Commerce Webservices

Address

createAddress

Creates a new address.

Creates a new address.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Address object.
        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 | Address object.
        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 = ; // Address object.
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}} Address object.
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 | Address object.
            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 | Address object.
$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 | Address object.
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 | Address object.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getAddresses

Get customer's addresses

Returns customer's addresses.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeAddress

Delete customer's address.

Removes customer's address.


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

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Address object.
        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 | Address object.
        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 = ; // Address object.
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}} Address object.
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 | Address object.
            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 | Address object.
$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 | Address object.
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 | Address object.
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Address object
        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 | Address object
        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 = ; // Address object
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}} Address object
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 | Address object
            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 | Address object
$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 | Address object
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 | Address object
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


validateAddress

Verifies address.

Verifies address.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Address object.
        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 | Address object.
        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 = ; // Address object.
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}} Address object.
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 | Address object.
            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 | Address object.
$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 | Address object.
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 | Address object.
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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}/orgUsers/{userId}/carts/{cartId}/entries/

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        OrderEntryList body = ; // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
        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(baseSiteId, cartId, userId, body, 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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        OrderEntryList body = ; // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
        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(baseSiteId, cartId, userId, body, 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"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
OrderEntryList *body = ; // List of entries containing the amount to add and the product code or the entryNumber. (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];

// Adds more quantity to the cart of specific products
[apiInstance doAddOrgCartEntriesWith:baseSiteId
    cartId:cartId
    userId:userId
    body:body
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'body':  // {{OrderEntryList}} List of entries containing the amount to add and the product code or the entryNumber.
  '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(baseSiteIdcartIduserId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var body = new OrderEntryList(); // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber. (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
            {
                // Adds more quantity to the cart of specific products
                CartModificationList result = apiInstance.doAddOrgCartEntries(baseSiteId, cartId, userId, body, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$body = ; // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
$fields = 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($baseSiteId, $cartId, $userId, $body, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $body = WWW::SwaggerClient::Object::OrderEntryList->new(); # OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
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(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, body => $body, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
body =  # OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber. (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: 
    # Adds more quantity to the cart of specific products
    api_response = api_instance.do_add_org_cart_entries(baseSiteId, cartId, userId, body=body, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCurrentOrgCart

Gets the current cart.

Gets the current cart.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 costCenterId = costCenterId_example; // String | The id of the cost center.
        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.replaceOrgCartCostCenter(baseSiteId, cartId, costCenterId, userId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 costCenterId = costCenterId_example; // String | The id of the cost center.
        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.replaceOrgCartCostCenter(baseSiteId, cartId, costCenterId, userId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *costCenterId = costCenterId_example; // The id of the cost center.
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];

// Sets the cost center for the checkout cart.
[apiInstance replaceOrgCartCostCenterWith:baseSiteId
    cartId:cartId
    costCenterId:costCenterId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var costCenterId = costCenterId_example; // {{String}} The id of the cost center.
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.replaceOrgCartCostCenter(baseSiteId, cartId, costCenterId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 costCenterId = costCenterId_example;  // String | The id of the cost center.
            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
            {
                // Sets the cost center for the checkout cart.
                Cart result = apiInstance.replaceOrgCartCostCenter(baseSiteId, cartId, costCenterId, userId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$costCenterId = costCenterId_example; // String | The id of the cost center.
$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->replaceOrgCartCostCenter($baseSiteId, $cartId, $costCenterId, $userId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $costCenterId = costCenterId_example; # String | The id of the cost center.
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->replaceOrgCartCostCenter(baseSiteId => $baseSiteId, cartId => $cartId, costCenterId => $costCenterId, userId => $userId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
costCenterId = costCenterId_example # String | The id of the cost center.
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: 
    # Sets the cost center for the checkout cart.
    api_response = api_instance.replace_org_cart_cost_center(baseSiteId, cartId, costCenterId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceOrgCartDeliveryAddress

Sets the delivery address for the checkout cart.

Sets the delivery address for the checkout cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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.replaceOrgCartDeliveryAddress(addressId, baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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.replaceOrgCartDeliveryAddress(addressId, baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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];

// Sets the delivery address for the checkout cart.
[apiInstance replaceOrgCartDeliveryAddressWith:addressId
    baseSiteId:baseSiteId
    cartId:cartId
    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 addressId = addressId_example; // {{String}} The id of the address.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.replaceOrgCartDeliveryAddress(addressId, baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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
            {
                // Sets the delivery address for the checkout cart.
                Cart result = apiInstance.replaceOrgCartDeliveryAddress(addressId, baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->replaceOrgCartDeliveryAddress($addressId, $baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->replaceOrgCartDeliveryAddress(addressId => $addressId, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Sets the delivery address for the checkout cart.
    api_response = api_instance.replace_org_cart_delivery_address(addressId, baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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}/orgUsers/{userId}/carts/{cartId}/entries/

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        OrderEntryList body = ; // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
        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(baseSiteId, cartId, userId, body, 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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        OrderEntryList body = ; // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
        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(baseSiteId, cartId, userId, body, 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"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
OrderEntryList *body = ; // List of entries containing the amount to add and the product code or the entryNumber. (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];

// Updates the quantity for specific products in the cart
[apiInstance replaceOrgCartEntriesWith:baseSiteId
    cartId:cartId
    userId:userId
    body:body
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'body':  // {{OrderEntryList}} List of entries containing the amount to add and the product code or the entryNumber.
  '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(baseSiteIdcartIduserId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var body = new OrderEntryList(); // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber. (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
            {
                // Updates the quantity for specific products in the cart
                CartModificationList result = apiInstance.replaceOrgCartEntries(baseSiteId, cartId, userId, body, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$body = ; // OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
$fields = 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($baseSiteId, $cartId, $userId, $body, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $body = WWW::SwaggerClient::Object::OrderEntryList->new(); # OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber.
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(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, body => $body, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
body =  # OrderEntryList | List of entries containing the amount to add and the product code or the entryNumber. (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: 
    # Updates the quantity for specific products in the cart
    api_response = api_instance.replace_org_cart_entries(baseSiteId, cartId, userId, body=body, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/paymenttype?fields=&paymentType=&purchaseOrderNumber="
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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String paymentType = paymentType_example; // String | Payment type choice (between card and account).
        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
        String purchaseOrderNumber = purchaseOrderNumber_example; // String | Purchase order number to assign to the checkout cart.
        try {
            Cart result = apiInstance.replaceOrgCartPaymentType(baseSiteId, cartId, paymentType, userId, fields, purchaseOrderNumber);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 paymentType = paymentType_example; // String | Payment type choice (between card and account).
        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
        String purchaseOrderNumber = purchaseOrderNumber_example; // String | Purchase order number to assign to the checkout cart.
        try {
            Cart result = apiInstance.replaceOrgCartPaymentType(baseSiteId, cartId, paymentType, userId, fields, purchaseOrderNumber);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *paymentType = paymentType_example; // Payment type choice (between card and account).
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)
String *purchaseOrderNumber = purchaseOrderNumber_example; // Purchase order number to assign to the checkout cart. (optional)

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

// Set the payment type for the checkout cart
[apiInstance replaceOrgCartPaymentTypeWith:baseSiteId
    cartId:cartId
    paymentType:paymentType
    userId:userId
    fields:fields
    purchaseOrderNumber:purchaseOrderNumber
              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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var paymentType = paymentType_example; // {{String}} Payment type choice (between card and account).
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
  'purchaseOrderNumber': purchaseOrderNumber_example // {{String}} Purchase order number to assign to the checkout cart.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceOrgCartPaymentType(baseSiteId, cartId, paymentType, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 paymentType = paymentType_example;  // String | Payment type choice (between card and account).
            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 purchaseOrderNumber = purchaseOrderNumber_example;  // String | Purchase order number to assign to the checkout cart. (optional) 

            try
            {
                // Set the payment type for the checkout cart
                Cart result = apiInstance.replaceOrgCartPaymentType(baseSiteId, cartId, paymentType, userId, fields, purchaseOrderNumber);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$paymentType = paymentType_example; // String | Payment type choice (between card and account).
$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
$purchaseOrderNumber = purchaseOrderNumber_example; // String | Purchase order number to assign to the checkout cart.

try {
    $result = $api_instance->replaceOrgCartPaymentType($baseSiteId, $cartId, $paymentType, $userId, $fields, $purchaseOrderNumber);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $paymentType = paymentType_example; # String | Payment type choice (between card and account).
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 $purchaseOrderNumber = purchaseOrderNumber_example; # String | Purchase order number to assign to the checkout cart.

eval { 
    my $result = $api_instance->replaceOrgCartPaymentType(baseSiteId => $baseSiteId, cartId => $cartId, paymentType => $paymentType, userId => $userId, fields => $fields, purchaseOrderNumber => $purchaseOrderNumber);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
paymentType = paymentType_example # String | Payment type choice (between card and account).
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)
purchaseOrderNumber = purchaseOrderNumber_example # String | Purchase order number to assign to the checkout cart. (optional)

try: 
    # Set the payment type for the checkout cart
    api_response = api_instance.replace_org_cart_payment_type(baseSiteId, cartId, paymentType, userId, fields=fields, purchaseOrderNumber=purchaseOrderNumber)
    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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
paymentType*
String
Payment type choice (between card and account).
Required
purchaseOrderNumber
String
Purchase order number to assign to the checkout cart.

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/categories/{categoryId}/products?currentPage=&fields=&pageSize=&query=&sort="
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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String categoryId = categoryId_example; // String | The category ID
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String query = query_example; // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
        String sort = sort_example; // String | Sorting method applied to the display search results.
        try {
            ProductSearchPage result = apiInstance.getProductsByCategory(baseSiteId, categoryId, currentPage, fields, pageSize, query, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String categoryId = categoryId_example; // String | The category ID
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String query = query_example; // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
        String sort = sort_example; // String | Sorting method applied to the display search results.
        try {
            ProductSearchPage result = apiInstance.getProductsByCategory(baseSiteId, categoryId, currentPage, fields, pageSize, query, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *categoryId = categoryId_example; // The category ID
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *query = query_example; // Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2 (optional)
String *sort = sort_example; // Sorting method applied to the display search results. (optional)

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

// Gets a list of products under a specific category
[apiInstance getProductsByCategoryWith:baseSiteId
    categoryId:categoryId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    query:query
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var categoryId = categoryId_example; // {{String}} The category ID
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'query': query_example, // {{String}} Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
  'sort': sort_example // {{String}} Sorting method applied to the display search results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductsByCategory(baseSiteId, categoryId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var categoryId = categoryId_example;  // String | The category ID
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var query = query_example;  // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2 (optional) 
            var sort = sort_example;  // String | Sorting method applied to the display search results. (optional) 

            try
            {
                // Gets a list of products under a specific category
                ProductSearchPage result = apiInstance.getProductsByCategory(baseSiteId, categoryId, currentPage, fields, pageSize, query, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$categoryId = categoryId_example; // String | The category ID
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$query = query_example; // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
$sort = sort_example; // String | Sorting method applied to the display search results.

try {
    $result = $api_instance->getProductsByCategory($baseSiteId, $categoryId, $currentPage, $fields, $pageSize, $query, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $categoryId = categoryId_example; # String | The category ID
my $currentPage = 56; # Integer | The current result page requested.
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 $pageSize = 56; # Integer | The number of results returned per page.
my $query = query_example; # String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
my $sort = sort_example; # String | Sorting method applied to the display search results.

eval { 
    my $result = $api_instance->getProductsByCategory(baseSiteId => $baseSiteId, categoryId => $categoryId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, query => $query, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
categoryId = categoryId_example # String | The category ID
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
query = query_example # String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2 (optional)
sort = sort_example # String | Sorting method applied to the display search results. (optional)

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

Parameters

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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 | Cost center object.
        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 | Cost center object.
        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 = ; // Cost center object.
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}} Cost center object.
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 | Cost center object.
            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 | Cost center object.
$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 | Cost center object.
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 | Cost center object.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | The budget which will be added to a specific cost center.
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center to which the budget will be added.
        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(baseSiteId, budgetCode, costCenterCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | The budget which will be added to a specific cost center.
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center to which the budget will be added.
        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(baseSiteId, budgetCode, costCenterCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *budgetCode = budgetCode_example; // The budget which will be added to a specific cost center.
String *costCenterCode = costCenterCode_example; // Identifier of the cost center to which the budget will be added.
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:baseSiteId
    budgetCode:budgetCode
    costCenterCode:costCenterCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var budgetCode = budgetCode_example; // {{String}} The budget which will be added to a specific cost center.
var costCenterCode = costCenterCode_example; // {{String}} Identifier of the cost center to which the budget will be added.
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(baseSiteId, budgetCode, costCenterCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var budgetCode = budgetCode_example;  // String | The budget which will be added to a specific cost center.
            var costCenterCode = costCenterCode_example;  // String | Identifier of the cost center to which the budget will be added.
            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(baseSiteId, budgetCode, costCenterCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$budgetCode = budgetCode_example; // String | The budget which will be added to a specific cost center.
$costCenterCode = costCenterCode_example; // String | Identifier of the cost center to which the budget will be added.
$fields = 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($baseSiteId, $budgetCode, $costCenterCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $budgetCode = budgetCode_example; # String | The budget which will be added to a specific cost center.
my $costCenterCode = costCenterCode_example; # String | Identifier of the cost center to which the budget will be added.
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(baseSiteId => $baseSiteId, budgetCode => $budgetCode, costCenterCode => $costCenterCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
budgetCode = budgetCode_example # String | The budget which will be added to a specific cost center.
costCenterCode = costCenterCode_example # String | Identifier of the cost center to which the budget will be added.
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(baseSiteId, budgetCode, costCenterCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->doAddBudgetToCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
costCenterCode*
String
Identifier of the cost center to which the budget will be added.
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getActiveCostCenters

Get active cost centers.

Returns the list of all active cost centers.


/{baseSiteId}/costcenters

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/costcenters/{costCenterCode}/budgets?currentPage=&fields=&pageSize=&sort="
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 costCenterCode = costCenterCode_example; // String | Cost center identifier.
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            BudgetList result = apiInstance.getBudgetsForCostCenter(baseSiteId, costCenterCode, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            BudgetList result = apiInstance.getBudgetsForCostCenter(baseSiteId, costCenterCode, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *costCenterCode = costCenterCode_example; // Cost center identifier.
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
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)

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

// Get all budgets and select budgets which belong to a specific cost center.
[apiInstance getBudgetsForCostCenterWith:baseSiteId
    costCenterCode:costCenterCode
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var costCenterCode = costCenterCode_example; // {{String}} Cost center identifier.
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBudgetsForCostCenter(baseSiteId, costCenterCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var costCenterCode = costCenterCode_example;  // String | Cost center identifier.
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 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) 

            try
            {
                // Get all budgets and select budgets which belong to a specific cost center.
                BudgetList result = apiInstance.getBudgetsForCostCenter(baseSiteId, costCenterCode, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$costCenterCode = costCenterCode_example; // String | Cost center identifier.
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.

try {
    $result = $api_instance->getBudgetsForCostCenter($baseSiteId, $costCenterCode, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $costCenterCode = costCenterCode_example; # String | Cost center identifier.
my $currentPage = 56; # Integer | The current result page requested.
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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getBudgetsForCostCenter(baseSiteId => $baseSiteId, costCenterCode => $costCenterCode, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
costCenterCode = costCenterCode_example # String | Cost center identifier.
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
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)

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

Parameters

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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String costCenterCode = costCenterCode_example; // String | Cost center 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(baseSiteId, costCenterCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String costCenterCode = costCenterCode_example; // String | Cost center 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(baseSiteId, costCenterCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *costCenterCode = costCenterCode_example; // Cost center 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:baseSiteId
    costCenterCode:costCenterCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var costCenterCode = costCenterCode_example; // {{String}} Cost center 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(baseSiteId, costCenterCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var costCenterCode = costCenterCode_example;  // String | Cost center 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(baseSiteId, costCenterCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$costCenterCode = costCenterCode_example; // String | Cost center 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($baseSiteId, $costCenterCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $costCenterCode = costCenterCode_example; # String | Cost center 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(baseSiteId => $baseSiteId, costCenterCode => $costCenterCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
costCenterCode = costCenterCode_example # String | Cost center 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(baseSiteId, costCenterCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->getCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
costCenterCode*
String
Cost center 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCostCenters

Get cost centers.

Returns the list of all cost centers.


/{baseSiteId}/costcentersall

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/costcentersall?currentPage=&fields=&pageSize=&sort="
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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            B2BCostCenterList result = apiInstance.getCostCenters(baseSiteId, currentPage, fields, pageSize, sort);
            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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            B2BCostCenterList result = apiInstance.getCostCenters(baseSiteId, currentPage, fields, pageSize, sort);
            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)
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)
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)

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

// Get cost centers.
[apiInstance getCostCentersWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
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 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 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) 

            try
            {
                // Get cost centers.
                B2BCostCenterList result = apiInstance.getCostCenters(baseSiteId, currentPage, fields, pageSize, sort);
                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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.

try {
    $result = $api_instance->getCostCenters($baseSiteId, $currentPage, $fields, $pageSize, $sort);
    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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getCostCenters(baseSiteId => $baseSiteId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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)
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)
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)

try: 
    # Get cost centers.
    api_response = api_instance.get_cost_centers(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | The budget which will be removed from a specific cost center.
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center from which the budget will be removed.
        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(baseSiteId, budgetCode, costCenterCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | The budget which will be removed from a specific cost center.
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center from which the budget will be removed.
        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(baseSiteId, budgetCode, costCenterCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *budgetCode = budgetCode_example; // The budget which will be removed from a specific cost center.
String *costCenterCode = costCenterCode_example; // Identifier of the cost center from which the budget will be removed.
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:baseSiteId
    budgetCode:budgetCode
    costCenterCode:costCenterCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var budgetCode = budgetCode_example; // {{String}} The budget which will be removed from a specific cost center.
var costCenterCode = costCenterCode_example; // {{String}} Identifier of the cost center from which the budget will be removed.
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(baseSiteId, budgetCode, costCenterCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var budgetCode = budgetCode_example;  // String | The budget which will be removed from a specific cost center.
            var costCenterCode = costCenterCode_example;  // String | Identifier of the cost center from which the budget will be removed.
            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(baseSiteId, budgetCode, costCenterCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$budgetCode = budgetCode_example; // String | The budget which will be removed from a specific cost center.
$costCenterCode = costCenterCode_example; // String | Identifier of the cost center from which the budget will be removed.
$fields = 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($baseSiteId, $budgetCode, $costCenterCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $budgetCode = budgetCode_example; # String | The budget which will be removed from a specific cost center.
my $costCenterCode = costCenterCode_example; # String | Identifier of the cost center from which the budget will be removed.
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(baseSiteId => $baseSiteId, budgetCode => $budgetCode, costCenterCode => $costCenterCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
budgetCode = budgetCode_example # String | The budget which will be removed from a specific cost center.
costCenterCode = costCenterCode_example # String | Identifier of the cost center from which the budget will be removed.
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(baseSiteId, budgetCode, costCenterCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->removeBudgetFromCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
budgetCode*
String
The budget which will be removed from a specific cost center.
Required
costCenterCode*
String
Identifier of the cost center from which the budget will be removed.
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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 | Cost center object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String costCenterCode = costCenterCode_example; // String | Cost center 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, baseSiteId, costCenterCode, 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 | Cost center object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String costCenterCode = costCenterCode_example; // String | Cost center 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, baseSiteId, costCenterCode, 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 = ; // Cost center object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *costCenterCode = costCenterCode_example; // Cost center 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
    baseSiteId:baseSiteId
    costCenterCode:costCenterCode
    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}} Cost center object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var costCenterCode = costCenterCode_example; // {{String}} Cost center 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(bodybaseSiteIdcostCenterCode, 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 | Cost center object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var costCenterCode = costCenterCode_example;  // String | Cost center 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, baseSiteId, costCenterCode, 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 | Cost center object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$costCenterCode = costCenterCode_example; // String | Cost center 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, $baseSiteId, $costCenterCode, $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 | Cost center object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $costCenterCode = costCenterCode_example; # String | Cost center 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, baseSiteId => $baseSiteId, costCenterCode => $costCenterCode, 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 | Cost center object.
baseSiteId = baseSiteId_example # String | Base site identifier
costCenterCode = costCenterCode_example # String | Cost center 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, baseSiteId, costCenterCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->updateCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
costCenterCode*
String
Cost center 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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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}/orgUsers/{userId}/cartFromOrder

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{userId}/cartFromOrder?fields=&orderCode="
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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderCode = orderCode_example; // String | The order code
        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(baseSiteId, orderCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderCode = orderCode_example; // String | The order code
        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(baseSiteId, orderCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orderCode = orderCode_example; // The order code
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) (default to DEFAULT)

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

// Create a cart based on a previous order
[apiInstance createCartFromOrderWith:baseSiteId
    orderCode:orderCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderCode = orderCode_example; // {{String}} The order code
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(baseSiteId, orderCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderCode = orderCode_example;  // String | The order code
            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)  (default to DEFAULT)

            try
            {
                // Create a cart based on a previous order
                CartModificationList result = apiInstance.createCartFromOrder(baseSiteId, orderCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderCode = orderCode_example; // String | The order code
$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($baseSiteId, $orderCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderCode = orderCode_example; # String | The order code
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(baseSiteId => $baseSiteId, orderCode => $orderCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orderCode = orderCode_example # String | The order code
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) (default to DEFAULT)

try: 
    # Create a cart based on a previous order
    api_response = api_instance.create_cart_from_order(baseSiteId, orderCode, 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
fields
String
Response configuration. This is the list of fields that should be returned in the response body.
orderCode*
String
The order code
Required

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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}/orgUsers/{userId}/replenishmentOrders

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{userId}/replenishmentOrders?cartId=&fields=&termsChecked="
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 | Schedule replenishment form object.
        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 | Schedule replenishment form object.
        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 = ; // Schedule replenishment form object.
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}} Schedule replenishment form object.
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 | Schedule replenishment form object.
            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 | Schedule replenishment form object.
$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 | Schedule replenishment form object.
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 | Schedule replenishment form object.
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
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
termsChecked*
Boolean
Whether terms were accepted or not.
Required

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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}/orgUsers/{userId}/orders

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{userId}/orders?cartId=&fields=&termsChecked="
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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, cartId, termsChecked, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, cartId, termsChecked, 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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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:baseSiteId
    cartId:cartId
    termsChecked:termsChecked
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, cartId, termsChecked, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, cartId, termsChecked, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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.
$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($baseSiteId, $cartId, $termsChecked, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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(baseSiteId => $baseSiteId, cartId => $cartId, termsChecked => $termsChecked, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
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.
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(baseSiteId, cartId, termsChecked, 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
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
termsChecked*
Boolean
Whether terms were accepted or not.
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BProducts

getOrgProduct

Returns a product.

Returns a product, based on the specified product code.


/{baseSiteId}/orgProducts/{productCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgProducts/{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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | The product code
        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(baseSiteId, productCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | The product code
        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(baseSiteId, productCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *productCode = productCode_example; // The product 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)

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

// Returns a product.
[apiInstance getOrgProductWith:baseSiteId
    productCode:productCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} The product code
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(baseSiteId, productCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | The product 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
            {
                // Returns a product.
                Product result = apiInstance.getOrgProduct(baseSiteId, productCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | The product 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

try {
    $result = $api_instance->getOrgProduct($baseSiteId, $productCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | The product code
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(baseSiteId => $baseSiteId, productCode => $productCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | The product 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: 
    # Returns a product.
    api_response = api_instance.get_org_product(baseSiteId, productCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BProductsApi->getOrgProduct: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
The product code
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BUsers

getOrgUser

Get a B2B user profile

Returns a B2B user profile.


/{baseSiteId}/orgUsers/{userId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orgUsers/{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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String baseStoreUid = baseStoreUid_example; // String | Base store name
        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(baseSiteId, baseStoreUid, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String baseStoreUid = baseStoreUid_example; // String | Base store name
        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(baseSiteId, baseStoreUid, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *baseStoreUid = baseStoreUid_example; // Base store 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)

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

// Get a base store.
[apiInstance getBaseStoreWith:baseSiteId
    baseStoreUid:baseStoreUid
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var baseStoreUid = baseStoreUid_example; // {{String}} Base store name
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(baseSiteId, baseStoreUid, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var baseStoreUid = baseStoreUid_example;  // String | Base store 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
            {
                // Get a base store.
                BaseStore result = apiInstance.getBaseStore(baseSiteId, baseStoreUid, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$baseStoreUid = baseStoreUid_example; // String | Base store 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

try {
    $result = $api_instance->getBaseStore($baseSiteId, $baseStoreUid, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $baseStoreUid = baseStoreUid_example; # String | Base store name
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(baseSiteId => $baseSiteId, baseStoreUid => $baseStoreUid, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
baseStoreUid = baseStoreUid_example # String | Base store 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: 
    # Get a base store.
    api_response = api_instance.get_base_store(baseSiteId, baseStoreUid, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BaseStoresApi->getBaseStore: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
baseStoreUid*
String
Base store name
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 | 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 | 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 = ; // Budget
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}} 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 | 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 | 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 | 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 | 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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        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(baseSiteId, budgetCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        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(baseSiteId, budgetCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *budgetCode = budgetCode_example; // Budget GUID (Globally Unique Identifier) or budget CODE.
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:baseSiteId
    budgetCode:budgetCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var budgetCode = budgetCode_example; // {{String}} Budget GUID (Globally Unique Identifier) or budget CODE.
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(baseSiteId, budgetCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var budgetCode = budgetCode_example;  // String | Budget GUID (Globally Unique Identifier) or budget CODE.
            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(baseSiteId, budgetCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
$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($baseSiteId, $budgetCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $budgetCode = budgetCode_example; # String | Budget GUID (Globally Unique Identifier) or budget CODE.
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(baseSiteId => $baseSiteId, budgetCode => $budgetCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
budgetCode = budgetCode_example # String | Budget GUID (Globally Unique Identifier) or budget CODE.
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(baseSiteId, budgetCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BudgetManagementApi->getBudget: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
budgetCode*
String
Budget GUID (Globally Unique Identifier) or budget CODE.
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/budgets?currentPage=&fields=&pageSize=&sort="
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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            BudgetList result = apiInstance.getBudgets(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            BudgetList result = apiInstance.getBudgets(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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)
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)
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)

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

// Gets the list of budgets for a specified base store
[apiInstance getBudgetsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
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 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 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)

            try
            {
                // Gets the list of budgets for a specified base store
                BudgetList result = apiInstance.getBudgets(baseSiteId, userId, currentPage, fields, pageSize, sort);
                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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getBudgets($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getBudgets(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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)
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)
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)

try: 
    # Gets the list of budgets for a specified base store
    api_response = api_instance.get_budgets(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 | Budget.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        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, baseSiteId, budgetCode, 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 | Budget.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        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, baseSiteId, budgetCode, 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 = ; // Budget.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *budgetCode = budgetCode_example; // Budget GUID (Globally Unique Identifier) or budget CODE.
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
    baseSiteId:baseSiteId
    budgetCode:budgetCode
    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}} Budget.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var budgetCode = budgetCode_example; // {{String}} Budget GUID (Globally Unique Identifier) or budget CODE.
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(bodybaseSiteIdbudgetCodeuserId, 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 | Budget.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var budgetCode = budgetCode_example;  // String | Budget GUID (Globally Unique Identifier) or budget CODE.
            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, baseSiteId, budgetCode, 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 | Budget.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
$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, $baseSiteId, $budgetCode, $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 | Budget.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $budgetCode = budgetCode_example; # String | Budget GUID (Globally Unique Identifier) or budget CODE.
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, baseSiteId => $baseSiteId, budgetCode => $budgetCode, 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 | Budget.
baseSiteId = baseSiteId_example # String | Base site identifier
budgetCode = budgetCode_example # String | Budget GUID (Globally Unique Identifier) or budget CODE.
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, baseSiteId, budgetCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BudgetManagementApi->updateBudget: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
budgetCode*
String
Budget GUID (Globally Unique Identifier) or budget CODE.
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


Bundles

createBundle

Start a bundle.

Starts a bundle once the productCode, its quantity, and a bundle templateId is provided. A successful result returns a CartModification response.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/bundles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BundlesApi;

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

public class BundlesApiExample {

    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");

        BundlesApi apiInstance = new BundlesApi();
        BundleStarter body = ; // BundleStarter | Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CartModification result = apiInstance.createBundle(body, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BundlesApi#createBundle");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BundlesApi;

public class BundlesApiExample {

    public static void main(String[] args) {
        BundlesApi apiInstance = new BundlesApi();
        BundleStarter body = ; // BundleStarter | Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CartModification result = apiInstance.createBundle(body, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BundlesApi#createBundle");
            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"];
BundleStarter *body = ; // Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Start a bundle.
[apiInstance createBundleWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
              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.BundlesApi()
var body = ; // {{BundleStarter}} Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.createBundle(bodybaseSiteIdcartIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createBundleExample
    {
        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 BundlesApi();
            var body = new BundleStarter(); // BundleStarter | Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Start a bundle.
                CartModification result = apiInstance.createBundle(body, baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BundlesApi.createBundle: " + 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\ApiBundlesApi();
$body = ; // BundleStarter | Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::BundlesApi->new();
my $body = WWW::SwaggerClient::Object::BundleStarter->new(); # BundleStarter | Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->createBundle(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BundlesApi->createBundle: $@\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.BundlesApi()
body =  # BundleStarter | Mandatory data required to start a bundle. This includes the templateId of the bundle, the productCode, and the quantity of the product itself.
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Start a bundle.
    api_response = api_instance.create_bundle(body, baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BundlesApi->createBundle: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getAvailableProducts

Retrieve products and additional data available for a given entry group and search query.

Returns products and additional data based on the entry group and search query provided. Examples include available facets, available sorting, and pagination options. It can also include spelling suggestions. To disable spelling suggestions "enableSpellCheck" must be set to "FALSE" on the SearchQuery. Default is set to "TRUE". The configuration of indexed properties is required for spellchecking. Any of the products returned can be added to the specific entry group (bundle).


/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}/allowedProductsSearch

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}/allowedProductsSearch?currentPage=&fields=&pageSize=&query=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BundlesApi;

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

public class BundlesApiExample {

    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");

        BundlesApi apiInstance = new BundlesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of products returned per page.
        String query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
        String sort = sort_example; // String | The sorting method applied to the results that are returned.
        try {
            ProductSearchPage result = apiInstance.getAvailableProducts(baseSiteId, cartId, entryGroupNumber, userId, currentPage, fields, pageSize, query, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BundlesApi#getAvailableProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BundlesApi;

public class BundlesApiExample {

    public static void main(String[] args) {
        BundlesApi apiInstance = new BundlesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of products returned per page.
        String query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
        String sort = sort_example; // String | The sorting method applied to the results that are returned.
        try {
            ProductSearchPage result = apiInstance.getAvailableProducts(baseSiteId, cartId, entryGroupNumber, userId, currentPage, fields, pageSize, query, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BundlesApi#getAvailableProducts");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
Integer *pageSize = 56; // The number of products returned per page. (optional) (default to 20)
String *query = query_example; // Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional)
String *sort = sort_example; // The sorting method applied to the results that are returned. (optional)

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

// Retrieve products and additional data available for a given entry group and search query.
[apiInstance getAvailableProductsWith:baseSiteId
    cartId:cartId
    entryGroupNumber:entryGroupNumber
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    query:query
    sort:sort
              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.BundlesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of products returned per page.
  'query': query_example, // {{String}} Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
  'sort': sort_example // {{String}} The sorting method applied to the results that are returned.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableProducts(baseSiteId, cartId, entryGroupNumber, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAvailableProductsExample
    {
        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 BundlesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 pageSize = 56;  // Integer | The number of products returned per page. (optional)  (default to 20)
            var query = query_example;  // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional) 
            var sort = sort_example;  // String | The sorting method applied to the results that are returned. (optional) 

            try
            {
                // Retrieve products and additional data available for a given entry group and search query.
                ProductSearchPage result = apiInstance.getAvailableProducts(baseSiteId, cartId, entryGroupNumber, userId, currentPage, fields, pageSize, query, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BundlesApi.getAvailableProducts: " + 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\ApiBundlesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of products returned per page.
$query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
$sort = sort_example; // String | The sorting method applied to the results that are returned.

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

# 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::BundlesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $currentPage = 56; # Integer | The current result page requested.
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 $pageSize = 56; # Integer | The number of products returned per page.
my $query = query_example; # String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
my $sort = sort_example; # String | The sorting method applied to the results that are returned.

eval { 
    my $result = $api_instance->getAvailableProducts(baseSiteId => $baseSiteId, cartId => $cartId, entryGroupNumber => $entryGroupNumber, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, query => $query, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BundlesApi->getAvailableProducts: $@\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.BundlesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
pageSize = 56 # Integer | The number of products returned per page. (optional) (default to 20)
query = query_example # String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional)
sort = sort_example # String | The sorting method applied to the results that are returned. (optional)

try: 
    # Retrieve products and additional data available for a given entry group and search query.
    api_response = api_instance.get_available_products(baseSiteId, cartId, entryGroupNumber, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, query=query, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BundlesApi->getAvailableProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of products returned per page.
query
String
Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
sort
String
The sorting method applied to the results that are returned.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.createCartDeliveryAddress(body, baseSiteId, cartId, userId, 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 | Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.createCartDeliveryAddress(body, baseSiteId, cartId, userId, 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 = ; // Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Creates a delivery address for the cart.
[apiInstance createCartDeliveryAddressWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    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.CartAddressesApi()
var body = ; // {{Address}} Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.createCartDeliveryAddress(bodybaseSiteIdcartIduserId, 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 | Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 delivery address for the cart.
                Address result = apiInstance.createCartDeliveryAddress(body, baseSiteId, cartId, userId, 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 | Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->createCartDeliveryAddress($body, $baseSiteId, $cartId, $userId, $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 | Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->createCartDeliveryAddress(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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 | Request body parameter that contains details such as the customer's first name (firstName), the customer's last name (lastName), the customer's title (titleCode), the customer's phone (phone), the country (country.isocode), the first part of the address (line1), the second part of the address (line2), the town (town), the postal code (postalCode), and the region (region.isocode).

The DTO is in XML or .json format.
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 delivery address for the cart.
    api_response = api_instance.create_cart_delivery_address(body, baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartDeliveryAddress

Deletes the delivery address from the cart.

Deletes the delivery address from the cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartDeliveryAddress(baseSiteId, cartId, userId);
        } 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartDeliveryAddress(baseSiteId, cartId, userId);
        } 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Deletes the delivery address from the cart.
[apiInstance removeCartDeliveryAddressWith:baseSiteId
    cartId:cartId
    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.CartAddressesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.removeCartDeliveryAddress(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes the delivery address from the cart.
                apiInstance.removeCartDeliveryAddress(baseSiteId, cartId, userId);
            }
            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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCartDeliveryAddress($baseSiteId, $cartId, $userId);
} 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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCartDeliveryAddress(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes the delivery address from the cart.
    api_instance.remove_cart_delivery_address(baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling CartAddressesApi->removeCartDeliveryAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


replaceCartDeliveryAddress

Sets a delivery address for the cart.

Sets a delivery address for the cart. The address country must be placed among the delivery countries of the current base store.


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

Usage and SDK Samples

curl -X PUT\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery?addressId="
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 addressId = addressId_example; // String | Address identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#replaceCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartAddressesApi;

public class CartAddressesApiExample {

    public static void main(String[] args) {
        CartAddressesApi apiInstance = new CartAddressesApi();
        String addressId = addressId_example; // String | Address identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#replaceCartDeliveryAddress");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Sets a delivery address for the cart.
[apiInstance replaceCartDeliveryAddressWith:addressId
    baseSiteId:baseSiteId
    cartId:cartId
    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.CartAddressesApi()
var addressId = addressId_example; // {{String}} Address identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartDeliveryAddressExample
    {
        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 addressId = addressId_example;  // String | Address identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Sets a delivery address for the cart.
                apiInstance.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartAddressesApi.replaceCartDeliveryAddress: " + 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();
$addressId = addressId_example; // String | Address identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceCartDeliveryAddress($addressId, $baseSiteId, $cartId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartAddressesApi->replaceCartDeliveryAddress: ', $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 $addressId = addressId_example; # String | Address identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceCartDeliveryAddress(addressId => $addressId, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartAddressesApi->replaceCartDeliveryAddress: $@\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()
addressId = addressId_example # String | Address identifier
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Sets a delivery address for the cart.
    api_instance.replace_cart_delivery_address(addressId, baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling CartAddressesApi->replaceCartDeliveryAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
addressId*
String
Address identifier
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get the delivery mode selected for the cart.
[apiInstance getCartDeliveryModeWith:baseSiteId
    cartId:cartId
    userId:userId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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.getCartDeliveryMode(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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 delivery mode selected for the cart.
                DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getCartDeliveryMode($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->getCartDeliveryMode(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 delivery mode selected for the cart.
    api_response = api_instance.get_cart_delivery_mode(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get all delivery modes for the current store and delivery address.
[apiInstance getCartDeliveryModesWith:baseSiteId
    cartId:cartId
    userId:userId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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.getCartDeliveryModes(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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 all delivery modes for the current store and delivery address.
                DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getCartDeliveryModes($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->getCartDeliveryModes(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 all delivery modes for the current store and delivery address.
    api_response = api_instance.get_cart_delivery_modes(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartDeliveryMode

Deletes the delivery mode from the cart.

Deletes the delivery mode from the cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartDeliveryMode(baseSiteId, cartId, userId);
        } 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartDeliveryMode(baseSiteId, cartId, userId);
        } 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Deletes the delivery mode from the cart.
[apiInstance removeCartDeliveryModeWith:baseSiteId
    cartId:cartId
    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.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.removeCartDeliveryMode(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes the delivery mode from the cart.
                apiInstance.removeCartDeliveryMode(baseSiteId, cartId, userId);
            }
            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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCartDeliveryMode($baseSiteId, $cartId, $userId);
} 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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCartDeliveryMode(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes the delivery mode from the cart.
    api_instance.remove_cart_delivery_mode(baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->removeCartDeliveryMode: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *deliveryModeId = deliveryModeId_example; // Delivery mode identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Sets the delivery mode for a cart.
[apiInstance replaceCartDeliveryModeWith:baseSiteId
    cartId:cartId
    deliveryModeId:deliveryModeId
    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.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 deliveryModeId = deliveryModeId_example; // {{String}} Delivery mode identifier (code)
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.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 deliveryModeId = deliveryModeId_example;  // String | Delivery mode identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Sets the delivery mode for a cart.
                apiInstance.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceCartDeliveryMode($baseSiteId, $cartId, $deliveryModeId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $deliveryModeId = deliveryModeId_example; # String | Delivery mode identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceCartDeliveryMode(baseSiteId => $baseSiteId, cartId => $cartId, deliveryModeId => $deliveryModeId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
deliveryModeId = deliveryModeId_example # String | Delivery mode identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Sets the delivery mode for a cart.
    api_instance.replace_cart_delivery_mode(baseSiteId, cartId, deliveryModeId, userId)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->replaceCartDeliveryMode: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
deliveryModeId*
String
Delivery mode identifier (code)
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartEntries

createCartEntry

Adds a product to the cart.

Adds a product to the cart.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, 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 | Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, 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 = ; // Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Adds a product to the cart.
[apiInstance createCartEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
    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}} Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.createCartEntry(bodybaseSiteIdcartIduserId, 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 | Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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
            {
                // Adds a product to the cart.
                CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, 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 | Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->createCartEntry($body, $baseSiteId, $cartId, $userId, $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 | Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->createCartEntry(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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 | Request body parameter that contains details such as the product code (product.code), the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name).

The DTO is in XML or .json format.
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Adds a product to the cart.
    api_response = api_instance.create_cart_entry(body, baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartEntries

Get cart entries.

Returns cart entries.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            OrderEntryList result = apiInstance.getCartEntries(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            OrderEntryList result = apiInstance.getCartEntries(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get cart entries.
[apiInstance getCartEntriesWith:baseSiteId
    cartId:cartId
    userId:userId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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.getCartEntries(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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 cart entries.
                OrderEntryList result = apiInstance.getCartEntries(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getCartEntries($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->getCartEntries(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 cart entries.
    api_response = api_instance.get_cart_entries(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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(baseSiteId, cartId, entryNumber, userId, 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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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(baseSiteId, cartId, entryNumber, userId, 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"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 *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:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 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(baseSiteId, cartId, entryNumber, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 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(baseSiteId, cartId, entryNumber, userId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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
$fields = 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($baseSiteId, $cartId, $entryNumber, $userId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $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(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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(baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->getCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartEntry

Deletes cart entry.

Deletes cart entry.


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

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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
        try {
            apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
        } 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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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
        try {
            apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
        } 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"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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

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

// Deletes cart entry.
[apiInstance removeCartEntryWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    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.CartEntriesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartEntry(baseSiteId, cartId, entryNumber, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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

            try
            {
                // Deletes cart entry.
                apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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

try {
    $api_instance->removeCartEntry($baseSiteId, $cartId, $entryNumber, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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

eval { 
    $api_instance->removeCartEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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

try: 
    # Deletes cart entry.
    api_instance.remove_cart_entry(baseSiteId, cartId, entryNumber, userId)
except ApiException as e:
    print("Exception when calling CartEntriesApi->removeCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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, cartId, entryNumber, userId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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, cartId, entryNumber, userId, 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 = ; // Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 *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
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    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}} Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 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(bodybaseSiteIdcartIdentryNumberuserId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 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, cartId, entryNumber, userId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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
$fields = 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, $cartId, $entryNumber, $userId, $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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $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, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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, cartId, entryNumber, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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, cartId, entryNumber, userId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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, cartId, entryNumber, userId, 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 = ; // Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 *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
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    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}} Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 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(bodybaseSiteIdcartIdentryNumberuserId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 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, cartId, entryNumber, userId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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
$fields = 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, $cartId, $entryNumber, $userId, $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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $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, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, 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 | Request body parameter that contains details such as the quantity of product (quantity), and the pickup store name (deliveryPointOfService.name)

The DTO is in XML or .json format.
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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, cartId, entryNumber, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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, cartId, entryGroupNumber, userId, 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 | Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 fields = 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, cartId, entryGroupNumber, userId, 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 = ; // Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 *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
    cartId:cartId
    entryGroupNumber:entryGroupNumber
    userId:userId
    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}} Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 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(bodybaseSiteIdcartIdentryGroupNumberuserId, 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 | Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 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, cartId, entryGroupNumber, userId, 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 | Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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
$fields = 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, $cartId, $entryGroupNumber, $userId, $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 | Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $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, cartId => $cartId, entryGroupNumber => $entryGroupNumber, userId => $userId, 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 | Request body parameter that contains details such as the product code (product.code) and the quantity of product (quantity).
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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, cartId, entryGroupNumber, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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
        try {
            apiInstance.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId);
        } 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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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
        try {
            apiInstance.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId);
        } 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"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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

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

// Delete an entry group.
[apiInstance removeCartEntryGroupWith:baseSiteId
    cartId:cartId
    entryGroupNumber:entryGroupNumber
    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.CartEntryGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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

            try
            {
                // Delete an entry group.
                apiInstance.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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

try {
    $api_instance->removeCartEntryGroup($baseSiteId, $cartId, $entryGroupNumber, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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

eval { 
    $api_instance->removeCartEntryGroup(baseSiteId => $baseSiteId, cartId => $cartId, entryGroupNumber => $entryGroupNumber, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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

try: 
    # Delete an entry group.
    api_instance.remove_cart_entry_group(baseSiteId, cartId, entryGroupNumber, userId)
except ApiException as e:
    print("Exception when calling CartEntryGroupsApi->removeCartEntryGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.createCartPaymentDetails(body, baseSiteId, cartId, userId, 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 | Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.createCartPaymentDetails(body, baseSiteId, cartId, userId, 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 = ; // Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Defines and assigns details of a new credit card payment to the cart.
[apiInstance createCartPaymentDetailsWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    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.CartPaymentsApi()
var body = ; // {{PaymentDetails}} Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.createCartPaymentDetails(bodybaseSiteIdcartIduserId, 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 | Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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
            {
                // Defines and assigns details of a new credit card payment to the cart.
                PaymentDetails result = apiInstance.createCartPaymentDetails(body, baseSiteId, cartId, userId, 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 | Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->createCartPaymentDetails($body, $baseSiteId, $cartId, $userId, $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 | Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->createCartPaymentDetails(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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 | Request body parameter that contains details such as the name on the card (accountHolderName), the card number (cardNumber), the card type (cardType.code), the month of the expiry date (expiryMonth), the year of the expiry date (expiryYear), whether the payment details should be saved (saved), whether the payment details should be set as default (defaultPaymentInfo), and the billing address (billingAddress.firstName, billingAddress.lastName, billingAddress.titleCode, billingAddress.country.isocode, billingAddress.line1, billingAddress.line2, billingAddress.town, billingAddress.postalCode, billingAddress.region.isocode)

The DTO is in XML or .json format.
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Defines and assigns details of a new credit card payment to the cart.
    api_response = api_instance.create_cart_payment_details(body, baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartPaymentDetails

Sets credit card payment details for the cart.

Sets credit card payment details for the cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartPaymentDetails(baseSiteId, cartId, paymentDetailsId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartPaymentDetails(baseSiteId, cartId, paymentDetailsId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *paymentDetailsId = paymentDetailsId_example; // Payment details identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Sets credit card payment details for the cart.
[apiInstance replaceCartPaymentDetailsWith:baseSiteId
    cartId:cartId
    paymentDetailsId:paymentDetailsId
    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.CartPaymentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details 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.replaceCartPaymentDetails(baseSiteId, cartId, paymentDetailsId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Sets credit card payment details for the cart.
                apiInstance.replaceCartPaymentDetails(baseSiteId, cartId, paymentDetailsId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceCartPaymentDetails($baseSiteId, $cartId, $paymentDetailsId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $paymentDetailsId = paymentDetailsId_example; # String | Payment details 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->replaceCartPaymentDetails(baseSiteId => $baseSiteId, cartId => $cartId, paymentDetailsId => $paymentDetailsId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Sets credit card payment details for the cart.
    api_instance.replace_cart_payment_details(baseSiteId, cartId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling CartPaymentsApi->replaceCartPaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
paymentDetailsId*
String
Payment details identifier.
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *promotionId = promotionId_example; // Promotion identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Enables promotions based on the promotionsId of the cart.
[apiInstance doApplyCartPromotionWith:baseSiteId
    cartId:cartId
    promotionId:promotionId
    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.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 promotionId = promotionId_example; // {{String}} Promotion identifier (code)
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.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 promotionId = promotionId_example;  // String | Promotion identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Enables promotions based on the promotionsId of the cart.
                apiInstance.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$promotionId = promotionId_example; // String | Promotion identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doApplyCartPromotion($baseSiteId, $cartId, $promotionId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $promotionId = promotionId_example; # String | Promotion identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doApplyCartPromotion(baseSiteId => $baseSiteId, cartId => $cartId, promotionId => $promotionId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
promotionId = promotionId_example # String | Promotion identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Enables promotions based on the promotionsId of the cart.
    api_instance.do_apply_cart_promotion(baseSiteId, cartId, promotionId, userId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->doApplyCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
promotionId*
String
Promotion identifier (code)
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doApplyCartVoucher

Applies a voucher based on the voucherId defined for the cart.

Applies a voucher based on the voucherId defined for the cart.


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

Usage and SDK Samples

curl -X POST\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *voucherId = voucherId_example; // Voucher identifier (code)

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

// Applies a voucher based on the voucherId defined for the cart.
[apiInstance doApplyCartVoucherWith:baseSiteId
    cartId:cartId
    userId:userId
    voucherId:voucherId
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var voucherId = voucherId_example; // {{String}} Voucher identifier (code)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var voucherId = voucherId_example;  // String | Voucher identifier (code)

            try
            {
                // Applies a voucher based on the voucherId defined for the cart.
                apiInstance.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$voucherId = voucherId_example; // String | Voucher identifier (code)

try {
    $api_instance->doApplyCartVoucher($baseSiteId, $cartId, $userId, $voucherId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $voucherId = voucherId_example; # String | Voucher identifier (code)

eval { 
    $api_instance->doApplyCartVoucher(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, voucherId => $voucherId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
voucherId = voucherId_example # String | Voucher identifier (code)

try: 
    # Applies a voucher based on the voucherId defined for the cart.
    api_instance.do_apply_cart_voucher(baseSiteId, cartId, userId, voucherId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->doApplyCartVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
voucherId*
String
Voucher identifier (code)
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 promotionId = promotionId_example; // String | Promotion identifier (code)
        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 {
            PromotionResultList result = apiInstance.getCartPromotion(baseSiteId, cartId, promotionId, userId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 promotionId = promotionId_example; // String | Promotion identifier (code)
        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 {
            PromotionResultList result = apiInstance.getCartPromotion(baseSiteId, cartId, promotionId, userId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *promotionId = promotionId_example; // Promotion identifier (code)
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)

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

// Get information about promotion applied on cart.
[apiInstance getCartPromotionWith:baseSiteId
    cartId:cartId
    promotionId:promotionId
    userId:userId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
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.getCartPromotion(baseSiteId, cartId, promotionId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 promotionId = promotionId_example;  // String | Promotion identifier (code)
            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 promotion applied on cart.
                PromotionResultList result = apiInstance.getCartPromotion(baseSiteId, cartId, promotionId, userId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$promotionId = promotionId_example; // String | Promotion identifier (code)
$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->getCartPromotion($baseSiteId, $cartId, $promotionId, $userId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $promotionId = promotionId_example; # String | Promotion identifier (code)
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->getCartPromotion(baseSiteId => $baseSiteId, cartId => $cartId, promotionId => $promotionId, userId => $userId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
promotionId = promotionId_example # String | Promotion identifier (code)
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 promotion applied on cart.
    api_response = api_instance.get_cart_promotion(baseSiteId, cartId, promotionId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
promotionId*
String
Promotion identifier (code)
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get information about promotions applied on cart.
[apiInstance getCartPromotionsWith:baseSiteId
    cartId:cartId
    userId:userId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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.getCartPromotions(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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 promotions applied on cart.
                PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getCartPromotions($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->getCartPromotions(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 promotions applied on cart.
    api_response = api_instance.get_cart_promotions(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            VoucherList result = apiInstance.getCartVouchers(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            VoucherList result = apiInstance.getCartVouchers(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get a list of vouchers applied to the cart.
[apiInstance getCartVouchersWith:baseSiteId
    cartId:cartId
    userId:userId
    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 cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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.getCartVouchers(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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 list of vouchers applied to the cart.
                VoucherList result = apiInstance.getCartVouchers(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getCartVouchers($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->getCartVouchers(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 list of vouchers applied to the cart.
    api_response = api_instance.get_cart_vouchers(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartPromotion(baseSiteId, cartId, promotionId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartPromotion(baseSiteId, cartId, promotionId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *promotionId = promotionId_example; // Promotion identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Disables the promotion based on the promotionsId of the cart.
[apiInstance removeCartPromotionWith:baseSiteId
    cartId:cartId
    promotionId:promotionId
    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.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 promotionId = promotionId_example; // {{String}} Promotion identifier (code)
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.removeCartPromotion(baseSiteId, cartId, promotionId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 promotionId = promotionId_example;  // String | Promotion identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Disables the promotion based on the promotionsId of the cart.
                apiInstance.removeCartPromotion(baseSiteId, cartId, promotionId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$promotionId = promotionId_example; // String | Promotion identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCartPromotion($baseSiteId, $cartId, $promotionId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $promotionId = promotionId_example; # String | Promotion identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCartPromotion(baseSiteId => $baseSiteId, cartId => $cartId, promotionId => $promotionId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
promotionId = promotionId_example # String | Promotion identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Disables the promotion based on the promotionsId of the cart.
    api_instance.remove_cart_promotion(baseSiteId, cartId, promotionId, userId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->removeCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
promotionId*
String
Promotion identifier (code)
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.removeCartVoucher(baseSiteId, cartId, userId, voucherId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.removeCartVoucher(baseSiteId, cartId, userId, voucherId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *voucherId = voucherId_example; // Voucher identifier (code)

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

// Deletes a voucher defined for the current cart.
[apiInstance removeCartVoucherWith:baseSiteId
    cartId:cartId
    userId:userId
    voucherId:voucherId
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var voucherId = voucherId_example; // {{String}} Voucher identifier (code)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartVoucher(baseSiteId, cartId, userId, voucherId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var voucherId = voucherId_example;  // String | Voucher identifier (code)

            try
            {
                // Deletes a voucher defined for the current cart.
                apiInstance.removeCartVoucher(baseSiteId, cartId, userId, voucherId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$voucherId = voucherId_example; // String | Voucher identifier (code)

try {
    $api_instance->removeCartVoucher($baseSiteId, $cartId, $userId, $voucherId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $voucherId = voucherId_example; # String | Voucher identifier (code)

eval { 
    $api_instance->removeCartVoucher(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, voucherId => $voucherId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
voucherId = voucherId_example # String | Voucher identifier (code)

try: 
    # Deletes a voucher defined for the current cart.
    api_instance.remove_cart_voucher(baseSiteId, cartId, userId, voucherId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->removeCartVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
voucherId*
String
Voucher identifier (code)
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts?fields=&oldCartId=&toMergeCartGuid="
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
        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.
        try {
            Cart result = apiInstance.createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid);
            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 fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
        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.
        try {
            Cart result = apiInstance.createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid);
            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 *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)
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)

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

// Creates or restore a cart for a user.
[apiInstance createCartWith:baseSiteId
    userId:userId
    fields:fields
    oldCartId:oldCartId
    toMergeCartGuid:toMergeCartGuid
              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 = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  '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.
};
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 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 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) 

            try
            {
                // Creates or restore a cart for a user.
                Cart result = apiInstance.createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid);
                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
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$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.

try {
    $result = $api_instance->createCart($baseSiteId, $userId, $fields, $oldCartId, $toMergeCartGuid);
    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 $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 $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.

eval { 
    my $result = $api_instance->createCart(baseSiteId => $baseSiteId, userId => $userId, fields => $fields, oldCartId => $oldCartId, toMergeCartGuid => $toMergeCartGuid);
    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
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)
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)

try: 
    # Creates or restore a cart for a user.
    api_response = api_instance.create_cart(baseSiteId, userId, fields=fields, oldCartId=oldCartId, toMergeCartGuid=toMergeCartGuid)
    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
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
oldCartId
String
Anonymous cart GUID.
toMergeCartGuid
String
The GUID of the user's cart that will be merged with the anonymous cart.

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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.getCart(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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.getCart(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 a cart with a given identifier.
[apiInstance getCartWith:baseSiteId
    cartId:cartId
    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.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.getCart(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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 cart with a given identifier.
                Cart result = apiInstance.getCart(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getCart($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->getCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 cart with a given identifier.
    api_response = api_instance.get_cart(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCarts

Get all customer carts.

Lists all customer carts.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts?currentPage=&fields=&pageSize=&savedCartsOnly=&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
        Integer currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        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
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, 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
        Integer currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        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
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, 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
Integer *currentPage = 56; // Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
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)
Integer *pageSize = 56; // Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
Boolean *savedCartsOnly = true; // Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
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
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    savedCartsOnly:savedCartsOnly
    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 = { 
  'currentPage': 56, // {{Integer}} Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
  'savedCartsOnly': true, // {{Boolean}} Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
  '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 currentPage = 56;  // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional)  (default to 0)
            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 pageSize = 56;  // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional)  (default to 20)
            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 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, currentPage, fields, pageSize, savedCartsOnly, 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
$currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
$savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
$sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.

try {
    $result = $api_instance->getCarts($baseSiteId, $userId, $currentPage, $fields, $pageSize, $savedCartsOnly, $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 $currentPage = 56; # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
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 $pageSize = 56; # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
my $savedCartsOnly = true; # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
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, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, savedCartsOnly => $savedCartsOnly, 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
currentPage = 56 # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
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)
pageSize = 56 # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
savedCartsOnly = true # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
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, currentPage=currentPage, fields=fields, pageSize=pageSize, savedCartsOnly=savedCartsOnly, 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
currentPage
Integer (int32)
Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
savedCartsOnly
Boolean
Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
sort
String
Optional sort criterion in case of savedCartsOnly == true. No default value.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCart

Deletes a cart with a given cart id.

Deletes a cart with a given cart id.


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

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCart(baseSiteId, cartId, userId);
        } 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCart(baseSiteId, cartId, userId);
        } 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 a cart with a given cart id.
[apiInstance removeCartWith:baseSiteId
    cartId:cartId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.removeCart(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes a cart with a given cart id.
                apiInstance.removeCart(baseSiteId, cartId, userId);
            }
            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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCart($baseSiteId, $cartId, $userId);
} 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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes a cart with a given cart id.
    api_instance.remove_cart(baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling CartsApi->removeCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 email = email_example; // String | Email of the guest user. It will be used during the checkout process.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartGuestUser(baseSiteId, cartId, email, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 email = email_example; // String | Email of the guest user. It will be used during the checkout process.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartGuestUser(baseSiteId, cartId, email, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *email = email_example; // Email of the guest user. It will be used during the checkout process.
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];

// Assigns an email to the cart.
[apiInstance replaceCartGuestUserWith:baseSiteId
    cartId:cartId
    email:email
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 email = email_example; // {{String}} Email of the guest user. It will be used during the checkout process.
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.replaceCartGuestUser(baseSiteId, cartId, email, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 email = email_example;  // String | Email of the guest user. It will be used during the checkout process.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Assigns an email to the cart.
                apiInstance.replaceCartGuestUser(baseSiteId, cartId, email, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$email = email_example; // String | Email of the guest user. It will be used during the checkout process.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceCartGuestUser($baseSiteId, $cartId, $email, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $email = email_example; # String | Email of the guest user. It will be used during the checkout process.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceCartGuestUser(baseSiteId => $baseSiteId, cartId => $cartId, email => $email, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
email = email_example # String | Email of the guest user. It will be used during the checkout process.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Assigns an email to the cart.
    api_instance.replace_cart_guest_user(baseSiteId, cartId, email, userId)
except ApiException as e:
    print("Exception when calling CartsApi->replaceCartGuestUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
email*
String
Email of the guest user. It will be used during the checkout process.
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            CartModificationList result = apiInstance.validateCart(baseSiteId, cartId, userId, 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 cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        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 {
            CartModificationList result = apiInstance.validateCart(baseSiteId, cartId, userId, 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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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];

// Validates the cart
[apiInstance validateCartWith:baseSiteId
    cartId:cartId
    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.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.validateCart(baseSiteId, cartId, userId, 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 cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            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
            {
                // Validates the cart
                CartModificationList result = apiInstance.validateCart(baseSiteId, cartId, userId, 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
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->validateCart($baseSiteId, $cartId, $userId, $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 $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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->validateCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, 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
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Validates the cart
    api_response = api_instance.validate_cart(baseSiteId, cartId, userId, 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
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogId = catalogId_example; // String | Catalog 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(baseSiteId, catalogId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogId = catalogId_example; // String | Catalog 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(baseSiteId, catalogId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *catalogId = catalogId_example; // Catalog 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:baseSiteId
    catalogId:catalogId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var catalogId = catalogId_example; // {{String}} Catalog 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(baseSiteId, catalogId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogId = catalogId_example;  // String | Catalog 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(baseSiteId, catalogId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogId = catalogId_example; // String | Catalog 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($baseSiteId, $catalogId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogId = catalogId_example; # String | Catalog 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(baseSiteId => $baseSiteId, catalogId => $catalogId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogId = catalogId_example # String | Catalog 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(baseSiteId, catalogId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalog: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
catalogId*
String
Catalog 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version 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(baseSiteId, catalogId, catalogVersionId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version 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(baseSiteId, catalogId, catalogVersionId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *catalogId = catalogId_example; // Catalog identifier
String *catalogVersionId = catalogVersionId_example; // Catalog version 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:baseSiteId
    catalogId:catalogId
    catalogVersionId:catalogVersionId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var catalogId = catalogId_example; // {{String}} Catalog identifier
var catalogVersionId = catalogVersionId_example; // {{String}} Catalog version 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(baseSiteId, catalogId, catalogVersionId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogId = catalogId_example;  // String | Catalog identifier
            var catalogVersionId = catalogVersionId_example;  // String | Catalog version 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(baseSiteId, catalogId, catalogVersionId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogId = catalogId_example; // String | Catalog identifier
$catalogVersionId = catalogVersionId_example; // String | Catalog version 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($baseSiteId, $catalogId, $catalogVersionId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogId = catalogId_example; # String | Catalog identifier
my $catalogVersionId = catalogVersionId_example; # String | Catalog version 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(baseSiteId => $baseSiteId, catalogId => $catalogId, catalogVersionId => $catalogVersionId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogId = catalogId_example # String | Catalog identifier
catalogVersionId = catalogVersionId_example # String | Catalog version 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(baseSiteId, catalogId, catalogVersionId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalogVersion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
catalogId*
String
Catalog identifier
Required
catalogVersionId*
String
Catalog version 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
        String categoryId = categoryId_example; // String | Category 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(baseSiteId, catalogId, catalogVersionId, categoryId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
        String categoryId = categoryId_example; // String | Category 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(baseSiteId, catalogId, catalogVersionId, categoryId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *catalogId = catalogId_example; // Catalog identifier
String *catalogVersionId = catalogVersionId_example; // Catalog version identifier
String *categoryId = categoryId_example; // Category 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:baseSiteId
    catalogId:catalogId
    catalogVersionId:catalogVersionId
    categoryId:categoryId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var catalogId = catalogId_example; // {{String}} Catalog identifier
var catalogVersionId = catalogVersionId_example; // {{String}} Catalog version identifier
var categoryId = categoryId_example; // {{String}} Category 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(baseSiteId, catalogId, catalogVersionId, categoryId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogId = catalogId_example;  // String | Catalog identifier
            var catalogVersionId = catalogVersionId_example;  // String | Catalog version identifier
            var categoryId = categoryId_example;  // String | Category 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(baseSiteId, catalogId, catalogVersionId, categoryId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogId = catalogId_example; // String | Catalog identifier
$catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
$categoryId = categoryId_example; // String | Category 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($baseSiteId, $catalogId, $catalogVersionId, $categoryId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogId = catalogId_example; # String | Catalog identifier
my $catalogVersionId = catalogVersionId_example; # String | Catalog version identifier
my $categoryId = categoryId_example; # String | Category 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(baseSiteId => $baseSiteId, catalogId => $catalogId, catalogVersionId => $catalogVersionId, categoryId => $categoryId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogId = catalogId_example # String | Catalog identifier
catalogVersionId = catalogVersionId_example # String | Catalog version identifier
categoryId = categoryId_example # String | Category 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(baseSiteId, catalogId, catalogVersionId, categoryId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCategories: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
catalogId*
String
Catalog identifier
Required
catalogVersionId*
String
Catalog version identifier
Required
categoryId*
String
Category 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Cities

getCitiesUsingGET

Gets cities for a region.

Gets cities for a region.


/{baseSiteId}/regions/{regionId}/cities

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/regions/{regionId}/cities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CitiesApi;

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

public class CitiesApiExample {

    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");

        CitiesApi apiInstance = new CitiesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String regionId = regionId_example; // String | Region identifier
        try {
            CityList result = apiInstance.getCitiesUsingGET(baseSiteId, regionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CitiesApi#getCitiesUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CitiesApi;

public class CitiesApiExample {

    public static void main(String[] args) {
        CitiesApi apiInstance = new CitiesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String regionId = regionId_example; // String | Region identifier
        try {
            CityList result = apiInstance.getCitiesUsingGET(baseSiteId, regionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CitiesApi#getCitiesUsingGET");
            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 *regionId = regionId_example; // Region identifier

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

// Gets cities for a region.
[apiInstance getCitiesUsingGETWith:baseSiteId
    regionId:regionId
              completionHandler: ^(CityList 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.CitiesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var regionId = regionId_example; // {{String}} Region identifier

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

namespace Example
{
    public class getCitiesUsingGETExample
    {
        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 CitiesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var regionId = regionId_example;  // String | Region identifier

            try
            {
                // Gets cities for a region.
                CityList result = apiInstance.getCitiesUsingGET(baseSiteId, regionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CitiesApi.getCitiesUsingGET: " + 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\ApiCitiesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$regionId = regionId_example; // String | Region identifier

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

# 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::CitiesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $regionId = regionId_example; # String | Region identifier

eval { 
    my $result = $api_instance->getCitiesUsingGET(baseSiteId => $baseSiteId, regionId => $regionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CitiesApi->getCitiesUsingGET: $@\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.CitiesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
regionId = regionId_example # String | Region identifier

try: 
    # Gets cities for a region.
    api_response = api_instance.get_cities_using_get(baseSiteId, regionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CitiesApi->getCitiesUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
regionId*
String
Region identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getDistrictsUsingGET

Gets districts for a city.

Gets districts for a city.


/{baseSiteId}/cities/{cityId}/districts

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cities/{cityId}/districts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CitiesApi;

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

public class CitiesApiExample {

    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");

        CitiesApi apiInstance = new CitiesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cityId = cityId_example; // String | City identifier
        try {
            DistrictList result = apiInstance.getDistrictsUsingGET(baseSiteId, cityId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CitiesApi#getDistrictsUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CitiesApi;

public class CitiesApiExample {

    public static void main(String[] args) {
        CitiesApi apiInstance = new CitiesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cityId = cityId_example; // String | City identifier
        try {
            DistrictList result = apiInstance.getDistrictsUsingGET(baseSiteId, cityId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CitiesApi#getDistrictsUsingGET");
            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 *cityId = cityId_example; // City identifier

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

// Gets districts for a city.
[apiInstance getDistrictsUsingGETWith:baseSiteId
    cityId:cityId
              completionHandler: ^(DistrictList 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.CitiesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cityId = cityId_example; // {{String}} City identifier

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

namespace Example
{
    public class getDistrictsUsingGETExample
    {
        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 CitiesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cityId = cityId_example;  // String | City identifier

            try
            {
                // Gets districts for a city.
                DistrictList result = apiInstance.getDistrictsUsingGET(baseSiteId, cityId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CitiesApi.getDistrictsUsingGET: " + 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\ApiCitiesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cityId = cityId_example; // String | City identifier

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

# 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::CitiesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cityId = cityId_example; # String | City identifier

eval { 
    my $result = $api_instance->getDistrictsUsingGET(baseSiteId => $baseSiteId, cityId => $cityId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CitiesApi->getDistrictsUsingGET: $@\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.CitiesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cityId = cityId_example # String | City identifier

try: 
    # Gets districts for a city.
    api_response = api_instance.get_districts_using_get(baseSiteId, cityId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CitiesApi->getDistrictsUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cityId*
String
City identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Components

getComponentById

Get component data by id

Given a component identifier, return cms component data.


/{baseSiteId}/cms/components/{componentId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cms/components/{componentId}?catalogCode=&categoryCode=&fields=&productCode="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ComponentsApi;

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

public class ComponentsApiExample {

    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");

        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String componentId = componentId_example; // String | Component identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        String productCode = productCode_example; // String | Product code
        try {
            ComponentAdaptedData result = apiInstance.getComponentById(baseSiteId, componentId, catalogCode, categoryCode, fields, productCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String componentId = componentId_example; // String | Component identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        String productCode = productCode_example; // String | Product code
        try {
            ComponentAdaptedData result = apiInstance.getComponentById(baseSiteId, componentId, catalogCode, categoryCode, fields, productCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentById");
            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 *componentId = componentId_example; // Component identifier
String *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (optional)
String *fields = fields_example; // Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
String *productCode = productCode_example; // Product code (optional)

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

// Get component data by id
[apiInstance getComponentByIdWith:baseSiteId
    componentId:componentId
    catalogCode:catalogCode
    categoryCode:categoryCode
    fields:fields
    productCode:productCode
              completionHandler: ^(ComponentAdaptedData 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.ComponentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var componentId = componentId_example; // {{String}} Component identifier
var opts = { 
  'catalogCode': catalogCode_example, // {{String}} Catalog code
  'categoryCode': categoryCode_example, // {{String}} Category code
  'fields': fields_example, // {{String}} Response configuration (list of fields, which should be returned in response)
  'productCode': productCode_example // {{String}} Product code
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getComponentById(baseSiteId, componentId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getComponentByIdExample
    {
        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 ComponentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var componentId = componentId_example;  // String | Component identifier
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var fields = fields_example;  // String | Response configuration (list of fields, which should be returned in response) (optional)  (default to DEFAULT)
            var productCode = productCode_example;  // String | Product code (optional) 

            try
            {
                // Get component data by id
                ComponentAdaptedData result = apiInstance.getComponentById(baseSiteId, componentId, catalogCode, categoryCode, fields, productCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.getComponentById: " + 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\ApiComponentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$componentId = componentId_example; // String | Component identifier
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
$productCode = productCode_example; // String | Product code

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

# 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::ComponentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $componentId = componentId_example; # String | Component identifier
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $fields = fields_example; # String | Response configuration (list of fields, which should be returned in response)
my $productCode = productCode_example; # String | Product code

eval { 
    my $result = $api_instance->getComponentById(baseSiteId => $baseSiteId, componentId => $componentId, catalogCode => $catalogCode, categoryCode => $categoryCode, fields => $fields, productCode => $productCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ComponentsApi->getComponentById: $@\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.ComponentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
componentId = componentId_example # String | Component identifier
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (optional)
fields = fields_example # String | Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
productCode = productCode_example # String | Product code (optional)

try: 
    # Get component data by id
    api_response = api_instance.get_component_by_id(baseSiteId, componentId, catalogCode=catalogCode, categoryCode=categoryCode, fields=fields, productCode=productCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComponentsApi->getComponentById: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
componentId*
String
Component identifier
Required
Query parameters
Name Description
catalogCode
String
Catalog code
categoryCode
String
Category code
fields
String
Response configuration (list of fields, which should be returned in response)
productCode
String
Product code

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getComponentsByIds

Get component data

Finds cms components by the specified IDs. When none is provided, this will retrieve all components The components list will be filtered by the given catalog, product or category restrictions, as well as by the pagination information. The result will be sorted in the specified order.


/{baseSiteId}/cms/components

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cms/components?catalogCode=&categoryCode=&componentIds=¤tPage=&fields=&pageSize=&productCode=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ComponentsApi;

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

public class ComponentsApiExample {

    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");

        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        array[String] componentIds = ; // array[String] | List of Component identifiers
        Integer currentPage = 56; // Integer | Optional pagination parameter. Default value 0.
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        Integer pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Optional sort criterion. No default value.
        try {
            ListAdaptedComponents result = apiInstance.getComponentsByIds(baseSiteId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentsByIds");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        array[String] componentIds = ; // array[String] | List of Component identifiers
        Integer currentPage = 56; // Integer | Optional pagination parameter. Default value 0.
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        Integer pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Optional sort criterion. No default value.
        try {
            ListAdaptedComponents result = apiInstance.getComponentsByIds(baseSiteId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentsByIds");
            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 *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (optional)
array[String] *componentIds = ; // List of Component identifiers (optional)
Integer *currentPage = 56; // Optional pagination parameter. Default value 0. (optional) (default to 0)
String *fields = fields_example; // Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
Integer *pageSize = 56; // Optional pagination parameter. Default value 10. (optional) (default to 10)
String *productCode = productCode_example; // Product code (optional)
String *sort = sort_example; // Optional sort criterion. No default value. (optional)

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

// Get component data
[apiInstance getComponentsByIdsWith:baseSiteId
    catalogCode:catalogCode
    categoryCode:categoryCode
    componentIds:componentIds
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    productCode:productCode
    sort:sort
              completionHandler: ^(ListAdaptedComponents 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.ComponentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'catalogCode': catalogCode_example, // {{String}} Catalog code
  'categoryCode': categoryCode_example, // {{String}} Category code
  'componentIds': , // {{array[String]}} List of Component identifiers
  'currentPage': 56, // {{Integer}} Optional pagination parameter. Default value 0.
  'fields': fields_example, // {{String}} Response configuration (list of fields, which should be returned in response)
  'pageSize': 56, // {{Integer}} Optional pagination parameter. Default value 10.
  'productCode': productCode_example, // {{String}} Product code
  'sort': sort_example // {{String}} Optional sort criterion. No default value.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getComponentsByIds(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getComponentsByIdsExample
    {
        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 ComponentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var componentIds = new array[String](); // array[String] | List of Component identifiers (optional) 
            var currentPage = 56;  // Integer | Optional pagination parameter. Default value 0. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration (list of fields, which should be returned in response) (optional)  (default to DEFAULT)
            var pageSize = 56;  // Integer | Optional pagination parameter. Default value 10. (optional)  (default to 10)
            var productCode = productCode_example;  // String | Product code (optional) 
            var sort = sort_example;  // String | Optional sort criterion. No default value. (optional) 

            try
            {
                // Get component data
                ListAdaptedComponents result = apiInstance.getComponentsByIds(baseSiteId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.getComponentsByIds: " + 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\ApiComponentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$componentIds = ; // array[String] | List of Component identifiers
$currentPage = 56; // Integer | Optional pagination parameter. Default value 0.
$fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
$pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
$productCode = productCode_example; // String | Product code
$sort = sort_example; // String | Optional sort criterion. No default value.

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

# 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::ComponentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $componentIds = []; # array[String] | List of Component identifiers
my $currentPage = 56; # Integer | Optional pagination parameter. Default value 0.
my $fields = fields_example; # String | Response configuration (list of fields, which should be returned in response)
my $pageSize = 56; # Integer | Optional pagination parameter. Default value 10.
my $productCode = productCode_example; # String | Product code
my $sort = sort_example; # String | Optional sort criterion. No default value.

eval { 
    my $result = $api_instance->getComponentsByIds(baseSiteId => $baseSiteId, catalogCode => $catalogCode, categoryCode => $categoryCode, componentIds => $componentIds, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, productCode => $productCode, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ComponentsApi->getComponentsByIds: $@\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.ComponentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (optional)
componentIds =  # array[String] | List of Component identifiers (optional)
currentPage = 56 # Integer | Optional pagination parameter. Default value 0. (optional) (default to 0)
fields = fields_example # String | Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
pageSize = 56 # Integer | Optional pagination parameter. Default value 10. (optional) (default to 10)
productCode = productCode_example # String | Product code (optional)
sort = sort_example # String | Optional sort criterion. No default value. (optional)

try: 
    # Get component data
    api_response = api_instance.get_components_by_ids(baseSiteId, catalogCode=catalogCode, categoryCode=categoryCode, componentIds=componentIds, currentPage=currentPage, fields=fields, pageSize=pageSize, productCode=productCode, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComponentsApi->getComponentsByIds: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
catalogCode
String
Catalog code
categoryCode
String
Category code
componentIds
array[String]
List of Component identifiers
currentPage
Integer (int32)
Optional pagination parameter. Default value 0.
fields
String
Response configuration (list of fields, which should be returned in response)
pageSize
Integer (int32)
Optional pagination parameter. Default value 10.
productCode
String
Product code
sort
String
Optional sort criterion. No default value.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


searchComponentsByIds

Get components' data by id given in body

Given a list of component identifiers in body, return cms component data.


/{baseSiteId}/cms/components

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cms/components?catalogCode=&categoryCode=¤tPage=&fields=&pageSize=&productCode=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ComponentsApi;

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

public class ComponentsApiExample {

    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");

        ComponentsApi apiInstance = new ComponentsApi();
        ComponentIDList body = ; // ComponentIDList | List of Component identifiers
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        Integer currentPage = 56; // Integer | Optional pagination parameter. Default value 0.
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        Integer pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Optional sort criterion. No default value.
        try {
            ListAdaptedComponents result = apiInstance.searchComponentsByIds(body, baseSiteId, catalogCode, categoryCode, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#searchComponentsByIds");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        ComponentIDList body = ; // ComponentIDList | List of Component identifiers
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        Integer currentPage = 56; // Integer | Optional pagination parameter. Default value 0.
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        Integer pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Optional sort criterion. No default value.
        try {
            ListAdaptedComponents result = apiInstance.searchComponentsByIds(body, baseSiteId, catalogCode, categoryCode, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#searchComponentsByIds");
            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"];
ComponentIDList *body = ; // List of Component identifiers
String *baseSiteId = baseSiteId_example; // Base site identifier
String *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (optional)
Integer *currentPage = 56; // Optional pagination parameter. Default value 0. (optional) (default to 0)
String *fields = fields_example; // Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
Integer *pageSize = 56; // Optional pagination parameter. Default value 10. (optional) (default to 10)
String *productCode = productCode_example; // Product code (optional)
String *sort = sort_example; // Optional sort criterion. No default value. (optional)

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

// Get components' data by id given in body
[apiInstance searchComponentsByIdsWith:body
    baseSiteId:baseSiteId
    catalogCode:catalogCode
    categoryCode:categoryCode
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    productCode:productCode
    sort:sort
              completionHandler: ^(ListAdaptedComponents 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.ComponentsApi()
var body = ; // {{ComponentIDList}} List of Component identifiers
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'catalogCode': catalogCode_example // {{String}} Catalog code
  'categoryCode': categoryCode_example // {{String}} Category code
  'currentPage': 56 // {{Integer}} Optional pagination parameter. Default value 0.
  'fields': fields_example // {{String}} Response configuration (list of fields, which should be returned in response)
  'pageSize': 56 // {{Integer}} Optional pagination parameter. Default value 10.
  'productCode': productCode_example // {{String}} Product code
  'sort': sort_example // {{String}} Optional sort criterion. No default value.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchComponentsByIds(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchComponentsByIdsExample
    {
        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 ComponentsApi();
            var body = new ComponentIDList(); // ComponentIDList | List of Component identifiers
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var currentPage = 56;  // Integer | Optional pagination parameter. Default value 0. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration (list of fields, which should be returned in response) (optional)  (default to DEFAULT)
            var pageSize = 56;  // Integer | Optional pagination parameter. Default value 10. (optional)  (default to 10)
            var productCode = productCode_example;  // String | Product code (optional) 
            var sort = sort_example;  // String | Optional sort criterion. No default value. (optional) 

            try
            {
                // Get components' data by id given in body
                ListAdaptedComponents result = apiInstance.searchComponentsByIds(body, baseSiteId, catalogCode, categoryCode, currentPage, fields, pageSize, productCode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.searchComponentsByIds: " + 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\ApiComponentsApi();
$body = ; // ComponentIDList | List of Component identifiers
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$currentPage = 56; // Integer | Optional pagination parameter. Default value 0.
$fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
$pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
$productCode = productCode_example; // String | Product code
$sort = sort_example; // String | Optional sort criterion. No default value.

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

# 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::ComponentsApi->new();
my $body = WWW::SwaggerClient::Object::ComponentIDList->new(); # ComponentIDList | List of Component identifiers
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $currentPage = 56; # Integer | Optional pagination parameter. Default value 0.
my $fields = fields_example; # String | Response configuration (list of fields, which should be returned in response)
my $pageSize = 56; # Integer | Optional pagination parameter. Default value 10.
my $productCode = productCode_example; # String | Product code
my $sort = sort_example; # String | Optional sort criterion. No default value.

eval { 
    my $result = $api_instance->searchComponentsByIds(body => $body, baseSiteId => $baseSiteId, catalogCode => $catalogCode, categoryCode => $categoryCode, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, productCode => $productCode, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ComponentsApi->searchComponentsByIds: $@\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.ComponentsApi()
body =  # ComponentIDList | List of Component identifiers
baseSiteId = baseSiteId_example # String | Base site identifier
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (optional)
currentPage = 56 # Integer | Optional pagination parameter. Default value 0. (optional) (default to 0)
fields = fields_example # String | Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
pageSize = 56 # Integer | Optional pagination parameter. Default value 10. (optional) (default to 10)
productCode = productCode_example # String | Product code (optional)
sort = sort_example # String | Optional sort criterion. No default value. (optional)

try: 
    # Get components' data by id given in body
    api_response = api_instance.search_components_by_ids(body, baseSiteId, catalogCode=catalogCode, categoryCode=categoryCode, currentPage=currentPage, fields=fields, pageSize=pageSize, productCode=productCode, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComponentsApi->searchComponentsByIds: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *
Query parameters
Name Description
catalogCode
String
Catalog code
categoryCode
String
Category code
currentPage
Integer (int32)
Optional pagination parameter. Default value 0.
fields
String
Response configuration (list of fields, which should be returned in response)
pageSize
Integer (int32)
Optional pagination parameter. Default value 10.
productCode
String
Product code
sort
String
Optional sort criterion. No default value.

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Consents

doGiveConsent

A user can give consent.


/{baseSiteId}/users/{userId}/consents

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template ID.
        Integer consentTemplateVersion = 56; // Integer | Consent template version.
        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(baseSiteId, consentTemplateId, consentTemplateVersion, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template ID.
        Integer consentTemplateVersion = 56; // Integer | Consent template version.
        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(baseSiteId, consentTemplateId, consentTemplateVersion, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *consentTemplateId = consentTemplateId_example; // Consent template ID.
Integer *consentTemplateVersion = 56; // Consent template version.
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:baseSiteId
    consentTemplateId:consentTemplateId
    consentTemplateVersion:consentTemplateVersion
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var consentTemplateId = consentTemplateId_example; // {{String}} Consent template ID.
var consentTemplateVersion = 56; // {{Integer}} Consent template version.
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(baseSiteId, consentTemplateId, consentTemplateVersion, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var consentTemplateId = consentTemplateId_example;  // String | Consent template ID.
            var consentTemplateVersion = 56;  // Integer | Consent template version.
            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(baseSiteId, consentTemplateId, consentTemplateVersion, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$consentTemplateId = consentTemplateId_example; // String | Consent template ID.
$consentTemplateVersion = 56; // Integer | Consent template version.
$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($baseSiteId, $consentTemplateId, $consentTemplateVersion, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $consentTemplateId = consentTemplateId_example; # String | Consent template ID.
my $consentTemplateVersion = 56; # Integer | Consent template version.
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(baseSiteId => $baseSiteId, consentTemplateId => $consentTemplateId, consentTemplateVersion => $consentTemplateVersion, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
consentTemplateId = consentTemplateId_example # String | Consent template ID.
consentTemplateVersion = 56 # Integer | Consent template version.
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(baseSiteId, consentTemplateId, consentTemplateVersion, 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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template id.
        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(baseSiteId, consentTemplateId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template id.
        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(baseSiteId, consentTemplateId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *consentTemplateId = consentTemplateId_example; // Consent template id.
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:baseSiteId
    consentTemplateId:consentTemplateId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var consentTemplateId = consentTemplateId_example; // {{String}} Consent template id.
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(baseSiteId, consentTemplateId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var consentTemplateId = consentTemplateId_example;  // String | Consent template id.
            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(baseSiteId, consentTemplateId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$consentTemplateId = consentTemplateId_example; // String | Consent template id.
$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($baseSiteId, $consentTemplateId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $consentTemplateId = consentTemplateId_example; # String | Consent template id.
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(baseSiteId => $baseSiteId, consentTemplateId => $consentTemplateId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
consentTemplateId = consentTemplateId_example # String | Consent template id.
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(baseSiteId, consentTemplateId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->getConsentTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
consentTemplateId*
String
Consent template id.
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentCode = consentCode_example; // String | Consent code.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeConsent(baseSiteId, consentCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentCode = consentCode_example; // String | Consent code.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeConsent(baseSiteId, consentCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *consentCode = consentCode_example; // Consent code.
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:baseSiteId
    consentCode:consentCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var consentCode = consentCode_example; // {{String}} Consent code.
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(baseSiteId, consentCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var consentCode = consentCode_example;  // String | Consent code.
            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(baseSiteId, consentCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$consentCode = consentCode_example; // String | Consent code.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeConsent($baseSiteId, $consentCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $consentCode = consentCode_example; # String | Consent code.
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(baseSiteId => $baseSiteId, consentCode => $consentCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
consentCode = consentCode_example # String | Consent code.
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(baseSiteId, consentCode, userId)
except ApiException as e:
    print("Exception when calling ConsentsApi->removeConsent: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


ConsignmentTracking

getConsignmentTrackingDataUsingGET

Gets consignment tracking information

Returns details of consignment tracking information based on the order code and the consignment code.


/{baseSiteId}/users/{userId}/orders/{orderCode}/consignments/{consignmentCode}/tracking

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orders/{orderCode}/consignments/{consignmentCode}/tracking"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsignmentTrackingApi;

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

public class ConsignmentTrackingApiExample {

    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");

        ConsignmentTrackingApi apiInstance = new ConsignmentTrackingApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consignmentCode = consignmentCode_example; // String | consignment identifier
        String orderCode = orderCode_example; // String | order identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            consignmentTracking result = apiInstance.getConsignmentTrackingDataUsingGET(baseSiteId, consignmentCode, orderCode, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsignmentTrackingApi#getConsignmentTrackingDataUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsignmentTrackingApi;

public class ConsignmentTrackingApiExample {

    public static void main(String[] args) {
        ConsignmentTrackingApi apiInstance = new ConsignmentTrackingApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consignmentCode = consignmentCode_example; // String | consignment identifier
        String orderCode = orderCode_example; // String | order identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            consignmentTracking result = apiInstance.getConsignmentTrackingDataUsingGET(baseSiteId, consignmentCode, orderCode, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsignmentTrackingApi#getConsignmentTrackingDataUsingGET");
            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 *consignmentCode = consignmentCode_example; // consignment identifier
String *orderCode = orderCode_example; // order identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Gets consignment tracking information
[apiInstance getConsignmentTrackingDataUsingGETWith:baseSiteId
    consignmentCode:consignmentCode
    orderCode:orderCode
    userId:userId
              completionHandler: ^(consignmentTracking 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.ConsignmentTrackingApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var consignmentCode = consignmentCode_example; // {{String}} consignment identifier
var orderCode = orderCode_example; // {{String}} order 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.getConsignmentTrackingDataUsingGET(baseSiteId, consignmentCode, orderCode, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConsignmentTrackingDataUsingGETExample
    {
        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 ConsignmentTrackingApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var consignmentCode = consignmentCode_example;  // String | consignment identifier
            var orderCode = orderCode_example;  // String | order identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Gets consignment tracking information
                consignmentTracking result = apiInstance.getConsignmentTrackingDataUsingGET(baseSiteId, consignmentCode, orderCode, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsignmentTrackingApi.getConsignmentTrackingDataUsingGET: " + 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\ApiConsignmentTrackingApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$consignmentCode = consignmentCode_example; // String | consignment identifier
$orderCode = orderCode_example; // String | order 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->getConsignmentTrackingDataUsingGET($baseSiteId, $consignmentCode, $orderCode, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsignmentTrackingApi->getConsignmentTrackingDataUsingGET: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsignmentTrackingApi;

# 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::ConsignmentTrackingApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $consignmentCode = consignmentCode_example; # String | consignment identifier
my $orderCode = orderCode_example; # String | order 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->getConsignmentTrackingDataUsingGET(baseSiteId => $baseSiteId, consignmentCode => $consignmentCode, orderCode => $orderCode, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsignmentTrackingApi->getConsignmentTrackingDataUsingGET: $@\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.ConsignmentTrackingApi()
baseSiteId = baseSiteId_example # String | Base site identifier
consignmentCode = consignmentCode_example # String | consignment identifier
orderCode = orderCode_example # String | order identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Gets consignment tracking information
    api_response = api_instance.get_consignment_tracking_data_using_get(baseSiteId, consignmentCode, orderCode, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsignmentTrackingApi->getConsignmentTrackingDataUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
consignmentCode*
String
consignment identifier
Required
orderCode*
String
order identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/countries?fields=&type="
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 fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
        String type = type_example; // String | The type of countries.
        try {
            CountryList result = apiInstance.getCountries(baseSiteId, fields, type);
            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 fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
        String type = type_example; // String | The type of countries.
        try {
            CountryList result = apiInstance.getCountries(baseSiteId, fields, type);
            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 *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)
String *type = type_example; // The type of countries. (optional)

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

// Get a list of countries.
[apiInstance getCountriesWith:baseSiteId
    fields:fields
    type:type
              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 = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'type': type_example // {{String}} The type of countries.
};
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 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 type = type_example;  // String | The type of countries. (optional) 

            try
            {
                // Get a list of countries.
                CountryList result = apiInstance.getCountries(baseSiteId, fields, type);
                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
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$type = type_example; // String | The type of countries.

try {
    $result = $api_instance->getCountries($baseSiteId, $fields, $type);
    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 $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 $type = type_example; # String | The type of countries.

eval { 
    my $result = $api_instance->getCountries(baseSiteId => $baseSiteId, fields => $fields, type => $type);
    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
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)
type = type_example # String | The type of countries. (optional)

try: 
    # Get a list of countries.
    api_response = api_instance.get_countries(baseSiteId, fields=fields, type=type)
    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
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
type
String
The type of countries.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
        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(baseSiteId, countyIsoCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
        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(baseSiteId, countyIsoCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *countyIsoCode = countyIsoCode_example; // An ISO code for a country
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:baseSiteId
    countyIsoCode:countyIsoCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var countyIsoCode = countyIsoCode_example; // {{String}} An ISO code for a country
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(baseSiteId, countyIsoCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var countyIsoCode = countyIsoCode_example;  // String | An ISO code for a country
            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(baseSiteId, countyIsoCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
$fields = 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($baseSiteId, $countyIsoCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $countyIsoCode = countyIsoCode_example; # String | An ISO code for a country
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(baseSiteId => $baseSiteId, countyIsoCode => $countyIsoCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
countyIsoCode = countyIsoCode_example # String | An ISO code for a country
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(baseSiteId, countyIsoCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CountriesApi->getCountryRegions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
countyIsoCode*
String
An ISO code for a country
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CustomerCoupons

doClaimCustomerCouponUsingPOST

Claims a customer coupon.

Claims a customer coupon by coupon code.


/{baseSiteId}/users/{userId}/customercoupons/{couponCode}/claim

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/customercoupons/{couponCode}/claim?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerCouponsApi;

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

public class CustomerCouponsApiExample {

    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");

        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String couponCode = couponCode_example; // String | Coupon code
        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 {
            CustomerCoupon2Customer result = apiInstance.doClaimCustomerCouponUsingPOST(baseSiteId, couponCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#doClaimCustomerCouponUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerCouponsApi;

public class CustomerCouponsApiExample {

    public static void main(String[] args) {
        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String couponCode = couponCode_example; // String | Coupon code
        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 {
            CustomerCoupon2Customer result = apiInstance.doClaimCustomerCouponUsingPOST(baseSiteId, couponCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#doClaimCustomerCouponUsingPOST");
            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 *couponCode = couponCode_example; // Coupon code
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)

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

// Claims a customer coupon.
[apiInstance doClaimCustomerCouponUsingPOSTWith:baseSiteId
    couponCode:couponCode
    userId:userId
    fields:fields
              completionHandler: ^(CustomerCoupon2Customer 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.CustomerCouponsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var couponCode = couponCode_example; // {{String}} Coupon code
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.doClaimCustomerCouponUsingPOST(baseSiteId, couponCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doClaimCustomerCouponUsingPOSTExample
    {
        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 CustomerCouponsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var couponCode = couponCode_example;  // String | Coupon code
            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
            {
                // Claims a customer coupon.
                CustomerCoupon2Customer result = apiInstance.doClaimCustomerCouponUsingPOST(baseSiteId, couponCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerCouponsApi.doClaimCustomerCouponUsingPOST: " + 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\ApiCustomerCouponsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$couponCode = couponCode_example; // String | Coupon code
$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->doClaimCustomerCouponUsingPOST($baseSiteId, $couponCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerCouponsApi->doClaimCustomerCouponUsingPOST: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerCouponsApi;

# 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::CustomerCouponsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $couponCode = couponCode_example; # String | Coupon code
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->doClaimCustomerCouponUsingPOST(baseSiteId => $baseSiteId, couponCode => $couponCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerCouponsApi->doClaimCustomerCouponUsingPOST: $@\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.CustomerCouponsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
couponCode = couponCode_example # String | Coupon code
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: 
    # Claims a customer coupon.
    api_response = api_instance.do_claim_customer_coupon_using_post(baseSiteId, couponCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerCouponsApi->doClaimCustomerCouponUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
couponCode*
String
Coupon code
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doSubscribeToCustomerCouponUsingPOST

Subscribes to a coupon notification.

Make a subscription to a customer coupon to receive notifications when it will be in effect soon, or will expire soon.


/{baseSiteId}/users/{userId}/customercoupons/{couponCode}/notification

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/customercoupons/{couponCode}/notification?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerCouponsApi;

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

public class CustomerCouponsApiExample {

    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");

        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String couponCode = couponCode_example; // String | Coupon code
        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 {
            CustomerCouponNotification result = apiInstance.doSubscribeToCustomerCouponUsingPOST(baseSiteId, couponCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#doSubscribeToCustomerCouponUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerCouponsApi;

public class CustomerCouponsApiExample {

    public static void main(String[] args) {
        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String couponCode = couponCode_example; // String | Coupon code
        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 {
            CustomerCouponNotification result = apiInstance.doSubscribeToCustomerCouponUsingPOST(baseSiteId, couponCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#doSubscribeToCustomerCouponUsingPOST");
            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 *couponCode = couponCode_example; // Coupon code
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)

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

// Subscribes to a coupon notification.
[apiInstance doSubscribeToCustomerCouponUsingPOSTWith:baseSiteId
    couponCode:couponCode
    userId:userId
    fields:fields
              completionHandler: ^(CustomerCouponNotification 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.CustomerCouponsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var couponCode = couponCode_example; // {{String}} Coupon code
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.doSubscribeToCustomerCouponUsingPOST(baseSiteId, couponCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doSubscribeToCustomerCouponUsingPOSTExample
    {
        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 CustomerCouponsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var couponCode = couponCode_example;  // String | Coupon code
            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
            {
                // Subscribes to a coupon notification.
                CustomerCouponNotification result = apiInstance.doSubscribeToCustomerCouponUsingPOST(baseSiteId, couponCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerCouponsApi.doSubscribeToCustomerCouponUsingPOST: " + 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\ApiCustomerCouponsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$couponCode = couponCode_example; // String | Coupon code
$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->doSubscribeToCustomerCouponUsingPOST($baseSiteId, $couponCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerCouponsApi->doSubscribeToCustomerCouponUsingPOST: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerCouponsApi;

# 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::CustomerCouponsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $couponCode = couponCode_example; # String | Coupon code
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->doSubscribeToCustomerCouponUsingPOST(baseSiteId => $baseSiteId, couponCode => $couponCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerCouponsApi->doSubscribeToCustomerCouponUsingPOST: $@\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.CustomerCouponsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
couponCode = couponCode_example # String | Coupon code
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: 
    # Subscribes to a coupon notification.
    api_response = api_instance.do_subscribe_to_customer_coupon_using_post(baseSiteId, couponCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerCouponsApi->doSubscribeToCustomerCouponUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
couponCode*
String
Coupon code
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doUnsubscribeFromCustomerCouponUsingDELETE

Unsubscribes from the coupon notification.

Removes notification subscription from the specific customer coupon.


/{baseSiteId}/users/{userId}/customercoupons/{couponCode}/notification

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/customercoupons/{couponCode}/notification"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerCouponsApi;

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

public class CustomerCouponsApiExample {

    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");

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

public class CustomerCouponsApiExample {

    public static void main(String[] args) {
        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String couponCode = couponCode_example; // String | Coupon code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doUnsubscribeFromCustomerCouponUsingDELETE(baseSiteId, couponCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#doUnsubscribeFromCustomerCouponUsingDELETE");
            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 *couponCode = couponCode_example; // Coupon code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Unsubscribes from the coupon notification.
[apiInstance doUnsubscribeFromCustomerCouponUsingDELETEWith:baseSiteId
    couponCode:couponCode
    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.CustomerCouponsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var couponCode = couponCode_example; // {{String}} Coupon code
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.doUnsubscribeFromCustomerCouponUsingDELETE(baseSiteId, couponCode, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doUnsubscribeFromCustomerCouponUsingDELETEExample
    {
        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 CustomerCouponsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var couponCode = couponCode_example;  // String | Coupon code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Unsubscribes from the coupon notification.
                apiInstance.doUnsubscribeFromCustomerCouponUsingDELETE(baseSiteId, couponCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerCouponsApi.doUnsubscribeFromCustomerCouponUsingDELETE: " + 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\ApiCustomerCouponsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$couponCode = couponCode_example; // String | Coupon code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::CustomerCouponsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $couponCode = couponCode_example; # String | Coupon code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doUnsubscribeFromCustomerCouponUsingDELETE(baseSiteId => $baseSiteId, couponCode => $couponCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling CustomerCouponsApi->doUnsubscribeFromCustomerCouponUsingDELETE: $@\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.CustomerCouponsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
couponCode = couponCode_example # String | Coupon code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Unsubscribes from the coupon notification.
    api_instance.do_unsubscribe_from_customer_coupon_using_delete(baseSiteId, couponCode, userId)
except ApiException as e:
    print("Exception when calling CustomerCouponsApi->doUnsubscribeFromCustomerCouponUsingDELETE: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


getCustomerCouponsUsingGET

Gets all customer coupons of the current customer.

Gets the customer coupon list of the current customer.


/{baseSiteId}/users/{userId}/customercoupons

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/customercoupons?currentPage=&fields=&needsTotal=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerCouponsApi;

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

public class CustomerCouponsApiExample {

    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");

        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        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.
        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 needsTotal = true; // Boolean | The flag for indicating if total number of results is needed or not.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | The sorting method applied to the return results.
        try {
            CustomerCouponSearchResult result = apiInstance.getCustomerCouponsUsingGET(baseSiteId, userId, currentPage, fields, needsTotal, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#getCustomerCouponsUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerCouponsApi;

public class CustomerCouponsApiExample {

    public static void main(String[] args) {
        CustomerCouponsApi apiInstance = new CustomerCouponsApi();
        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.
        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 needsTotal = true; // Boolean | The flag for indicating if total number of results is needed or not.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | The sorting method applied to the return results.
        try {
            CustomerCouponSearchResult result = apiInstance.getCustomerCouponsUsingGET(baseSiteId, userId, currentPage, fields, needsTotal, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerCouponsApi#getCustomerCouponsUsingGET");
            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)
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 *needsTotal = true; // The flag for indicating if total number of results is needed or not. (optional) (default to true)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 10)
String *sort = sort_example; // The sorting method applied to the return results. (optional)

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

// Gets all customer coupons of the current customer.
[apiInstance getCustomerCouponsUsingGETWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    needsTotal:needsTotal
    pageSize:pageSize
    sort:sort
              completionHandler: ^(CustomerCouponSearchResult 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.CustomerCouponsApi()
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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'needsTotal': true, // {{Boolean}} The flag for indicating if total number of results is needed or not.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} The sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCustomerCouponsUsingGET(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 getCustomerCouponsUsingGETExample
    {
        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 CustomerCouponsApi();
            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 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 needsTotal = true;  // Boolean | The flag for indicating if total number of results is needed or not. (optional)  (default to true)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 10)
            var sort = sort_example;  // String | The sorting method applied to the return results. (optional) 

            try
            {
                // Gets all customer coupons of the current customer.
                CustomerCouponSearchResult result = apiInstance.getCustomerCouponsUsingGET(baseSiteId, userId, currentPage, fields, needsTotal, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerCouponsApi.getCustomerCouponsUsingGET: " + 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\ApiCustomerCouponsApi();
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$needsTotal = true; // Boolean | The flag for indicating if total number of results is needed or not.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | The sorting method applied to the return results.

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

# 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::CustomerCouponsApi->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 $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 $needsTotal = true; # Boolean | The flag for indicating if total number of results is needed or not.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | The sorting method applied to the return results.

eval { 
    my $result = $api_instance->getCustomerCouponsUsingGET(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, needsTotal => $needsTotal, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerCouponsApi->getCustomerCouponsUsingGET: $@\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.CustomerCouponsApi()
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)
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)
needsTotal = true # Boolean | The flag for indicating if total number of results is needed or not. (optional) (default to true)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 10)
sort = sort_example # String | The sorting method applied to the return results. (optional)

try: 
    # Gets all customer coupons of the current customer.
    api_response = api_instance.get_customer_coupons_using_get(baseSiteId, userId, currentPage=currentPage, fields=fields, needsTotal=needsTotal, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerCouponsApi->getCustomerCouponsUsingGET: %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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
needsTotal
Boolean
The flag for indicating if total number of results is needed or not.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
The sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | User group object with id and name.
        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 | User group object with id and name.
        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 = ; // User group object with id and name.
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}} User group object with id and name.
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 | User group object with id and name.
            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 | User group object with id and name.
$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 | User group object with id and name.
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 | User group object with id and name.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group 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(baseSiteId, groupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group 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(baseSiteId, groupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *groupId = groupId_example; // Group 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:baseSiteId
    groupId:groupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var groupId = groupId_example; // {{String}} Group 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(baseSiteId, groupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group 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(baseSiteId, groupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$groupId = groupId_example; // String | Group 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($baseSiteId, $groupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $groupId = groupId_example; # String | Group 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(baseSiteId => $baseSiteId, groupId => $groupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group 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(baseSiteId, groupId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->getCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/customergroups?currentPage=&fields=&pageSize="
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).
        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
        Integer pageSize = 56; // Integer | Number of customer group returned in one page.
        try {
            UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, fields, pageSize);
            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).
        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
        Integer pageSize = 56; // Integer | Number of customer group returned in one page.
        try {
            UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, fields, pageSize);
            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)
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)
Integer *pageSize = 56; // Number of customer group returned in one page. (optional) (default to 20)

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

// Get all subgroups of a customergroup.
[apiInstance getCustomerGroupsWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
              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).
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56 // {{Integer}} Number of customer group returned in one page.
};
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 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)
            var pageSize = 56;  // Integer | Number of customer group returned in one page. (optional)  (default to 20)

            try
            {
                // Get all subgroups of a customergroup.
                UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, fields, pageSize);
                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).
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | Number of customer group returned in one page.

try {
    $result = $api_instance->getCustomerGroups($baseSiteId, $currentPage, $fields, $pageSize);
    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 $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 $pageSize = 56; # Integer | Number of customer group returned in one page.

eval { 
    my $result = $api_instance->getCustomerGroups(baseSiteId => $baseSiteId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize);
    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)
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)
pageSize = 56 # Integer | Number of customer group returned in one page. (optional) (default to 20)

try: 
    # Get all subgroups of a customergroup.
    api_response = api_instance.get_customer_groups(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize)
    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).
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
Number of customer group returned in one page.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        String userId = userId_example; // String | User identifier.
        try {
            apiInstance.removeUsersFromCustomerGroup(baseSiteId, groupId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        String userId = userId_example; // String | User identifier.
        try {
            apiInstance.removeUsersFromCustomerGroup(baseSiteId, groupId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *groupId = groupId_example; // Group identifier.
String *userId = userId_example; // User identifier.

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

// Deletes a user from a customer group.
[apiInstance removeUsersFromCustomerGroupWith:baseSiteId
    groupId:groupId
    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.CustomerGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var groupId = groupId_example; // {{String}} Group identifier.
var userId = userId_example; // {{String}} User identifier.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeUsersFromCustomerGroup(baseSiteId, groupId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group identifier.
            var userId = userId_example;  // String | User identifier.

            try
            {
                // Deletes a user from a customer group.
                apiInstance.removeUsersFromCustomerGroup(baseSiteId, groupId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$groupId = groupId_example; // String | Group identifier.
$userId = userId_example; // String | User identifier.

try {
    $api_instance->removeUsersFromCustomerGroup($baseSiteId, $groupId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $groupId = groupId_example; # String | Group identifier.
my $userId = userId_example; # String | User identifier.

eval { 
    $api_instance->removeUsersFromCustomerGroup(baseSiteId => $baseSiteId, groupId => $groupId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group identifier.
userId = userId_example # String | User identifier.

try: 
    # Deletes a user from a customer group.
    api_instance.remove_users_from_customer_group(baseSiteId, groupId, userId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group identifier.
Required
userId*
String
User identifier.
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | List of users to set for customer group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        try {
            apiInstance.replaceUsersForCustomerGroup(body, baseSiteId, groupId);
        } 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 | List of users to set for customer group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        try {
            apiInstance.replaceUsersForCustomerGroup(body, baseSiteId, groupId);
        } 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 = ; // List of users to set for customer group.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *groupId = groupId_example; // Group identifier.

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

// Sets members for a user group.
[apiInstance replaceUsersForCustomerGroupWith:body
    baseSiteId:baseSiteId
    groupId:groupId
              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}} List of users to set for customer group.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var groupId = groupId_example; // {{String}} Group identifier.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceUsersForCustomerGroup(bodybaseSiteIdgroupId, 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 | List of users to set for customer group.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group identifier.

            try
            {
                // Sets members for a user group.
                apiInstance.replaceUsersForCustomerGroup(body, baseSiteId, groupId);
            }
            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 | List of users to set for customer group.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$groupId = groupId_example; // String | Group identifier.

try {
    $api_instance->replaceUsersForCustomerGroup($body, $baseSiteId, $groupId);
} 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 | List of users to set for customer group.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $groupId = groupId_example; # String | Group identifier.

eval { 
    $api_instance->replaceUsersForCustomerGroup(body => $body, baseSiteId => $baseSiteId, groupId => $groupId);
};
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 | List of users to set for customer group.
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group identifier.

try: 
    # Sets members for a user group.
    api_instance.replace_users_for_customer_group(body, baseSiteId, groupId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->replaceUsersForCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group identifier.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | List of users to assign to customer group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        try {
            apiInstance.updateCustomerGroupWithUsers(body, baseSiteId, groupId);
        } 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 | List of users to assign to customer group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        try {
            apiInstance.updateCustomerGroupWithUsers(body, baseSiteId, groupId);
        } 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 = ; // List of users to assign to customer group.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *groupId = groupId_example; // Group identifier.

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

// Assigns user(s) to a customer group.
[apiInstance updateCustomerGroupWithUsersWith:body
    baseSiteId:baseSiteId
    groupId:groupId
              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}} List of users to assign to customer group.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var groupId = groupId_example; // {{String}} Group identifier.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateCustomerGroupWithUsers(bodybaseSiteIdgroupId, 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 | List of users to assign to customer group.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group identifier.

            try
            {
                // Assigns user(s) to a customer group.
                apiInstance.updateCustomerGroupWithUsers(body, baseSiteId, groupId);
            }
            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 | List of users to assign to customer group.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$groupId = groupId_example; // String | Group identifier.

try {
    $api_instance->updateCustomerGroupWithUsers($body, $baseSiteId, $groupId);
} 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 | List of users to assign to customer group.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $groupId = groupId_example; # String | Group identifier.

eval { 
    $api_instance->updateCustomerGroupWithUsers(body => $body, baseSiteId => $baseSiteId, groupId => $groupId);
};
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 | List of users to assign to customer group.
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group identifier.

try: 
    # Assigns user(s) to a customer group.
    api_instance.update_customer_group_with_users(body, baseSiteId, groupId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->updateCustomerGroupWithUsers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group identifier.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/export/products?catalog=¤tPage=&fields=&pageSize=×tamp=&version="
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
        String catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        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 version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        try {
            ProductList result = apiInstance.getExportedProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
            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
        String catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        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 version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        try {
            ProductList result = apiInstance.getExportedProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
            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
String *catalog = catalog_example; // The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
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 *version = version_example; // The catalog version. The catalog version must be provided along with the catalog. (optional)

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

// Get a list of product exports.
[apiInstance getExportedProductsWith:baseSiteId
    catalog:catalog
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    timestamp:timestamp
    version:version
              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 = { 
  'catalog': catalog_example, // {{String}} The catalog to retrieve products from. The catalog must be provided along with the version.
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  '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).
  'version': version_example // {{String}} The catalog version. The catalog version must be provided along with the catalog.
};
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 catalog = catalog_example;  // String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional) 
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            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 version = version_example;  // String | The catalog version. The catalog version must be provided along with the catalog. (optional) 

            try
            {
                // Get a list of product exports.
                ProductList result = apiInstance.getExportedProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
                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
$catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$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).
$version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.

try {
    $result = $api_instance->getExportedProducts($baseSiteId, $catalog, $currentPage, $fields, $pageSize, $timestamp, $version);
    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 $catalog = catalog_example; # String | The catalog to retrieve products from. The catalog must be provided along with the version.
my $currentPage = 56; # Integer | The current result page requested.
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 $pageSize = 56; # Integer | The number of results returned per page.
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 $version = version_example; # String | The catalog version. The catalog version must be provided along with the catalog.

eval { 
    my $result = $api_instance->getExportedProducts(baseSiteId => $baseSiteId, catalog => $catalog, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, timestamp => $timestamp, version => $version);
    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
catalog = catalog_example # String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
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)
version = version_example # String | The catalog version. The catalog version must be provided along with the catalog. (optional)

try: 
    # Get a list of product exports.
    api_response = api_instance.get_exported_products(baseSiteId, catalog=catalog, currentPage=currentPage, fields=fields, pageSize=pageSize, timestamp=timestamp, version=version)
    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
catalog
String
The catalog to retrieve products from. The catalog must be provided along with the version.
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
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).
version
String
The catalog version. The catalog version must be provided along with the catalog.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ExtendedCarts

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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/consolidate?fields=&storeName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExtendedCartsApi;

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

public class ExtendedCartsApiExample {

    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");

        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 storeName = storeName_example; // String | The name of the store where items will be picked up
        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 {
            CartModificationList result = apiInstance.createConsolidatedPickupLocation(baseSiteId, cartId, storeName, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#createConsolidatedPickupLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtendedCartsApi;

public class ExtendedCartsApiExample {

    public static void main(String[] args) {
        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 storeName = storeName_example; // String | The name of the store where items will be picked up
        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 {
            CartModificationList result = apiInstance.createConsolidatedPickupLocation(baseSiteId, cartId, storeName, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *storeName = storeName_example; // The name of the store where items will be picked up
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)

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

// Handles the consolidating pickup locations.
[apiInstance createConsolidatedPickupLocationWith:baseSiteId
    cartId:cartId
    storeName:storeName
    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.ExtendedCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 storeName = storeName_example; // {{String}} The name of the store where items will be picked up
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.createConsolidatedPickupLocation(baseSiteId, cartId, storeName, userId, 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 ExtendedCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 storeName = storeName_example;  // String | The name of the store where items will be picked up
            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
            {
                // Handles the consolidating pickup locations.
                CartModificationList result = apiInstance.createConsolidatedPickupLocation(baseSiteId, cartId, storeName, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtendedCartsApi.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\ApiExtendedCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$storeName = storeName_example; // String | The name of the store where items will be picked up
$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->createConsolidatedPickupLocation($baseSiteId, $cartId, $storeName, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExtendedCartsApi->createConsolidatedPickupLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExtendedCartsApi;

# 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::ExtendedCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $storeName = storeName_example; # String | The name of the store where items will be picked up
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->createConsolidatedPickupLocation(baseSiteId => $baseSiteId, cartId => $cartId, storeName => $storeName, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExtendedCartsApi->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.ExtendedCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
storeName = storeName_example # String | The name of the store where items will be picked up
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: 
    # Handles the consolidating pickup locations.
    api_response = api_instance.create_consolidated_pickup_location(baseSiteId, cartId, storeName, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtendedCartsApi->createConsolidatedPickupLocation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
storeName*
String
The name of the store where items will be picked up
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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.ExtendedCartsApi;

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

public class ExtendedCartsApiExample {

    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");

        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.doHandleSopPaymentResponse(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#doHandleSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtendedCartsApi;

public class ExtendedCartsApiExample {

    public static void main(String[] args) {
        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.doHandleSopPaymentResponse(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Handles response from payment provider and create payment details
[apiInstance doHandleSopPaymentResponseWith:baseSiteId
    cartId:cartId
    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.ExtendedCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.doHandleSopPaymentResponse(baseSiteId, cartId, userId, 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 ExtendedCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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
            {
                // Handles response from payment provider and create payment details
                PaymentDetails result = apiInstance.doHandleSopPaymentResponse(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtendedCartsApi.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\ApiExtendedCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->doHandleSopPaymentResponse($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExtendedCartsApi->doHandleSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExtendedCartsApi;

# 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::ExtendedCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->doHandleSopPaymentResponse(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExtendedCartsApi->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.ExtendedCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Handles response from payment provider and create payment details
    api_response = api_instance.do_handle_sop_payment_response(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtendedCartsApi->doHandleSopPaymentResponse: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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.ExtendedCartsApi;

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

public class ExtendedCartsApiExample {

    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");

        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#getConsolidatedPickupLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtendedCartsApi;

public class ExtendedCartsApiExample {

    public static void main(String[] args) {
        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get consolidated pickup options.
[apiInstance getConsolidatedPickupLocationsWith:baseSiteId
    cartId:cartId
    userId:userId
    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.ExtendedCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.getConsolidatedPickupLocations(baseSiteId, cartId, userId, 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 ExtendedCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 consolidated pickup options.
                PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtendedCartsApi.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\ApiExtendedCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getConsolidatedPickupLocations($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExtendedCartsApi->getConsolidatedPickupLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExtendedCartsApi;

# 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::ExtendedCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->getConsolidatedPickupLocations(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExtendedCartsApi->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.ExtendedCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 consolidated pickup options.
    api_response = api_instance.get_consolidated_pickup_locations(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtendedCartsApi->getConsolidatedPickupLocations: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/request?extendedMerchantCallback=&fields=&responseUrl="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExtendedCartsApi;

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

public class ExtendedCartsApiExample {

    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");

        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        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(baseSiteId, cartId, responseUrl, userId, extendedMerchantCallback, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#getSopPaymentRequestDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtendedCartsApi;

public class ExtendedCartsApiExample {

    public static void main(String[] args) {
        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        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(baseSiteId, cartId, responseUrl, userId, extendedMerchantCallback, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
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)

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

// Get information needed for create subscription
[apiInstance getSopPaymentRequestDetailsWith:baseSiteId
    cartId:cartId
    responseUrl:responseUrl
    userId:userId
    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.ExtendedCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
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(baseSiteId, cartId, responseUrl, userId, 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 ExtendedCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            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(baseSiteId, cartId, responseUrl, userId, extendedMerchantCallback, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtendedCartsApi.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\ApiExtendedCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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”.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$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($baseSiteId, $cartId, $responseUrl, $userId, $extendedMerchantCallback, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExtendedCartsApi->getSopPaymentRequestDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExtendedCartsApi;

# 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::ExtendedCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
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(baseSiteId => $baseSiteId, cartId => $cartId, responseUrl => $responseUrl, userId => $userId, extendedMerchantCallback => $extendedMerchantCallback, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExtendedCartsApi->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.ExtendedCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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”.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
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(baseSiteId, cartId, responseUrl, userId, extendedMerchantCallback=extendedMerchantCallback, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtendedCartsApi->getSopPaymentRequestDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
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
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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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.ExtendedCartsApi;

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

public class ExtendedCartsApiExample {

    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");

        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#getSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtendedCartsApi;

public class ExtendedCartsApiExample {

    public static void main(String[] args) {
        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get information about create subscription request results
[apiInstance getSopPaymentResponseWith:baseSiteId
    cartId:cartId
    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.ExtendedCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, cartId, 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 ExtendedCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtendedCartsApi.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\ApiExtendedCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExtendedCartsApi->getSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExtendedCartsApi;

# 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::ExtendedCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExtendedCartsApi->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.ExtendedCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtendedCartsApi->getSopPaymentResponse: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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.ExtendedCartsApi;

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

public class ExtendedCartsApiExample {

    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");

        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeSopPaymentResponse(baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#removeSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtendedCartsApi;

public class ExtendedCartsApiExample {

    public static void main(String[] args) {
        ExtendedCartsApi apiInstance = new ExtendedCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeSopPaymentResponse(baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtendedCartsApi#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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Deletes payment provider response related to cart.
[apiInstance removeSopPaymentResponseWith:baseSiteId
    cartId:cartId
    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.ExtendedCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, cartId, 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 ExtendedCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtendedCartsApi.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\ApiExtendedCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::ExtendedCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeSopPaymentResponse(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
if ($@) {
    warn "Exception when calling ExtendedCartsApi->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.ExtendedCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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(baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling ExtendedCartsApi->removeSopPaymentResponse: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/feeds/orders/statusfeed?fields=×tamp="
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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 fields = 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(baseSiteId, timestamp, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 fields = 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(baseSiteId, timestamp, 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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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:baseSiteId
    timestamp:timestamp
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, timestamp, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, timestamp, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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).
$fields = 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($baseSiteId, $timestamp, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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(baseSiteId => $baseSiteId, timestamp => $timestamp, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
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).
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(baseSiteId, timestamp, 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
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ForgottenPasswords

doResetPassword

Reset password after customer's clicked forgotten password link.

Reset password after customer's clicked forgotten password link.


/{baseSiteId}/resetpassword

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Request body parameter that contains details such as token and new password
        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 | Request body parameter that contains details such as token and new password
        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 = ; // Request body parameter that contains details such as token and new password
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}} Request body parameter that contains details such as token and new password
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 | Request body parameter that contains details such as token and new password
            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 | Request body parameter that contains details such as token and new password
$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 | Request body parameter that contains details such as token and new password
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 | Request body parameter that contains details such as token and new password
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: 201 - Created

Status: 202 - Accepted

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doRestorePassword

Generates a token to restore a customer's forgotten password.

Generates a token to restore a customer's forgotten password.


/{baseSiteId}/forgottenpasswordtokens

Usage and SDK Samples

curl -X POST\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | Customer's user id. Customer user id is case insensitive.
        try {
            apiInstance.doRestorePassword(baseSiteId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | Customer's user id. Customer user id is case insensitive.
        try {
            apiInstance.doRestorePassword(baseSiteId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // Customer's user id. Customer user id is case insensitive.

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

// Generates a token to restore a customer's forgotten password.
[apiInstance doRestorePasswordWith: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.ForgottenPasswordsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} Customer's user id. Customer user id is case insensitive.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doRestorePassword(baseSiteId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | Customer's user id. Customer user id is case insensitive.

            try
            {
                // Generates a token to restore a customer's forgotten password.
                apiInstance.doRestorePassword(baseSiteId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | Customer's user id. Customer user id is case insensitive.

try {
    $api_instance->doRestorePassword($baseSiteId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | Customer's user id. Customer user id is case insensitive.

eval { 
    $api_instance->doRestorePassword(baseSiteId => $baseSiteId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | Customer's user id. Customer user id is case insensitive.

try: 
    # Generates a token to restore a customer's forgotten password.
    api_instance.do_restore_password(baseSiteId, userId)
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: 201 - Created

Status: 202 - Accepted

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


LoginNotification

doPublishSuccessfulLoginEvent

Notify about successful login.

Publish notification event about successful login.


/{baseSiteId}/users/{userId}/loginnotification

Usage and SDK Samples

curl -X POST\
\
\
"//localhost:9002/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 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.doPublishSuccessfulLoginEvent(baseSiteId, userId);
        } 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 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.doPublishSuccessfulLoginEvent(baseSiteId, userId);
        } 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 *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

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

// Notify about successful login.
[apiInstance doPublishSuccessfulLoginEventWith: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.LoginNotificationApi()
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.doPublishSuccessfulLoginEvent(baseSiteId, userId, 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 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
            {
                // Notify about successful login.
                apiInstance.doPublishSuccessfulLoginEvent(baseSiteId, userId);
            }
            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();
$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->doPublishSuccessfulLoginEvent($baseSiteId, $userId);
} 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 $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->doPublishSuccessfulLoginEvent(baseSiteId => $baseSiteId, userId => $userId);
};
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()
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: 
    # Notify about successful login.
    api_instance.do_publish_successful_login_event(baseSiteId, userId)
except ApiException as e:
    print("Exception when calling LoginNotificationApi->doPublishSuccessfulLoginEvent: %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

Responses

Status: 201 - Created

Status: 202 - Accepted

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doHandleCartMerchantCallback(baseSiteId, cartId, userId);
        } 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doHandleCartMerchantCallback(baseSiteId, cartId, userId);
        } 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Verify the decision of the Merchant for a cart
[apiInstance doHandleCartMerchantCallbackWith:baseSiteId
    cartId:cartId
    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.MerchantCallbackApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.doHandleCartMerchantCallback(baseSiteId, cartId, userId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Verify the decision of the Merchant for a cart
                apiInstance.doHandleCartMerchantCallback(baseSiteId, cartId, userId);
            }
            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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doHandleCartMerchantCallback($baseSiteId, $cartId, $userId);
} 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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doHandleCartMerchantCallback(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
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()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Verify the decision of the Merchant for a cart
    api_instance.do_handle_cart_merchant_callback(baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling MerchantCallbackApi->doHandleCartMerchantCallback: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


MessageCenter

closeConversationUsingPATCH

Closes an open conversation

Closes an open conversation and returns the conversation data.


/{baseSiteId}/messagecenter/im/conversations/{conversationId}/close

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/messagecenter/im/conversations/{conversationId}/close"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessageCenterApi;

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

public class MessageCenterApiExample {

    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");

        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String conversationId = conversationId_example; // String | the uid of conversation
        try {
            conversation result = apiInstance.closeConversationUsingPATCH(baseSiteId, conversationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#closeConversationUsingPATCH");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessageCenterApi;

public class MessageCenterApiExample {

    public static void main(String[] args) {
        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String conversationId = conversationId_example; // String | the uid of conversation
        try {
            conversation result = apiInstance.closeConversationUsingPATCH(baseSiteId, conversationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#closeConversationUsingPATCH");
            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 *conversationId = conversationId_example; // the uid of conversation

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

// Closes an open conversation
[apiInstance closeConversationUsingPATCHWith:baseSiteId
    conversationId:conversationId
              completionHandler: ^(conversation 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.MessageCenterApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var conversationId = conversationId_example; // {{String}} the uid of conversation

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

namespace Example
{
    public class closeConversationUsingPATCHExample
    {
        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 MessageCenterApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var conversationId = conversationId_example;  // String | the uid of conversation

            try
            {
                // Closes an open conversation
                conversation result = apiInstance.closeConversationUsingPATCH(baseSiteId, conversationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessageCenterApi.closeConversationUsingPATCH: " + 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\ApiMessageCenterApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$conversationId = conversationId_example; // String | the uid of conversation

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

# 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::MessageCenterApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $conversationId = conversationId_example; # String | the uid of conversation

eval { 
    my $result = $api_instance->closeConversationUsingPATCH(baseSiteId => $baseSiteId, conversationId => $conversationId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessageCenterApi->closeConversationUsingPATCH: $@\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.MessageCenterApi()
baseSiteId = baseSiteId_example # String | Base site identifier
conversationId = conversationId_example # String | the uid of conversation

try: 
    # Closes an open conversation
    api_response = api_instance.close_conversation_using_patch(baseSiteId, conversationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageCenterApi->closeConversationUsingPATCH: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
conversationId*
String
the uid of conversation
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


getConversationsForAgentUsingGET

Gets unassigned or open conversations for current CSA

Returns unassigned or open conversation list for current CSA.


/{baseSiteId}/messagecenter/im/conversations/agentconversations

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/messagecenter/im/conversations/agentconversations?status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessageCenterApi;

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

public class MessageCenterApiExample {

    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");

        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String status = status_example; // String | the conversation status
        try {
            conversationList result = apiInstance.getConversationsForAgentUsingGET(baseSiteId, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#getConversationsForAgentUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessageCenterApi;

public class MessageCenterApiExample {

    public static void main(String[] args) {
        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String status = status_example; // String | the conversation status
        try {
            conversationList result = apiInstance.getConversationsForAgentUsingGET(baseSiteId, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#getConversationsForAgentUsingGET");
            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 *status = status_example; // the conversation status

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

// Gets unassigned or open conversations for current CSA
[apiInstance getConversationsForAgentUsingGETWith:baseSiteId
    status:status
              completionHandler: ^(conversationList 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.MessageCenterApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var status = status_example; // {{String}} the conversation status

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

namespace Example
{
    public class getConversationsForAgentUsingGETExample
    {
        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 MessageCenterApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var status = status_example;  // String | the conversation status

            try
            {
                // Gets unassigned or open conversations for current CSA
                conversationList result = apiInstance.getConversationsForAgentUsingGET(baseSiteId, status);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessageCenterApi.getConversationsForAgentUsingGET: " + 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\ApiMessageCenterApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$status = status_example; // String | the conversation status

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

# 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::MessageCenterApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $status = status_example; # String | the conversation status

eval { 
    my $result = $api_instance->getConversationsForAgentUsingGET(baseSiteId => $baseSiteId, status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessageCenterApi->getConversationsForAgentUsingGET: $@\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.MessageCenterApi()
baseSiteId = baseSiteId_example # String | Base site identifier
status = status_example # String | the conversation status

try: 
    # Gets unassigned or open conversations for current CSA
    api_response = api_instance.get_conversations_for_agent_using_get(baseSiteId, status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageCenterApi->getConversationsForAgentUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
status*
String
the conversation status
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConversationsForCustomerUsingGET

Gets conversations of current customer

Returns the conversation list of current customer.


/{baseSiteId}/messagecenter/im/conversations/customerconversations

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/messagecenter/im/conversations/customerconversations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessageCenterApi;

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

public class MessageCenterApiExample {

    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");

        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            conversationList result = apiInstance.getConversationsForCustomerUsingGET(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#getConversationsForCustomerUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessageCenterApi;

public class MessageCenterApiExample {

    public static void main(String[] args) {
        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            conversationList result = apiInstance.getConversationsForCustomerUsingGET(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#getConversationsForCustomerUsingGET");
            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

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

// Gets conversations of current customer
[apiInstance getConversationsForCustomerUsingGETWith:baseSiteId
              completionHandler: ^(conversationList 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.MessageCenterApi()
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. Returned data: ' + data);
  }
};
api.getConversationsForCustomerUsingGET(baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConversationsForCustomerUsingGETExample
    {
        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 MessageCenterApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Gets conversations of current customer
                conversationList result = apiInstance.getConversationsForCustomerUsingGET(baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessageCenterApi.getConversationsForCustomerUsingGET: " + 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\ApiMessageCenterApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

# 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::MessageCenterApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    my $result = $api_instance->getConversationsForCustomerUsingGET(baseSiteId => $baseSiteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessageCenterApi->getConversationsForCustomerUsingGET: $@\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.MessageCenterApi()
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Gets conversations of current customer
    api_response = api_instance.get_conversations_for_customer_using_get(baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageCenterApi->getConversationsForCustomerUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getMessagesForConversationUsingGET

Gets conversation messages for current customer or current CSA

Returns all messages of a specific conversation.


/{baseSiteId}/messagecenter/im/conversations/{conversationId}/messages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/messagecenter/im/conversations/{conversationId}/messages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessageCenterApi;

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

public class MessageCenterApiExample {

    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");

        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String conversationId = conversationId_example; // String | the uid of conversation
        try {
            conversationMessageList result = apiInstance.getMessagesForConversationUsingGET(baseSiteId, conversationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#getMessagesForConversationUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessageCenterApi;

public class MessageCenterApiExample {

    public static void main(String[] args) {
        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String conversationId = conversationId_example; // String | the uid of conversation
        try {
            conversationMessageList result = apiInstance.getMessagesForConversationUsingGET(baseSiteId, conversationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#getMessagesForConversationUsingGET");
            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 *conversationId = conversationId_example; // the uid of conversation

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

// Gets conversation messages for current customer or current CSA
[apiInstance getMessagesForConversationUsingGETWith:baseSiteId
    conversationId:conversationId
              completionHandler: ^(conversationMessageList 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.MessageCenterApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var conversationId = conversationId_example; // {{String}} the uid of conversation

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

namespace Example
{
    public class getMessagesForConversationUsingGETExample
    {
        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 MessageCenterApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var conversationId = conversationId_example;  // String | the uid of conversation

            try
            {
                // Gets conversation messages for current customer or current CSA
                conversationMessageList result = apiInstance.getMessagesForConversationUsingGET(baseSiteId, conversationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessageCenterApi.getMessagesForConversationUsingGET: " + 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\ApiMessageCenterApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$conversationId = conversationId_example; // String | the uid of conversation

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

# 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::MessageCenterApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $conversationId = conversationId_example; # String | the uid of conversation

eval { 
    my $result = $api_instance->getMessagesForConversationUsingGET(baseSiteId => $baseSiteId, conversationId => $conversationId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessageCenterApi->getMessagesForConversationUsingGET: $@\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.MessageCenterApi()
baseSiteId = baseSiteId_example # String | Base site identifier
conversationId = conversationId_example # String | the uid of conversation

try: 
    # Gets conversation messages for current customer or current CSA
    api_response = api_instance.get_messages_for_conversation_using_get(baseSiteId, conversationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageCenterApi->getMessagesForConversationUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
conversationId*
String
the uid of conversation
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


pickConversationUsingPATCH

Picks an unassigned conversation

Picks an unassigned conversation and returns the conversation data.


/{baseSiteId}/messagecenter/im/conversations/{conversationId}/pick

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/messagecenter/im/conversations/{conversationId}/pick"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessageCenterApi;

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

public class MessageCenterApiExample {

    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");

        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String conversationId = conversationId_example; // String | the uid of conversation
        try {
            conversation result = apiInstance.pickConversationUsingPATCH(baseSiteId, conversationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#pickConversationUsingPATCH");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessageCenterApi;

public class MessageCenterApiExample {

    public static void main(String[] args) {
        MessageCenterApi apiInstance = new MessageCenterApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String conversationId = conversationId_example; // String | the uid of conversation
        try {
            conversation result = apiInstance.pickConversationUsingPATCH(baseSiteId, conversationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#pickConversationUsingPATCH");
            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 *conversationId = conversationId_example; // the uid of conversation

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

// Picks an unassigned conversation
[apiInstance pickConversationUsingPATCHWith:baseSiteId
    conversationId:conversationId
              completionHandler: ^(conversation 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.MessageCenterApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var conversationId = conversationId_example; // {{String}} the uid of conversation

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

namespace Example
{
    public class pickConversationUsingPATCHExample
    {
        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 MessageCenterApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var conversationId = conversationId_example;  // String | the uid of conversation

            try
            {
                // Picks an unassigned conversation
                conversation result = apiInstance.pickConversationUsingPATCH(baseSiteId, conversationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessageCenterApi.pickConversationUsingPATCH: " + 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\ApiMessageCenterApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$conversationId = conversationId_example; // String | the uid of conversation

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

# 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::MessageCenterApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $conversationId = conversationId_example; # String | the uid of conversation

eval { 
    my $result = $api_instance->pickConversationUsingPATCH(baseSiteId => $baseSiteId, conversationId => $conversationId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessageCenterApi->pickConversationUsingPATCH: $@\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.MessageCenterApi()
baseSiteId = baseSiteId_example # String | Base site identifier
conversationId = conversationId_example # String | the uid of conversation

try: 
    # Picks an unassigned conversation
    api_response = api_instance.pick_conversation_using_patch(baseSiteId, conversationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageCenterApi->pickConversationUsingPATCH: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
conversationId*
String
the uid of conversation
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


sendMessageUsingPOST

Sends messages

Sends messages in a conversation and returns the conversation data.


/{baseSiteId}/messagecenter/im/conversations

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/messagecenter/im/conversations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessageCenterApi;

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

public class MessageCenterApiExample {

    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");

        MessageCenterApi apiInstance = new MessageCenterApi();
        ConversationMessageList body = ; // ConversationMessageList | the list of messages
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            conversation result = apiInstance.sendMessageUsingPOST(body, baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#sendMessageUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessageCenterApi;

public class MessageCenterApiExample {

    public static void main(String[] args) {
        MessageCenterApi apiInstance = new MessageCenterApi();
        ConversationMessageList body = ; // ConversationMessageList | the list of messages
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            conversation result = apiInstance.sendMessageUsingPOST(body, baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessageCenterApi#sendMessageUsingPOST");
            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"];
ConversationMessageList *body = ; // the list of messages
String *baseSiteId = baseSiteId_example; // Base site identifier

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

// Sends messages
[apiInstance sendMessageUsingPOSTWith:body
    baseSiteId:baseSiteId
              completionHandler: ^(conversation 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.MessageCenterApi()
var body = ; // {{ConversationMessageList}} the list of messages
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. Returned data: ' + data);
  }
};
api.sendMessageUsingPOST(bodybaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendMessageUsingPOSTExample
    {
        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 MessageCenterApi();
            var body = new ConversationMessageList(); // ConversationMessageList | the list of messages
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Sends messages
                conversation result = apiInstance.sendMessageUsingPOST(body, baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessageCenterApi.sendMessageUsingPOST: " + 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\ApiMessageCenterApi();
$body = ; // ConversationMessageList | the list of messages
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

# 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::MessageCenterApi->new();
my $body = WWW::SwaggerClient::Object::ConversationMessageList->new(); # ConversationMessageList | the list of messages
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    my $result = $api_instance->sendMessageUsingPOST(body => $body, baseSiteId => $baseSiteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessageCenterApi->sendMessageUsingPOST: $@\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.MessageCenterApi()
body =  # ConversationMessageList | the list of messages
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Sends messages
    api_response = api_instance.send_message_using_post(body, baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageCenterApi->sendMessageUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTitles

Get a list of all localized titles.

Lists all localized titles.


/{baseSiteId}/titles

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


NotificationPreference

getNotificationPreferencesUsingGET

Gets all notification preferences of the current customer

Returns the notification preferences of the current customer.


/{baseSiteId}/users/{userId}/notificationpreferences

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/notificationpreferences"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NotificationPreferenceApi;

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

public class NotificationPreferenceApiExample {

    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");

        NotificationPreferenceApi apiInstance = new NotificationPreferenceApi();
        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 {
            notificationPreferenceList result = apiInstance.getNotificationPreferencesUsingGET(baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationPreferenceApi#getNotificationPreferencesUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NotificationPreferenceApi;

public class NotificationPreferenceApiExample {

    public static void main(String[] args) {
        NotificationPreferenceApi apiInstance = new NotificationPreferenceApi();
        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 {
            notificationPreferenceList result = apiInstance.getNotificationPreferencesUsingGET(baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationPreferenceApi#getNotificationPreferencesUsingGET");
            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

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

// Gets all notification preferences of the current customer
[apiInstance getNotificationPreferencesUsingGETWith:baseSiteId
    userId:userId
              completionHandler: ^(notificationPreferenceList 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.NotificationPreferenceApi()
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.getNotificationPreferencesUsingGET(baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNotificationPreferencesUsingGETExample
    {
        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 NotificationPreferenceApi();
            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
            {
                // Gets all notification preferences of the current customer
                notificationPreferenceList result = apiInstance.getNotificationPreferencesUsingGET(baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NotificationPreferenceApi.getNotificationPreferencesUsingGET: " + 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\ApiNotificationPreferenceApi();
$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->getNotificationPreferencesUsingGET($baseSiteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NotificationPreferenceApi->getNotificationPreferencesUsingGET: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NotificationPreferenceApi;

# 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::NotificationPreferenceApi->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

eval { 
    my $result = $api_instance->getNotificationPreferencesUsingGET(baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NotificationPreferenceApi->getNotificationPreferencesUsingGET: $@\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.NotificationPreferenceApi()
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: 
    # Gets all notification preferences of the current customer
    api_response = api_instance.get_notification_preferences_using_get(baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NotificationPreferenceApi->getNotificationPreferencesUsingGET: %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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateNotificationPreferencesUsingPATCH

Updates the notification preferences of the current customer

Updates the notification preference of the current customer.


/{baseSiteId}/users/{userId}/notificationpreferences

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/notificationpreferences"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NotificationPreferenceApi;

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

public class NotificationPreferenceApiExample {

    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");

        NotificationPreferenceApi apiInstance = new NotificationPreferenceApi();
        BasicnotificationPreferenceList body = ; // BasicnotificationPreferenceList | Notification preference list
        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.updateNotificationPreferencesUsingPATCH(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationPreferenceApi#updateNotificationPreferencesUsingPATCH");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NotificationPreferenceApi;

public class NotificationPreferenceApiExample {

    public static void main(String[] args) {
        NotificationPreferenceApi apiInstance = new NotificationPreferenceApi();
        BasicnotificationPreferenceList body = ; // BasicnotificationPreferenceList | Notification preference list
        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.updateNotificationPreferencesUsingPATCH(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationPreferenceApi#updateNotificationPreferencesUsingPATCH");
            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"];
BasicnotificationPreferenceList *body = ; // Notification preference list
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

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

// Updates the notification preferences of the current customer
[apiInstance updateNotificationPreferencesUsingPATCHWith:body
    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.NotificationPreferenceApi()
var body = ; // {{BasicnotificationPreferenceList}} Notification preference list
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.updateNotificationPreferencesUsingPATCH(bodybaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateNotificationPreferencesUsingPATCHExample
    {
        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 NotificationPreferenceApi();
            var body = new BasicnotificationPreferenceList(); // BasicnotificationPreferenceList | Notification preference list
            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 notification preferences of the current customer
                apiInstance.updateNotificationPreferencesUsingPATCH(body, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NotificationPreferenceApi.updateNotificationPreferencesUsingPATCH: " + 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\ApiNotificationPreferenceApi();
$body = ; // BasicnotificationPreferenceList | Notification preference list
$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->updateNotificationPreferencesUsingPATCH($body, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling NotificationPreferenceApi->updateNotificationPreferencesUsingPATCH: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NotificationPreferenceApi;

# 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::NotificationPreferenceApi->new();
my $body = WWW::SwaggerClient::Object::BasicnotificationPreferenceList->new(); # BasicnotificationPreferenceList | Notification preference list
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->updateNotificationPreferencesUsingPATCH(body => $body, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling NotificationPreferenceApi->updateNotificationPreferencesUsingPATCH: $@\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.NotificationPreferenceApi()
body =  # BasicnotificationPreferenceList | Notification preference list
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 notification preferences of the current customer
    api_instance.update_notification_preferences_using_patch(body, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling NotificationPreferenceApi->updateNotificationPreferencesUsingPATCH: %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 *

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 | Order Approval Permission object.
        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 | Order Approval Permission object.
        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 = ; // Order Approval Permission object.
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}} Order Approval Permission object.
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 | Order Approval Permission object.
            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 | Order Approval Permission object.
$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 | Order Approval Permission object.
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 | Order Approval Permission object.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission 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(baseSiteId, orderApprovalPermissionCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission 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(baseSiteId, orderApprovalPermissionCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order Approval Permission 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:baseSiteId
    orderApprovalPermissionCode:orderApprovalPermissionCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order Approval Permission 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(baseSiteId, orderApprovalPermissionCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order Approval Permission 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(baseSiteId, orderApprovalPermissionCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission 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($baseSiteId, $orderApprovalPermissionCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order Approval Permission 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(baseSiteId => $baseSiteId, orderApprovalPermissionCode => $orderApprovalPermissionCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order Approval Permission 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(baseSiteId, orderApprovalPermissionCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermission: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderApprovalPermissionCode*
String
Order Approval Permission 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orderApprovalPermissions?currentPage=&fields=&pageSize=&sort="
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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissions(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissions(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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)
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)
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)

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

// Get order approval permissions.
[apiInstance getOrderApprovalPermissionsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
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 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 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) 

            try
            {
                // Get order approval permissions.
                OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissions(baseSiteId, userId, currentPage, fields, pageSize, sort);
                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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.

try {
    $result = $api_instance->getOrderApprovalPermissions($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getOrderApprovalPermissions(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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)
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)
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)

try: 
    # Get order approval permissions.
    api_response = api_instance.get_order_approval_permissions(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 | Order Approval Permission object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission 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, baseSiteId, orderApprovalPermissionCode, 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 | Order Approval Permission object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission 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, baseSiteId, orderApprovalPermissionCode, 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 = ; // Order Approval Permission object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order Approval Permission 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
    baseSiteId:baseSiteId
    orderApprovalPermissionCode:orderApprovalPermissionCode
    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}} Order Approval Permission object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order Approval Permission 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(bodybaseSiteIdorderApprovalPermissionCodeuserId, 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 | Order Approval Permission object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order Approval Permission 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, baseSiteId, orderApprovalPermissionCode, 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 | Order Approval Permission object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission 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, $baseSiteId, $orderApprovalPermissionCode, $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 | Order Approval Permission object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order Approval Permission 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, baseSiteId => $baseSiteId, orderApprovalPermissionCode => $orderApprovalPermissionCode, 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 | Order Approval Permission object.
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order Approval Permission 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, baseSiteId, orderApprovalPermissionCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionsApi->updateOrderApprovalPermission: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderApprovalPermissionCode*
String
Order Approval Permission 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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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 | The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        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, baseSiteId, orderApprovalCode, 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 | The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        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, baseSiteId, orderApprovalCode, 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 = ; // The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalCode = orderApprovalCode_example; // Code that identifies the order approval.
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
    baseSiteId:baseSiteId
    orderApprovalCode:orderApprovalCode
    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}} The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalCode = orderApprovalCode_example; // {{String}} Code that identifies the order approval.
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(bodybaseSiteIdorderApprovalCodeuserId, 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 | The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalCode = orderApprovalCode_example;  // String | Code that identifies the order approval.
            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, baseSiteId, orderApprovalCode, 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 | The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
$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, $baseSiteId, $orderApprovalCode, $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 | The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalCode = orderApprovalCode_example; # String | Code that identifies the order approval.
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, baseSiteId => $baseSiteId, orderApprovalCode => $orderApprovalCode, 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 | The order approval decision. The approval decision field is mandatory, and the approval comment field is mandatory if the decision is 'rejected'.
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalCode = orderApprovalCode_example # String | Code that identifies the order approval.
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, baseSiteId, orderApprovalCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalsApi->doMakeOrderApprovalDecision: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderApprovalCode*
String
Code that identifies the order approval.
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        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(baseSiteId, orderApprovalCode, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        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(baseSiteId, orderApprovalCode, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalCode = orderApprovalCode_example; // Code that identifies the order approval.
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:baseSiteId
    orderApprovalCode:orderApprovalCode
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalCode = orderApprovalCode_example; // {{String}} Code that identifies the order approval.
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(baseSiteId, orderApprovalCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalCode = orderApprovalCode_example;  // String | Code that identifies the order approval.
            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(baseSiteId, orderApprovalCode, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
$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($baseSiteId, $orderApprovalCode, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalCode = orderApprovalCode_example; # String | Code that identifies the order approval.
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(baseSiteId => $baseSiteId, orderApprovalCode => $orderApprovalCode, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalCode = orderApprovalCode_example # String | Code that identifies the order approval.
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(baseSiteId, orderApprovalCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalsApi->getOrderApproval: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderApprovalCode*
String
Code that identifies the order approval.
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orderapprovals?currentPage=&fields=&pageSize=&sort="
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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            OrderApprovalList result = apiInstance.getOrderApprovals(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            OrderApprovalList result = apiInstance.getOrderApprovals(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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)
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)
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)

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

// Get orders to approve.
[apiInstance getOrderApprovalsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
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 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 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) 

            try
            {
                // Get orders to approve.
                OrderApprovalList result = apiInstance.getOrderApprovals(baseSiteId, userId, currentPage, fields, pageSize, sort);
                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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.

try {
    $result = $api_instance->getOrderApprovals($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getOrderApprovals(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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)
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)
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)

try: 
    # Get orders to approve.
    api_response = api_instance.get_order_approvals(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrderForms

createOrderFormUsingPOST

createOrderForm


/{baseSiteId}/orderforms

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orderforms"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFormsApi;

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

public class OrderFormsApiExample {

    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");

        OrderFormsApi apiInstance = new OrderFormsApi();
        OrderForm body = ; // OrderForm | orderFormWsDTO
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.createOrderFormUsingPOST(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#createOrderFormUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFormsApi;

public class OrderFormsApiExample {

    public static void main(String[] args) {
        OrderFormsApi apiInstance = new OrderFormsApi();
        OrderForm body = ; // OrderForm | orderFormWsDTO
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.createOrderFormUsingPOST(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#createOrderFormUsingPOST");
            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"];
OrderForm *body = ; // orderFormWsDTO
String *baseSiteId = baseSiteId_example; // Base site identifier

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

// createOrderForm
[apiInstance createOrderFormUsingPOSTWith: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.OrderFormsApi()
var body = ; // {{OrderForm}} orderFormWsDTO
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.createOrderFormUsingPOST(bodybaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrderFormUsingPOSTExample
    {
        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 OrderFormsApi();
            var body = new OrderForm(); // OrderForm | orderFormWsDTO
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // createOrderForm
                apiInstance.createOrderFormUsingPOST(body, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFormsApi.createOrderFormUsingPOST: " + 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\ApiOrderFormsApi();
$body = ; // OrderForm | orderFormWsDTO
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

# 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::OrderFormsApi->new();
my $body = WWW::SwaggerClient::Object::OrderForm->new(); # OrderForm | orderFormWsDTO
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->createOrderFormUsingPOST(body => $body, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling OrderFormsApi->createOrderFormUsingPOST: $@\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.OrderFormsApi()
body =  # OrderForm | orderFormWsDTO
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # createOrderForm
    api_instance.create_order_form_using_post(body, baseSiteId)
except ApiException as e:
    print("Exception when calling OrderFormsApi->createOrderFormUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


deleteOrderFormUsingDELETE

deleteOrderForm


/{baseSiteId}/orderforms/{orderFormCode}

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/orderforms/{orderFormCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFormsApi;

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

public class OrderFormsApiExample {

    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");

        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        try {
            apiInstance.deleteOrderFormUsingDELETE(baseSiteId, orderFormCode);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#deleteOrderFormUsingDELETE");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFormsApi;

public class OrderFormsApiExample {

    public static void main(String[] args) {
        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        try {
            apiInstance.deleteOrderFormUsingDELETE(baseSiteId, orderFormCode);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#deleteOrderFormUsingDELETE");
            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 *orderFormCode = orderFormCode_example; // orderFormCode

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

// deleteOrderForm
[apiInstance deleteOrderFormUsingDELETEWith:baseSiteId
    orderFormCode:orderFormCode
              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.OrderFormsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderFormCode = orderFormCode_example; // {{String}} orderFormCode

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

namespace Example
{
    public class deleteOrderFormUsingDELETEExample
    {
        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 OrderFormsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderFormCode = orderFormCode_example;  // String | orderFormCode

            try
            {
                // deleteOrderForm
                apiInstance.deleteOrderFormUsingDELETE(baseSiteId, orderFormCode);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFormsApi.deleteOrderFormUsingDELETE: " + 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\ApiOrderFormsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderFormCode = orderFormCode_example; // String | orderFormCode

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

# 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::OrderFormsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderFormCode = orderFormCode_example; # String | orderFormCode

eval { 
    $api_instance->deleteOrderFormUsingDELETE(baseSiteId => $baseSiteId, orderFormCode => $orderFormCode);
};
if ($@) {
    warn "Exception when calling OrderFormsApi->deleteOrderFormUsingDELETE: $@\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.OrderFormsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderFormCode = orderFormCode_example # String | orderFormCode

try: 
    # deleteOrderForm
    api_instance.delete_order_form_using_delete(baseSiteId, orderFormCode)
except ApiException as e:
    print("Exception when calling OrderFormsApi->deleteOrderFormUsingDELETE: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderFormCode*
String
orderFormCode
Required

Responses

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


getOrderFormForCodeUsingGET

getOrderFormForCode


/{baseSiteId}/orderforms/{orderFormCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orderforms/{orderFormCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFormsApi;

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

public class OrderFormsApiExample {

    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");

        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        String fields = fields_example; // String | fields
        try {
            OrderForm result = apiInstance.getOrderFormForCodeUsingGET(baseSiteId, orderFormCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#getOrderFormForCodeUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFormsApi;

public class OrderFormsApiExample {

    public static void main(String[] args) {
        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        String fields = fields_example; // String | fields
        try {
            OrderForm result = apiInstance.getOrderFormForCodeUsingGET(baseSiteId, orderFormCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#getOrderFormForCodeUsingGET");
            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 *orderFormCode = orderFormCode_example; // orderFormCode
String *fields = fields_example; // fields (optional) (default to DEFAULT)

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

// getOrderFormForCode
[apiInstance getOrderFormForCodeUsingGETWith:baseSiteId
    orderFormCode:orderFormCode
    fields:fields
              completionHandler: ^(OrderForm 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.OrderFormsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderFormCode = orderFormCode_example; // {{String}} orderFormCode
var opts = { 
  'fields': fields_example // {{String}} fields
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderFormForCodeUsingGET(baseSiteId, orderFormCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderFormForCodeUsingGETExample
    {
        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 OrderFormsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderFormCode = orderFormCode_example;  // String | orderFormCode
            var fields = fields_example;  // String | fields (optional)  (default to DEFAULT)

            try
            {
                // getOrderFormForCode
                OrderForm result = apiInstance.getOrderFormForCodeUsingGET(baseSiteId, orderFormCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFormsApi.getOrderFormForCodeUsingGET: " + 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\ApiOrderFormsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderFormCode = orderFormCode_example; // String | orderFormCode
$fields = fields_example; // String | fields

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

# 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::OrderFormsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderFormCode = orderFormCode_example; # String | orderFormCode
my $fields = fields_example; # String | fields

eval { 
    my $result = $api_instance->getOrderFormForCodeUsingGET(baseSiteId => $baseSiteId, orderFormCode => $orderFormCode, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderFormsApi->getOrderFormForCodeUsingGET: $@\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.OrderFormsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderFormCode = orderFormCode_example # String | orderFormCode
fields = fields_example # String | fields (optional) (default to DEFAULT)

try: 
    # getOrderFormForCode
    api_response = api_instance.get_order_form_for_code_using_get(baseSiteId, orderFormCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderFormsApi->getOrderFormForCodeUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderFormCode*
String
orderFormCode
Required
Query parameters
Name Description
fields
String
fields

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrderFormsForCurrentUserUsingGET

getOrderFormsForCurrentUser


/{baseSiteId}/orderforms

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orderforms?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFormsApi;

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

public class OrderFormsApiExample {

    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");

        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | fields
        try {
            OrderFormList result = apiInstance.getOrderFormsForCurrentUserUsingGET(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#getOrderFormsForCurrentUserUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFormsApi;

public class OrderFormsApiExample {

    public static void main(String[] args) {
        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | fields
        try {
            OrderFormList result = apiInstance.getOrderFormsForCurrentUserUsingGET(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#getOrderFormsForCurrentUserUsingGET");
            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; // fields (optional) (default to DEFAULT)

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

// getOrderFormsForCurrentUser
[apiInstance getOrderFormsForCurrentUserUsingGETWith:baseSiteId
    fields:fields
              completionHandler: ^(OrderFormList 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.OrderFormsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} fields
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderFormsForCurrentUserUsingGET(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderFormsForCurrentUserUsingGETExample
    {
        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 OrderFormsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | fields (optional)  (default to DEFAULT)

            try
            {
                // getOrderFormsForCurrentUser
                OrderFormList result = apiInstance.getOrderFormsForCurrentUserUsingGET(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFormsApi.getOrderFormsForCurrentUserUsingGET: " + 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\ApiOrderFormsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | fields

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

# 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::OrderFormsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | fields

eval { 
    my $result = $api_instance->getOrderFormsForCurrentUserUsingGET(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderFormsApi->getOrderFormsForCurrentUserUsingGET: $@\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.OrderFormsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | fields (optional) (default to DEFAULT)

try: 
    # getOrderFormsForCurrentUser
    api_response = api_instance.get_order_forms_for_current_user_using_get(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderFormsApi->getOrderFormsForCurrentUserUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
fields

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


orderFormUsingPOST

orderForm


/{baseSiteId}/orderforms/{orderFormCode}/cart

Usage and SDK Samples

curl -X POST\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/orderforms/{orderFormCode}/cart?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFormsApi;

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

public class OrderFormsApiExample {

    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");

        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        String fields = fields_example; // String | fields
        try {
            apiInstance.orderFormUsingPOST(baseSiteId, orderFormCode, fields);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#orderFormUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFormsApi;

public class OrderFormsApiExample {

    public static void main(String[] args) {
        OrderFormsApi apiInstance = new OrderFormsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        String fields = fields_example; // String | fields
        try {
            apiInstance.orderFormUsingPOST(baseSiteId, orderFormCode, fields);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#orderFormUsingPOST");
            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 *orderFormCode = orderFormCode_example; // orderFormCode
String *fields = fields_example; // fields (optional) (default to DEFAULT)

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

// orderForm
[apiInstance orderFormUsingPOSTWith:baseSiteId
    orderFormCode:orderFormCode
    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.OrderFormsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderFormCode = orderFormCode_example; // {{String}} orderFormCode
var opts = { 
  'fields': fields_example // {{String}} fields
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.orderFormUsingPOST(baseSiteId, orderFormCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class orderFormUsingPOSTExample
    {
        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 OrderFormsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderFormCode = orderFormCode_example;  // String | orderFormCode
            var fields = fields_example;  // String | fields (optional)  (default to DEFAULT)

            try
            {
                // orderForm
                apiInstance.orderFormUsingPOST(baseSiteId, orderFormCode, fields);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFormsApi.orderFormUsingPOST: " + 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\ApiOrderFormsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderFormCode = orderFormCode_example; // String | orderFormCode
$fields = fields_example; // String | fields

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

# 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::OrderFormsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderFormCode = orderFormCode_example; # String | orderFormCode
my $fields = fields_example; # String | fields

eval { 
    $api_instance->orderFormUsingPOST(baseSiteId => $baseSiteId, orderFormCode => $orderFormCode, fields => $fields);
};
if ($@) {
    warn "Exception when calling OrderFormsApi->orderFormUsingPOST: $@\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.OrderFormsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderFormCode = orderFormCode_example # String | orderFormCode
fields = fields_example # String | fields (optional) (default to DEFAULT)

try: 
    # orderForm
    api_instance.order_form_using_post(baseSiteId, orderFormCode, fields=fields)
except ApiException as e:
    print("Exception when calling OrderFormsApi->orderFormUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderFormCode*
String
orderFormCode
Required
Query parameters
Name Description
fields
String
fields

Responses

Status: 201 - Created

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateOrderFormUsingPUT

updateOrderForm


/{baseSiteId}/orderforms/{orderFormCode}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/orderforms/{orderFormCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFormsApi;

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

public class OrderFormsApiExample {

    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");

        OrderFormsApi apiInstance = new OrderFormsApi();
        OrderForm body = ; // OrderForm | orderFormWsDTO
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        String fields = fields_example; // String | fields
        try {
            OrderForm result = apiInstance.updateOrderFormUsingPUT(body, baseSiteId, orderFormCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#updateOrderFormUsingPUT");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFormsApi;

public class OrderFormsApiExample {

    public static void main(String[] args) {
        OrderFormsApi apiInstance = new OrderFormsApi();
        OrderForm body = ; // OrderForm | orderFormWsDTO
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderFormCode = orderFormCode_example; // String | orderFormCode
        String fields = fields_example; // String | fields
        try {
            OrderForm result = apiInstance.updateOrderFormUsingPUT(body, baseSiteId, orderFormCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFormsApi#updateOrderFormUsingPUT");
            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"];
OrderForm *body = ; // orderFormWsDTO
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderFormCode = orderFormCode_example; // orderFormCode
String *fields = fields_example; // fields (optional) (default to DEFAULT)

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

// updateOrderForm
[apiInstance updateOrderFormUsingPUTWith:body
    baseSiteId:baseSiteId
    orderFormCode:orderFormCode
    fields:fields
              completionHandler: ^(OrderForm 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.OrderFormsApi()
var body = ; // {{OrderForm}} orderFormWsDTO
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderFormCode = orderFormCode_example; // {{String}} orderFormCode
var opts = { 
  'fields': fields_example // {{String}} fields
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateOrderFormUsingPUT(bodybaseSiteIdorderFormCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrderFormUsingPUTExample
    {
        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 OrderFormsApi();
            var body = new OrderForm(); // OrderForm | orderFormWsDTO
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderFormCode = orderFormCode_example;  // String | orderFormCode
            var fields = fields_example;  // String | fields (optional)  (default to DEFAULT)

            try
            {
                // updateOrderForm
                OrderForm result = apiInstance.updateOrderFormUsingPUT(body, baseSiteId, orderFormCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFormsApi.updateOrderFormUsingPUT: " + 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\ApiOrderFormsApi();
$body = ; // OrderForm | orderFormWsDTO
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderFormCode = orderFormCode_example; // String | orderFormCode
$fields = fields_example; // String | fields

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

# 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::OrderFormsApi->new();
my $body = WWW::SwaggerClient::Object::OrderForm->new(); # OrderForm | orderFormWsDTO
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderFormCode = orderFormCode_example; # String | orderFormCode
my $fields = fields_example; # String | fields

eval { 
    my $result = $api_instance->updateOrderFormUsingPUT(body => $body, baseSiteId => $baseSiteId, orderFormCode => $orderFormCode, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderFormsApi->updateOrderFormUsingPUT: $@\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.OrderFormsApi()
body =  # OrderForm | orderFormWsDTO
baseSiteId = baseSiteId_example # String | Base site identifier
orderFormCode = orderFormCode_example # String | orderFormCode
fields = fields_example # String | fields (optional) (default to DEFAULT)

try: 
    # updateOrderForm
    api_response = api_instance.update_order_form_using_put(body, baseSiteId, orderFormCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderFormsApi->updateOrderFormUsingPUT: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderFormCode*
String
orderFormCode
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
fields

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


doCancelOrder

Cancel an order.

Cancels an order partially or completely


/{baseSiteId}/users/{userId}/orders/{code}/cancellation

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/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 | Cancellation request input list for the current order.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order code
        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, baseSiteId, code, 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 | Cancellation request input list for the current order.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order code
        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, baseSiteId, code, 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 = ; // Cancellation request input list for the current order.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *code = code_example; // Order code
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
    baseSiteId:baseSiteId
    code:code
    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}} Cancellation request input list for the current order.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Order code
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(bodybaseSiteIdcodeuserId, 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 | Cancellation request input list for the current order.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Order code
            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, baseSiteId, code, 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 | Cancellation request input list for the current order.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Order code
$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, $baseSiteId, $code, $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 | Cancellation request input list for the current order.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Order code
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, baseSiteId => $baseSiteId, code => $code, 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 | Cancellation request input list for the current order.
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Order code
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, baseSiteId, code, userId)
except ApiException as e:
    print("Exception when calling OrdersApi->doCancelOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Order code
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        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(baseSiteId, code, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        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(baseSiteId, code, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *code = code_example; // Order GUID (Globally Unique Identifier) or order 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)

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

// Get a order.
[apiInstance getOrderWith:baseSiteId
    code:code
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Order GUID (Globally Unique Identifier) or order CODE
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(baseSiteId, code, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Order GUID (Globally Unique Identifier) or order 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
            {
                // Get a order.
                Order result = apiInstance.getOrder(baseSiteId, code, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Order GUID (Globally Unique Identifier) or order 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

try {
    $result = $api_instance->getOrder($baseSiteId, $code, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Order GUID (Globally Unique Identifier) or order CODE
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(baseSiteId => $baseSiteId, code => $code, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Order GUID (Globally Unique Identifier) or order 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: 
    # Get a order.
    api_response = api_instance.get_order(baseSiteId, code, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->getOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Order GUID (Globally Unique Identifier) or order CODE
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orders?currentPage=&fields=&pageSize=&sort=&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
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        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 {
            OrderHistoryList result = apiInstance.getUserOrderHistory(baseSiteId, userId, currentPage, fields, pageSize, sort, statuses);
            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
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        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 {
            OrderHistoryList result = apiInstance.getUserOrderHistory(baseSiteId, userId, currentPage, fields, pageSize, sort, statuses);
            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
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
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 *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 order history for user.
[apiInstance getUserOrderHistoryWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
    statuses:statuses
              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 = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  '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. 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 currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 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 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 order history for user.
                OrderHistoryList result = apiInstance.getUserOrderHistory(baseSiteId, userId, currentPage, fields, pageSize, sort, statuses);
                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
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$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 {
    $result = $api_instance->getUserOrderHistory($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort, $statuses);
    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 $currentPage = 56; # Integer | The current result page requested.
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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.
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 { 
    my $result = $api_instance->getUserOrderHistory(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort, statuses => $statuses);
    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
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
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)
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 order history for user.
    api_response = api_instance.get_user_order_history(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort, statuses=statuses)
    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
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        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(baseSiteId, code, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        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(baseSiteId, code, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *code = code_example; // Order GUID (Globally Unique Identifier) or order CODE
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:baseSiteId
    code:code
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Order GUID (Globally Unique Identifier) or order CODE
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(baseSiteId, code, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Order GUID (Globally Unique Identifier) or order CODE
            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(baseSiteId, code, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
$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($baseSiteId, $code, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Order GUID (Globally Unique Identifier) or order CODE
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(baseSiteId => $baseSiteId, code => $code, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Order GUID (Globally Unique Identifier) or order CODE
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(baseSiteId, code, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->getUserOrders: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Order GUID (Globally Unique Identifier) or order CODE
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


placeOrder

Place a order.

Authorizes the cart and places the order. The response contains the new order data.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orders?cartId=&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 cartId = cartId_example; // String | Cart code for logged in user, cart GUID for guest checkout
        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.placeOrder(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#placeOrder");
            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 cartId = cartId_example; // String | Cart code for logged in user, cart GUID for guest checkout
        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.placeOrder(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#placeOrder");
            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 *cartId = cartId_example; // Cart code for logged in user, cart GUID for guest checkout
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];

// Place a order.
[apiInstance placeOrderWith:baseSiteId
    cartId:cartId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart code for logged in user, cart GUID for guest checkout
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.placeOrder(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class placeOrderExample
    {
        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 cartId = cartId_example;  // String | Cart code for logged in user, cart GUID for guest checkout
            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
            {
                // Place a order.
                Order result = apiInstance.placeOrder(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrdersApi.placeOrder: " + 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
$cartId = cartId_example; // String | Cart code for logged in user, cart GUID for guest checkout
$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->placeOrder($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->placeOrder: ', $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 $cartId = cartId_example; # String | Cart code for logged in user, cart GUID for guest checkout
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->placeOrder(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrdersApi->placeOrder: $@\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
cartId = cartId_example # String | Cart code for logged in user, cart GUID for guest checkout
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: 
    # Place a order.
    api_response = api_instance.place_order(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->placeOrder: %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 code for logged in user, cart GUID for guest checkout
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrganizationalUnitCustomerManagement

createOrgCustomer

Registers a org customer

Creates a new organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/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 | Data object that contains information necessary for user creation
        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 | Data object that contains information necessary for user creation
        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 = ; // Data object that contains information necessary for user creation
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}} Data object that contains information necessary for user creation
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 | Data object that contains information necessary for user creation
            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 | Data object that contains information necessary for user creation
$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 | Data object that contains information necessary for user creation
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 | Data object that contains information necessary for user creation
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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 approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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 *approverId = approverId_example; // Approver GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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:approverId
    baseSiteId:baseSiteId
    orgCustomerId:orgCustomerId
    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 approverId = approverId_example; // {{String}} Approver GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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 approverId = approverId_example;  // String | Approver GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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();
$approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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($approverId, $baseSiteId, $orgCustomerId, $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 $approverId = approverId_example; # String | Approver GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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(approverId => $approverId, baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, 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()
approverId = approverId_example # String | Approver GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->doAddApproverToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
approverId*
String
Approver GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *userGroupId = userGroupId_example; // Org User Group GUID (Globally Unique 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:baseSiteId
    orgCustomerId:orgCustomerId
    userGroupId:userGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var userGroupId = userGroupId_example; // {{String}} Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var userGroupId = userGroupId_example;  // String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique 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($baseSiteId, $orgCustomerId, $userGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $userGroupId = userGroupId_example; # String | Org User Group GUID (Globally Unique 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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, userGroupId => $userGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
userGroupId = userGroupId_example # String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->doAddOrgUserGroupToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
userGroupId*
String
Org User Group GUID (Globally Unique 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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *permissionId = permissionId_example; // Permission GUID (Globally Unique 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:baseSiteId
    orgCustomerId:orgCustomerId
    permissionId:permissionId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var permissionId = permissionId_example; // {{String}} Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var permissionId = permissionId_example;  // String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$permissionId = permissionId_example; // String | Permission GUID (Globally Unique 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($baseSiteId, $orgCustomerId, $permissionId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $permissionId = permissionId_example; # String | Permission GUID (Globally Unique 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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, permissionId => $permissionId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
permissionId = permissionId_example # String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->doAddPermissionToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
permissionId*
String
Permission GUID (Globally Unique 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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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(baseSiteId, orgCustomerId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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(baseSiteId, orgCustomerId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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) (default to DEFAULT)

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

// Get a org customer profile
[apiInstance getOrgCustomerWith:baseSiteId
    orgCustomerId:orgCustomerId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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(baseSiteId, orgCustomerId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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)  (default to DEFAULT)

            try
            {
                // Get a org customer profile
                User result = apiInstance.getOrgCustomer(baseSiteId, orgCustomerId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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($baseSiteId, $orgCustomerId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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) (default to DEFAULT)

try: 
    # Get a org customer profile
    api_response = api_instance.get_org_customer(baseSiteId, orgCustomerId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers?currentPage=&fields=&pageSize=&sort="
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 orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomerApprovers(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomerApprovers(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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)
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)
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)

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

// Gets the list of approvers for an specified org customer
[apiInstance getOrgCustomerApproversWith:baseSiteId
    orgCustomerId:orgCustomerId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomerApprovers(baseSiteId, orgCustomerId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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 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 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)

            try
            {
                // Gets the list of approvers for an specified org customer
                OrgUnitUserList result = apiInstance.getOrgCustomerApprovers(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getOrgCustomerApprovers($baseSiteId, $orgCustomerId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getOrgCustomerApprovers(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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)
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)
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)

try: 
    # Gets the list of approvers for an specified org customer
    api_response = api_instance.get_org_customer_approvers(baseSiteId, orgCustomerId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerApprovers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups?currentPage=&fields=&pageSize=&sort="
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 orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgCustomerOrgUserGroups(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgCustomerOrgUserGroups(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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)
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)
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)

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

// Gets the list of org user groups for a specified org customer
[apiInstance getOrgCustomerOrgUserGroupsWith:baseSiteId
    orgCustomerId:orgCustomerId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomerOrgUserGroups(baseSiteId, orgCustomerId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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 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 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)

            try
            {
                // Gets the list of org user groups for a specified org customer
                OrgUnitUserGroupList result = apiInstance.getOrgCustomerOrgUserGroups(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getOrgCustomerOrgUserGroups($baseSiteId, $orgCustomerId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getOrgCustomerOrgUserGroups(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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)
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)
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)

try: 
    # Gets the list of org user groups for a specified org customer
    api_response = api_instance.get_org_customer_org_user_groups(baseSiteId, orgCustomerId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerOrgUserGroups: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions?currentPage=&fields=&pageSize=&sort="
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 orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrderApprovalPermissionList result = apiInstance.getOrgCustomerPermissions(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrderApprovalPermissionList result = apiInstance.getOrgCustomerPermissions(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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)
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)
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)

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

// Gets the list of permissions for an org customer
[apiInstance getOrgCustomerPermissionsWith:baseSiteId
    orgCustomerId:orgCustomerId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomerPermissions(baseSiteId, orgCustomerId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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 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 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)

            try
            {
                // Gets the list of permissions for an org customer
                OrderApprovalPermissionList result = apiInstance.getOrgCustomerPermissions(baseSiteId, orgCustomerId, userId, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getOrgCustomerPermissions($baseSiteId, $orgCustomerId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getOrgCustomerPermissions(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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)
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)
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)

try: 
    # Gets the list of permissions for an org customer
    api_response = api_instance.get_org_customer_permissions(baseSiteId, orgCustomerId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerPermissions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgCustomers?currentPage=&fields=&pageSize=&sort="
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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomers(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomers(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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)
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)
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)

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

// Gets the list of org customers for a specified base store
[apiInstance getOrgCustomersWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
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 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 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)

            try
            {
                // Gets the list of org customers for a specified base store
                OrgUnitUserList result = apiInstance.getOrgCustomers(baseSiteId, userId, currentPage, fields, pageSize, sort);
                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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getOrgCustomers($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getOrgCustomers(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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)
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)
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)

try: 
    # Gets the list of org customers for a specified base store
    api_response = api_instance.get_org_customers(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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 approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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 *approverId = approverId_example; // Approver GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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:approverId
    baseSiteId:baseSiteId
    orgCustomerId:orgCustomerId
    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 approverId = approverId_example; // {{String}} Approver GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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 approverId = approverId_example;  // String | Approver GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, 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();
$approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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($approverId, $baseSiteId, $orgCustomerId, $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 $approverId = approverId_example; # String | Approver GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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(approverId => $approverId, baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, 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()
approverId = approverId_example # String | Approver GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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(approverId, baseSiteId, orgCustomerId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->removeApproverFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
approverId*
String
Approver GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *userGroupId = userGroupId_example; // Org User Group GUID (Globally Unique 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:baseSiteId
    orgCustomerId:orgCustomerId
    userGroupId:userGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var userGroupId = userGroupId_example; // {{String}} Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var userGroupId = userGroupId_example;  // String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique 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($baseSiteId, $orgCustomerId, $userGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $userGroupId = userGroupId_example; # String | Org User Group GUID (Globally Unique 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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, userGroupId => $userGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
userGroupId = userGroupId_example # String | Org User Group GUID (Globally Unique 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(baseSiteId, orgCustomerId, userGroupId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->removeOrgUserGroupFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
userGroupId*
String
Org User Group GUID (Globally Unique Identifier).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *permissionId = permissionId_example; // Permission GUID (Globally Unique 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:baseSiteId
    orgCustomerId:orgCustomerId
    permissionId:permissionId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var permissionId = permissionId_example; // {{String}} Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var permissionId = permissionId_example;  // String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$permissionId = permissionId_example; // String | Permission GUID (Globally Unique 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($baseSiteId, $orgCustomerId, $permissionId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $permissionId = permissionId_example; # String | Permission GUID (Globally Unique 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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, permissionId => $permissionId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
permissionId = permissionId_example # String | Permission GUID (Globally Unique 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(baseSiteId, orgCustomerId, permissionId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->removePermissionFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
permissionId*
String
Permission GUID (Globally Unique 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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/json"\
"//localhost:9002/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 | Data object which contains information necessary for user modification
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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, baseSiteId, orgCustomerId, 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 | Data object which contains information necessary for user modification
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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, baseSiteId, orgCustomerId, 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 = ; // Data object which contains information necessary for user modification
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique 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
    baseSiteId:baseSiteId
    orgCustomerId:orgCustomerId
    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}} Data object which contains information necessary for user modification
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique 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(bodybaseSiteIdorgCustomerIduserId, 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 | Data object which contains information necessary for user modification
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique 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, baseSiteId, orgCustomerId, 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 | Data object which contains information necessary for user modification
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique 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, $baseSiteId, $orgCustomerId, $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 | Data object which contains information necessary for user modification
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique 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, baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, 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 | Data object which contains information necessary for user modification
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique 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, baseSiteId, orgCustomerId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->updateOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Org Customer GUID (Globally Unique 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: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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 | Organizational Unit object.
        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 | Organizational Unit object.
        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 = ; // Organizational Unit object.
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}} Organizational Unit object.
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 | Organizational Unit object.
            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 | Organizational Unit object.
$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 | Organizational Unit object.
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 | Organizational Unit object.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 | Address object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        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, baseSiteId, orgUnitId, 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 | Address object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        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, baseSiteId, orgUnitId, 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 = ; // Address object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational unit id.
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
    baseSiteId:baseSiteId
    orgUnitId:orgUnitId
    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}} Address object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
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(bodybaseSiteIdorgUnitIduserId, 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 | Address object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            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, baseSiteId, orgUnitId, 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 | Address object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$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, $baseSiteId, $orgUnitId, $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 | Address object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
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, baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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 | Address object.
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational unit id.
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, baseSiteId, orgUnitId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->createOrgUnitAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitId*
String
Organizational unit id.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String roleId = roleId_example; // String | The role which is added to the user. Example roles are: b2bapprovergroup
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgUnitRoleToOrgCustomer(baseSiteId, orgCustomerId, orgUnitId, roleId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String roleId = roleId_example; // String | The role which is added to the user. Example roles are: b2bapprovergroup
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgUnitRoleToOrgCustomer(baseSiteId, orgCustomerId, orgUnitId, roleId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which the role will be added.
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *roleId = roleId_example; // The role which is added to the user. Example roles are: b2bapprovergroup
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:baseSiteId
    orgCustomerId:orgCustomerId
    orgUnitId:orgUnitId
    roleId:roleId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which the role will be added.
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var roleId = roleId_example; // {{String}} The role which is added to the user. Example roles are: b2bapprovergroup
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(baseSiteId, orgCustomerId, orgUnitId, roleId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which the role will be added.
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var roleId = roleId_example;  // String | The role which is added to the user. Example roles are: b2bapprovergroup
            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(baseSiteId, orgCustomerId, orgUnitId, roleId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$roleId = roleId_example; // String | The role which is added to the user. Example roles are: b2bapprovergroup
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doAddOrgUnitRoleToOrgCustomer($baseSiteId, $orgCustomerId, $orgUnitId, $roleId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which the role will be added.
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $roleId = roleId_example; # String | The role which is added to the user. Example roles are: b2bapprovergroup
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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, orgUnitId => $orgUnitId, roleId => $roleId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which the role will be added.
orgUnitId = orgUnitId_example # String | Organizational unit id.
roleId = roleId_example # String | The role which is added to the user. Example roles are: b2bapprovergroup
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(baseSiteId, orgCustomerId, orgUnitId, roleId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->doAddOrgUnitRoleToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Identifier of the organizational customer which the role will be added.
Required
orgUnitId*
String
Organizational unit id.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/roles?fields=&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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, orgCustomerId, roleId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, orgCustomerId, roleId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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:baseSiteId
    orgCustomerId:orgCustomerId
    roleId:roleId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, orgCustomerId, roleId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, orgCustomerId, roleId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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
$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($baseSiteId, $orgCustomerId, $roleId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, roleId => $roleId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
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
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(baseSiteId, orgCustomerId, roleId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->doAddRoleToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Identifier of the organizational customer which the role will be added.
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
roleId*
String
The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
Required

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational Unit 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(baseSiteId, orgUnitId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational Unit 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(baseSiteId, orgUnitId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational Unit 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:baseSiteId
    orgUnitId:orgUnitId
    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 orgUnitId = orgUnitId_example; // {{String}} Organizational Unit 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(baseSiteId, orgUnitId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational Unit 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(baseSiteId, orgUnitId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational Unit 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($baseSiteId, $orgUnitId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational Unit 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(baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational Unit 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(baseSiteId, orgUnitId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getAvailableParentUnits: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitId*
String
Organizational Unit 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational Unit 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(baseSiteId, orgUnitId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational Unit 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(baseSiteId, orgUnitId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational Unit 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:baseSiteId
    orgUnitId:orgUnitId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitId = orgUnitId_example; // {{String}} Organizational Unit 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(baseSiteId, orgUnitId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational Unit 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(baseSiteId, orgUnitId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational Unit 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($baseSiteId, $orgUnitId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational Unit 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(baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational Unit 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(baseSiteId, orgUnitId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnit: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitId*
String
Organizational Unit 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        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(baseSiteId, orgUnitId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        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(baseSiteId, orgUnitId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational unit id.
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:baseSiteId
    orgUnitId:orgUnitId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
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(baseSiteId, orgUnitId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            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(baseSiteId, orgUnitId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$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($baseSiteId, $orgUnitId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
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(baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational unit id.
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(baseSiteId, orgUnitId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnitAddresses: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitId*
String
Organizational unit id.
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/availableUsers/{roleId}?currentPage=&fields=&pageSize=&sort="
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 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 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the display search results.
        try {
            OrgUnitUserList result = apiInstance.getOrgUnitUsers(baseSiteId, orgUnitId, roleId, userId, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the display search results.
        try {
            OrgUnitUserList result = apiInstance.getOrgUnitUsers(baseSiteId, orgUnitId, roleId, userId, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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)
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)
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)

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

// Get users who belongs to the organization unit.
[apiInstance getOrgUnitUsersWith:baseSiteId
    orgUnitId:orgUnitId
    roleId:roleId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the display search results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitUsers(baseSiteId, orgUnitId, roleId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 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 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) 

            try
            {
                // Get users who belongs to the organization unit.
                OrgUnitUserList result = apiInstance.getOrgUnitUsers(baseSiteId, orgUnitId, roleId, userId, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the display search results.

try {
    $result = $api_instance->getOrgUnitUsers($baseSiteId, $orgUnitId, $roleId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the display search results.

eval { 
    my $result = $api_instance->getOrgUnitUsers(baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, roleId => $roleId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
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
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)
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)
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)

try: 
    # Get users who belongs to the organization unit.
    api_response = api_instance.get_org_unit_users(baseSiteId, orgUnitId, roleId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnitUsers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
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
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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the display search results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitAddress(addressId, baseSiteId, orgUnitId, 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 addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitAddress(addressId, baseSiteId, orgUnitId, 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 *addressId = addressId_example; // Address id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational unit id.
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:addressId
    baseSiteId:baseSiteId
    orgUnitId:orgUnitId
    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 addressId = addressId_example; // {{String}} Address id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
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(addressId, baseSiteId, orgUnitId, 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 addressId = addressId_example;  // String | Address id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            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(addressId, baseSiteId, orgUnitId, 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();
$addressId = addressId_example; // String | Address id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUnitAddress($addressId, $baseSiteId, $orgUnitId, $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 $addressId = addressId_example; # String | Address id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
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(addressId => $addressId, baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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()
addressId = addressId_example # String | Address id.
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational unit id.
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(addressId, baseSiteId, orgUnitId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->removeOrgUnitAddress: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitRoleFromOrgCustomer(baseSiteId, orgCustomerId, orgUnitId, roleId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitRoleFromOrgCustomer(baseSiteId, orgCustomerId, orgUnitId, roleId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which the role will be removed.
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *roleId = roleId_example; // The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
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:baseSiteId
    orgCustomerId:orgCustomerId
    orgUnitId:orgUnitId
    roleId:roleId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which the role will be removed.
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var roleId = roleId_example; // {{String}} The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
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(baseSiteId, orgCustomerId, orgUnitId, roleId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which the role will be removed.
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var roleId = roleId_example;  // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
            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(baseSiteId, orgCustomerId, orgUnitId, roleId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUnitRoleFromOrgCustomer($baseSiteId, $orgCustomerId, $orgUnitId, $roleId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which the role will be removed.
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $roleId = roleId_example; # String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, orgUnitId => $orgUnitId, roleId => $roleId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which the role will be removed.
orgUnitId = orgUnitId_example # String | Organizational unit id.
roleId = roleId_example # String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
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(baseSiteId, orgCustomerId, orgUnitId, roleId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->removeOrgUnitRoleFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Identifier of the organizational customer which the role will be removed.
Required
orgUnitId*
String
Organizational unit id.
Required
roleId*
String
The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, orgCustomerId, roleId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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(baseSiteId, orgCustomerId, roleId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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:baseSiteId
    orgCustomerId:orgCustomerId
    roleId:roleId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, orgCustomerId, roleId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, orgCustomerId, roleId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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
$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($baseSiteId, $orgCustomerId, $roleId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, roleId => $roleId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
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
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(baseSiteId, orgCustomerId, roleId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->removeRoleFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
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: b2badmingroup, b2bmanagergroup, b2bcustomergroup
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/json"\
"//localhost:9002/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 | Organizational Unit object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational Unit 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, baseSiteId, orgUnitId, 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 | Organizational Unit object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational Unit 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, baseSiteId, orgUnitId, 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 = ; // Organizational Unit object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational Unit 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
    baseSiteId:baseSiteId
    orgUnitId:orgUnitId
    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}} Organizational Unit object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitId = orgUnitId_example; // {{String}} Organizational Unit 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(bodybaseSiteIdorgUnitIduserId, 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 | Organizational Unit object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational Unit 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, baseSiteId, orgUnitId, 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 | Organizational Unit object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational Unit 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, $baseSiteId, $orgUnitId, $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 | Organizational Unit object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational Unit 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, baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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 | Organizational Unit object.
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational Unit 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, baseSiteId, orgUnitId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->updateOrgUnit: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitId*
String
Organizational Unit 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: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/json"\
"//localhost:9002/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 | Address object.
        String addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        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, addressId, baseSiteId, orgUnitId, 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 | Address object.
        String addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        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, addressId, baseSiteId, orgUnitId, 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 = ; // Address object.
String *addressId = addressId_example; // Address id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitId = orgUnitId_example; // Organizational unit id.
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
    addressId:addressId
    baseSiteId:baseSiteId
    orgUnitId:orgUnitId
    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}} Address object.
var addressId = addressId_example; // {{String}} Address id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
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(bodyaddressIdbaseSiteIdorgUnitIduserId, 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 | Address object.
            var addressId = addressId_example;  // String | Address id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            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, addressId, baseSiteId, orgUnitId, 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 | Address object.
$addressId = addressId_example; // String | Address id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$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, $addressId, $baseSiteId, $orgUnitId, $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 | Address object.
my $addressId = addressId_example; # String | Address id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
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, addressId => $addressId, baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, 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 | Address object.
addressId = addressId_example # String | Address id.
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitId = orgUnitId_example # String | Organizational unit id.
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, addressId, baseSiteId, orgUnitId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->updateOrgUnitAddress: %s\n" % e)

Parameters

Path parameters
Name Description
addressId*
String
Address id.
Required
baseSiteId*
String
Base site identifier
Required
orgUnitId*
String
Organizational unit id.
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: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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"\
"//localhost:9002/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 | Organizational unit user group object.
        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 | Organizational unit user group object.
        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 = ; // Organizational unit user group object.
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}} Organizational unit user group object.
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 | Organizational unit user group object.
            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 | Organizational unit user group object.
$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 | Organizational unit user group object.
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 | Organizational unit user group object.
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/orderApprovalPermissions?fields=&orderApprovalPermissionCode="
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 orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is added to the organizational unit user group.
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Identifier of the organizational unit user group which the order approval permission will be added.
        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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is added to the organizational unit user group.
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Identifier of the organizational unit user group which the order approval permission will be added.
        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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order approval permission identifier which is added to the organizational unit user group.
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Identifier of the organizational unit user group which the order approval permission will be added.
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:baseSiteId
    orderApprovalPermissionCode:orderApprovalPermissionCode
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order approval permission identifier which is added to the organizational unit user group.
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Identifier of the organizational unit user group which the order approval permission will be added.
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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order approval permission identifier which is added to the organizational unit user group.
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Identifier of the organizational unit user group which the order approval permission will be added.
            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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is added to the organizational unit user group.
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Identifier of the organizational unit user group which the order approval permission will be added.
$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($baseSiteId, $orderApprovalPermissionCode, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order approval permission identifier which is added to the organizational unit user group.
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Identifier of the organizational unit user group which the order approval permission will be added.
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(baseSiteId => $baseSiteId, orderApprovalPermissionCode => $orderApprovalPermissionCode, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order approval permission identifier which is added to the organizational unit user group.
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Identifier of the organizational unit user group which the order approval permission will be added.
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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->doAddOrderApprovalPermissionToOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Identifier of the organizational unit user group which the order approval permission will be added.
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
orderApprovalPermissionCode*
String
Order approval permission identifier which is added to the organizational unit user group.
Required

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgCustomerToOrgUnitUserGroupMembers(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgCustomerToOrgUnitUserGroupMembers(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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:baseSiteId
    orgCustomerId:orgCustomerId
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doAddOrgCustomerToOrgUnitUserGroupMembers($baseSiteId, $orgCustomerId, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doAddOrgCustomerToOrgUnitUserGroupMembers(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
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
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(baseSiteId, orgCustomerId, orgUnitUserGroupId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->doAddOrgCustomerToOrgUnitUserGroupMembers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group 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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/availableOrgCustomers?currentPage=&fields=&pageSize=&sort="
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 orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserList result = apiInstance.getAvailableOrgCustomersForUserGroup(baseSiteId, orgUnitUserGroupId, userId, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserList result = apiInstance.getAvailableOrgCustomersForUserGroup(baseSiteId, orgUnitUserGroupId, userId, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group 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)
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)
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)

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

// Gets the list of organizational customers for a specified organizational unit user group
[apiInstance getAvailableOrgCustomersForUserGroupWith:baseSiteId
    orgUnitUserGroupId:orgUnitUserGroupId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group 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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableOrgCustomersForUserGroup(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group 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 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 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)

            try
            {
                // Gets the list of organizational customers for a specified organizational unit user group
                OrgUnitUserList result = apiInstance.getAvailableOrgCustomersForUserGroup(baseSiteId, orgUnitUserGroupId, userId, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getAvailableOrgCustomersForUserGroup($baseSiteId, $orgUnitUserGroupId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group 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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getAvailableOrgCustomersForUserGroup(baseSiteId => $baseSiteId, orgUnitUserGroupId => $orgUnitUserGroupId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group 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)
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)
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)

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(baseSiteId, orgUnitUserGroupId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getAvailableOrgCustomersForUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group 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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/availableOrderApprovalPermissions?currentPage=&fields=&pageSize=&sort="
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 orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissionsForOrgUnitUserGroup(baseSiteId, orgUnitUserGroupId, userId, currentPage, fields, pageSize, sort);
            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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissionsForOrgUnitUserGroup(baseSiteId, orgUnitUserGroupId, userId, currentPage, fields, pageSize, sort);
            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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group 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)
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)
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)

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

// Gets the list of order approval permissions for a specified organizational unit user group
[apiInstance getOrderApprovalPermissionsForOrgUnitUserGroupWith:baseSiteId
    orgUnitUserGroupId:orgUnitUserGroupId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group 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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApprovalPermissionsForOrgUnitUserGroup(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group 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 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 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)

            try
            {
                // Gets the list of order approval permissions for a specified organizational unit user group
                OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissionsForOrgUnitUserGroup(baseSiteId, orgUnitUserGroupId, userId, currentPage, fields, pageSize, sort);
                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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getOrderApprovalPermissionsForOrgUnitUserGroup($baseSiteId, $orgUnitUserGroupId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group 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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getOrderApprovalPermissionsForOrgUnitUserGroup(baseSiteId => $baseSiteId, orgUnitUserGroupId => $orgUnitUserGroupId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group 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)
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)
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)

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(baseSiteId, orgUnitUserGroupId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getOrderApprovalPermissionsForOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group 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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group 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:baseSiteId
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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($baseSiteId, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group 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(baseSiteId => $baseSiteId, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups?currentPage=&fields=&pageSize=&sort="
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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgUnitUserGroups(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgUnitUserGroups(baseSiteId, userId, currentPage, fields, pageSize, sort);
            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)
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)
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)

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
    fields:fields
    pageSize:pageSize
    sort:sort
              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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
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 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 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)

            try
            {
                // Gets the list of organizational unit user groups for a specified base store
                OrgUnitUserGroupList result = apiInstance.getOrgUnitUserGroups(baseSiteId, userId, currentPage, fields, pageSize, sort);
                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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

try {
    $result = $api_instance->getOrgUnitUserGroups($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort);
    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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getOrgUnitUserGroups(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    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)
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)
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)

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, fields=fields, pageSize=pageSize, sort=sort)
    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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is removed from the organizational unit user group.
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier which is added to the organizational customer.
        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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is removed from the organizational unit user group.
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier which is added to the organizational customer.
        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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order approval permission identifier which is removed from the organizational unit user group.
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier which is added to the organizational customer.
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:baseSiteId
    orderApprovalPermissionCode:orderApprovalPermissionCode
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order approval permission identifier which is removed from the organizational unit user group.
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier which is added to the organizational customer.
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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order approval permission identifier which is removed from the organizational unit user group.
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier which is added to the organizational customer.
            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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is removed from the organizational unit user group.
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier which is added to the organizational customer.
$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($baseSiteId, $orderApprovalPermissionCode, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order approval permission identifier which is removed from the organizational unit user group.
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier which is added to the organizational customer.
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(baseSiteId => $baseSiteId, orderApprovalPermissionCode => $orderApprovalPermissionCode, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order approval permission identifier which is removed from the organizational unit user group.
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier which is added to the organizational customer.
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(baseSiteId, orderApprovalPermissionCode, orgUnitUserGroupId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrderApprovalPermissionFromOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderApprovalPermissionCode*
String
Order approval permission identifier which is removed from the organizational unit user group.
Required
orgUnitUserGroupId*
String
Organizational unit user group identifier which is added to the organizational customer.
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgCustomerFromOrgUnitUserGroupMembers(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgCustomerFromOrgUnitUserGroupMembers(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
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 *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:baseSiteId
    orgCustomerId:orgCustomerId
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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(baseSiteId, orgCustomerId, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgCustomerFromOrgUnitUserGroupMembers($baseSiteId, $orgCustomerId, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgCustomerFromOrgUnitUserGroupMembers(baseSiteId => $baseSiteId, orgCustomerId => $orgCustomerId, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
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
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(baseSiteId, orgCustomerId, orgUnitUserGroupId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrgCustomerFromOrgUnitUserGroupMembers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
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
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group 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:baseSiteId
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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($baseSiteId, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group 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(baseSiteId => $baseSiteId, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group 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:baseSiteId
    orgUnitUserGroupId:orgUnitUserGroupId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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($baseSiteId, $orgUnitUserGroupId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group 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(baseSiteId => $baseSiteId, orgUnitUserGroupId => $orgUnitUserGroupId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group 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(baseSiteId, orgUnitUserGroupId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroupMembers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/json"\
"//localhost:9002/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 | Organizational unit user group object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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, baseSiteId, orgUnitUserGroupId, 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 | Organizational unit user group object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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, baseSiteId, orgUnitUserGroupId, 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 = ; // Organizational unit user group object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group 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
    baseSiteId:baseSiteId
    orgUnitUserGroupId:orgUnitUserGroupId
    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}} Organizational unit user group object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group 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(bodybaseSiteIdorgUnitUserGroupIduserId, 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 | Organizational unit user group object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group 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, baseSiteId, orgUnitUserGroupId, 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 | Organizational unit user group object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group 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, $baseSiteId, $orgUnitUserGroupId, $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 | Organizational unit user group object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group 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, baseSiteId => $baseSiteId, orgUnitUserGroupId => $orgUnitUserGroupId, 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 | Organizational unit user group object.
baseSiteId = baseSiteId_example # String | Base site identifier
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group 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, baseSiteId, orgUnitUserGroupId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->updateOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgUnitUserGroupId*
String
Organizational unit user group 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: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


Pages

getAllPages

Get a list of page data.

Get a list page data with pagination support.


/{baseSiteId}/cms/sitepages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cms/sitepages?currentPage=&fields=&pageSize=&pageType=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PagesApi;

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

public class PagesApiExample {

    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");

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | Pagination parameter. Default value 0.
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        Integer pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
        String pageType = pageType_example; // String | Page type.
        String sort = sort_example; // String | Optional sort criterion. No default value.
        try {
            ListAdaptedPages result = apiInstance.getAllPages(baseSiteId, currentPage, fields, pageSize, pageType, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getAllPages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | Pagination parameter. Default value 0.
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        Integer pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
        String pageType = pageType_example; // String | Page type.
        String sort = sort_example; // String | Optional sort criterion. No default value.
        try {
            ListAdaptedPages result = apiInstance.getAllPages(baseSiteId, currentPage, fields, pageSize, pageType, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getAllPages");
            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; // Pagination parameter. Default value 0. (optional) (default to 0)
String *fields = fields_example; // Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
Integer *pageSize = 56; // Optional pagination parameter. Default value 10. (optional) (default to 10)
String *pageType = pageType_example; // Page type. (optional)
String *sort = sort_example; // Optional sort criterion. No default value. (optional)

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

// Get a list of page data.
[apiInstance getAllPagesWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    pageType:pageType
    sort:sort
              completionHandler: ^(ListAdaptedPages 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.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} Pagination parameter. Default value 0.
  'fields': fields_example, // {{String}} Response configuration (list of fields, which should be returned in response)
  'pageSize': 56, // {{Integer}} Optional pagination parameter. Default value 10.
  'pageType': pageType_example, // {{String}} Page type.
  'sort': sort_example // {{String}} Optional sort criterion. No default value.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllPages(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAllPagesExample
    {
        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 PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | Pagination parameter. Default value 0. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration (list of fields, which should be returned in response) (optional)  (default to DEFAULT)
            var pageSize = 56;  // Integer | Optional pagination parameter. Default value 10. (optional)  (default to 10)
            var pageType = pageType_example;  // String | Page type. (optional) 
            var sort = sort_example;  // String | Optional sort criterion. No default value. (optional) 

            try
            {
                // Get a list of page data.
                ListAdaptedPages result = apiInstance.getAllPages(baseSiteId, currentPage, fields, pageSize, pageType, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getAllPages: " + 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\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | Pagination parameter. Default value 0.
$fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
$pageSize = 56; // Integer | Optional pagination parameter. Default value 10.
$pageType = pageType_example; // String | Page type.
$sort = sort_example; // String | Optional sort criterion. No default value.

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

# 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::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | Pagination parameter. Default value 0.
my $fields = fields_example; # String | Response configuration (list of fields, which should be returned in response)
my $pageSize = 56; # Integer | Optional pagination parameter. Default value 10.
my $pageType = pageType_example; # String | Page type.
my $sort = sort_example; # String | Optional sort criterion. No default value.

eval { 
    my $result = $api_instance->getAllPages(baseSiteId => $baseSiteId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, pageType => $pageType, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PagesApi->getAllPages: $@\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.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | Pagination parameter. Default value 0. (optional) (default to 0)
fields = fields_example # String | Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
pageSize = 56 # Integer | Optional pagination parameter. Default value 10. (optional) (default to 10)
pageType = pageType_example # String | Page type. (optional)
sort = sort_example # String | Optional sort criterion. No default value. (optional)

try: 
    # Get a list of page data.
    api_response = api_instance.get_all_pages(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize, pageType=pageType, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getAllPages: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
Pagination parameter. Default value 0.
fields
String
Response configuration (list of fields, which should be returned in response)
pageSize
Integer (int32)
Optional pagination parameter. Default value 10.
pageType
String
Page type.
sort
String
Optional sort criterion. No default value.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPage

Get page data with a list of cms content slots

Get page data with a list of cms content slots based on pageLabelOrId or code. If none is provided then this will retrieve a Homepage cms content slots. Content pages can be filtered by pageLabelOrId while the rest of the page types can be filtered by the code.


/{baseSiteId}/cms/pages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cms/pages?code=&fields=&pageLabelOrId=&pageType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PagesApi;

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

public class PagesApiExample {

    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");

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        String pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters
        String pageType = pageType_example; // String | Page type
        try {
            PageAdaptedData result = apiInstance.getPage(baseSiteId, code, fields, pageLabelOrId, pageType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        String pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters
        String pageType = pageType_example; // String | Page type
        try {
            PageAdaptedData result = apiInstance.getPage(baseSiteId, code, fields, pageLabelOrId, pageType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPage");
            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 *code = code_example; // If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code (optional)
String *fields = fields_example; // Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
String *pageLabelOrId = pageLabelOrId_example; // Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters (optional)
String *pageType = pageType_example; // Page type (optional) (default to ContentPage)

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

// Get page data with a list of cms content slots
[apiInstance getPageWith:baseSiteId
    code:code
    fields:fields
    pageLabelOrId:pageLabelOrId
    pageType:pageType
              completionHandler: ^(PageAdaptedData 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.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'code': code_example, // {{String}} If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code
  'fields': fields_example, // {{String}} Response configuration (list of fields, which should be returned in response)
  'pageLabelOrId': pageLabelOrId_example, // {{String}} Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters
  'pageType': pageType_example // {{String}} Page type
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPage(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPageExample
    {
        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 PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code (optional) 
            var fields = fields_example;  // String | Response configuration (list of fields, which should be returned in response) (optional)  (default to DEFAULT)
            var pageLabelOrId = pageLabelOrId_example;  // String | Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters (optional) 
            var pageType = pageType_example;  // String | Page type (optional)  (default to ContentPage)

            try
            {
                // Get page data with a list of cms content slots
                PageAdaptedData result = apiInstance.getPage(baseSiteId, code, fields, pageLabelOrId, pageType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getPage: " + 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\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code
$fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
$pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters
$pageType = pageType_example; // String | Page type

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

# 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::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code
my $fields = fields_example; # String | Response configuration (list of fields, which should be returned in response)
my $pageLabelOrId = pageLabelOrId_example; # String | Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters
my $pageType = pageType_example; # String | Page type

eval { 
    my $result = $api_instance->getPage(baseSiteId => $baseSiteId, code => $code, fields => $fields, pageLabelOrId => $pageLabelOrId, pageType => $pageType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PagesApi->getPage: $@\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.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code (optional)
fields = fields_example # String | Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)
pageLabelOrId = pageLabelOrId_example # String | Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters (optional)
pageType = pageType_example # String | Page type (optional) (default to ContentPage)

try: 
    # Get page data with a list of cms content slots
    api_response = api_instance.get_page(baseSiteId, code=code, fields=fields, pageLabelOrId=pageLabelOrId, pageType=pageType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getPage: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
code
String
If pageType is ProductPage, code should be product code; if pageType is CategoryPage, code should be category code; if pageType is CatalogPage, code should be catalog code
fields
String
Response configuration (list of fields, which should be returned in response)
pageLabelOrId
String
Page Label or Id; if no page has a label that matches the provided label exactly, try to find pages whose label starts with a section of the provided label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters
pageType
String
Page type

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPageById

Get page data for specific page id with a list of cms content slots

Given a page identifier, return the page data with a list of cms content slots, each of which contains a list of cms component data.


/{baseSiteId}/cms/pages/{pageId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/cms/pages/{pageId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PagesApi;

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

public class PagesApiExample {

    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");

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String pageId = pageId_example; // String | Page Id
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        try {
            PageAdaptedData result = apiInstance.getPageById(baseSiteId, pageId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPageById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String pageId = pageId_example; // String | Page Id
        String fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)
        try {
            PageAdaptedData result = apiInstance.getPageById(baseSiteId, pageId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPageById");
            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 *pageId = pageId_example; // Page Id
String *fields = fields_example; // Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)

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

// Get page data for specific page id with a list of cms content slots
[apiInstance getPageByIdWith:baseSiteId
    pageId:pageId
    fields:fields
              completionHandler: ^(PageAdaptedData 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.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var pageId = pageId_example; // {{String}} Page Id
var opts = { 
  'fields': fields_example // {{String}} Response configuration (list of fields, which should be returned in response)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPageById(baseSiteId, pageId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPageByIdExample
    {
        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 PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var pageId = pageId_example;  // String | Page Id
            var fields = fields_example;  // String | Response configuration (list of fields, which should be returned in response) (optional)  (default to DEFAULT)

            try
            {
                // Get page data for specific page id with a list of cms content slots
                PageAdaptedData result = apiInstance.getPageById(baseSiteId, pageId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getPageById: " + 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\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$pageId = pageId_example; // String | Page Id
$fields = fields_example; // String | Response configuration (list of fields, which should be returned in response)

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

# 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::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $pageId = pageId_example; # String | Page Id
my $fields = fields_example; # String | Response configuration (list of fields, which should be returned in response)

eval { 
    my $result = $api_instance->getPageById(baseSiteId => $baseSiteId, pageId => $pageId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PagesApi->getPageById: $@\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.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
pageId = pageId_example # String | Page Id
fields = fields_example # String | Response configuration (list of fields, which should be returned in response) (optional) (default to DEFAULT)

try: 
    # Get page data for specific page id with a list of cms content slots
    api_response = api_instance.get_page_by_id(baseSiteId, pageId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getPageById: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
pageId*
String
Page Id
Required
Query parameters
Name Description
fields
String
Response configuration (list of fields, which should be returned in response)

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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(baseSiteId, paymentDetailsId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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(baseSiteId, paymentDetailsId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *paymentDetailsId = paymentDetailsId_example; // Payment details 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:baseSiteId
    paymentDetailsId:paymentDetailsId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details 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(baseSiteId, paymentDetailsId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details 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(baseSiteId, paymentDetailsId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$paymentDetailsId = paymentDetailsId_example; // String | Payment details 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($baseSiteId, $paymentDetailsId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details 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(baseSiteId => $baseSiteId, paymentDetailsId => $paymentDetailsId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
paymentDetailsId = paymentDetailsId_example # String | Payment details 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(baseSiteId, paymentDetailsId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->getPaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
paymentDetailsId*
String
Payment details 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/paymentdetails?fields=&saved="
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
        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 saved = true; // Boolean | Type of payment details.
        try {
            PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, fields, saved);
            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
        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 saved = true; // Boolean | Type of payment details.
        try {
            PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, fields, saved);
            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
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 *saved = true; // Type of payment details. (optional) (default to false)

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

// Get customer's credit card payment details list.
[apiInstance getPaymentDetailsListWith:baseSiteId
    userId:userId
    fields:fields
    saved:saved
              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 = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'saved': true // {{Boolean}} Type of payment details.
};
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 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 saved = true;  // Boolean | Type of payment details. (optional)  (default to false)

            try
            {
                // Get customer's credit card payment details list.
                PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, fields, saved);
                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
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$saved = true; // Boolean | Type of payment details.

try {
    $result = $api_instance->getPaymentDetailsList($baseSiteId, $userId, $fields, $saved);
    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 $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 $saved = true; # Boolean | Type of payment details.

eval { 
    my $result = $api_instance->getPaymentDetailsList(baseSiteId => $baseSiteId, userId => $userId, fields => $fields, saved => $saved);
    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
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)
saved = true # Boolean | Type of payment details. (optional) (default to false)

try: 
    # Get customer's credit card payment details list.
    api_response = api_instance.get_payment_details_list(baseSiteId, userId, fields=fields, saved=saved)
    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
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
saved
Boolean
Type of payment details.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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\
\
\
"//localhost:9002/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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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(baseSiteId, paymentDetailsId, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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(baseSiteId, paymentDetailsId, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *paymentDetailsId = paymentDetailsId_example; // Payment details 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:baseSiteId
    paymentDetailsId:paymentDetailsId
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details 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(baseSiteId, paymentDetailsId, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details 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(baseSiteId, paymentDetailsId, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$paymentDetailsId = paymentDetailsId_example; // String | Payment details 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($baseSiteId, $paymentDetailsId, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details 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(baseSiteId => $baseSiteId, paymentDetailsId => $paymentDetailsId, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
paymentDetailsId = paymentDetailsId_example # String | Payment details 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(baseSiteId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->removePaymentDetails: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Payment details object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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, baseSiteId, paymentDetailsId, 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 | Payment details object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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, baseSiteId, paymentDetailsId, 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 = ; // Payment details object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *paymentDetailsId = paymentDetailsId_example; // Payment details 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
    baseSiteId:baseSiteId
    paymentDetailsId:paymentDetailsId
    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}} Payment details object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details 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(bodybaseSiteIdpaymentDetailsIduserId, 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 | Payment details object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details 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, baseSiteId, paymentDetailsId, 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 | Payment details object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$paymentDetailsId = paymentDetailsId_example; // String | Payment details 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, $baseSiteId, $paymentDetailsId, $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 | Payment details object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details 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, baseSiteId => $baseSiteId, paymentDetailsId => $paymentDetailsId, 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 | Payment details object.
baseSiteId = baseSiteId_example # String | Base site identifier
paymentDetailsId = paymentDetailsId_example # String | Payment details 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, baseSiteId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->replacePaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
paymentDetailsId*
String
Payment details 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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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 "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Payment details object
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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, baseSiteId, paymentDetailsId, 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 | Payment details object
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details 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, baseSiteId, paymentDetailsId, 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 = ; // Payment details object
String *baseSiteId = baseSiteId_example; // Base site identifier
String *paymentDetailsId = paymentDetailsId_example; // Payment details 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
    baseSiteId:baseSiteId
    paymentDetailsId:paymentDetailsId
    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}} Payment details object
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details 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(bodybaseSiteIdpaymentDetailsIduserId, 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 | Payment details object
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details 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, baseSiteId, paymentDetailsId, 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 | Payment details object
$baseSiteId = baseSiteId_example; // String | Base site identifier
$paymentDetailsId = paymentDetailsId_example; // String | Payment details 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, $baseSiteId, $paymentDetailsId, $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 | Payment details object
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details 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, baseSiteId => $baseSiteId, paymentDetailsId => $paymentDetailsId, 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 | Payment details object
baseSiteId = baseSiteId_example # String | Base site identifier
paymentDetailsId = paymentDetailsId_example # String | Payment details 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, baseSiteId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->updatePaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
paymentDetailsId*
String
Payment details 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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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: application/xml,application/json"\
"//localhost:9002/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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductConfiguratorCCP

getDefaultProductConfiguration

Gets the default product configuration for a complex product

Returns the default product configuration for a given complex product. This means that a new instance of the configuration runtime object is created that is equipped with the default values from the configuration model. This API always returns the _entire_ group hierarchy, whereas it's capable of both including all attributes or only those for the first group. This is controlled by query attribute provideAllAttributes


/{baseSiteId}/products/{productCode}/configurators/ccpconfigurator

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/configurators/ccpconfigurator?provideAllAttributes="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPApi;

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

public class ProductConfiguratorCCPApiExample {

    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");

        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product code
        Boolean provideAllAttributes = true; // Boolean | If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered.
        try {
            CCPConfiguration result = apiInstance.getDefaultProductConfiguration(baseSiteId, productCode, provideAllAttributes);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getDefaultProductConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPApi;

public class ProductConfiguratorCCPApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product code
        Boolean provideAllAttributes = true; // Boolean | If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered.
        try {
            CCPConfiguration result = apiInstance.getDefaultProductConfiguration(baseSiteId, productCode, provideAllAttributes);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getDefaultProductConfiguration");
            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 *productCode = productCode_example; // Product code
Boolean *provideAllAttributes = true; // If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered. (optional) (default to false)

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

// Gets the default product configuration for a complex product
[apiInstance getDefaultProductConfigurationWith:baseSiteId
    productCode:productCode
    provideAllAttributes:provideAllAttributes
              completionHandler: ^(CCPConfiguration 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.ProductConfiguratorCCPApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product code
var opts = { 
  'provideAllAttributes': true // {{Boolean}} If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDefaultProductConfiguration(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDefaultProductConfigurationExample
    {
        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 ProductConfiguratorCCPApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product code
            var provideAllAttributes = true;  // Boolean | If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered. (optional)  (default to false)

            try
            {
                // Gets the default product configuration for a complex product
                CCPConfiguration result = apiInstance.getDefaultProductConfiguration(baseSiteId, productCode, provideAllAttributes);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPApi.getDefaultProductConfiguration: " + 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\ApiProductConfiguratorCCPApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product code
$provideAllAttributes = true; // Boolean | If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered.

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

# 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::ProductConfiguratorCCPApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product code
my $provideAllAttributes = true; # Boolean | If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered.

eval { 
    my $result = $api_instance->getDefaultProductConfiguration(baseSiteId => $baseSiteId, productCode => $productCode, provideAllAttributes => $provideAllAttributes);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPApi->getDefaultProductConfiguration: $@\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.ProductConfiguratorCCPApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product code
provideAllAttributes = true # Boolean | If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered. (optional) (default to false)

try: 
    # Gets the default product configuration for a complex product
    api_response = api_instance.get_default_product_configuration(baseSiteId, productCode, provideAllAttributes=provideAllAttributes)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPApi->getDefaultProductConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product code
Required
Query parameters
Name Description
provideAllAttributes
Boolean
If this parameter is provided and its value is true, attributes for all groups are returned. Otherwise, attributes only for the first group are considered.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductConfiguration

Gets a product configuration

Returns a product configuration, specified by its id. In case this call is done in the context of a logged-in session, the call ensures that the configuration is only returned if the user is authorized to view the configuration


/{baseSiteId}/ccpconfigurator/{configId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/ccpconfigurator/{configId}?groupId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPApi;

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

public class ProductConfiguratorCCPApiExample {

    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");

        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        String groupId = groupId_example; // String | If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned.
        try {
            CCPConfiguration result = apiInstance.getProductConfiguration(baseSiteId, configId, groupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getProductConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPApi;

public class ProductConfiguratorCCPApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        String groupId = groupId_example; // String | If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned.
        try {
            CCPConfiguration result = apiInstance.getProductConfiguration(baseSiteId, configId, groupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getProductConfiguration");
            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 *configId = configId_example; // Configuration identifier
String *groupId = groupId_example; // If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned. (optional)

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

// Gets a product configuration
[apiInstance getProductConfigurationWith:baseSiteId
    configId:configId
    groupId:groupId
              completionHandler: ^(CCPConfiguration 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.ProductConfiguratorCCPApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var configId = configId_example; // {{String}} Configuration identifier
var opts = { 
  'groupId': groupId_example // {{String}} If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductConfiguration(baseSiteId, configId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductConfigurationExample
    {
        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 ProductConfiguratorCCPApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var configId = configId_example;  // String | Configuration identifier
            var groupId = groupId_example;  // String | If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned. (optional) 

            try
            {
                // Gets a product configuration
                CCPConfiguration result = apiInstance.getProductConfiguration(baseSiteId, configId, groupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPApi.getProductConfiguration: " + 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\ApiProductConfiguratorCCPApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$configId = configId_example; // String | Configuration identifier
$groupId = groupId_example; // String | If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned.

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

# 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::ProductConfiguratorCCPApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $configId = configId_example; # String | Configuration identifier
my $groupId = groupId_example; # String | If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned.

eval { 
    my $result = $api_instance->getProductConfiguration(baseSiteId => $baseSiteId, configId => $configId, groupId => $groupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPApi->getProductConfiguration: $@\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.ProductConfiguratorCCPApi()
baseSiteId = baseSiteId_example # String | Base site identifier
configId = configId_example # String | Configuration identifier
groupId = groupId_example # String | If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned. (optional)

try: 
    # Gets a product configuration
    api_response = api_instance.get_product_configuration(baseSiteId, configId, groupId=groupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPApi->getProductConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
configId*
String
Configuration identifier
Required
Query parameters
Name Description
groupId
String
If the parameter is provided only the attributes of the requested group are returned. If the parameter is not provided, attributes for all groups are returned.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductConfigurationOverview

Gets a product configuration overview

Gets a configuration overview, a simplified, condensed read-only view on the product configuration. Only the selected attribute values are present here


/{baseSiteId}/ccpconfigurator/{configId}/configurationOverview

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/ccpconfigurator/{configId}/configurationOverview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPApi;

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

public class ProductConfiguratorCCPApiExample {

    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");

        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        try {
            CCPConfigurationOverview result = apiInstance.getProductConfigurationOverview(baseSiteId, configId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getProductConfigurationOverview");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPApi;

public class ProductConfiguratorCCPApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        try {
            CCPConfigurationOverview result = apiInstance.getProductConfigurationOverview(baseSiteId, configId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getProductConfigurationOverview");
            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 *configId = configId_example; // Configuration identifier

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

// Gets a product configuration overview
[apiInstance getProductConfigurationOverviewWith:baseSiteId
    configId:configId
              completionHandler: ^(CCPConfigurationOverview 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.ProductConfiguratorCCPApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var configId = configId_example; // {{String}} Configuration identifier

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

namespace Example
{
    public class getProductConfigurationOverviewExample
    {
        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 ProductConfiguratorCCPApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var configId = configId_example;  // String | Configuration identifier

            try
            {
                // Gets a product configuration overview
                CCPConfigurationOverview result = apiInstance.getProductConfigurationOverview(baseSiteId, configId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPApi.getProductConfigurationOverview: " + 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\ApiProductConfiguratorCCPApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$configId = configId_example; // String | Configuration identifier

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

# 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::ProductConfiguratorCCPApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $configId = configId_example; # String | Configuration identifier

eval { 
    my $result = $api_instance->getProductConfigurationOverview(baseSiteId => $baseSiteId, configId => $configId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPApi->getProductConfigurationOverview: $@\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.ProductConfiguratorCCPApi()
baseSiteId = baseSiteId_example # String | Base site identifier
configId = configId_example # String | Configuration identifier

try: 
    # Gets a product configuration overview
    api_response = api_instance.get_product_configuration_overview(baseSiteId, configId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPApi->getProductConfigurationOverview: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
configId*
String
Configuration identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductConfigurationPricing

Gets prices for a product configuration

Gets price elements on configuration level and on attribute value level if present. Those price elements include e.g. the configuration base price and the sum of selected options


/{baseSiteId}/ccpconfigurator/{configId}/pricing

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/ccpconfigurator/{configId}/pricing?groupId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPApi;

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

public class ProductConfiguratorCCPApiExample {

    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");

        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        String groupId = groupId_example; // String | Specifies the group for which the value prices are requested. In case not specified, no value prices are returned
        try {
            CCPConfigurationPricing result = apiInstance.getProductConfigurationPricing(baseSiteId, configId, groupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getProductConfigurationPricing");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPApi;

public class ProductConfiguratorCCPApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        String groupId = groupId_example; // String | Specifies the group for which the value prices are requested. In case not specified, no value prices are returned
        try {
            CCPConfigurationPricing result = apiInstance.getProductConfigurationPricing(baseSiteId, configId, groupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#getProductConfigurationPricing");
            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 *configId = configId_example; // Configuration identifier
String *groupId = groupId_example; // Specifies the group for which the value prices are requested. In case not specified, no value prices are returned (optional)

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

// Gets prices for a product configuration
[apiInstance getProductConfigurationPricingWith:baseSiteId
    configId:configId
    groupId:groupId
              completionHandler: ^(CCPConfigurationPricing 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.ProductConfiguratorCCPApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var configId = configId_example; // {{String}} Configuration identifier
var opts = { 
  'groupId': groupId_example // {{String}} Specifies the group for which the value prices are requested. In case not specified, no value prices are returned
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductConfigurationPricing(baseSiteId, configId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductConfigurationPricingExample
    {
        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 ProductConfiguratorCCPApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var configId = configId_example;  // String | Configuration identifier
            var groupId = groupId_example;  // String | Specifies the group for which the value prices are requested. In case not specified, no value prices are returned (optional) 

            try
            {
                // Gets prices for a product configuration
                CCPConfigurationPricing result = apiInstance.getProductConfigurationPricing(baseSiteId, configId, groupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPApi.getProductConfigurationPricing: " + 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\ApiProductConfiguratorCCPApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$configId = configId_example; // String | Configuration identifier
$groupId = groupId_example; // String | Specifies the group for which the value prices are requested. In case not specified, no value prices are returned

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

# 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::ProductConfiguratorCCPApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $configId = configId_example; # String | Configuration identifier
my $groupId = groupId_example; # String | Specifies the group for which the value prices are requested. In case not specified, no value prices are returned

eval { 
    my $result = $api_instance->getProductConfigurationPricing(baseSiteId => $baseSiteId, configId => $configId, groupId => $groupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPApi->getProductConfigurationPricing: $@\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.ProductConfiguratorCCPApi()
baseSiteId = baseSiteId_example # String | Base site identifier
configId = configId_example # String | Configuration identifier
groupId = groupId_example # String | Specifies the group for which the value prices are requested. In case not specified, no value prices are returned (optional)

try: 
    # Gets prices for a product configuration
    api_response = api_instance.get_product_configuration_pricing(baseSiteId, configId, groupId=groupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPApi->getProductConfigurationPricing: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
configId*
String
Configuration identifier
Required
Query parameters
Name Description
groupId
String
Specifies the group for which the value prices are requested. In case not specified, no value prices are returned

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateProductConfiguration

Updates a product configuration

Updates a product configuration. It's possible to send only the changed parts of the configuration, for example a single value change for an attribute. These changes must include their entire path through the configuration (the group they belong to and its parent groups)


/{baseSiteId}/ccpconfigurator/{configId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/ccpconfigurator/{configId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPApi;

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

public class ProductConfiguratorCCPApiExample {

    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");

        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        CCPConfiguration body = ; // CCPConfiguration | updatedConfiguration
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        try {
            CCPConfiguration result = apiInstance.updateProductConfiguration(body, baseSiteId, configId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#updateProductConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPApi;

public class ProductConfiguratorCCPApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPApi apiInstance = new ProductConfiguratorCCPApi();
        CCPConfiguration body = ; // CCPConfiguration | updatedConfiguration
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        try {
            CCPConfiguration result = apiInstance.updateProductConfiguration(body, baseSiteId, configId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPApi#updateProductConfiguration");
            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"];
CCPConfiguration *body = ; // updatedConfiguration
String *baseSiteId = baseSiteId_example; // Base site identifier
String *configId = configId_example; // Configuration identifier

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

// Updates a product configuration
[apiInstance updateProductConfigurationWith:body
    baseSiteId:baseSiteId
    configId:configId
              completionHandler: ^(CCPConfiguration 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.ProductConfiguratorCCPApi()
var body = ; // {{CCPConfiguration}} updatedConfiguration
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var configId = configId_example; // {{String}} Configuration identifier

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

namespace Example
{
    public class updateProductConfigurationExample
    {
        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 ProductConfiguratorCCPApi();
            var body = new CCPConfiguration(); // CCPConfiguration | updatedConfiguration
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var configId = configId_example;  // String | Configuration identifier

            try
            {
                // Updates a product configuration
                CCPConfiguration result = apiInstance.updateProductConfiguration(body, baseSiteId, configId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPApi.updateProductConfiguration: " + 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\ApiProductConfiguratorCCPApi();
$body = ; // CCPConfiguration | updatedConfiguration
$baseSiteId = baseSiteId_example; // String | Base site identifier
$configId = configId_example; // String | Configuration identifier

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

# 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::ProductConfiguratorCCPApi->new();
my $body = WWW::SwaggerClient::Object::CCPConfiguration->new(); # CCPConfiguration | updatedConfiguration
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $configId = configId_example; # String | Configuration identifier

eval { 
    my $result = $api_instance->updateProductConfiguration(body => $body, baseSiteId => $baseSiteId, configId => $configId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPApi->updateProductConfiguration: $@\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.ProductConfiguratorCCPApi()
body =  # CCPConfiguration | updatedConfiguration
baseSiteId = baseSiteId_example # String | Base site identifier
configId = configId_example # String | Configuration identifier

try: 
    # Updates a product configuration
    api_response = api_instance.update_product_configuration(body, baseSiteId, configId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPApi->updateProductConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
configId*
String
Configuration identifier
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


ProductConfiguratorCCPCartIntegration

createCartEntryConfiguration

Adds a product configuration to the cart

Adds a product configuration to the cart. The root product of the configuration is added as a cart entry, in addition the configuration is attached to the new entry


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/ccpconfigurator"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPCartIntegrationApi;

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

public class ProductConfiguratorCCPCartIntegrationApiExample {

    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");

        ProductConfiguratorCCPCartIntegrationApi apiInstance = new ProductConfiguratorCCPCartIntegrationApi();
        CCPOrderEntry body = ; // CCPOrderEntry | Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CartModification result = apiInstance.createCartEntryConfiguration(body, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPCartIntegrationApi#createCartEntryConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPCartIntegrationApi;

public class ProductConfiguratorCCPCartIntegrationApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPCartIntegrationApi apiInstance = new ProductConfiguratorCCPCartIntegrationApi();
        CCPOrderEntry body = ; // CCPOrderEntry | Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CartModification result = apiInstance.createCartEntryConfiguration(body, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPCartIntegrationApi#createCartEntryConfiguration");
            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"];
CCPOrderEntry *body = ; // Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Adds a product configuration to the cart
[apiInstance createCartEntryConfigurationWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
              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.ProductConfiguratorCCPCartIntegrationApi()
var body = ; // {{CCPOrderEntry}} Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.createCartEntryConfiguration(bodybaseSiteIdcartIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCartEntryConfigurationExample
    {
        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 ProductConfiguratorCCPCartIntegrationApi();
            var body = new CCPOrderEntry(); // CCPOrderEntry | Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Adds a product configuration to the cart
                CartModification result = apiInstance.createCartEntryConfiguration(body, baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPCartIntegrationApi.createCartEntryConfiguration: " + 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\ApiProductConfiguratorCCPCartIntegrationApi();
$body = ; // CCPOrderEntry | Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::ProductConfiguratorCCPCartIntegrationApi->new();
my $body = WWW::SwaggerClient::Object::CCPOrderEntry->new(); # CCPOrderEntry | Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->createCartEntryConfiguration(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPCartIntegrationApi->createCartEntryConfiguration: $@\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.ProductConfiguratorCCPCartIntegrationApi()
body =  # CCPOrderEntry | Request body parameter that contains attributes for creating the order entry, like quantity, product code and configuration identifier
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Adds a product configuration to the cart
    api_response = api_instance.create_cart_entry_configuration(body, baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPCartIntegrationApi->createCartEntryConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartEntryConfiguration

Gets the configuration of a cart entry

Returns the configuration of a cart entry and ensures that the entry can later be updated with the configuration and its changes


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/ccpconfigurator"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPCartIntegrationApi;

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

public class ProductConfiguratorCCPCartIntegrationApiExample {

    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");

        ProductConfiguratorCCPCartIntegrationApi apiInstance = new ProductConfiguratorCCPCartIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | 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
        try {
            CCPConfiguration result = apiInstance.getCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPCartIntegrationApi#getCartEntryConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPCartIntegrationApi;

public class ProductConfiguratorCCPCartIntegrationApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPCartIntegrationApi apiInstance = new ProductConfiguratorCCPCartIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | 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
        try {
            CCPConfiguration result = apiInstance.getCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPCartIntegrationApi#getCartEntryConfiguration");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryNumber = 56; // 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

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

// Gets the configuration of a cart entry
[apiInstance getCartEntryConfigurationWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
              completionHandler: ^(CCPConfiguration 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.ProductConfiguratorCCPCartIntegrationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 entryNumber = 56; // {{Integer}} 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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartEntryConfigurationExample
    {
        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 ProductConfiguratorCCPCartIntegrationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 entryNumber = 56;  // Integer | 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

            try
            {
                // Gets the configuration of a cart entry
                CCPConfiguration result = apiInstance.getCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPCartIntegrationApi.getCartEntryConfiguration: " + 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\ApiProductConfiguratorCCPCartIntegrationApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 56; // Integer | 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

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

# 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::ProductConfiguratorCCPCartIntegrationApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $entryNumber = 56; # Integer | 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

eval { 
    my $result = $api_instance->getCartEntryConfiguration(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPCartIntegrationApi->getCartEntryConfiguration: $@\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.ProductConfiguratorCCPCartIntegrationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 56 # Integer | 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

try: 
    # Gets the configuration of a cart entry
    api_response = api_instance.get_cart_entry_configuration(baseSiteId, cartId, entryNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPCartIntegrationApi->getCartEntryConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Integer (int32)
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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartEntryConfiguration

Updates the configuration of a cart entry

Updates the configuration. The entire configuration attached to the cart entry is replaced by the configuration specified in the request body. Possible only if the configuration change has been initiated by the corresponding GET method before


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/ccpconfigurator"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPCartIntegrationApi;

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

public class ProductConfiguratorCCPCartIntegrationApiExample {

    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");

        ProductConfiguratorCCPCartIntegrationApi apiInstance = new ProductConfiguratorCCPCartIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | 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
        CCPOrderEntry body = ; // CCPOrderEntry | Product configuration order entry with config id and order entry attributes
        try {
            CartModification result = apiInstance.replaceCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPCartIntegrationApi#replaceCartEntryConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPCartIntegrationApi;

public class ProductConfiguratorCCPCartIntegrationApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPCartIntegrationApi apiInstance = new ProductConfiguratorCCPCartIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | 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
        CCPOrderEntry body = ; // CCPOrderEntry | Product configuration order entry with config id and order entry attributes
        try {
            CartModification result = apiInstance.replaceCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPCartIntegrationApi#replaceCartEntryConfiguration");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryNumber = 56; // 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
CCPOrderEntry *body = ; // Product configuration order entry with config id and order entry attributes (optional)

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

// Updates the configuration of a cart entry
[apiInstance replaceCartEntryConfigurationWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    body:body
              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.ProductConfiguratorCCPCartIntegrationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 entryNumber = 56; // {{Integer}} 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 opts = { 
  'body':  // {{CCPOrderEntry}} Product configuration order entry with config id and order entry attributes
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceCartEntryConfiguration(baseSiteIdcartIdentryNumberuserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartEntryConfigurationExample
    {
        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 ProductConfiguratorCCPCartIntegrationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 entryNumber = 56;  // Integer | 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 body = new CCPOrderEntry(); // CCPOrderEntry | Product configuration order entry with config id and order entry attributes (optional) 

            try
            {
                // Updates the configuration of a cart entry
                CartModification result = apiInstance.replaceCartEntryConfiguration(baseSiteId, cartId, entryNumber, userId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPCartIntegrationApi.replaceCartEntryConfiguration: " + 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\ApiProductConfiguratorCCPCartIntegrationApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 56; // Integer | 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
$body = ; // CCPOrderEntry | Product configuration order entry with config id and order entry attributes

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

# 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::ProductConfiguratorCCPCartIntegrationApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $entryNumber = 56; # Integer | 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 $body = WWW::SwaggerClient::Object::CCPOrderEntry->new(); # CCPOrderEntry | Product configuration order entry with config id and order entry attributes

eval { 
    my $result = $api_instance->replaceCartEntryConfiguration(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPCartIntegrationApi->replaceCartEntryConfiguration: $@\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.ProductConfiguratorCCPCartIntegrationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 56 # Integer | 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
body =  # CCPOrderEntry | Product configuration order entry with config id and order entry attributes (optional)

try: 
    # Updates the configuration of a cart entry
    api_response = api_instance.replace_cart_entry_configuration(baseSiteId, cartId, entryNumber, userId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPCartIntegrationApi->replaceCartEntryConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Integer (int32)
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
Body parameters
Name Description
body

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductConfiguratorCCPOrderIntegration

getConfigurationOverviewForOrderEntry

Gets a product configuration overview of an order entry

Gets a configuration overview, a simplified, condensed read-only view on the product configuration of an order entry. Only the selected attribute values are present here


/{baseSiteId}/users/{userId}/orders/{orderId}/entries/{entryNumber}/ccpconfigurator/configurationOverview

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/entries/{entryNumber}/ccpconfigurator/configurationOverview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPOrderIntegrationApi;

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

public class ProductConfiguratorCCPOrderIntegrationApiExample {

    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");

        ProductConfiguratorCCPOrderIntegrationApi apiInstance = new ProductConfiguratorCCPOrderIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer entryNumber = 56; // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
        String orderId = orderId_example; // String | The order id. Each order has a unique identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForOrderEntry(baseSiteId, entryNumber, orderId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPOrderIntegrationApi#getConfigurationOverviewForOrderEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPOrderIntegrationApi;

public class ProductConfiguratorCCPOrderIntegrationApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPOrderIntegrationApi apiInstance = new ProductConfiguratorCCPOrderIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer entryNumber = 56; // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
        String orderId = orderId_example; // String | The order id. Each order has a unique identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForOrderEntry(baseSiteId, entryNumber, orderId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPOrderIntegrationApi#getConfigurationOverviewForOrderEntry");
            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 *entryNumber = 56; // The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
String *orderId = orderId_example; // The order id. Each order has a unique identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Gets a product configuration overview of an order entry
[apiInstance getConfigurationOverviewForOrderEntryWith:baseSiteId
    entryNumber:entryNumber
    orderId:orderId
    userId:userId
              completionHandler: ^(CCPConfigurationOverview 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.ProductConfiguratorCCPOrderIntegrationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var entryNumber = 56; // {{Integer}} The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
var orderId = orderId_example; // {{String}} The order id. Each order has a unique 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.getConfigurationOverviewForOrderEntry(baseSiteId, entryNumber, orderId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConfigurationOverviewForOrderEntryExample
    {
        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 ProductConfiguratorCCPOrderIntegrationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var entryNumber = 56;  // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
            var orderId = orderId_example;  // String | The order id. Each order has a unique identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Gets a product configuration overview of an order entry
                CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForOrderEntry(baseSiteId, entryNumber, orderId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPOrderIntegrationApi.getConfigurationOverviewForOrderEntry: " + 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\ApiProductConfiguratorCCPOrderIntegrationApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$entryNumber = 56; // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
$orderId = orderId_example; // String | The order id. Each order has a unique 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->getConfigurationOverviewForOrderEntry($baseSiteId, $entryNumber, $orderId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductConfiguratorCCPOrderIntegrationApi->getConfigurationOverviewForOrderEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductConfiguratorCCPOrderIntegrationApi;

# 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::ProductConfiguratorCCPOrderIntegrationApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $entryNumber = 56; # Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
my $orderId = orderId_example; # String | The order id. Each order has a unique 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->getConfigurationOverviewForOrderEntry(baseSiteId => $baseSiteId, entryNumber => $entryNumber, orderId => $orderId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPOrderIntegrationApi->getConfigurationOverviewForOrderEntry: $@\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.ProductConfiguratorCCPOrderIntegrationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
entryNumber = 56 # Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
orderId = orderId_example # String | The order id. Each order has a unique identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Gets a product configuration overview of an order entry
    api_response = api_instance.get_configuration_overview_for_order_entry(baseSiteId, entryNumber, orderId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPOrderIntegrationApi->getConfigurationOverviewForOrderEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
entryNumber*
Integer (int32)
The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
Required
orderId*
String
The order id. Each order has a unique identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductConfiguratorCCPQuoteIntegration

getConfigurationOverviewForQuote

Gets a product configuration overview of an quote entry

Gets a configuration overview, a simplified, condensed read-only view on the product configuration of an quote entry. Only the selected attribute values are present here


/{baseSiteId}/users/{userId}/quotes/{quoteId}/entries/{entryNumber}/ccpconfigurator/configurationOverview

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteId}/entries/{entryNumber}/ccpconfigurator/configurationOverview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPQuoteIntegrationApi;

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

public class ProductConfiguratorCCPQuoteIntegrationApiExample {

    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");

        ProductConfiguratorCCPQuoteIntegrationApi apiInstance = new ProductConfiguratorCCPQuoteIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
        String quoteId = quoteId_example; // String | The quote id. Each quote has a unique identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForQuote(baseSiteId, entryNumber, quoteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPQuoteIntegrationApi#getConfigurationOverviewForQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPQuoteIntegrationApi;

public class ProductConfiguratorCCPQuoteIntegrationApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPQuoteIntegrationApi apiInstance = new ProductConfiguratorCCPQuoteIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
        String quoteId = quoteId_example; // String | The quote id. Each quote has a unique identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForQuote(baseSiteId, entryNumber, quoteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPQuoteIntegrationApi#getConfigurationOverviewForQuote");
            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 *entryNumber = 56; // The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
String *quoteId = quoteId_example; // The quote id. Each quote has a unique identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Gets a product configuration overview of an quote entry
[apiInstance getConfigurationOverviewForQuoteWith:baseSiteId
    entryNumber:entryNumber
    quoteId:quoteId
    userId:userId
              completionHandler: ^(CCPConfigurationOverview 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.ProductConfiguratorCCPQuoteIntegrationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var entryNumber = 56; // {{Integer}} The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
var quoteId = quoteId_example; // {{String}} The quote id. Each quote has a unique 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.getConfigurationOverviewForQuote(baseSiteId, entryNumber, quoteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConfigurationOverviewForQuoteExample
    {
        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 ProductConfiguratorCCPQuoteIntegrationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var entryNumber = 56;  // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
            var quoteId = quoteId_example;  // String | The quote id. Each quote has a unique identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Gets a product configuration overview of an quote entry
                CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForQuote(baseSiteId, entryNumber, quoteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPQuoteIntegrationApi.getConfigurationOverviewForQuote: " + 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\ApiProductConfiguratorCCPQuoteIntegrationApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$entryNumber = 56; // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
$quoteId = quoteId_example; // String | The quote id. Each quote has a unique 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->getConfigurationOverviewForQuote($baseSiteId, $entryNumber, $quoteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductConfiguratorCCPQuoteIntegrationApi->getConfigurationOverviewForQuote: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductConfiguratorCCPQuoteIntegrationApi;

# 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::ProductConfiguratorCCPQuoteIntegrationApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $entryNumber = 56; # Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
my $quoteId = quoteId_example; # String | The quote id. Each quote has a unique 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->getConfigurationOverviewForQuote(baseSiteId => $baseSiteId, entryNumber => $entryNumber, quoteId => $quoteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPQuoteIntegrationApi->getConfigurationOverviewForQuote: $@\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.ProductConfiguratorCCPQuoteIntegrationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
entryNumber = 56 # Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
quoteId = quoteId_example # String | The quote id. Each quote has a unique identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Gets a product configuration overview of an quote entry
    api_response = api_instance.get_configuration_overview_for_quote(baseSiteId, entryNumber, quoteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPQuoteIntegrationApi->getConfigurationOverviewForQuote: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
entryNumber*
Integer (int32)
The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
Required
quoteId*
String
The quote id. Each quote has a unique identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductConfiguratorCCPSavedCartIntegration

getConfigurationOverviewForSavedCart

Gets a product configuration overview of an saved cart entry

Gets a configuration overview, a simplified, condensed read-only view on the product configuration of an saved cart entry. Only the selected attribute values are present here


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/ccpconfigurator/configurationOverview

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/ccpconfigurator/configurationOverview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPSavedCartIntegrationApi;

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

public class ProductConfiguratorCCPSavedCartIntegrationApiExample {

    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");

        ProductConfiguratorCCPSavedCartIntegrationApi apiInstance = new ProductConfiguratorCCPSavedCartIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | The cart id. Each cart has a unique identifier.
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a saved cart has an entry number. Saved 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
        try {
            CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForSavedCart(baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPSavedCartIntegrationApi#getConfigurationOverviewForSavedCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPSavedCartIntegrationApi;

public class ProductConfiguratorCCPSavedCartIntegrationApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPSavedCartIntegrationApi apiInstance = new ProductConfiguratorCCPSavedCartIntegrationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | The cart id. Each cart has a unique identifier.
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a saved cart has an entry number. Saved 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
        try {
            CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForSavedCart(baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPSavedCartIntegrationApi#getConfigurationOverviewForSavedCart");
            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 *cartId = cartId_example; // The cart id. Each cart has a unique identifier.
Integer *entryNumber = 56; // The entry number. Each entry in a saved cart has an entry number. Saved 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

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

// Gets a product configuration overview of an saved cart entry
[apiInstance getConfigurationOverviewForSavedCartWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
              completionHandler: ^(CCPConfigurationOverview 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.ProductConfiguratorCCPSavedCartIntegrationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} The cart id. Each cart has a unique identifier.
var entryNumber = 56; // {{Integer}} The entry number. Each entry in a saved cart has an entry number. Saved 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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getConfigurationOverviewForSavedCart(baseSiteId, cartId, entryNumber, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConfigurationOverviewForSavedCartExample
    {
        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 ProductConfiguratorCCPSavedCartIntegrationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | The cart id. Each cart has a unique identifier.
            var entryNumber = 56;  // Integer | The entry number. Each entry in a saved cart has an entry number. Saved 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

            try
            {
                // Gets a product configuration overview of an saved cart entry
                CCPConfigurationOverview result = apiInstance.getConfigurationOverviewForSavedCart(baseSiteId, cartId, entryNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPSavedCartIntegrationApi.getConfigurationOverviewForSavedCart: " + 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\ApiProductConfiguratorCCPSavedCartIntegrationApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | The cart id. Each cart has a unique identifier.
$entryNumber = 56; // Integer | The entry number. Each entry in a saved cart has an entry number. Saved 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

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

# 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::ProductConfiguratorCCPSavedCartIntegrationApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | The cart id. Each cart has a unique identifier.
my $entryNumber = 56; # Integer | The entry number. Each entry in a saved cart has an entry number. Saved 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

eval { 
    my $result = $api_instance->getConfigurationOverviewForSavedCart(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPSavedCartIntegrationApi->getConfigurationOverviewForSavedCart: $@\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.ProductConfiguratorCCPSavedCartIntegrationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | The cart id. Each cart has a unique identifier.
entryNumber = 56 # Integer | The entry number. Each entry in a saved cart has an entry number. Saved 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

try: 
    # Gets a product configuration overview of an saved cart entry
    api_response = api_instance.get_configuration_overview_for_saved_cart(baseSiteId, cartId, entryNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPSavedCartIntegrationApi->getConfigurationOverviewForSavedCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
The cart id. Each cart has a unique identifier.
Required
entryNumber*
Integer (int32)
The entry number. Each entry in a saved cart has an entry number. Saved 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

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductConfiguratorCCPVariantSearch

getProductConfigurationVariantSearch

Gets variants for a product configuration

Gets variants that match the current configuration attributes


/{baseSiteId}/ccpconfigurator/{configId}/variants

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/ccpconfigurator/{configId}/variants"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorCCPVariantSearchApi;

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

public class ProductConfiguratorCCPVariantSearchApiExample {

    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");

        ProductConfiguratorCCPVariantSearchApi apiInstance = new ProductConfiguratorCCPVariantSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        try {
            array[CCPConfigurationProductVariant] result = apiInstance.getProductConfigurationVariantSearch(baseSiteId, configId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPVariantSearchApi#getProductConfigurationVariantSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorCCPVariantSearchApi;

public class ProductConfiguratorCCPVariantSearchApiExample {

    public static void main(String[] args) {
        ProductConfiguratorCCPVariantSearchApi apiInstance = new ProductConfiguratorCCPVariantSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String configId = configId_example; // String | Configuration identifier
        try {
            array[CCPConfigurationProductVariant] result = apiInstance.getProductConfigurationVariantSearch(baseSiteId, configId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorCCPVariantSearchApi#getProductConfigurationVariantSearch");
            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 *configId = configId_example; // Configuration identifier

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

// Gets variants for a product configuration
[apiInstance getProductConfigurationVariantSearchWith:baseSiteId
    configId:configId
              completionHandler: ^(array[CCPConfigurationProductVariant] 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.ProductConfiguratorCCPVariantSearchApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var configId = configId_example; // {{String}} Configuration identifier

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

namespace Example
{
    public class getProductConfigurationVariantSearchExample
    {
        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 ProductConfiguratorCCPVariantSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var configId = configId_example;  // String | Configuration identifier

            try
            {
                // Gets variants for a product configuration
                array[CCPConfigurationProductVariant] result = apiInstance.getProductConfigurationVariantSearch(baseSiteId, configId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorCCPVariantSearchApi.getProductConfigurationVariantSearch: " + 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\ApiProductConfiguratorCCPVariantSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$configId = configId_example; // String | Configuration identifier

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

# 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::ProductConfiguratorCCPVariantSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $configId = configId_example; # String | Configuration identifier

eval { 
    my $result = $api_instance->getProductConfigurationVariantSearch(baseSiteId => $baseSiteId, configId => $configId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorCCPVariantSearchApi->getProductConfigurationVariantSearch: $@\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.ProductConfiguratorCCPVariantSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier
configId = configId_example # String | Configuration identifier

try: 
    # Gets variants for a product configuration
    api_response = api_instance.get_product_configuration_variant_search(baseSiteId, configId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorCCPVariantSearchApi->getProductConfigurationVariantSearch: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
configId*
String
Configuration identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductConfiguratorTextfieldTemplate

addCartEntryUsingPOST

Adds a product to the cart.

Adds a textfield configurator product to the cart.


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

Usage and SDK Samples

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

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        OrderEntry body = ; // OrderEntry | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 (list of fields, which should be returned in response)
        try {
            CartModification result = apiInstance.addCartEntryUsingPOST(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#addCartEntryUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        OrderEntry body = ; // OrderEntry | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 (list of fields, which should be returned in response)
        try {
            CartModification result = apiInstance.addCartEntryUsingPOST(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#addCartEntryUsingPOST");
            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 = ; // Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 (list of fields, which should be returned in response) (optional) (default to FULL)

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

// Adds a product to the cart.
[apiInstance addCartEntryUsingPOSTWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
    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.ProductConfiguratorTextfieldTemplateApi()
var body = ; // {{OrderEntry}} Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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 (list of fields, which should be returned in response)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addCartEntryUsingPOST(bodybaseSiteIdcartIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addCartEntryUsingPOSTExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var body = new OrderEntry(); // OrderEntry | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 (list of fields, which should be returned in response) (optional)  (default to FULL)

            try
            {
                // Adds a product to the cart.
                CartModification result = apiInstance.addCartEntryUsingPOST(body, baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.addCartEntryUsingPOST: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$body = ; // OrderEntry | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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 (list of fields, which should be returned in response)

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

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 (list of fields, which should be returned in response)

eval { 
    my $result = $api_instance->addCartEntryUsingPOST(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->addCartEntryUsingPOST: $@\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.ProductConfiguratorTextfieldTemplateApi()
body =  # OrderEntry | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 (list of fields, which should be returned in response) (optional) (default to FULL)

try: 
    # Adds a product to the cart.
    api_response = api_instance.add_cart_entry_using_post(body, baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->addCartEntryUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 (list of fields, which should be returned in response)

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConfigurationByProductCodeUsingGET

Get textfield configuration

Returns list of textfield configuration elements.


/{baseSiteId}/products/{productCode}/configurator/textfield

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/configurator/textfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        try {
            ConfigurationInfoList result = apiInstance.getConfigurationByProductCodeUsingGET(baseSiteId, productCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getConfigurationByProductCodeUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        try {
            ConfigurationInfoList result = apiInstance.getConfigurationByProductCodeUsingGET(baseSiteId, productCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getConfigurationByProductCodeUsingGET");
            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 *productCode = productCode_example; // Product identifier

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

// Get textfield configuration
[apiInstance getConfigurationByProductCodeUsingGETWith:baseSiteId
    productCode:productCode
              completionHandler: ^(ConfigurationInfoList 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.ProductConfiguratorTextfieldTemplateApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier

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

namespace Example
{
    public class getConfigurationByProductCodeUsingGETExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier

            try
            {
                // Get textfield configuration
                ConfigurationInfoList result = apiInstance.getConfigurationByProductCodeUsingGET(baseSiteId, productCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.getConfigurationByProductCodeUsingGET: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier

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

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier

eval { 
    my $result = $api_instance->getConfigurationByProductCodeUsingGET(baseSiteId => $baseSiteId, productCode => $productCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->getConfigurationByProductCodeUsingGET: $@\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.ProductConfiguratorTextfieldTemplateApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product identifier

try: 
    # Get textfield configuration
    api_response = api_instance.get_configuration_by_product_code_using_get(baseSiteId, productCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->getConfigurationByProductCodeUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConfigurationInEntryUsingGET

Get configuration of cart entry.

Get the textfield configuration for a cart entry.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/configurator/textfield

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/configurator/textfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | Cart entry number.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            ConfigurationInfoList result = apiInstance.getConfigurationInEntryUsingGET(baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getConfigurationInEntryUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | Cart entry number.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            ConfigurationInfoList result = apiInstance.getConfigurationInEntryUsingGET(baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getConfigurationInEntryUsingGET");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryNumber = 56; // Cart entry number.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Get configuration of cart entry.
[apiInstance getConfigurationInEntryUsingGETWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
              completionHandler: ^(ConfigurationInfoList 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.ProductConfiguratorTextfieldTemplateApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 entryNumber = 56; // {{Integer}} Cart entry number.
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.getConfigurationInEntryUsingGET(baseSiteId, cartId, entryNumber, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConfigurationInEntryUsingGETExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 entryNumber = 56;  // Integer | Cart entry number.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Get configuration of cart entry.
                ConfigurationInfoList result = apiInstance.getConfigurationInEntryUsingGET(baseSiteId, cartId, entryNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.getConfigurationInEntryUsingGET: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 56; // Integer | Cart entry number.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $entryNumber = 56; # Integer | Cart entry number.
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->getConfigurationInEntryUsingGET(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->getConfigurationInEntryUsingGET: $@\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.ProductConfiguratorTextfieldTemplateApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 56 # Integer | Cart entry number.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Get configuration of cart entry.
    api_response = api_instance.get_configuration_in_entry_using_get(baseSiteId, cartId, entryNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->getConfigurationInEntryUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Integer (int32)
Cart entry number.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConfigurationInEntryUsingPOST

Update configuration of cart entry.

Update the textfield configurtion for a cart entry.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/configurator/textfield

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}/configurator/textfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        ConfigurationInfoList body = ; // ConfigurationInfoList | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | Cart entry number.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CartModification result = apiInstance.getConfigurationInEntryUsingPOST(body, baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getConfigurationInEntryUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        ConfigurationInfoList body = ; // ConfigurationInfoList | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryNumber = 56; // Integer | Cart entry number.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            CartModification result = apiInstance.getConfigurationInEntryUsingPOST(body, baseSiteId, cartId, entryNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getConfigurationInEntryUsingPOST");
            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"];
ConfigurationInfoList *body = ; // Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryNumber = 56; // Cart entry number.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Update configuration of cart entry.
[apiInstance getConfigurationInEntryUsingPOSTWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
              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.ProductConfiguratorTextfieldTemplateApi()
var body = ; // {{ConfigurationInfoList}} Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 entryNumber = 56; // {{Integer}} Cart entry number.
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.getConfigurationInEntryUsingPOST(bodybaseSiteIdcartIdentryNumberuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConfigurationInEntryUsingPOSTExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var body = new ConfigurationInfoList(); // ConfigurationInfoList | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 entryNumber = 56;  // Integer | Cart entry number.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Update configuration of cart entry.
                CartModification result = apiInstance.getConfigurationInEntryUsingPOST(body, baseSiteId, cartId, entryNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.getConfigurationInEntryUsingPOST: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$body = ; // ConfigurationInfoList | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 56; // Integer | Cart entry number.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $body = WWW::SwaggerClient::Object::ConfigurationInfoList->new(); # ConfigurationInfoList | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $entryNumber = 56; # Integer | Cart entry number.
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->getConfigurationInEntryUsingPOST(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->getConfigurationInEntryUsingPOST: $@\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.ProductConfiguratorTextfieldTemplateApi()
body =  # ConfigurationInfoList | Request body parameter (DTO in xml or json format) which contains details like : product code (product.code), quantity of product (quantity), pickup store name (deliveryPointOfService.name)
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 56 # Integer | Cart entry number.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Update configuration of cart entry.
    api_response = api_instance.get_configuration_in_entry_using_post(body, baseSiteId, cartId, entryNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->getConfigurationInEntryUsingPOST: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Integer (int32)
Cart entry number.
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTextfieldConfigurationForOrderEntry

Get textfield configuration for order entry.

Get the textfield configuration for an order entry.


/{baseSiteId}/users/{userId}/orders/{orderId}/entries/{entryNumber}/configurator/textfield

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/entries/{entryNumber}/configurator/textfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        Integer entryNumber = 56; // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
        String orderId = orderId_example; // String | The order id. Each order has a unique identifier.
        try {
            ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForOrderEntry(entryNumber, orderId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getTextfieldConfigurationForOrderEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        Integer entryNumber = 56; // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
        String orderId = orderId_example; // String | The order id. Each order has a unique identifier.
        try {
            ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForOrderEntry(entryNumber, orderId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getTextfieldConfigurationForOrderEntry");
            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 *entryNumber = 56; // The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
String *orderId = orderId_example; // The order id. Each order has a unique identifier.

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

// Get textfield configuration for order entry.
[apiInstance getTextfieldConfigurationForOrderEntryWith:entryNumber
    orderId:orderId
              completionHandler: ^(ConfigurationInfoList 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.ProductConfiguratorTextfieldTemplateApi()
var entryNumber = 56; // {{Integer}} The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
var orderId = orderId_example; // {{String}} The order id. Each order has a unique identifier.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTextfieldConfigurationForOrderEntry(entryNumber, orderId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTextfieldConfigurationForOrderEntryExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var entryNumber = 56;  // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
            var orderId = orderId_example;  // String | The order id. Each order has a unique identifier.

            try
            {
                // Get textfield configuration for order entry.
                ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForOrderEntry(entryNumber, orderId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.getTextfieldConfigurationForOrderEntry: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$entryNumber = 56; // Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
$orderId = orderId_example; // String | The order id. Each order has a unique identifier.

try {
    $result = $api_instance->getTextfieldConfigurationForOrderEntry($entryNumber, $orderId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForOrderEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductConfiguratorTextfieldTemplateApi;

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $entryNumber = 56; # Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
my $orderId = orderId_example; # String | The order id. Each order has a unique identifier.

eval { 
    my $result = $api_instance->getTextfieldConfigurationForOrderEntry(entryNumber => $entryNumber, orderId => $orderId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForOrderEntry: $@\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.ProductConfiguratorTextfieldTemplateApi()
entryNumber = 56 # Integer | The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
orderId = orderId_example # String | The order id. Each order has a unique identifier.

try: 
    # Get textfield configuration for order entry.
    api_response = api_instance.get_textfield_configuration_for_order_entry(entryNumber, orderId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForOrderEntry: %s\n" % e)

Parameters

Path parameters
Name Description
entryNumber*
Integer (int32)
The entry number. Each entry in an order has an entry number. Order entries are numbered in ascending order, starting with zero (0).
Required
orderId*
String
The order id. Each order has a unique identifier.
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTextfieldConfigurationForQuoteEntry

Get textfield configuration for quote entry.

Get the textfield configuration for a quote entry.


/{baseSiteId}/users/{userId}/quotes/{quoteId}/entries/{entryNumber}/configurator/textfield

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteId}/entries/{entryNumber}/configurator/textfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
        String quoteId = quoteId_example; // String | The quote id. Each quote has a unique identifier.
        try {
            ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForQuoteEntry(entryNumber, quoteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getTextfieldConfigurationForQuoteEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
        String quoteId = quoteId_example; // String | The quote id. Each quote has a unique identifier.
        try {
            ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForQuoteEntry(entryNumber, quoteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getTextfieldConfigurationForQuoteEntry");
            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 *entryNumber = 56; // The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
String *quoteId = quoteId_example; // The quote id. Each quote has a unique identifier.

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

// Get textfield configuration for quote entry.
[apiInstance getTextfieldConfigurationForQuoteEntryWith:entryNumber
    quoteId:quoteId
              completionHandler: ^(ConfigurationInfoList 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.ProductConfiguratorTextfieldTemplateApi()
var entryNumber = 56; // {{Integer}} The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
var quoteId = quoteId_example; // {{String}} The quote id. Each quote has a unique identifier.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTextfieldConfigurationForQuoteEntry(entryNumber, quoteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTextfieldConfigurationForQuoteEntryExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var entryNumber = 56;  // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
            var quoteId = quoteId_example;  // String | The quote id. Each quote has a unique identifier.

            try
            {
                // Get textfield configuration for quote entry.
                ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForQuoteEntry(entryNumber, quoteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.getTextfieldConfigurationForQuoteEntry: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$entryNumber = 56; // Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
$quoteId = quoteId_example; // String | The quote id. Each quote has a unique identifier.

try {
    $result = $api_instance->getTextfieldConfigurationForQuoteEntry($entryNumber, $quoteId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForQuoteEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductConfiguratorTextfieldTemplateApi;

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $entryNumber = 56; # Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
my $quoteId = quoteId_example; # String | The quote id. Each quote has a unique identifier.

eval { 
    my $result = $api_instance->getTextfieldConfigurationForQuoteEntry(entryNumber => $entryNumber, quoteId => $quoteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForQuoteEntry: $@\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.ProductConfiguratorTextfieldTemplateApi()
entryNumber = 56 # Integer | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
quoteId = quoteId_example # String | The quote id. Each quote has a unique identifier.

try: 
    # Get textfield configuration for quote entry.
    api_response = api_instance.get_textfield_configuration_for_quote_entry(entryNumber, quoteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForQuoteEntry: %s\n" % e)

Parameters

Path parameters
Name Description
entryNumber*
Integer (int32)
The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
Required
quoteId*
String
The quote id. Each quote has a unique identifier.
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTextfieldConfigurationForSavedCartEntry

Get textfield configuration for saved cart entry

Get the textfield configuration for a saved cart entry.


/{baseSiteId}/users/{userId}/savedCarts/{cartId}/entries/{entryNumber}/configurator/textfield

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/savedCarts/{cartId}/entries/{entryNumber}/configurator/textfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

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

public class ProductConfiguratorTextfieldTemplateApiExample {

    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");

        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        String cartId = cartId_example; // String | The cart id. Each cart has a unique identifier.
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).
        try {
            ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForSavedCartEntry(cartId, entryNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getTextfieldConfigurationForSavedCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductConfiguratorTextfieldTemplateApi;

public class ProductConfiguratorTextfieldTemplateApiExample {

    public static void main(String[] args) {
        ProductConfiguratorTextfieldTemplateApi apiInstance = new ProductConfiguratorTextfieldTemplateApi();
        String cartId = cartId_example; // String | The cart id. Each cart has a unique identifier.
        Integer entryNumber = 56; // Integer | The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).
        try {
            ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForSavedCartEntry(cartId, entryNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductConfiguratorTextfieldTemplateApi#getTextfieldConfigurationForSavedCartEntry");
            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; // The cart id. Each cart has a unique identifier.
Integer *entryNumber = 56; // The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).

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

// Get textfield configuration for saved cart entry
[apiInstance getTextfieldConfigurationForSavedCartEntryWith:cartId
    entryNumber:entryNumber
              completionHandler: ^(ConfigurationInfoList 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.ProductConfiguratorTextfieldTemplateApi()
var cartId = cartId_example; // {{String}} The cart id. Each cart has a unique identifier.
var entryNumber = 56; // {{Integer}} The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTextfieldConfigurationForSavedCartEntry(cartId, entryNumber, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTextfieldConfigurationForSavedCartEntryExample
    {
        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 ProductConfiguratorTextfieldTemplateApi();
            var cartId = cartId_example;  // String | The cart id. Each cart has a unique identifier.
            var entryNumber = 56;  // Integer | The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).

            try
            {
                // Get textfield configuration for saved cart entry
                ConfigurationInfoList result = apiInstance.getTextfieldConfigurationForSavedCartEntry(cartId, entryNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductConfiguratorTextfieldTemplateApi.getTextfieldConfigurationForSavedCartEntry: " + 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\ApiProductConfiguratorTextfieldTemplateApi();
$cartId = cartId_example; // String | The cart id. Each cart has a unique identifier.
$entryNumber = 56; // Integer | The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).

try {
    $result = $api_instance->getTextfieldConfigurationForSavedCartEntry($cartId, $entryNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForSavedCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductConfiguratorTextfieldTemplateApi;

# 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::ProductConfiguratorTextfieldTemplateApi->new();
my $cartId = cartId_example; # String | The cart id. Each cart has a unique identifier.
my $entryNumber = 56; # Integer | The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).

eval { 
    my $result = $api_instance->getTextfieldConfigurationForSavedCartEntry(cartId => $cartId, entryNumber => $entryNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForSavedCartEntry: $@\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.ProductConfiguratorTextfieldTemplateApi()
cartId = cartId_example # String | The cart id. Each cart has a unique identifier.
entryNumber = 56 # Integer | The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).

try: 
    # Get textfield configuration for saved cart entry
    api_response = api_instance.get_textfield_configuration_for_saved_cart_entry(cartId, entryNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductConfiguratorTextfieldTemplateApi->getTextfieldConfigurationForSavedCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
cartId*
String
The cart id. Each cart has a unique identifier.
Required
entryNumber*
Integer (int32)
The entry number. Each entry in a saved cart has an entry number. Saved Cart entries are numbered in ascending order, starting with zero (0).
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ProductInterests

createProductInterestUsingPOST

Sets product interests for a user.

Sets product interests for a user.


/{baseSiteId}/users/{userId}/productinterests

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/productinterests?fields=¬ificationType=&productCode="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductInterestsApi;

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

public class ProductInterestsApiExample {

    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");

        ProductInterestsApi apiInstance = new ProductInterestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String notificationType = notificationType_example; // String | Notification type
        String productCode = productCode_example; // String | Product 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 {
            productInterestRelation result = apiInstance.createProductInterestUsingPOST(baseSiteId, notificationType, productCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductInterestsApi#createProductInterestUsingPOST");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductInterestsApi;

public class ProductInterestsApiExample {

    public static void main(String[] args) {
        ProductInterestsApi apiInstance = new ProductInterestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String notificationType = notificationType_example; // String | Notification type
        String productCode = productCode_example; // String | Product 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 {
            productInterestRelation result = apiInstance.createProductInterestUsingPOST(baseSiteId, notificationType, productCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductInterestsApi#createProductInterestUsingPOST");
            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 *notificationType = notificationType_example; // Notification type
String *productCode = productCode_example; // Product 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)

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

// Sets product interests for a user.
[apiInstance createProductInterestUsingPOSTWith:baseSiteId
    notificationType:notificationType
    productCode:productCode
    userId:userId
    fields:fields
              completionHandler: ^(productInterestRelation 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.ProductInterestsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var notificationType = notificationType_example; // {{String}} Notification type
var productCode = productCode_example; // {{String}} Product 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.createProductInterestUsingPOST(baseSiteId, notificationType, productCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createProductInterestUsingPOSTExample
    {
        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 ProductInterestsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var notificationType = notificationType_example;  // String | Notification type
            var productCode = productCode_example;  // String | Product 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
            {
                // Sets product interests for a user.
                productInterestRelation result = apiInstance.createProductInterestUsingPOST(baseSiteId, notificationType, productCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductInterestsApi.createProductInterestUsingPOST: " + 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\ApiProductInterestsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$notificationType = notificationType_example; // String | Notification type
$productCode = productCode_example; // String | Product 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->createProductInterestUsingPOST($baseSiteId, $notificationType, $productCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductInterestsApi->createProductInterestUsingPOST: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductInterestsApi;

# 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::ProductInterestsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $notificationType = notificationType_example; # String | Notification type
my $productCode = productCode_example; # String | Product 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->createProductInterestUsingPOST(baseSiteId => $baseSiteId, notificationType => $notificationType, productCode => $productCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductInterestsApi->createProductInterestUsingPOST: $@\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.ProductInterestsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
notificationType = notificationType_example # String | Notification type
productCode = productCode_example # String | Product 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: 
    # Sets product interests for a user.
    api_response = api_instance.create_product_interest_using_post(baseSiteId, notificationType, productCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductInterestsApi->createProductInterestUsingPOST: %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
notificationType*
String
Notification type
Required
productCode*
String
Product identifier
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductInterestsUsingGET

Gets product interests for a user.

Gets product interests for a user.


/{baseSiteId}/users/{userId}/productinterests

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/productinterests?currentPage=&fields=&needsTotal=¬ificationType=&pageSize=&productCode=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductInterestsApi;

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

public class ProductInterestsApiExample {

    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");

        ProductInterestsApi apiInstance = new ProductInterestsApi();
        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 currentPage = currentPage_example; // String | The current result page requested.
        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
        String needsTotal = needsTotal_example; // String | the flag for indicating if total number of results is needed or not
        String notificationType = notificationType_example; // String | Notification type
        String pageSize = pageSize_example; // String | The number of results returned per page.
        String productCode = productCode_example; // String | Product identifier
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            customerInterestsSearchPage result = apiInstance.getProductInterestsUsingGET(baseSiteId, userId, currentPage, fields, needsTotal, notificationType, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductInterestsApi#getProductInterestsUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductInterestsApi;

public class ProductInterestsApiExample {

    public static void main(String[] args) {
        ProductInterestsApi apiInstance = new ProductInterestsApi();
        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 currentPage = currentPage_example; // String | The current result page requested.
        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
        String needsTotal = needsTotal_example; // String | the flag for indicating if total number of results is needed or not
        String notificationType = notificationType_example; // String | Notification type
        String pageSize = pageSize_example; // String | The number of results returned per page.
        String productCode = productCode_example; // String | Product identifier
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            customerInterestsSearchPage result = apiInstance.getProductInterestsUsingGET(baseSiteId, userId, currentPage, fields, needsTotal, notificationType, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductInterestsApi#getProductInterestsUsingGET");
            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 *currentPage = currentPage_example; // The current result page requested. (optional) (default to 0)
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)
String *needsTotal = needsTotal_example; // the flag for indicating if total number of results is needed or not (optional) (default to true)
String *notificationType = notificationType_example; // Notification type (optional)
String *pageSize = pageSize_example; // The number of results returned per page. (optional) (default to 20)
String *productCode = productCode_example; // Product identifier (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Gets product interests for a user.
[apiInstance getProductInterestsUsingGETWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    needsTotal:needsTotal
    notificationType:notificationType
    pageSize:pageSize
    productCode:productCode
    sort:sort
              completionHandler: ^(customerInterestsSearchPage 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.ProductInterestsApi()
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': currentPage_example, // {{String}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'needsTotal': needsTotal_example, // {{String}} the flag for indicating if total number of results is needed or not
  'notificationType': notificationType_example, // {{String}} Notification type
  'pageSize': pageSize_example, // {{String}} The number of results returned per page.
  'productCode': productCode_example, // {{String}} Product identifier
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductInterestsUsingGET(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 getProductInterestsUsingGETExample
    {
        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 ProductInterestsApi();
            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 = currentPage_example;  // String | The current result page requested. (optional)  (default to 0)
            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 needsTotal = needsTotal_example;  // String | the flag for indicating if total number of results is needed or not (optional)  (default to true)
            var notificationType = notificationType_example;  // String | Notification type (optional) 
            var pageSize = pageSize_example;  // String | The number of results returned per page. (optional)  (default to 20)
            var productCode = productCode_example;  // String | Product identifier (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Gets product interests for a user.
                customerInterestsSearchPage result = apiInstance.getProductInterestsUsingGET(baseSiteId, userId, currentPage, fields, needsTotal, notificationType, pageSize, productCode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductInterestsApi.getProductInterestsUsingGET: " + 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\ApiProductInterestsApi();
$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 = currentPage_example; // String | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$needsTotal = needsTotal_example; // String | the flag for indicating if total number of results is needed or not
$notificationType = notificationType_example; // String | Notification type
$pageSize = pageSize_example; // String | The number of results returned per page.
$productCode = productCode_example; // String | Product identifier
$sort = sort_example; // String | Sorting method applied to the return results.

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

# 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::ProductInterestsApi->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 = currentPage_example; # String | The current result page requested.
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 $needsTotal = needsTotal_example; # String | the flag for indicating if total number of results is needed or not
my $notificationType = notificationType_example; # String | Notification type
my $pageSize = pageSize_example; # String | The number of results returned per page.
my $productCode = productCode_example; # String | Product identifier
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getProductInterestsUsingGET(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, needsTotal => $needsTotal, notificationType => $notificationType, pageSize => $pageSize, productCode => $productCode, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductInterestsApi->getProductInterestsUsingGET: $@\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.ProductInterestsApi()
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 = currentPage_example # String | The current result page requested. (optional) (default to 0)
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)
needsTotal = needsTotal_example # String | the flag for indicating if total number of results is needed or not (optional) (default to true)
notificationType = notificationType_example # String | Notification type (optional)
pageSize = pageSize_example # String | The number of results returned per page. (optional) (default to 20)
productCode = productCode_example # String | Product identifier (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Gets product interests for a user.
    api_response = api_instance.get_product_interests_using_get(baseSiteId, userId, currentPage=currentPage, fields=fields, needsTotal=needsTotal, notificationType=notificationType, pageSize=pageSize, productCode=productCode, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductInterestsApi->getProductInterestsUsingGET: %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
String
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
needsTotal
String
the flag for indicating if total number of results is needed or not
notificationType
String
Notification type
pageSize
String
The number of results returned per page.
productCode
String
Product identifier
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeProductInterestUsingDELETE

Removes product interests by product code and notification type

Removes product interests by product code and notification type.


/{baseSiteId}/users/{userId}/productinterests

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/productinterests?notificationType=&productCode="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductInterestsApi;

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

public class ProductInterestsApiExample {

    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");

        ProductInterestsApi apiInstance = new ProductInterestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String notificationType = notificationType_example; // String | Notification type
        String productCode = productCode_example; // String | Product identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeProductInterestUsingDELETE(baseSiteId, notificationType, productCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductInterestsApi#removeProductInterestUsingDELETE");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductInterestsApi;

public class ProductInterestsApiExample {

    public static void main(String[] args) {
        ProductInterestsApi apiInstance = new ProductInterestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String notificationType = notificationType_example; // String | Notification type
        String productCode = productCode_example; // String | Product identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeProductInterestUsingDELETE(baseSiteId, notificationType, productCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductInterestsApi#removeProductInterestUsingDELETE");
            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 *notificationType = notificationType_example; // Notification type
String *productCode = productCode_example; // Product identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Removes product interests by product code and notification type
[apiInstance removeProductInterestUsingDELETEWith:baseSiteId
    notificationType:notificationType
    productCode:productCode
    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.ProductInterestsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var notificationType = notificationType_example; // {{String}} Notification type
var productCode = productCode_example; // {{String}} Product 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.removeProductInterestUsingDELETE(baseSiteId, notificationType, productCode, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeProductInterestUsingDELETEExample
    {
        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 ProductInterestsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var notificationType = notificationType_example;  // String | Notification type
            var productCode = productCode_example;  // String | Product identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Removes product interests by product code and notification type
                apiInstance.removeProductInterestUsingDELETE(baseSiteId, notificationType, productCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductInterestsApi.removeProductInterestUsingDELETE: " + 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\ApiProductInterestsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$notificationType = notificationType_example; // String | Notification type
$productCode = productCode_example; // String | Product identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::ProductInterestsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $notificationType = notificationType_example; # String | Notification type
my $productCode = productCode_example; # String | Product 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->removeProductInterestUsingDELETE(baseSiteId => $baseSiteId, notificationType => $notificationType, productCode => $productCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling ProductInterestsApi->removeProductInterestUsingDELETE: $@\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.ProductInterestsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
notificationType = notificationType_example # String | Notification type
productCode = productCode_example # String | Product identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Removes product interests by product code and notification type
    api_instance.remove_product_interest_using_delete(baseSiteId, notificationType, productCode, userId)
except ApiException as e:
    print("Exception when calling ProductInterestsApi->removeProductInterestUsingDELETE: %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
notificationType*
String
Notification type
Required
productCode*
String
Product identifier
Required

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/stock?latitude=&location=&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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        Double latitude = 1.2; // Double | Latitude location parameter.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Longitude location parameter.
        try {
            apiInstance.countProductStockByLocation(baseSiteId, productCode, latitude, location, 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 baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        Double latitude = 1.2; // Double | Latitude location parameter.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Longitude location parameter.
        try {
            apiInstance.countProductStockByLocation(baseSiteId, productCode, latitude, location, 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 *baseSiteId = baseSiteId_example; // Base site identifier
String *productCode = productCode_example; // Product identifier
Double *latitude = 1.2; // Latitude location parameter. (optional)
String *location = location_example; // Free-text location (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:baseSiteId
    productCode:productCode
    latitude:latitude
    location:location
    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 baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier
var opts = { 
  'latitude': 1.2, // {{Double}} Latitude location parameter.
  'location': location_example, // {{String}} Free-text location
  '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(baseSiteId, productCode, 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 baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier
            var latitude = 1.2;  // Double | Latitude location parameter. (optional) 
            var location = location_example;  // String | Free-text location (optional) 
            var longitude = 1.2;  // Double | Longitude location parameter. (optional) 

            try
            {
                // Get header with a total number of product's stock levels.
                apiInstance.countProductStockByLocation(baseSiteId, productCode, latitude, location, 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();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier
$latitude = 1.2; // Double | Latitude location parameter.
$location = location_example; // String | Free-text location
$longitude = 1.2; // Double | Longitude location parameter.

try {
    $api_instance->countProductStockByLocation($baseSiteId, $productCode, $latitude, $location, $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 $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier
my $latitude = 1.2; # Double | Latitude location parameter.
my $location = location_example; # String | Free-text location
my $longitude = 1.2; # Double | Longitude location parameter.

eval { 
    $api_instance->countProductStockByLocation(baseSiteId => $baseSiteId, productCode => $productCode, latitude => $latitude, location => $location, 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()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product identifier
latitude = 1.2 # Double | Latitude location parameter. (optional)
location = location_example # String | Free-text location (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(baseSiteId, productCode, latitude=latitude, location=location, longitude=longitude)
except ApiException as e:
    print("Exception when calling ProductsApi->countProductStockByLocation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier
Required
Query parameters
Name Description
latitude
Double (double)
Latitude location parameter.
location
String
Free-text location
longitude
Double (double)
Longitude location parameter.

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


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\
\
\
"//localhost:9002/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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


createProductReview

Creates a new customer review as an anonymous user.

Creates a new customer review as an anonymous user.


/{baseSiteId}/products/{productCode}/reviews

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"//localhost:9002/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 | Object contains review details like : rating, alias, headline, comment
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product 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, baseSiteId, productCode, 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 | Object contains review details like : rating, alias, headline, comment
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product 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, baseSiteId, productCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#createProductReview");
            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"];
Review *body = ; // Object contains review details like : rating, alias, headline, comment
String *baseSiteId = baseSiteId_example; // Base site identifier
String *productCode = productCode_example; // Product 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)

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

// Creates a new customer review as an anonymous user.
[apiInstance createProductReviewWith:body
    baseSiteId:baseSiteId
    productCode:productCode
    fields:fields
              completionHandler: ^(Review 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.ProductsApi()
var body = ; // {{Review}} Object contains review details like : rating, alias, headline, comment
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product 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.createProductReview(bodybaseSiteIdproductCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createProductReviewExample
    {
        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 body = new Review(); // Review | Object contains review details like : rating, alias, headline, comment
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product 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
            {
                // Creates a new customer review as an anonymous user.
                Review result = apiInstance.createProductReview(body, baseSiteId, productCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.createProductReview: " + 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();
$body = ; // Review | Object contains review details like : rating, alias, headline, comment
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product 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->createProductReview($body, $baseSiteId, $productCode, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->createProductReview: ', $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 $body = WWW::SwaggerClient::Object::Review->new(); # Review | Object contains review details like : rating, alias, headline, comment
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product 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->createProductReview(body => $body, baseSiteId => $baseSiteId, productCode => $productCode, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->createProductReview: $@\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()
body =  # Review | Object contains review details like : rating, alias, headline, comment
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product 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: 
    # Creates a new customer review as an anonymous user.
    api_response = api_instance.create_product_review(body, baseSiteId, productCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->createProductReview: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product 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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getExpressUpdateProducts

Get products added to the express update feed.

Returns products added to the express update feed. Returns only elements updated after the provided timestamp. The queue is cleared using a defined cronjob.


/{baseSiteId}/products/expressupdate

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/expressupdate?catalog=&fields=×tamp="
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 timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
        String catalog = catalog_example; // String | Only products from this catalog are returned. Format: catalogId:catalogVersion
        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 {
            ProductExpressUpdateElementList result = apiInstance.getExpressUpdateProducts(baseSiteId, timestamp, catalog, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getExpressUpdateProducts");
            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 timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
        String catalog = catalog_example; // String | Only products from this catalog are returned. Format: catalogId:catalogVersion
        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 {
            ProductExpressUpdateElementList result = apiInstance.getExpressUpdateProducts(baseSiteId, timestamp, catalog, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getExpressUpdateProducts");
            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 *timestamp = timestamp_example; // Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
String *catalog = catalog_example; // Only products from this catalog are returned. Format: catalogId:catalogVersion (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)

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

// Get products added to the express update feed.
[apiInstance getExpressUpdateProductsWith:baseSiteId
    timestamp:timestamp
    catalog:catalog
    fields:fields
              completionHandler: ^(ProductExpressUpdateElementList 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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var timestamp = timestamp_example; // {{String}} Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
var opts = { 
  'catalog': catalog_example, // {{String}} Only products from this catalog are returned. Format: catalogId:catalogVersion
  '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.getExpressUpdateProducts(baseSiteId, timestamp, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getExpressUpdateProductsExample
    {
        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 timestamp = timestamp_example;  // String | Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
            var catalog = catalog_example;  // String | Only products from this catalog are returned. Format: catalogId:catalogVersion (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 products added to the express update feed.
                ProductExpressUpdateElementList result = apiInstance.getExpressUpdateProducts(baseSiteId, timestamp, catalog, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getExpressUpdateProducts: " + 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
$timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
$catalog = catalog_example; // String | Only products from this catalog are returned. Format: catalogId:catalogVersion
$fields = 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->getExpressUpdateProducts($baseSiteId, $timestamp, $catalog, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getExpressUpdateProducts: ', $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 $timestamp = timestamp_example; # String | Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
my $catalog = catalog_example; # String | Only products from this catalog are returned. Format: catalogId:catalogVersion
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->getExpressUpdateProducts(baseSiteId => $baseSiteId, timestamp => $timestamp, catalog => $catalog, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getExpressUpdateProducts: $@\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
timestamp = timestamp_example # String | Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
catalog = catalog_example # String | Only products from this catalog are returned. Format: catalogId:catalogVersion (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 products added to the express update feed.
    api_response = api_instance.get_express_update_products(baseSiteId, timestamp, catalog=catalog, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getExpressUpdateProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
catalog
String
Only products from this catalog are returned. Format: catalogId:catalogVersion
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
timestamp*
String
Only items newer than the given parameter are retrieved from the queue. This parameter should be in ISO-8601 format.
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getLocationProductStock

Get a product's stock level.

Returns a product's stock levels sorted by distance from the specified location, which is provided using the free-text "location" parameter, or by using the longitude and latitude parameters. The following two sets of parameters are available: location (required), currentPage (optional), pageSize (optional); or longitude (required), latitude (required), currentPage (optional), pageSize(optional).


/{baseSiteId}/products/{productCode}/stock

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/stock?currentPage=&fields=&latitude=&location=&longitude=&pageSize="
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 productCode = productCode_example; // String | Product identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Double latitude = 1.2; // Double | Latitude location parameter.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Longitude location parameter.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        try {
            StoreFinderStockSearchPage result = apiInstance.getLocationProductStock(baseSiteId, productCode, currentPage, fields, latitude, location, longitude, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getLocationProductStock");
            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 productCode = productCode_example; // String | Product identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Double latitude = 1.2; // Double | Latitude location parameter.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Longitude location parameter.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        try {
            StoreFinderStockSearchPage result = apiInstance.getLocationProductStock(baseSiteId, productCode, currentPage, fields, latitude, location, longitude, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getLocationProductStock");
            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 *productCode = productCode_example; // Product identifier
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
Double *latitude = 1.2; // Latitude location parameter. (optional)
String *location = location_example; // Free-text location (optional)
Double *longitude = 1.2; // Longitude location parameter. (optional)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)

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

// Get a product's stock level.
[apiInstance getLocationProductStockWith:baseSiteId
    productCode:productCode
    currentPage:currentPage
    fields:fields
    latitude:latitude
    location:location
    longitude:longitude
    pageSize:pageSize
              completionHandler: ^(StoreFinderStockSearchPage 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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'latitude': 1.2, // {{Double}} Latitude location parameter.
  'location': location_example, // {{String}} Free-text location
  'longitude': 1.2, // {{Double}} Longitude location parameter.
  'pageSize': 56 // {{Integer}} The number of results returned per page.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLocationProductStock(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLocationProductStockExample
    {
        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 productCode = productCode_example;  // String | Product identifier
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 latitude = 1.2;  // Double | Latitude location parameter. (optional) 
            var location = location_example;  // String | Free-text location (optional) 
            var longitude = 1.2;  // Double | Longitude location parameter. (optional) 
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)

            try
            {
                // Get a product's stock level.
                StoreFinderStockSearchPage result = apiInstance.getLocationProductStock(baseSiteId, productCode, currentPage, fields, latitude, location, longitude, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getLocationProductStock: " + 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
$productCode = productCode_example; // String | Product identifier
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$latitude = 1.2; // Double | Latitude location parameter.
$location = location_example; // String | Free-text location
$longitude = 1.2; // Double | Longitude location parameter.
$pageSize = 56; // Integer | The number of results returned per page.

try {
    $result = $api_instance->getLocationProductStock($baseSiteId, $productCode, $currentPage, $fields, $latitude, $location, $longitude, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getLocationProductStock: ', $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 $productCode = productCode_example; # String | Product identifier
my $currentPage = 56; # Integer | The current result page requested.
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 $latitude = 1.2; # Double | Latitude location parameter.
my $location = location_example; # String | Free-text location
my $longitude = 1.2; # Double | Longitude location parameter.
my $pageSize = 56; # Integer | The number of results returned per page.

eval { 
    my $result = $api_instance->getLocationProductStock(baseSiteId => $baseSiteId, productCode => $productCode, currentPage => $currentPage, fields => $fields, latitude => $latitude, location => $location, longitude => $longitude, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getLocationProductStock: $@\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
productCode = productCode_example # String | Product identifier
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
latitude = 1.2 # Double | Latitude location parameter. (optional)
location = location_example # String | Free-text location (optional)
longitude = 1.2 # Double | Longitude location parameter. (optional)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)

try: 
    # Get a product's stock level.
    api_response = api_instance.get_location_product_stock(baseSiteId, productCode, currentPage=currentPage, fields=fields, latitude=latitude, location=location, longitude=longitude, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getLocationProductStock: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
latitude
Double (double)
Latitude location parameter.
location
String
Free-text location
longitude
Double (double)
Longitude location parameter.
pageSize
Integer (int32)
The number of results returned per page.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProduct

Get product details.

Returns details of a single product according to a product code.


/{baseSiteId}/products/{productCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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.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 productCode = productCode_example; // String | Product 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.getProduct(baseSiteId, productCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProduct");
            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 productCode = productCode_example; // String | Product 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.getProduct(baseSiteId, productCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProduct");
            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 *productCode = productCode_example; // Product 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)

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

// Get product details.
[apiInstance getProductWith:baseSiteId
    productCode:productCode
    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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product 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.getProduct(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductExample
    {
        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 productCode = productCode_example;  // String | Product 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 product details.
                Product result = apiInstance.getProduct(baseSiteId, productCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProduct: " + 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
$productCode = productCode_example; // String | Product 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->getProduct($baseSiteId, $productCode, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getProduct: ', $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 $productCode = productCode_example; # String | Product 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->getProduct(baseSiteId => $baseSiteId, productCode => $productCode, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getProduct: $@\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
productCode = productCode_example # String | Product 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 product details.
    api_response = api_instance.get_product(baseSiteId, productCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProduct: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductReferences

Get a product reference

Returns references for a product with a given product code. Reference type specifies which references to return.


/{baseSiteId}/products/{productCode}/references

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/references?fields=&pageSize=&referenceType="
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 productCode = productCode_example; // String | Product 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
        Integer pageSize = 56; // Integer | Maximum size of returned results.
        String referenceType = referenceType_example; // String | Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used.
        try {
            ProductReferenceList result = apiInstance.getProductReferences(baseSiteId, productCode, fields, pageSize, referenceType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductReferences");
            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 productCode = productCode_example; // String | Product 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
        Integer pageSize = 56; // Integer | Maximum size of returned results.
        String referenceType = referenceType_example; // String | Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used.
        try {
            ProductReferenceList result = apiInstance.getProductReferences(baseSiteId, productCode, fields, pageSize, referenceType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductReferences");
            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 *productCode = productCode_example; // Product 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)
Integer *pageSize = 56; // Maximum size of returned results. (optional) (default to 2147483647)
String *referenceType = referenceType_example; // Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used. (optional)

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

// Get a product reference
[apiInstance getProductReferencesWith:baseSiteId
    productCode:productCode
    fields:fields
    pageSize:pageSize
    referenceType:referenceType
              completionHandler: ^(ProductReferenceList 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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product 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
  'pageSize': 56, // {{Integer}} Maximum size of returned results.
  'referenceType': referenceType_example // {{String}} Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductReferences(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductReferencesExample
    {
        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 productCode = productCode_example;  // String | Product 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)
            var pageSize = 56;  // Integer | Maximum size of returned results. (optional)  (default to 2147483647)
            var referenceType = referenceType_example;  // String | Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used. (optional) 

            try
            {
                // Get a product reference
                ProductReferenceList result = apiInstance.getProductReferences(baseSiteId, productCode, fields, pageSize, referenceType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProductReferences: " + 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
$productCode = productCode_example; // String | Product 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
$pageSize = 56; // Integer | Maximum size of returned results.
$referenceType = referenceType_example; // String | Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used.

try {
    $result = $api_instance->getProductReferences($baseSiteId, $productCode, $fields, $pageSize, $referenceType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getProductReferences: ', $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 $productCode = productCode_example; # String | Product 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
my $pageSize = 56; # Integer | Maximum size of returned results.
my $referenceType = referenceType_example; # String | Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used.

eval { 
    my $result = $api_instance->getProductReferences(baseSiteId => $baseSiteId, productCode => $productCode, fields => $fields, pageSize => $pageSize, referenceType => $referenceType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getProductReferences: $@\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
productCode = productCode_example # String | Product 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)
pageSize = 56 # Integer | Maximum size of returned results. (optional) (default to 2147483647)
referenceType = referenceType_example # String | Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used. (optional)

try: 
    # Get a product reference
    api_response = api_instance.get_product_references(baseSiteId, productCode, fields=fields, pageSize=pageSize, referenceType=referenceType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProductReferences: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product 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
pageSize
Integer (int32)
Maximum size of returned results.
referenceType
String
Comma-separated list of reference types according to enum ProductReferenceTypeEnum. If not specified, all types of product references will be used.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductReviews

Get reviews for a product

Returns the reviews for a product with a given product code.


/{baseSiteId}/products/{productCode}/reviews

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/reviews?fields=&maxCount="
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 productCode = productCode_example; // String | Product 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
        Integer maxCount = 56; // Integer | Maximum count of reviews
        try {
            ReviewList result = apiInstance.getProductReviews(baseSiteId, productCode, fields, maxCount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductReviews");
            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 productCode = productCode_example; // String | Product 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
        Integer maxCount = 56; // Integer | Maximum count of reviews
        try {
            ReviewList result = apiInstance.getProductReviews(baseSiteId, productCode, fields, maxCount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductReviews");
            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 *productCode = productCode_example; // Product 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)
Integer *maxCount = 56; // Maximum count of reviews (optional)

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

// Get reviews for a product
[apiInstance getProductReviewsWith:baseSiteId
    productCode:productCode
    fields:fields
    maxCount:maxCount
              completionHandler: ^(ReviewList 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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product 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
  'maxCount': 56 // {{Integer}} Maximum count of reviews
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductReviews(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductReviewsExample
    {
        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 productCode = productCode_example;  // String | Product 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)
            var maxCount = 56;  // Integer | Maximum count of reviews (optional) 

            try
            {
                // Get reviews for a product
                ReviewList result = apiInstance.getProductReviews(baseSiteId, productCode, fields, maxCount);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProductReviews: " + 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
$productCode = productCode_example; // String | Product 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
$maxCount = 56; // Integer | Maximum count of reviews

try {
    $result = $api_instance->getProductReviews($baseSiteId, $productCode, $fields, $maxCount);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getProductReviews: ', $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 $productCode = productCode_example; # String | Product 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
my $maxCount = 56; # Integer | Maximum count of reviews

eval { 
    my $result = $api_instance->getProductReviews(baseSiteId => $baseSiteId, productCode => $productCode, fields => $fields, maxCount => $maxCount);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getProductReviews: $@\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
productCode = productCode_example # String | Product 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)
maxCount = 56 # Integer | Maximum count of reviews (optional)

try: 
    # Get reviews for a product
    api_response = api_instance.get_product_reviews(baseSiteId, productCode, fields=fields, maxCount=maxCount)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProductReviews: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product 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
maxCount
Integer (int32)
Maximum count of reviews

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProducts

Get a list of products and additional data

Returns a list of products and additional data, such as available facets, available sorting, and pagination options. It can also include spelling suggestions. To make spelling suggestions work, you need to make sure that "enableSpellCheck" on the SearchQuery is set to "true" (by default, it should already be set to "true"). You also need to have indexed properties configured to be used for spellchecking.


/{baseSiteId}/products/search

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/search?currentPage=&fields=&pageSize=&query=&searchQueryContext=&sort="
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
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
        String searchQueryContext = searchQueryContext_example; // String | The context to be used in the search query.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ProductSearchPage result = apiInstance.getProducts(baseSiteId, currentPage, fields, pageSize, query, searchQueryContext, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProducts");
            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
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
        String searchQueryContext = searchQueryContext_example; // String | The context to be used in the search query.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ProductSearchPage result = apiInstance.getProducts(baseSiteId, currentPage, fields, pageSize, query, searchQueryContext, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProducts");
            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)
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)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *query = query_example; // Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional)
String *searchQueryContext = searchQueryContext_example; // The context to be used in the search query. (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Get a list of products and additional data
[apiInstance getProductsWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    query:query
    searchQueryContext:searchQueryContext
    sort:sort
              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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'query': query_example, // {{String}} Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
  'searchQueryContext': searchQueryContext_example, // {{String}} The context to be used in the search query.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProducts(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductsExample
    {
        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 currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var query = query_example;  // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional) 
            var searchQueryContext = searchQueryContext_example;  // String | The context to be used in the search query. (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Get a list of products and additional data
                ProductSearchPage result = apiInstance.getProducts(baseSiteId, currentPage, fields, pageSize, query, searchQueryContext, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProducts: " + 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
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
$searchQueryContext = searchQueryContext_example; // String | The context to be used in the search query.
$sort = sort_example; // String | Sorting method applied to the return results.

try {
    $result = $api_instance->getProducts($baseSiteId, $currentPage, $fields, $pageSize, $query, $searchQueryContext, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getProducts: ', $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 $currentPage = 56; # Integer | The current result page requested.
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 $pageSize = 56; # Integer | The number of results returned per page.
my $query = query_example; # String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
my $searchQueryContext = searchQueryContext_example; # String | The context to be used in the search query.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getProducts(baseSiteId => $baseSiteId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, query => $query, searchQueryContext => $searchQueryContext, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getProducts: $@\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
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
query = query_example # String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional)
searchQueryContext = searchQueryContext_example # String | The context to be used in the search query. (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Get a list of products and additional data
    api_response = api_instance.get_products(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize, query=query, searchQueryContext=searchQueryContext, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProducts: %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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
query
String
Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
searchQueryContext
String
The context to be used in the search query.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoreProductStock

Get a product's stock level for a store

Returns a product's stock level for a particular store (in other words, for a particular point of sale).


/{baseSiteId}/products/{productCode}/stock/{storeName}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/{productCode}/stock/{storeName}?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();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        String storeName = storeName_example; // String | Store 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 {
            Stock result = apiInstance.getStoreProductStock(baseSiteId, productCode, storeName, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getStoreProductStock");
            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 productCode = productCode_example; // String | Product identifier
        String storeName = storeName_example; // String | Store 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 {
            Stock result = apiInstance.getStoreProductStock(baseSiteId, productCode, storeName, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getStoreProductStock");
            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 *productCode = productCode_example; // Product identifier
String *storeName = storeName_example; // Store 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)

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

// Get a product's stock level for a store
[apiInstance getStoreProductStockWith:baseSiteId
    productCode:productCode
    storeName:storeName
    fields:fields
              completionHandler: ^(Stock 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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier
var storeName = storeName_example; // {{String}} Store 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.getStoreProductStock(baseSiteId, productCode, storeName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoreProductStockExample
    {
        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 productCode = productCode_example;  // String | Product identifier
            var storeName = storeName_example;  // String | Store 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 product's stock level for a store
                Stock result = apiInstance.getStoreProductStock(baseSiteId, productCode, storeName, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getStoreProductStock: " + 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
$productCode = productCode_example; // String | Product identifier
$storeName = storeName_example; // String | Store 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->getStoreProductStock($baseSiteId, $productCode, $storeName, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getStoreProductStock: ', $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 $productCode = productCode_example; # String | Product identifier
my $storeName = storeName_example; # String | Store 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->getStoreProductStock(baseSiteId => $baseSiteId, productCode => $productCode, storeName => $storeName, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getStoreProductStock: $@\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
productCode = productCode_example # String | Product identifier
storeName = storeName_example # String | Store 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 product's stock level for a store
    api_response = api_instance.get_store_product_stock(baseSiteId, productCode, storeName, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getStoreProductStock: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier
Required
storeName*
String
Store 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSuggestions

Get a list of available suggestions

Returns a list of all available suggestions related to a given term and limits the results to a specific value of the max parameter.


/{baseSiteId}/products/suggestions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/products/suggestions?fields=&max=&term="
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 term = term_example; // String | Specified term
        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
        Integer max = 56; // Integer | Specifies the limit of results.
        try {
            SuggestionList result = apiInstance.getSuggestions(baseSiteId, term, fields, max);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getSuggestions");
            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 term = term_example; // String | Specified term
        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
        Integer max = 56; // Integer | Specifies the limit of results.
        try {
            SuggestionList result = apiInstance.getSuggestions(baseSiteId, term, fields, max);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getSuggestions");
            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 *term = term_example; // Specified term
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)
Integer *max = 56; // Specifies the limit of results. (optional) (default to 10)

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

// Get a list of available suggestions
[apiInstance getSuggestionsWith:baseSiteId
    term:term
    fields:fields
    max:max
              completionHandler: ^(SuggestionList 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.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var term = term_example; // {{String}} Specified term
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
  'max': 56 // {{Integer}} Specifies the limit of results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSuggestions(baseSiteId, term, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSuggestionsExample
    {
        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 term = term_example;  // String | Specified term
            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 max = 56;  // Integer | Specifies the limit of results. (optional)  (default to 10)

            try
            {
                // Get a list of available suggestions
                SuggestionList result = apiInstance.getSuggestions(baseSiteId, term, fields, max);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getSuggestions: " + 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
$term = term_example; // String | Specified term
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$max = 56; // Integer | Specifies the limit of results.

try {
    $result = $api_instance->getSuggestions($baseSiteId, $term, $fields, $max);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getSuggestions: ', $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 $term = term_example; # String | Specified term
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 $max = 56; # Integer | Specifies the limit of results.

eval { 
    my $result = $api_instance->getSuggestions(baseSiteId => $baseSiteId, term => $term, fields => $fields, max => $max);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->getSuggestions: $@\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
term = term_example # String | Specified term
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)
max = 56 # Integer | Specifies the limit of results. (optional) (default to 10)

try: 
    # Get a list of available suggestions
    api_response = api_instance.get_suggestions(baseSiteId, term, fields=fields, max=max)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getSuggestions: %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
max
Integer (int32)
Specifies the limit of results.
term*
String
Specified term
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Promotions

getPromotion

Get a promotion based on code

Returns details of a single promotion specified by a promotion code. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers and therefore some of them are currently not compatible with the new promotion engine.


/{baseSiteId}/promotions/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/promotions/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PromotionsApi;

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

public class PromotionsApiExample {

    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");

        PromotionsApi apiInstance = new PromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Promotion identifier (code)
        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 {
            Promotion result = apiInstance.getPromotion(baseSiteId, code, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PromotionsApi#getPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PromotionsApi;

public class PromotionsApiExample {

    public static void main(String[] args) {
        PromotionsApi apiInstance = new PromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Promotion identifier (code)
        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 {
            Promotion result = apiInstance.getPromotion(baseSiteId, code, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PromotionsApi#getPromotion");
            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 *code = code_example; // Promotion identifier (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 BASIC)

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

// Get a promotion based on code
[apiInstance getPromotionWith:baseSiteId
    code:code
    fields:fields
              completionHandler: ^(Promotion 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.PromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Promotion identifier (code)
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.getPromotion(baseSiteId, code, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPromotionExample
    {
        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 PromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Promotion identifier (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 BASIC)

            try
            {
                // Get a promotion based on code
                Promotion result = apiInstance.getPromotion(baseSiteId, code, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PromotionsApi.getPromotion: " + 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\ApiPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Promotion identifier (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

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

# 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::PromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Promotion identifier (code)
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->getPromotion(baseSiteId => $baseSiteId, code => $code, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PromotionsApi->getPromotion: $@\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.PromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Promotion identifier (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 BASIC)

try: 
    # Get a promotion based on code
    api_response = api_instance.get_promotion(baseSiteId, code, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PromotionsApi->getPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Promotion identifier (code)
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPromotions

Get a list of promotions.

Returns promotions defined for a current base site. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers and therefore some of them are currently not compatible with the new promotion engine.


/{baseSiteId}/promotions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/promotions?fields=&promotionGroup=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PromotionsApi;

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

public class PromotionsApiExample {

    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");

        PromotionsApi apiInstance = new PromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String type = type_example; // String | Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are 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 String promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned try { PromotionList result = apiInstance.getPromotions(baseSiteId, type, fields, promotionGroup); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PromotionsApi#getPromotions"); e.printStackTrace(); } } }
import io.swagger.client.api.PromotionsApi;

public class PromotionsApiExample {

    public static void main(String[] args) {
        PromotionsApi apiInstance = new PromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String type = type_example; // String | Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are 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 String promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned try { PromotionList result = apiInstance.getPromotions(baseSiteId, type, fields, promotionGroup); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PromotionsApi#getPromotions"); 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; // Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are returned
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) String *promotionGroup = promotionGroup_example; // Only promotions from this group are returned (optional) PromotionsApi *apiInstance = [[PromotionsApi alloc] init]; // Get a list of promotions. [apiInstance getPromotionsWith:baseSiteId type:type fields:fields promotionGroup:promotionGroup completionHandler: ^(PromotionList 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.PromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var type = type_example; // {{String}} Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are returned
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 'promotionGroup': promotionGroup_example // {{String}} Only promotions from this group are returned }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getPromotions(baseSiteId, type, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPromotionsExample
    {
        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 PromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var type = type_example;  // String | Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are returned
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) var promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned (optional) try { // Get a list of promotions. PromotionList result = apiInstance.getPromotions(baseSiteId, type, fields, promotionGroup); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling PromotionsApi.getPromotions: " + 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\ApiPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$type = type_example; // String | Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are 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 $promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned try { $result = $api_instance->getPromotions($baseSiteId, $type, $fields, $promotionGroup); print_r($result); } catch (Exception $e) { echo 'Exception when calling PromotionsApi->getPromotions: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PromotionsApi;

# 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::PromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $type = type_example; # String | Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are 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 my $promotionGroup = promotionGroup_example; # String | Only promotions from this group are returned eval { my $result = $api_instance->getPromotions(baseSiteId => $baseSiteId, type => $type, fields => $fields, promotionGroup => $promotionGroup); print Dumper($result); }; if ($@) { warn "Exception when calling PromotionsApi->getPromotions: $@\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.PromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
type = type_example # String | Defines what type of promotions should be returned. Values supported for that parameter are: 
  • all: All available promotions are returned
  • product: Only product promotions are returned
  • order: Only order promotions are 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 (optional) (default to BASIC) promotionGroup = promotionGroup_example # String | Only promotions from this group are returned (optional) try: # Get a list of promotions. api_response = api_instance.get_promotions(baseSiteId, type, fields=fields, promotionGroup=promotionGroup) pprint(api_response) except ApiException as e: print("Exception when calling PromotionsApi->getPromotions: %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
promotionGroup
String
Only promotions from this group are returned
type*
String
Defines what type of promotions should be returned. Values supported for that parameter are: <ul><li>all: All available promotions are returned</li><li>product: Only product promotions are returned</li><li>order: Only order promotions are returned</li></ul>
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Quotes

createCommentForQuote

Add a comment to a quote.

Adds a comment to the quote


/{baseSiteId}/users/{userId}/quotes/{quoteCode}/comments

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}/comments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        CreateComment body = ; // CreateComment | Text of the comment
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createCommentForQuote(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createCommentForQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        CreateComment body = ; // CreateComment | Text of the comment
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createCommentForQuote(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createCommentForQuote");
            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"];
CreateComment *body = ; // Text of the comment
String *baseSiteId = baseSiteId_example; // Base site identifier
String *quoteCode = quoteCode_example; // Identifying code of the quote
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Add a comment to a quote.
[apiInstance createCommentForQuoteWith:body
    baseSiteId:baseSiteId
    quoteCode:quoteCode
    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.QuotesApi()
var body = ; // {{CreateComment}} Text of the comment
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.createCommentForQuote(bodybaseSiteIdquoteCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCommentForQuoteExample
    {
        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 QuotesApi();
            var body = new CreateComment(); // CreateComment | Text of the comment
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add a comment to a quote.
                apiInstance.createCommentForQuote(body, baseSiteId, quoteCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.createCommentForQuote: " + 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\ApiQuotesApi();
$body = ; // CreateComment | Text of the comment
$baseSiteId = baseSiteId_example; // String | Base site identifier
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::CreateComment->new(); # CreateComment | Text of the comment
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->createCommentForQuote(body => $body, baseSiteId => $baseSiteId, quoteCode => $quoteCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling QuotesApi->createCommentForQuote: $@\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.QuotesApi()
body =  # CreateComment | Text of the comment
baseSiteId = baseSiteId_example # String | Base site identifier
quoteCode = quoteCode_example # String | Identifying code of the quote
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add a comment to a quote.
    api_instance.create_comment_for_quote(body, baseSiteId, quoteCode, userId)
except ApiException as e:
    print("Exception when calling QuotesApi->createCommentForQuote: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
quoteCode*
String
Identifying code of the quote
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createQuote

Request a quote.

In the edit state the quote can be requested via cartId, the current content of a cart will be then linked with the quote. The requote action can be triggered by providing the quoteCode parameter, instead of cartId inside the body. The response will contain the new quote's data.


/{baseSiteId}/users/{userId}/quotes

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        QuoteStarter body = ; // QuoteStarter | Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
        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 {
            Quote result = apiInstance.createQuote(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        QuoteStarter body = ; // QuoteStarter | Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
        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 {
            Quote result = apiInstance.createQuote(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createQuote");
            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"];
QuoteStarter *body = ; // Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
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)

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

// Request a quote.
[apiInstance createQuoteWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Quote 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.QuotesApi()
var body = ; // {{QuoteStarter}} Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
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.createQuote(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createQuoteExample
    {
        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 QuotesApi();
            var body = new QuoteStarter(); // QuoteStarter | Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
            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
            {
                // Request a quote.
                Quote result = apiInstance.createQuote(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.createQuote: " + 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\ApiQuotesApi();
$body = ; // QuoteStarter | Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
$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->createQuote($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotesApi->createQuote: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QuotesApi;

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::QuoteStarter->new(); # QuoteStarter | Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
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->createQuote(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuotesApi->createQuote: $@\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.QuotesApi()
body =  # QuoteStarter | Object representing ways of creating new quote - by cartId for creating a new quote from the cart, by quoteCode for the requote action 
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: 
    # Request a quote.
    api_response = api_instance.create_quote(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuotesApi->createQuote: %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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createQuoteDiscount

Apply a discount to an existing quote.

In the edit state, a seller can apply a discount to a quote. Type of the discount - PERCENT for discount by percentage, ABSOLUTE for discount by amount, TARGET for discount by adjustment of the total value


/{baseSiteId}/users/{userId}/quotes/{quoteCode}/discounts

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}/discounts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        QuoteDiscount body = ; // QuoteDiscount | Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createQuoteDiscount(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createQuoteDiscount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        QuoteDiscount body = ; // QuoteDiscount | Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createQuoteDiscount(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createQuoteDiscount");
            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"];
QuoteDiscount *body = ; // Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *quoteCode = quoteCode_example; // Identifying code of the quote
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Apply a discount to an existing quote.
[apiInstance createQuoteDiscountWith:body
    baseSiteId:baseSiteId
    quoteCode:quoteCode
    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.QuotesApi()
var body = ; // {{QuoteDiscount}} Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.createQuoteDiscount(bodybaseSiteIdquoteCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createQuoteDiscountExample
    {
        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 QuotesApi();
            var body = new QuoteDiscount(); // QuoteDiscount | Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Apply a discount to an existing quote.
                apiInstance.createQuoteDiscount(body, baseSiteId, quoteCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.createQuoteDiscount: " + 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\ApiQuotesApi();
$body = ; // QuoteDiscount | Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::QuoteDiscount->new(); # QuoteDiscount | Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->createQuoteDiscount(body => $body, baseSiteId => $baseSiteId, quoteCode => $quoteCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling QuotesApi->createQuoteDiscount: $@\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.QuotesApi()
body =  # QuoteDiscount | Discount applied to the quote - discountType for type of the discount, discountRate for value of the discount 
baseSiteId = baseSiteId_example # String | Base site identifier
quoteCode = quoteCode_example # String | Identifying code of the quote
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Apply a discount to an existing quote.
    api_instance.create_quote_discount(body, baseSiteId, quoteCode, userId)
except ApiException as e:
    print("Exception when calling QuotesApi->createQuoteDiscount: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
quoteCode*
String
Identifying code of the quote
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createQuoteEntryComment

Add a comment to a line item of a quote.

Add a comment to a line item of a quote.


/{baseSiteId}/users/{userId}/quotes/{quoteCode}/entries/{entryNumber}/comments

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}/entries/{entryNumber}/comments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        CreateComment body = ; // CreateComment | Text of the comment
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Long entryNumber = 789; // Long | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createQuoteEntryComment(body, baseSiteId, entryNumber, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createQuoteEntryComment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        CreateComment body = ; // CreateComment | Text of the comment
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Long entryNumber = 789; // Long | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createQuoteEntryComment(body, baseSiteId, entryNumber, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#createQuoteEntryComment");
            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"];
CreateComment *body = ; // Text of the comment
String *baseSiteId = baseSiteId_example; // Base site identifier
Long *entryNumber = 789; // The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
String *quoteCode = quoteCode_example; // Identifying code of the quote
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Add a comment to a line item of a quote.
[apiInstance createQuoteEntryCommentWith:body
    baseSiteId:baseSiteId
    entryNumber:entryNumber
    quoteCode:quoteCode
    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.QuotesApi()
var body = ; // {{CreateComment}} Text of the comment
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var entryNumber = 789; // {{Long}} The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.createQuoteEntryComment(bodybaseSiteIdentryNumberquoteCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createQuoteEntryCommentExample
    {
        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 QuotesApi();
            var body = new CreateComment(); // CreateComment | Text of the comment
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var entryNumber = 789;  // Long | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add a comment to a line item of a quote.
                apiInstance.createQuoteEntryComment(body, baseSiteId, entryNumber, quoteCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.createQuoteEntryComment: " + 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\ApiQuotesApi();
$body = ; // CreateComment | Text of the comment
$baseSiteId = baseSiteId_example; // String | Base site identifier
$entryNumber = 789; // Long | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::CreateComment->new(); # CreateComment | Text of the comment
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $entryNumber = 789; # Long | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->createQuoteEntryComment(body => $body, baseSiteId => $baseSiteId, entryNumber => $entryNumber, quoteCode => $quoteCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling QuotesApi->createQuoteEntryComment: $@\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.QuotesApi()
body =  # CreateComment | Text of the comment
baseSiteId = baseSiteId_example # String | Base site identifier
entryNumber = 789 # Long | The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
quoteCode = quoteCode_example # String | Identifying code of the quote
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add a comment to a line item of a quote.
    api_instance.create_quote_entry_comment(body, baseSiteId, entryNumber, quoteCode, userId)
except ApiException as e:
    print("Exception when calling QuotesApi->createQuoteEntryComment: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
entryNumber*
Long (int64)
The entry number. Each entry in a quote has an entry number. Quote entries are numbered in ascending order, starting with zero (0).
Required
quoteCode*
String
Identifying code of the quote
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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getQuote

Get a specific quote.

Returns quote details based on a specific quote code. The response contains detailed quote information


/{baseSiteId}/users/{userId}/quotes/{quoteCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        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 {
            Quote result = apiInstance.getQuote(baseSiteId, quoteCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#getQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        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 {
            Quote result = apiInstance.getQuote(baseSiteId, quoteCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#getQuote");
            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 *quoteCode = quoteCode_example; // Identifying code of the quote
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)

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

// Get a specific quote.
[apiInstance getQuoteWith:baseSiteId
    quoteCode:quoteCode
    userId:userId
    fields:fields
              completionHandler: ^(Quote 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.QuotesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.getQuote(baseSiteId, quoteCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getQuoteExample
    {
        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 QuotesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            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 specific quote.
                Quote result = apiInstance.getQuote(baseSiteId, quoteCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.getQuote: " + 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\ApiQuotesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$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->getQuote($baseSiteId, $quoteCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotesApi->getQuote: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QuotesApi;

# 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::QuotesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
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->getQuote(baseSiteId => $baseSiteId, quoteCode => $quoteCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuotesApi->getQuote: $@\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.QuotesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
quoteCode = quoteCode_example # String | Identifying code of the quote
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 specific quote.
    api_response = api_instance.get_quote(baseSiteId, quoteCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuotesApi->getQuote: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
quoteCode*
String
Identifying code of the quote
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getQuotes

Get all quotes for user.

Returns history data for all quotes requested by a specified user for a specified base store. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/quotes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            QuoteList result = apiInstance.getQuotes(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#getQuotes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            QuoteList result = apiInstance.getQuotes(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#getQuotes");
            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)
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)
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)

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

// Get all quotes for user.
[apiInstance getQuotesWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(QuoteList 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.QuotesApi()
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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getQuotes(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 getQuotesExample
    {
        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 QuotesApi();
            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 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)
            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) 

            try
            {
                // Get all quotes for user.
                QuoteList result = apiInstance.getQuotes(baseSiteId, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.getQuotes: " + 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\ApiQuotesApi();
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.

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

# 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::QuotesApi->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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getQuotes(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuotesApi->getQuotes: $@\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.QuotesApi()
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)
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)
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)

try: 
    # Get all quotes for user.
    api_response = api_instance.get_quotes(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuotesApi->getQuotes: %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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


performQuoteAction

Perform workflow actions with the quote.

Perform cancel, submit, edit, checkout, approve, reject actions with the quote.


/{baseSiteId}/users/{userId}/quotes/{quoteCode}/action

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}/action"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        QuoteAction body = ; // QuoteAction | The action with the quote. The quote action field is mandatory.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.performQuoteAction(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#performQuoteAction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        QuoteAction body = ; // QuoteAction | The action with the quote. The quote action field is mandatory.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.performQuoteAction(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#performQuoteAction");
            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"];
QuoteAction *body = ; // The action with the quote. The quote action field is mandatory.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *quoteCode = quoteCode_example; // Identifying code of the quote
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Perform workflow actions with the quote.
[apiInstance performQuoteActionWith:body
    baseSiteId:baseSiteId
    quoteCode:quoteCode
    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.QuotesApi()
var body = ; // {{QuoteAction}} The action with the quote. The quote action field is mandatory.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.performQuoteAction(bodybaseSiteIdquoteCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class performQuoteActionExample
    {
        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 QuotesApi();
            var body = new QuoteAction(); // QuoteAction | The action with the quote. The quote action field is mandatory.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Perform workflow actions with the quote.
                apiInstance.performQuoteAction(body, baseSiteId, quoteCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.performQuoteAction: " + 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\ApiQuotesApi();
$body = ; // QuoteAction | The action with the quote. The quote action field is mandatory.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::QuoteAction->new(); # QuoteAction | The action with the quote. The quote action field is mandatory.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->performQuoteAction(body => $body, baseSiteId => $baseSiteId, quoteCode => $quoteCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling QuotesApi->performQuoteAction: $@\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.QuotesApi()
body =  # QuoteAction | The action with the quote. The quote action field is mandatory.
baseSiteId = baseSiteId_example # String | Base site identifier
quoteCode = quoteCode_example # String | Identifying code of the quote
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Perform workflow actions with the quote.
    api_instance.perform_quote_action(body, baseSiteId, quoteCode, userId)
except ApiException as e:
    print("Exception when calling QuotesApi->performQuoteAction: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
quoteCode*
String
Identifying code of the quote
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceQuote

Edit the quote.

Updates name, description or expiry date of the quote.


/{baseSiteId}/users/{userId}/quotes/{quoteCode}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        QuoteMetadata body = ; // QuoteMetadata | Updated name, description or expiry date of the quote
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceQuote(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#replaceQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        QuoteMetadata body = ; // QuoteMetadata | Updated name, description or expiry date of the quote
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceQuote(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#replaceQuote");
            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"];
QuoteMetadata *body = ; // Updated name, description or expiry date of the quote
String *baseSiteId = baseSiteId_example; // Base site identifier
String *quoteCode = quoteCode_example; // Identifying code of the quote
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Edit the quote.
[apiInstance replaceQuoteWith:body
    baseSiteId:baseSiteId
    quoteCode:quoteCode
    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.QuotesApi()
var body = ; // {{QuoteMetadata}} Updated name, description or expiry date of the quote
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.replaceQuote(bodybaseSiteIdquoteCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceQuoteExample
    {
        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 QuotesApi();
            var body = new QuoteMetadata(); // QuoteMetadata | Updated name, description or expiry date of the quote
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Edit the quote.
                apiInstance.replaceQuote(body, baseSiteId, quoteCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.replaceQuote: " + 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\ApiQuotesApi();
$body = ; // QuoteMetadata | Updated name, description or expiry date of the quote
$baseSiteId = baseSiteId_example; // String | Base site identifier
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::QuoteMetadata->new(); # QuoteMetadata | Updated name, description or expiry date of the quote
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceQuote(body => $body, baseSiteId => $baseSiteId, quoteCode => $quoteCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling QuotesApi->replaceQuote: $@\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.QuotesApi()
body =  # QuoteMetadata | Updated name, description or expiry date of the quote
baseSiteId = baseSiteId_example # String | Base site identifier
quoteCode = quoteCode_example # String | Identifying code of the quote
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Edit the quote.
    api_instance.replace_quote(body, baseSiteId, quoteCode, userId)
except ApiException as e:
    print("Exception when calling QuotesApi->replaceQuote: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
quoteCode*
String
Identifying code of the quote
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: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateQuote

Edit the quote.

Updates name, description or expiry date of the quote.


/{baseSiteId}/users/{userId}/quotes/{quoteCode}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/quotes/{quoteCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotesApi;

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

public class QuotesApiExample {

    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");

        QuotesApi apiInstance = new QuotesApi();
        QuoteMetadata body = ; // QuoteMetadata | Updated name, description or expiry date of the quote
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateQuote(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#updateQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotesApi;

public class QuotesApiExample {

    public static void main(String[] args) {
        QuotesApi apiInstance = new QuotesApi();
        QuoteMetadata body = ; // QuoteMetadata | Updated name, description or expiry date of the quote
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String quoteCode = quoteCode_example; // String | Identifying code of the quote
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateQuote(body, baseSiteId, quoteCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotesApi#updateQuote");
            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"];
QuoteMetadata *body = ; // Updated name, description or expiry date of the quote
String *baseSiteId = baseSiteId_example; // Base site identifier
String *quoteCode = quoteCode_example; // Identifying code of the quote
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Edit the quote.
[apiInstance updateQuoteWith:body
    baseSiteId:baseSiteId
    quoteCode:quoteCode
    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.QuotesApi()
var body = ; // {{QuoteMetadata}} Updated name, description or expiry date of the quote
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var quoteCode = quoteCode_example; // {{String}} Identifying code of the quote
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.updateQuote(bodybaseSiteIdquoteCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateQuoteExample
    {
        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 QuotesApi();
            var body = new QuoteMetadata(); // QuoteMetadata | Updated name, description or expiry date of the quote
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var quoteCode = quoteCode_example;  // String | Identifying code of the quote
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Edit the quote.
                apiInstance.updateQuote(body, baseSiteId, quoteCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotesApi.updateQuote: " + 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\ApiQuotesApi();
$body = ; // QuoteMetadata | Updated name, description or expiry date of the quote
$baseSiteId = baseSiteId_example; // String | Base site identifier
$quoteCode = quoteCode_example; // String | Identifying code of the quote
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::QuotesApi->new();
my $body = WWW::SwaggerClient::Object::QuoteMetadata->new(); # QuoteMetadata | Updated name, description or expiry date of the quote
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $quoteCode = quoteCode_example; # String | Identifying code of the quote
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateQuote(body => $body, baseSiteId => $baseSiteId, quoteCode => $quoteCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling QuotesApi->updateQuote: $@\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.QuotesApi()
body =  # QuoteMetadata | Updated name, description or expiry date of the quote
baseSiteId = baseSiteId_example # String | Base site identifier
quoteCode = quoteCode_example # String | Identifying code of the quote
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Edit the quote.
    api_instance.update_quote(body, baseSiteId, quoteCode, userId)
except ApiException as e:
    print("Exception when calling QuotesApi->updateQuote: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
quoteCode*
String
Identifying code of the quote
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


ReplenishmentOrder

getReplenishmentOrder

Gets replenishment order for a specified user and replenishment order code.

Returns specific replenishment order details accessible for a specified user. The response contains detailed orders information from the replenishment order.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/replenishmentOrders/{replenishmentOrderCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReplenishmentOrderApi;

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

public class ReplenishmentOrderApiExample {

    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");

        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
        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.getReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#getReplenishmentOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReplenishmentOrderApi;

public class ReplenishmentOrderApiExample {

    public static void main(String[] args) {
        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
        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.getReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#getReplenishmentOrder");
            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 *replenishmentOrderCode = replenishmentOrderCode_example; // Unique code for the replenishment order.
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)

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

// Gets replenishment order for a specified user and replenishment order code.
[apiInstance getReplenishmentOrderWith:baseSiteId
    replenishmentOrderCode:replenishmentOrderCode
    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.ReplenishmentOrderApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var replenishmentOrderCode = replenishmentOrderCode_example; // {{String}} Unique code for the replenishment order.
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.getReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReplenishmentOrderExample
    {
        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 ReplenishmentOrderApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var replenishmentOrderCode = replenishmentOrderCode_example;  // String | Unique code for the replenishment order.
            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 replenishment order for a specified user and replenishment order code.
                ReplenishmentOrder result = apiInstance.getReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReplenishmentOrderApi.getReplenishmentOrder: " + 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\ApiReplenishmentOrderApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
$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->getReplenishmentOrder($baseSiteId, $replenishmentOrderCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReplenishmentOrderApi->getReplenishmentOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReplenishmentOrderApi;

# 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::ReplenishmentOrderApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $replenishmentOrderCode = replenishmentOrderCode_example; # String | Unique code for the replenishment order.
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->getReplenishmentOrder(baseSiteId => $baseSiteId, replenishmentOrderCode => $replenishmentOrderCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReplenishmentOrderApi->getReplenishmentOrder: $@\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.ReplenishmentOrderApi()
baseSiteId = baseSiteId_example # String | Base site identifier
replenishmentOrderCode = replenishmentOrderCode_example # String | Unique code for the replenishment order.
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 replenishment order for a specified user and replenishment order code.
    api_response = api_instance.get_replenishment_order(baseSiteId, replenishmentOrderCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplenishmentOrderApi->getReplenishmentOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
replenishmentOrderCode*
String
Unique code for the replenishment order.
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getReplenishmentOrderHistory

Gets replenishment order history.

Returns order history data from a replenishment order placed by a specified user.


/{baseSiteId}/users/{userId}/replenishmentOrders/{replenishmentOrderCode}/orders

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/replenishmentOrders/{replenishmentOrderCode}/orders?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReplenishmentOrderApi;

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

public class ReplenishmentOrderApiExample {

    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");

        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrderHistoryList result = apiInstance.getReplenishmentOrderHistory(baseSiteId, replenishmentOrderCode, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#getReplenishmentOrderHistory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReplenishmentOrderApi;

public class ReplenishmentOrderApiExample {

    public static void main(String[] args) {
        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            OrderHistoryList result = apiInstance.getReplenishmentOrderHistory(baseSiteId, replenishmentOrderCode, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#getReplenishmentOrderHistory");
            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 *replenishmentOrderCode = replenishmentOrderCode_example; // Unique code for the replenishment order.
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)
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)
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)

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

// Gets replenishment order history.
[apiInstance getReplenishmentOrderHistoryWith:baseSiteId
    replenishmentOrderCode:replenishmentOrderCode
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              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.ReplenishmentOrderApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var replenishmentOrderCode = replenishmentOrderCode_example; // {{String}} Unique code for the replenishment order.
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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReplenishmentOrderHistory(baseSiteId, replenishmentOrderCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReplenishmentOrderHistoryExample
    {
        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 ReplenishmentOrderApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var replenishmentOrderCode = replenishmentOrderCode_example;  // String | Unique code for the replenishment order.
            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 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 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)

            try
            {
                // Gets replenishment order history.
                OrderHistoryList result = apiInstance.getReplenishmentOrderHistory(baseSiteId, replenishmentOrderCode, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReplenishmentOrderApi.getReplenishmentOrderHistory: " + 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\ApiReplenishmentOrderApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

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

# 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::ReplenishmentOrderApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $replenishmentOrderCode = replenishmentOrderCode_example; # String | Unique code for the replenishment order.
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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getReplenishmentOrderHistory(baseSiteId => $baseSiteId, replenishmentOrderCode => $replenishmentOrderCode, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReplenishmentOrderApi->getReplenishmentOrderHistory: $@\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.ReplenishmentOrderApi()
baseSiteId = baseSiteId_example # String | Base site identifier
replenishmentOrderCode = replenishmentOrderCode_example # String | Unique code for the replenishment order.
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)
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)
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)

try: 
    # Gets replenishment order history.
    api_response = api_instance.get_replenishment_order_history(baseSiteId, replenishmentOrderCode, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplenishmentOrderApi->getReplenishmentOrderHistory: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
replenishmentOrderCode*
String
Unique code for the replenishment order.
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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getReplenishmentOrders

Gets the list of replenishment orders for a specified user.

Returns the list of replenishment orders accessible to a specified user.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/replenishmentOrders?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReplenishmentOrderApi;

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

public class ReplenishmentOrderApiExample {

    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");

        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            ReplenishmentOrderList result = apiInstance.getReplenishmentOrders(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#getReplenishmentOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReplenishmentOrderApi;

public class ReplenishmentOrderApiExample {

    public static void main(String[] args) {
        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        try {
            ReplenishmentOrderList result = apiInstance.getReplenishmentOrders(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#getReplenishmentOrders");
            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)
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)
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)

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

// Gets the list of replenishment orders for a specified user.
[apiInstance getReplenishmentOrdersWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(ReplenishmentOrderList 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.ReplenishmentOrderApi()
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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReplenishmentOrders(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 getReplenishmentOrdersExample
    {
        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 ReplenishmentOrderApi();
            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 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 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)

            try
            {
                // Gets the list of replenishment orders for a specified user.
                ReplenishmentOrderList result = apiInstance.getReplenishmentOrders(baseSiteId, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReplenishmentOrderApi.getReplenishmentOrders: " + 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\ApiReplenishmentOrderApi();
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.

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

# 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::ReplenishmentOrderApi->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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.

eval { 
    my $result = $api_instance->getReplenishmentOrders(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReplenishmentOrderApi->getReplenishmentOrders: $@\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.ReplenishmentOrderApi()
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)
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)
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)

try: 
    # Gets the list of replenishment orders for a specified user.
    api_response = api_instance.get_replenishment_orders(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplenishmentOrderApi->getReplenishmentOrders: %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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateReplenishmentOrder

Updates the replenishment order for a specified user and replenishment order code.

Updates the replenishment order. Only cancellation of the replenishment order is supported by setting the attribute 'active' to FALSE. Cancellation of the replenishment order cannot be reverted.


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

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/replenishmentOrders/{replenishmentOrderCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReplenishmentOrderApi;

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

public class ReplenishmentOrderApiExample {

    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");

        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
        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.updateReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#updateReplenishmentOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReplenishmentOrderApi;

public class ReplenishmentOrderApiExample {

    public static void main(String[] args) {
        ReplenishmentOrderApi apiInstance = new ReplenishmentOrderApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
        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.updateReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReplenishmentOrderApi#updateReplenishmentOrder");
            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 *replenishmentOrderCode = replenishmentOrderCode_example; // Unique code for the replenishment order.
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)

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

// Updates the replenishment order for a specified user and replenishment order code.
[apiInstance updateReplenishmentOrderWith:baseSiteId
    replenishmentOrderCode:replenishmentOrderCode
    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.ReplenishmentOrderApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var replenishmentOrderCode = replenishmentOrderCode_example; // {{String}} Unique code for the replenishment order.
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.updateReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateReplenishmentOrderExample
    {
        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 ReplenishmentOrderApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var replenishmentOrderCode = replenishmentOrderCode_example;  // String | Unique code for the replenishment order.
            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 replenishment order for a specified user and replenishment order code.
                ReplenishmentOrder result = apiInstance.updateReplenishmentOrder(baseSiteId, replenishmentOrderCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReplenishmentOrderApi.updateReplenishmentOrder: " + 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\ApiReplenishmentOrderApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$replenishmentOrderCode = replenishmentOrderCode_example; // String | Unique code for the replenishment order.
$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->updateReplenishmentOrder($baseSiteId, $replenishmentOrderCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReplenishmentOrderApi->updateReplenishmentOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReplenishmentOrderApi;

# 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::ReplenishmentOrderApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $replenishmentOrderCode = replenishmentOrderCode_example; # String | Unique code for the replenishment order.
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->updateReplenishmentOrder(baseSiteId => $baseSiteId, replenishmentOrderCode => $replenishmentOrderCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReplenishmentOrderApi->updateReplenishmentOrder: $@\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.ReplenishmentOrderApi()
baseSiteId = baseSiteId_example # String | Base site identifier
replenishmentOrderCode = replenishmentOrderCode_example # String | Unique code for the replenishment order.
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 replenishment order for a specified user and replenishment order code.
    api_response = api_instance.update_replenishment_order(baseSiteId, replenishmentOrderCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplenishmentOrderApi->updateReplenishmentOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
replenishmentOrderCode*
String
Unique code for the replenishment order.
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


ReturnRequests

createReturnRequest

Create an order return request.

Creates an order return request.


/{baseSiteId}/users/{userId}/orderReturns

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orderReturns?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnRequestsApi;

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

public class ReturnRequestsApiExample {

    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");

        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        ReturnRequestEntryInputList body = ; // ReturnRequestEntryInputList | Return request input list for the current 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 fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
        try {
            ReturnRequest result = apiInstance.createReturnRequest(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#createReturnRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnRequestsApi;

public class ReturnRequestsApiExample {

    public static void main(String[] args) {
        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        ReturnRequestEntryInputList body = ; // ReturnRequestEntryInputList | Return request input list for the current 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 fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
        try {
            ReturnRequest result = apiInstance.createReturnRequest(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#createReturnRequest");
            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"];
ReturnRequestEntryInputList *body = ; // Return request input list for the current 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 *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)

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

// Create an order return request.
[apiInstance createReturnRequestWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ReturnRequest 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.ReturnRequestsApi()
var body = ; // {{ReturnRequestEntryInputList}} Return request input list for the current 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 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.createReturnRequest(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createReturnRequestExample
    {
        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 ReturnRequestsApi();
            var body = new ReturnRequestEntryInputList(); // ReturnRequestEntryInputList | Return request input list for the current 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 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 an order return request.
                ReturnRequest result = apiInstance.createReturnRequest(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.createReturnRequest: " + 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\ApiReturnRequestsApi();
$body = ; // ReturnRequestEntryInputList | Return request input list for the current 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
$fields = 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->createReturnRequest($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReturnRequestsApi->createReturnRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReturnRequestsApi;

# 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::ReturnRequestsApi->new();
my $body = WWW::SwaggerClient::Object::ReturnRequestEntryInputList->new(); # ReturnRequestEntryInputList | Return request input list for the current 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 $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->createReturnRequest(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReturnRequestsApi->createReturnRequest: $@\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.ReturnRequestsApi()
body =  # ReturnRequestEntryInputList | Return request input list for the current 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
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 an order return request.
    api_response = api_instance.create_return_request(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->createReturnRequest: %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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getReturnRequest

Get the details of a return request.

Returns specific order return request details based on a specific return request code. The response contains detailed order return request information.


/{baseSiteId}/users/{userId}/orderReturns/{returnRequestCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orderReturns/{returnRequestCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnRequestsApi;

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

public class ReturnRequestsApiExample {

    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");

        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String returnRequestCode = returnRequestCode_example; // String | Order return request code
        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 {
            ReturnRequest result = apiInstance.getReturnRequest(baseSiteId, returnRequestCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#getReturnRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnRequestsApi;

public class ReturnRequestsApiExample {

    public static void main(String[] args) {
        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String returnRequestCode = returnRequestCode_example; // String | Order return request code
        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 {
            ReturnRequest result = apiInstance.getReturnRequest(baseSiteId, returnRequestCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#getReturnRequest");
            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 *returnRequestCode = returnRequestCode_example; // Order return request code
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)

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

// Get the details of a return request.
[apiInstance getReturnRequestWith:baseSiteId
    returnRequestCode:returnRequestCode
    userId:userId
    fields:fields
              completionHandler: ^(ReturnRequest 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.ReturnRequestsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var returnRequestCode = returnRequestCode_example; // {{String}} Order return request code
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.getReturnRequest(baseSiteId, returnRequestCode, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReturnRequestExample
    {
        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 ReturnRequestsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var returnRequestCode = returnRequestCode_example;  // String | Order return request code
            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 details of a return request.
                ReturnRequest result = apiInstance.getReturnRequest(baseSiteId, returnRequestCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.getReturnRequest: " + 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\ApiReturnRequestsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$returnRequestCode = returnRequestCode_example; // String | Order return request code
$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->getReturnRequest($baseSiteId, $returnRequestCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReturnRequestsApi->getReturnRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReturnRequestsApi;

# 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::ReturnRequestsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $returnRequestCode = returnRequestCode_example; # String | Order return request code
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->getReturnRequest(baseSiteId => $baseSiteId, returnRequestCode => $returnRequestCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReturnRequestsApi->getReturnRequest: $@\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.ReturnRequestsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
returnRequestCode = returnRequestCode_example # String | Order return request code
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 details of a return request.
    api_response = api_instance.get_return_request(baseSiteId, returnRequestCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->getReturnRequest: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
returnRequestCode*
String
Order return request code
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getReturnRequests

Gets the user's return requests history

Returns order return request data associated with a specified user for a specified base store.


/{baseSiteId}/users/{userId}/orderReturns

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orderReturns?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnRequestsApi;

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

public class ReturnRequestsApiExample {

    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");

        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ReturnRequestList result = apiInstance.getReturnRequests(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#getReturnRequests");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnRequestsApi;

public class ReturnRequestsApiExample {

    public static void main(String[] args) {
        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ReturnRequestList result = apiInstance.getReturnRequests(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#getReturnRequests");
            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)
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)
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)

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

// Gets the user's return requests history
[apiInstance getReturnRequestsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(ReturnRequestList 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.ReturnRequestsApi()
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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReturnRequests(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 getReturnRequestsExample
    {
        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 ReturnRequestsApi();
            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 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 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) 

            try
            {
                // Gets the user's return requests history
                ReturnRequestList result = apiInstance.getReturnRequests(baseSiteId, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.getReturnRequests: " + 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\ApiReturnRequestsApi();
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.

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

# 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::ReturnRequestsApi->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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getReturnRequests(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReturnRequestsApi->getReturnRequests: $@\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.ReturnRequestsApi()
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)
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)
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)

try: 
    # Gets the user's return requests history
    api_response = api_instance.get_return_requests(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->getReturnRequests: %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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateReturnRequest

Updates the order return request.

Updates the order return request. Only cancellation of the request is supported by setting the attribute status to CANCELLING. Cancellation of the return request cannot be reverted


/{baseSiteId}/users/{userId}/orderReturns/{returnRequestCode}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/orderReturns/{returnRequestCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnRequestsApi;

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

public class ReturnRequestsApiExample {

    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");

        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        ReturnRequestModification body = ; // ReturnRequestModification | Return request modification object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String returnRequestCode = returnRequestCode_example; // String | Order return request code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateReturnRequest(body, baseSiteId, returnRequestCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#updateReturnRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnRequestsApi;

public class ReturnRequestsApiExample {

    public static void main(String[] args) {
        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        ReturnRequestModification body = ; // ReturnRequestModification | Return request modification object.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String returnRequestCode = returnRequestCode_example; // String | Order return request code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateReturnRequest(body, baseSiteId, returnRequestCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#updateReturnRequest");
            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"];
ReturnRequestModification *body = ; // Return request modification object.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *returnRequestCode = returnRequestCode_example; // Order return request code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Updates the order return request.
[apiInstance updateReturnRequestWith:body
    baseSiteId:baseSiteId
    returnRequestCode:returnRequestCode
    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.ReturnRequestsApi()
var body = ; // {{ReturnRequestModification}} Return request modification object.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var returnRequestCode = returnRequestCode_example; // {{String}} Order return request code
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.updateReturnRequest(bodybaseSiteIdreturnRequestCodeuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateReturnRequestExample
    {
        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 ReturnRequestsApi();
            var body = new ReturnRequestModification(); // ReturnRequestModification | Return request modification object.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var returnRequestCode = returnRequestCode_example;  // String | Order return request code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates the order return request.
                apiInstance.updateReturnRequest(body, baseSiteId, returnRequestCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.updateReturnRequest: " + 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\ApiReturnRequestsApi();
$body = ; // ReturnRequestModification | Return request modification object.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$returnRequestCode = returnRequestCode_example; // String | Order return request code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::ReturnRequestsApi->new();
my $body = WWW::SwaggerClient::Object::ReturnRequestModification->new(); # ReturnRequestModification | Return request modification object.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $returnRequestCode = returnRequestCode_example; # String | Order return request code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateReturnRequest(body => $body, baseSiteId => $baseSiteId, returnRequestCode => $returnRequestCode, userId => $userId);
};
if ($@) {
    warn "Exception when calling ReturnRequestsApi->updateReturnRequest: $@\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.ReturnRequestsApi()
body =  # ReturnRequestModification | Return request modification object.
baseSiteId = baseSiteId_example # String | Base site identifier
returnRequestCode = returnRequestCode_example # String | Order return request code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the order return request.
    api_instance.update_return_request(body, baseSiteId, returnRequestCode, userId)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->updateReturnRequest: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
returnRequestCode*
String
Order return request code
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


SaveCart

doCartClone

Explicitly clones a cart.

Explicitly clones a cart.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/clonesavedcart?description=&fields=&name="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

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

public class SaveCartApiExample {

    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");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String description = description_example; // String | The description that should be applied to the cloned 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
        String name = name_example; // String | The name that should be applied to the cloned cart.
        try {
            SaveCartResult result = apiInstance.doCartClone(baseSiteId, cartId, userId, description, fields, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doCartClone");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String description = description_example; // String | The description that should be applied to the cloned 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
        String name = name_example; // String | The name that should be applied to the cloned cart.
        try {
            SaveCartResult result = apiInstance.doCartClone(baseSiteId, cartId, userId, description, fields, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doCartClone");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *description = description_example; // The description that should be applied to the cloned 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)
String *name = name_example; // The name that should be applied to the cloned cart. (optional)

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

// Explicitly clones a cart.
[apiInstance doCartCloneWith:baseSiteId
    cartId:cartId
    userId:userId
    description:description
    fields:fields
    name:name
              completionHandler: ^(SaveCartResult 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.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'description': description_example, // {{String}} The description that should be applied to the cloned 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
  'name': name_example // {{String}} The name that should be applied to the cloned cart.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doCartClone(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doCartCloneExample
    {
        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 SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var description = description_example;  // String | The description that should be applied to the cloned 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)
            var name = name_example;  // String | The name that should be applied to the cloned cart. (optional) 

            try
            {
                // Explicitly clones a cart.
                SaveCartResult result = apiInstance.doCartClone(baseSiteId, cartId, userId, description, fields, name);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doCartClone: " + 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\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$description = description_example; // String | The description that should be applied to the cloned 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
$name = name_example; // String | The name that should be applied to the cloned cart.

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

# 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::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $description = description_example; # String | The description that should be applied to the cloned 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
my $name = name_example; # String | The name that should be applied to the cloned cart.

eval { 
    my $result = $api_instance->doCartClone(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, description => $description, fields => $fields, name => $name);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->doCartClone: $@\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.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
description = description_example # String | The description that should be applied to the cloned 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)
name = name_example # String | The name that should be applied to the cloned cart. (optional)

try: 
    # Explicitly clones a cart.
    api_response = api_instance.do_cart_clone(baseSiteId, cartId, userId, description=description, fields=fields, name=name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doCartClone: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doSaveCart

Explicitly saves a cart.

Explicitly saves a cart.


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

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/save?fields=&saveCartDescription=&saveCartName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

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

public class SaveCartApiExample {

    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");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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
        String saveCartDescription = saveCartDescription_example; // String | The description that should be applied to the saved cart.
        String saveCartName = saveCartName_example; // String | The name that should be applied to the saved cart.
        try {
            SaveCartResult result = apiInstance.doSaveCart(baseSiteId, cartId, userId, fields, saveCartDescription, saveCartName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doSaveCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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
        String saveCartDescription = saveCartDescription_example; // String | The description that should be applied to the saved cart.
        String saveCartName = saveCartName_example; // String | The name that should be applied to the saved cart.
        try {
            SaveCartResult result = apiInstance.doSaveCart(baseSiteId, cartId, userId, fields, saveCartDescription, saveCartName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doSaveCart");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)
String *saveCartDescription = saveCartDescription_example; // The description that should be applied to the saved cart. (optional)
String *saveCartName = saveCartName_example; // The name that should be applied to the saved cart. (optional)

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

// Explicitly saves a cart.
[apiInstance doSaveCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
    saveCartDescription:saveCartDescription
    saveCartName:saveCartName
              completionHandler: ^(SaveCartResult 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.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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
  'saveCartDescription': saveCartDescription_example, // {{String}} The description that should be applied to the saved cart.
  'saveCartName': saveCartName_example // {{String}} The name that should be applied to the saved cart.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doSaveCart(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doSaveCartExample
    {
        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 SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 saveCartDescription = saveCartDescription_example;  // String | The description that should be applied to the saved cart. (optional) 
            var saveCartName = saveCartName_example;  // String | The name that should be applied to the saved cart. (optional) 

            try
            {
                // Explicitly saves a cart.
                SaveCartResult result = apiInstance.doSaveCart(baseSiteId, cartId, userId, fields, saveCartDescription, saveCartName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doSaveCart: " + 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\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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
$saveCartDescription = saveCartDescription_example; // String | The description that should be applied to the saved cart.
$saveCartName = saveCartName_example; // String | The name that should be applied to the saved cart.

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

# 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::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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 $saveCartDescription = saveCartDescription_example; # String | The description that should be applied to the saved cart.
my $saveCartName = saveCartName_example; # String | The name that should be applied to the saved cart.

eval { 
    my $result = $api_instance->doSaveCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields, saveCartDescription => $saveCartDescription, saveCartName => $saveCartName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->doSaveCart: $@\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.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)
saveCartDescription = saveCartDescription_example # String | The description that should be applied to the saved cart. (optional)
saveCartName = saveCartName_example # String | The name that should be applied to the saved cart. (optional)

try: 
    # Explicitly saves a cart.
    api_response = api_instance.do_save_cart(baseSiteId, cartId, userId, fields=fields, saveCartDescription=saveCartDescription, saveCartName=saveCartName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doSaveCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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
saveCartDescription
String
The description that should be applied to the saved cart.
saveCartName
String
The name that should be applied to the saved cart.

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


doUpdateFlagForDeletion

Flag a cart for deletion.

Flags a cart for deletion (the cart doesn't have corresponding save cart attributes anymore). The cart is not actually deleted from the database. But with the removal of the saved cart attributes, this cart will be taken care of by the cart removal job just like any other cart.


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

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/flagForDeletion?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

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

public class SaveCartApiExample {

    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");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            SaveCartResult result = apiInstance.doUpdateFlagForDeletion(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doUpdateFlagForDeletion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            SaveCartResult result = apiInstance.doUpdateFlagForDeletion(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doUpdateFlagForDeletion");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Flag a cart for deletion.
[apiInstance doUpdateFlagForDeletionWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(SaveCartResult 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.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.doUpdateFlagForDeletion(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doUpdateFlagForDeletionExample
    {
        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 SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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
            {
                // Flag a cart for deletion.
                SaveCartResult result = apiInstance.doUpdateFlagForDeletion(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doUpdateFlagForDeletion: " + 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\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->doUpdateFlagForDeletion($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SaveCartApi->doUpdateFlagForDeletion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SaveCartApi;

# 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::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->doUpdateFlagForDeletion(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->doUpdateFlagForDeletion: $@\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.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Flag a cart for deletion.
    api_response = api_instance.do_update_flag_for_deletion(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doUpdateFlagForDeletion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


doUpdateSavedCart

Restore a saved cart.

Restore a saved cart.


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

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/restoresavedcart?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

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

public class SaveCartApiExample {

    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");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            SaveCartResult result = apiInstance.doUpdateSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doUpdateSavedCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            SaveCartResult result = apiInstance.doUpdateSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doUpdateSavedCart");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Restore a saved cart.
[apiInstance doUpdateSavedCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(SaveCartResult 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.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.doUpdateSavedCart(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doUpdateSavedCartExample
    {
        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 SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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
            {
                // Restore a saved cart.
                SaveCartResult result = apiInstance.doUpdateSavedCart(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doUpdateSavedCart: " + 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\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->doUpdateSavedCart($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SaveCartApi->doUpdateSavedCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SaveCartApi;

# 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::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->doUpdateSavedCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->doUpdateSavedCart: $@\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.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 
    # Restore a saved cart.
    api_response = api_instance.do_update_saved_cart(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doUpdateSavedCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


getSavedCart

Get a saved cart.

Returns a saved cart for an authenticated user. The cart is identified using the "cartId" parameter.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/savedcart?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

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

public class SaveCartApiExample {

    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");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            SaveCartResult result = apiInstance.getSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#getSavedCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 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 {
            SaveCartResult result = apiInstance.getSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#getSavedCart");
            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 *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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)

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

// Get a saved cart.
[apiInstance getSavedCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(SaveCartResult 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.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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 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.getSavedCart(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSavedCartExample
    {
        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 SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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 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 saved cart.
                SaveCartResult result = apiInstance.getSavedCart(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.getSavedCart: " + 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\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$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->getSavedCart($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SaveCartApi->getSavedCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SaveCartApi;

# 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::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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 $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->getSavedCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->getSavedCart: $@\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.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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 saved cart.
    api_response = api_instance.get_saved_cart(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->getSavedCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


SiteMessages

siteMessagesUsingGET

Gets all site messages of current customer.

Returns the site messages of current customer.


/{baseSiteId}/users/{userId}/notifications/sitemessages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/notifications/sitemessages?currentPage=&needsTotal=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SiteMessagesApi;

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

public class SiteMessagesApiExample {

    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");

        SiteMessagesApi apiInstance = new SiteMessagesApi();
        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 currentPage = currentPage_example; // String | The current result page requested.
        String needsTotal = needsTotal_example; // String | The flag for indicating if total number of results is needed or not.
        String pageSize = pageSize_example; // String | The number of results returned per page.
        String sort = sort_example; // String | The sorting method applied to the return results.
        try {
            siteMessageSearchResult result = apiInstance.siteMessagesUsingGET(baseSiteId, userId, currentPage, needsTotal, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SiteMessagesApi#siteMessagesUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SiteMessagesApi;

public class SiteMessagesApiExample {

    public static void main(String[] args) {
        SiteMessagesApi apiInstance = new SiteMessagesApi();
        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 currentPage = currentPage_example; // String | The current result page requested.
        String needsTotal = needsTotal_example; // String | The flag for indicating if total number of results is needed or not.
        String pageSize = pageSize_example; // String | The number of results returned per page.
        String sort = sort_example; // String | The sorting method applied to the return results.
        try {
            siteMessageSearchResult result = apiInstance.siteMessagesUsingGET(baseSiteId, userId, currentPage, needsTotal, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SiteMessagesApi#siteMessagesUsingGET");
            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 *currentPage = currentPage_example; // The current result page requested. (optional) (default to 0)
String *needsTotal = needsTotal_example; // The flag for indicating if total number of results is needed or not. (optional) (default to true)
String *pageSize = pageSize_example; // The number of results returned per page. (optional) (default to 10)
String *sort = sort_example; // The sorting method applied to the return results. (optional)

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

// Gets all site messages of current customer.
[apiInstance siteMessagesUsingGETWith:baseSiteId
    userId:userId
    currentPage:currentPage
    needsTotal:needsTotal
    pageSize:pageSize
    sort:sort
              completionHandler: ^(siteMessageSearchResult 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.SiteMessagesApi()
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': currentPage_example, // {{String}} The current result page requested.
  'needsTotal': needsTotal_example, // {{String}} The flag for indicating if total number of results is needed or not.
  'pageSize': pageSize_example, // {{String}} The number of results returned per page.
  'sort': sort_example // {{String}} The sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.siteMessagesUsingGET(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 siteMessagesUsingGETExample
    {
        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 SiteMessagesApi();
            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 = currentPage_example;  // String | The current result page requested. (optional)  (default to 0)
            var needsTotal = needsTotal_example;  // String | The flag for indicating if total number of results is needed or not. (optional)  (default to true)
            var pageSize = pageSize_example;  // String | The number of results returned per page. (optional)  (default to 10)
            var sort = sort_example;  // String | The sorting method applied to the return results. (optional) 

            try
            {
                // Gets all site messages of current customer.
                siteMessageSearchResult result = apiInstance.siteMessagesUsingGET(baseSiteId, userId, currentPage, needsTotal, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SiteMessagesApi.siteMessagesUsingGET: " + 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\ApiSiteMessagesApi();
$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 = currentPage_example; // String | The current result page requested.
$needsTotal = needsTotal_example; // String | The flag for indicating if total number of results is needed or not.
$pageSize = pageSize_example; // String | The number of results returned per page.
$sort = sort_example; // String | The sorting method applied to the return results.

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

# 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::SiteMessagesApi->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 = currentPage_example; # String | The current result page requested.
my $needsTotal = needsTotal_example; # String | The flag for indicating if total number of results is needed or not.
my $pageSize = pageSize_example; # String | The number of results returned per page.
my $sort = sort_example; # String | The sorting method applied to the return results.

eval { 
    my $result = $api_instance->siteMessagesUsingGET(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, needsTotal => $needsTotal, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SiteMessagesApi->siteMessagesUsingGET: $@\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.SiteMessagesApi()
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 = currentPage_example # String | The current result page requested. (optional) (default to 0)
needsTotal = needsTotal_example # String | The flag for indicating if total number of results is needed or not. (optional) (default to true)
pageSize = pageSize_example # String | The number of results returned per page. (optional) (default to 10)
sort = sort_example # String | The sorting method applied to the return results. (optional)

try: 
    # Gets all site messages of current customer.
    api_response = api_instance.site_messages_using_get(baseSiteId, userId, currentPage=currentPage, needsTotal=needsTotal, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SiteMessagesApi->siteMessagesUsingGET: %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
String
The current result page requested.
needsTotal
String
The flag for indicating if total number of results is needed or not.
pageSize
String
The number of results returned per page.
sort
String
The sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Stores

countStoreLocations

Get a header with the number of store locations.

In the response header, the "x-total-count" indicates the number of all store locations that are near the location specified in a query, or based on latitude and longitude.


/{baseSiteId}/stores

Usage and SDK Samples

curl -X HEAD\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/stores?accuracy=&latitude=&longitude=&query=&radius="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

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

public class StoresApiExample {

    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");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        String query = query_example; // String | Location in natural language i.e. city or country.
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        try {
            apiInstance.countStoreLocations(baseSiteId, accuracy, latitude, longitude, query, radius);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#countStoreLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        String query = query_example; // String | Location in natural language i.e. city or country.
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        try {
            apiInstance.countStoreLocations(baseSiteId, accuracy, latitude, longitude, query, radius);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#countStoreLocations");
            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
Double *accuracy = 1.2; // Accuracy in meters. (optional) (default to 0.0)
Double *latitude = 1.2; // Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
Double *longitude = 1.2; // Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
String *query = query_example; // Location in natural language i.e. city or country. (optional)
Double *radius = 1.2; // Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)

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

// Get a header with the number of store locations.
[apiInstance countStoreLocationsWith:baseSiteId
    accuracy:accuracy
    latitude:latitude
    longitude:longitude
    query:query
    radius:radius
              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.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'accuracy': 1.2, // {{Double}} Accuracy in meters.
  'latitude': 1.2, // {{Double}} Coordinate that specifies the north-south position of a point on the Earth's surface.
  'longitude': 1.2, // {{Double}} Coordinate that specifies the east-west position of a point on the Earth's surface.
  'query': query_example, // {{String}} Location in natural language i.e. city or country.
  'radius': 1.2 // {{Double}} Radius in meters. Max value: 40075000.0 (Earth's perimeter).
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countStoreLocations(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class countStoreLocationsExample
    {
        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 StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var accuracy = 1.2;  // Double | Accuracy in meters. (optional)  (default to 0.0)
            var latitude = 1.2;  // Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional) 
            var longitude = 1.2;  // Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional) 
            var query = query_example;  // String | Location in natural language i.e. city or country. (optional) 
            var radius = 1.2;  // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional)  (default to 100000.0)

            try
            {
                // Get a header with the number of store locations.
                apiInstance.countStoreLocations(baseSiteId, accuracy, latitude, longitude, query, radius);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.countStoreLocations: " + 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\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$accuracy = 1.2; // Double | Accuracy in meters.
$latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
$longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
$query = query_example; // String | Location in natural language i.e. city or country.
$radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).

try {
    $api_instance->countStoreLocations($baseSiteId, $accuracy, $latitude, $longitude, $query, $radius);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->countStoreLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# 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::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $accuracy = 1.2; # Double | Accuracy in meters.
my $latitude = 1.2; # Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
my $longitude = 1.2; # Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
my $query = query_example; # String | Location in natural language i.e. city or country.
my $radius = 1.2; # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).

eval { 
    $api_instance->countStoreLocations(baseSiteId => $baseSiteId, accuracy => $accuracy, latitude => $latitude, longitude => $longitude, query => $query, radius => $radius);
};
if ($@) {
    warn "Exception when calling StoresApi->countStoreLocations: $@\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.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
accuracy = 1.2 # Double | Accuracy in meters. (optional) (default to 0.0)
latitude = 1.2 # Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
longitude = 1.2 # Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
query = query_example # String | Location in natural language i.e. city or country. (optional)
radius = 1.2 # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)

try: 
    # Get a header with the number of store locations.
    api_instance.count_store_locations(baseSiteId, accuracy=accuracy, latitude=latitude, longitude=longitude, query=query, radius=radius)
except ApiException as e:
    print("Exception when calling StoresApi->countStoreLocations: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
accuracy
Double (double)
Accuracy in meters.
latitude
Double (double)
Coordinate that specifies the north-south position of a point on the Earth's surface.
longitude
Double (double)
Coordinate that specifies the east-west position of a point on the Earth's surface.
query
String
Location in natural language i.e. city or country.
radius
Double (double)
Radius in meters. Max value: 40075000.0 (Earth's perimeter).

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


getLocationCounts

Gets a store location count per country and regions

Returns store counts in countries and regions


/{baseSiteId}/stores/storescounts

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/stores/storescounts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

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

public class StoresApiExample {

    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");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            StoreCountList result = apiInstance.getLocationCounts(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getLocationCounts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            StoreCountList result = apiInstance.getLocationCounts(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getLocationCounts");
            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

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

// Gets a store location count per country and regions
[apiInstance getLocationCountsWith:baseSiteId
              completionHandler: ^(StoreCountList 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.StoresApi()
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. Returned data: ' + data);
  }
};
api.getLocationCounts(baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLocationCountsExample
    {
        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 StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Gets a store location count per country and regions
                StoreCountList result = apiInstance.getLocationCounts(baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getLocationCounts: " + 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\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

# 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::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    my $result = $api_instance->getLocationCounts(baseSiteId => $baseSiteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getLocationCounts: $@\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.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Gets a store location count per country and regions
    api_response = api_instance.get_location_counts(baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getLocationCounts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoreLocation

Get a store location

Returns store location based on its unique name.


/{baseSiteId}/stores/{storeId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/stores/{storeId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

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

public class StoresApiExample {

    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");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String storeId = storeId_example; // String | Store identifier (currently store name)
        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 {
            PointOfService result = apiInstance.getStoreLocation(baseSiteId, storeId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String storeId = storeId_example; // String | Store identifier (currently store name)
        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 {
            PointOfService result = apiInstance.getStoreLocation(baseSiteId, storeId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocation");
            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 *storeId = storeId_example; // Store identifier (currently store 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)

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

// Get a store location
[apiInstance getStoreLocationWith:baseSiteId
    storeId:storeId
    fields:fields
              completionHandler: ^(PointOfService 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.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var storeId = storeId_example; // {{String}} Store identifier (currently store name)
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.getStoreLocation(baseSiteId, storeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoreLocationExample
    {
        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 StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var storeId = storeId_example;  // String | Store identifier (currently store 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
            {
                // Get a store location
                PointOfService result = apiInstance.getStoreLocation(baseSiteId, storeId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoreLocation: " + 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\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$storeId = storeId_example; // String | Store identifier (currently store 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

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

# 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::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $storeId = storeId_example; # String | Store identifier (currently store name)
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->getStoreLocation(baseSiteId => $baseSiteId, storeId => $storeId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoreLocation: $@\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.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
storeId = storeId_example # String | Store identifier (currently store 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: 
    # Get a store location
    api_response = api_instance.get_store_location(baseSiteId, storeId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoreLocation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
storeId*
String
Store identifier (currently store name)
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoreLocations

Get a list of store locations

Lists all store locations that are near the location specified in a query or based on latitude and longitude.


/{baseSiteId}/stores

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/stores?accuracy=¤tPage=&fields=&latitude=&longitude=&pageSize=&query=&radius=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

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

public class StoresApiExample {

    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");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String query = query_example; // String | Location in natural language i.e. city or country.
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            StoreFinderSearchPage result = apiInstance.getStoreLocations(baseSiteId, accuracy, currentPage, fields, latitude, longitude, pageSize, query, radius, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Integer currentPage = 56; // Integer | The current result page requested.
        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
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String query = query_example; // String | Location in natural language i.e. city or country.
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            StoreFinderSearchPage result = apiInstance.getStoreLocations(baseSiteId, accuracy, currentPage, fields, latitude, longitude, pageSize, query, radius, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocations");
            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
Double *accuracy = 1.2; // Accuracy in meters. (optional) (default to 0.0)
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
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)
Double *latitude = 1.2; // Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
Double *longitude = 1.2; // Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *query = query_example; // Location in natural language i.e. city or country. (optional)
Double *radius = 1.2; // Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)
String *sort = sort_example; // Sorting method applied to the return results. (optional) (default to asc)

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

// Get a list of store locations
[apiInstance getStoreLocationsWith:baseSiteId
    accuracy:accuracy
    currentPage:currentPage
    fields:fields
    latitude:latitude
    longitude:longitude
    pageSize:pageSize
    query:query
    radius:radius
    sort:sort
              completionHandler: ^(StoreFinderSearchPage 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.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'accuracy': 1.2, // {{Double}} Accuracy in meters.
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'latitude': 1.2, // {{Double}} Coordinate that specifies the north-south position of a point on the Earth's surface.
  'longitude': 1.2, // {{Double}} Coordinate that specifies the east-west position of a point on the Earth's surface.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'query': query_example, // {{String}} Location in natural language i.e. city or country.
  'radius': 1.2, // {{Double}} Radius in meters. Max value: 40075000.0 (Earth's perimeter).
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStoreLocations(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoreLocationsExample
    {
        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 StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var accuracy = 1.2;  // Double | Accuracy in meters. (optional)  (default to 0.0)
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            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 latitude = 1.2;  // Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional) 
            var longitude = 1.2;  // Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional) 
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var query = query_example;  // String | Location in natural language i.e. city or country. (optional) 
            var radius = 1.2;  // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional)  (default to 100000.0)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional)  (default to asc)

            try
            {
                // Get a list of store locations
                StoreFinderSearchPage result = apiInstance.getStoreLocations(baseSiteId, accuracy, currentPage, fields, latitude, longitude, pageSize, query, radius, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoreLocations: " + 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\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$accuracy = 1.2; // Double | Accuracy in meters.
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
$longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
$pageSize = 56; // Integer | The number of results returned per page.
$query = query_example; // String | Location in natural language i.e. city or country.
$radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
$sort = sort_example; // String | Sorting method applied to the return results.

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

# 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::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $accuracy = 1.2; # Double | Accuracy in meters.
my $currentPage = 56; # Integer | The current result page requested.
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 $latitude = 1.2; # Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
my $longitude = 1.2; # Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
my $pageSize = 56; # Integer | The number of results returned per page.
my $query = query_example; # String | Location in natural language i.e. city or country.
my $radius = 1.2; # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getStoreLocations(baseSiteId => $baseSiteId, accuracy => $accuracy, currentPage => $currentPage, fields => $fields, latitude => $latitude, longitude => $longitude, pageSize => $pageSize, query => $query, radius => $radius, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoreLocations: $@\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.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
accuracy = 1.2 # Double | Accuracy in meters. (optional) (default to 0.0)
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
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)
latitude = 1.2 # Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
longitude = 1.2 # Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
query = query_example # String | Location in natural language i.e. city or country. (optional)
radius = 1.2 # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)
sort = sort_example # String | Sorting method applied to the return results. (optional) (default to asc)

try: 
    # Get a list of store locations
    api_response = api_instance.get_store_locations(baseSiteId, accuracy=accuracy, currentPage=currentPage, fields=fields, latitude=latitude, longitude=longitude, pageSize=pageSize, query=query, radius=radius, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoreLocations: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
accuracy
Double (double)
Accuracy in meters.
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
latitude
Double (double)
Coordinate that specifies the north-south position of a point on the Earth's surface.
longitude
Double (double)
Coordinate that specifies the east-west position of a point on the Earth's surface.
pageSize
Integer (int32)
The number of results returned per page.
query
String
Location in natural language i.e. city or country.
radius
Double (double)
Radius in meters. Max value: 40075000.0 (Earth's perimeter).
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoresByCountry

Get a list of store locations for a given country

Lists all store locations that are in the specified country.


/{baseSiteId}/stores/country/{countryIso}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/stores/country/{countryIso}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

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

public class StoresApiExample {

    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");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code
        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.getStoresByCountry(baseSiteId, countryIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code
        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.getStoresByCountry(baseSiteId, countryIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountry");
            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 *countryIso = countryIso_example; // Country ISO 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)

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

// Get a list of store locations for a given country
[apiInstance getStoresByCountryWith:baseSiteId
    countryIso:countryIso
    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.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var countryIso = countryIso_example; // {{String}} Country ISO code
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.getStoresByCountry(baseSiteId, countryIso, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoresByCountryExample
    {
        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 StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var countryIso = countryIso_example;  // String | Country ISO 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
            {
                // Get a list of store locations for a given country
                PointOfServiceList result = apiInstance.getStoresByCountry(baseSiteId, countryIso, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoresByCountry: " + 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\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$countryIso = countryIso_example; // String | Country ISO 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

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

# 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::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $countryIso = countryIso_example; # String | Country ISO code
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->getStoresByCountry(baseSiteId => $baseSiteId, countryIso => $countryIso, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoresByCountry: $@\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.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
countryIso = countryIso_example # String | Country ISO 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: 
    # Get a list of store locations for a given country
    api_response = api_instance.get_stores_by_country(baseSiteId, countryIso, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoresByCountry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
countryIso*
String
Country ISO code
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoresByCountryAndRegion

Get a list of store locations for a given country and region

Lists all store locations that are in the specified country and region.


/{baseSiteId}/stores/country/{countryIso}/region/{regionIso}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/stores/country/{countryIso}/region/{regionIso}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

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

public class StoresApiExample {

    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");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code
        String regionIso = regionIso_example; // String | Region ISO code
        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.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountryAndRegion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code
        String regionIso = regionIso_example; // String | Region ISO code
        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.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountryAndRegion");
            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 *countryIso = countryIso_example; // Country ISO code
String *regionIso = regionIso_example; // Region ISO 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)

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

// Get a list of store locations for a given country and region
[apiInstance getStoresByCountryAndRegionWith:baseSiteId
    countryIso:countryIso
    regionIso:regionIso
    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.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var countryIso = countryIso_example; // {{String}} Country ISO code
var regionIso = regionIso_example; // {{String}} Region ISO code
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.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoresByCountryAndRegionExample
    {
        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 StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var countryIso = countryIso_example;  // String | Country ISO code
            var regionIso = regionIso_example;  // String | Region ISO 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
            {
                // Get a list of store locations for a given country and region
                PointOfServiceList result = apiInstance.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoresByCountryAndRegion: " + 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\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$countryIso = countryIso_example; // String | Country ISO code
$regionIso = regionIso_example; // String | Region ISO 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

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

# 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::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $countryIso = countryIso_example; # String | Country ISO code
my $regionIso = regionIso_example; # String | Region ISO code
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->getStoresByCountryAndRegion(baseSiteId => $baseSiteId, countryIso => $countryIso, regionIso => $regionIso, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoresByCountryAndRegion: $@\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.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
countryIso = countryIso_example # String | Country ISO code
regionIso = regionIso_example # String | Region ISO 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: 
    # Get a list of store locations for a given country and region
    api_response = api_instance.get_stores_by_country_and_region(baseSiteId, countryIso, regionIso, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoresByCountryAndRegion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
countryIso*
String
Country ISO code
Required
regionIso*
String
Region ISO code
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Tickets

createTicket

Create a ticket


/{baseSiteId}/users/{userId}/tickets

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/tickets?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TicketsApi;

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

public class TicketsApiExample {

    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");

        TicketsApi apiInstance = new TicketsApi();
        TicketStarter body = ; // TicketStarter | ticketStarter
        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 {
            Ticket result = apiInstance.createTicket(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#createTicket");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TicketsApi;

public class TicketsApiExample {

    public static void main(String[] args) {
        TicketsApi apiInstance = new TicketsApi();
        TicketStarter body = ; // TicketStarter | ticketStarter
        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 {
            Ticket result = apiInstance.createTicket(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#createTicket");
            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"];
TicketStarter *body = ; // ticketStarter
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)

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

// Create a ticket
[apiInstance createTicketWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Ticket 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.TicketsApi()
var body = ; // {{TicketStarter}} ticketStarter
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.createTicket(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createTicketExample
    {
        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 TicketsApi();
            var body = new TicketStarter(); // TicketStarter | ticketStarter
            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 ticket
                Ticket result = apiInstance.createTicket(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TicketsApi.createTicket: " + 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\ApiTicketsApi();
$body = ; // TicketStarter | ticketStarter
$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->createTicket($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TicketsApi->createTicket: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TicketsApi;

# 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::TicketsApi->new();
my $body = WWW::SwaggerClient::Object::TicketStarter->new(); # TicketStarter | ticketStarter
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->createTicket(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TicketsApi->createTicket: $@\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.TicketsApi()
body =  # TicketStarter | ticketStarter
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 ticket
    api_response = api_instance.create_ticket(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TicketsApi->createTicket: %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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createTicketEvent

Create a new ticket event.

Create new ticket event with property message(required) and toStatus(optional).


/{baseSiteId}/users/{userId}/tickets/{ticketId}/events

Usage and SDK Samples

curl -X POST\
\
\
-H "Content-Type: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/tickets/{ticketId}/events"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TicketsApi;

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

public class TicketsApiExample {

    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");

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

public class TicketsApiExample {

    public static void main(String[] args) {
        TicketsApi apiInstance = new TicketsApi();
        TicketEvent body = ; // TicketEvent | ticketEvent
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String ticketId = ticketId_example; // String | Ticket Identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createTicketEvent(body, baseSiteId, ticketId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#createTicketEvent");
            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"];
TicketEvent *body = ; // ticketEvent
String *baseSiteId = baseSiteId_example; // Base site identifier
String *ticketId = ticketId_example; // Ticket Identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Create a new ticket event.
[apiInstance createTicketEventWith:body
    baseSiteId:baseSiteId
    ticketId:ticketId
    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.TicketsApi()
var body = ; // {{TicketEvent}} ticketEvent
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var ticketId = ticketId_example; // {{String}} Ticket 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.createTicketEvent(bodybaseSiteIdticketIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createTicketEventExample
    {
        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 TicketsApi();
            var body = new TicketEvent(); // TicketEvent | ticketEvent
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var ticketId = ticketId_example;  // String | Ticket Identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Create a new ticket event.
                apiInstance.createTicketEvent(body, baseSiteId, ticketId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TicketsApi.createTicketEvent: " + 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\ApiTicketsApi();
$body = ; // TicketEvent | ticketEvent
$baseSiteId = baseSiteId_example; // String | Base site identifier
$ticketId = ticketId_example; // String | Ticket Identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::TicketsApi->new();
my $body = WWW::SwaggerClient::Object::TicketEvent->new(); # TicketEvent | ticketEvent
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $ticketId = ticketId_example; # String | Ticket 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->createTicketEvent(body => $body, baseSiteId => $baseSiteId, ticketId => $ticketId, userId => $userId);
};
if ($@) {
    warn "Exception when calling TicketsApi->createTicketEvent: $@\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.TicketsApi()
body =  # TicketEvent | ticketEvent
baseSiteId = baseSiteId_example # String | Base site identifier
ticketId = ticketId_example # String | Ticket Identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Create a new ticket event.
    api_instance.create_ticket_event(body, baseSiteId, ticketId, userId)
except ApiException as e:
    print("Exception when calling TicketsApi->createTicketEvent: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
ticketId*
String
Ticket 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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTicket

Get a ticket by ticket id.


/{baseSiteId}/users/{userId}/tickets/{ticketId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/tickets/{ticketId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TicketsApi;

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

public class TicketsApiExample {

    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");

        TicketsApi apiInstance = new TicketsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String ticketId = ticketId_example; // String | Ticket 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 {
            Ticket result = apiInstance.getTicket(baseSiteId, ticketId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTicket");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TicketsApi;

public class TicketsApiExample {

    public static void main(String[] args) {
        TicketsApi apiInstance = new TicketsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String ticketId = ticketId_example; // String | Ticket 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 {
            Ticket result = apiInstance.getTicket(baseSiteId, ticketId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTicket");
            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 *ticketId = ticketId_example; // Ticket 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)

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

// Get a ticket by ticket id.
[apiInstance getTicketWith:baseSiteId
    ticketId:ticketId
    userId:userId
    fields:fields
              completionHandler: ^(Ticket 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.TicketsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var ticketId = ticketId_example; // {{String}} Ticket 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.getTicket(baseSiteId, ticketId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTicketExample
    {
        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 TicketsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var ticketId = ticketId_example;  // String | Ticket 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 ticket by ticket id.
                Ticket result = apiInstance.getTicket(baseSiteId, ticketId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TicketsApi.getTicket: " + 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\ApiTicketsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$ticketId = ticketId_example; // String | Ticket 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->getTicket($baseSiteId, $ticketId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TicketsApi->getTicket: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TicketsApi;

# 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::TicketsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $ticketId = ticketId_example; # String | Ticket 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->getTicket(baseSiteId => $baseSiteId, ticketId => $ticketId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TicketsApi->getTicket: $@\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.TicketsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
ticketId = ticketId_example # String | Ticket 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 ticket by ticket id.
    api_response = api_instance.get_ticket(baseSiteId, ticketId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TicketsApi->getTicket: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
ticketId*
String
Ticket 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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTicketAssociatedObjects

Get order and cart objects that can be associated with a ticket for the current user.


/{baseSiteId}/users/{userId}/ticketAssociatedObjects

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/ticketAssociatedObjects?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TicketsApi;

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

public class TicketsApiExample {

    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");

        TicketsApi apiInstance = new TicketsApi();
        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 {
            TicketAssociatedObjectList result = apiInstance.getTicketAssociatedObjects(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTicketAssociatedObjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TicketsApi;

public class TicketsApiExample {

    public static void main(String[] args) {
        TicketsApi apiInstance = new TicketsApi();
        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 {
            TicketAssociatedObjectList result = apiInstance.getTicketAssociatedObjects(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTicketAssociatedObjects");
            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)

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

// Get order and cart objects that can be associated with a ticket for the current user.
[apiInstance getTicketAssociatedObjectsWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(TicketAssociatedObjectList 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.TicketsApi()
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.getTicketAssociatedObjects(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 getTicketAssociatedObjectsExample
    {
        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 TicketsApi();
            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 order and cart objects that can be associated with a ticket for the current user.
                TicketAssociatedObjectList result = apiInstance.getTicketAssociatedObjects(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TicketsApi.getTicketAssociatedObjects: " + 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\ApiTicketsApi();
$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->getTicketAssociatedObjects($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TicketsApi->getTicketAssociatedObjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TicketsApi;

# 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::TicketsApi->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->getTicketAssociatedObjects(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TicketsApi->getTicketAssociatedObjects: $@\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.TicketsApi()
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 order and cart objects that can be associated with a ticket for the current user.
    api_response = api_instance.get_ticket_associated_objects(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TicketsApi->getTicketAssociatedObjects: %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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTicketCategories

Get all ticket categories.


/{baseSiteId}/ticketCategories

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/ticketCategories?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TicketsApi;

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

public class TicketsApiExample {

    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");

        TicketsApi apiInstance = new TicketsApi();
        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 {
            TicketCategoryList result = apiInstance.getTicketCategories(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTicketCategories");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TicketsApi;

public class TicketsApiExample {

    public static void main(String[] args) {
        TicketsApi apiInstance = new TicketsApi();
        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 {
            TicketCategoryList result = apiInstance.getTicketCategories(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTicketCategories");
            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)

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

// Get all ticket categories.
[apiInstance getTicketCategoriesWith:baseSiteId
    fields:fields
              completionHandler: ^(TicketCategoryList 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.TicketsApi()
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.getTicketCategories(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTicketCategoriesExample
    {
        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 TicketsApi();
            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 all ticket categories.
                TicketCategoryList result = apiInstance.getTicketCategories(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TicketsApi.getTicketCategories: " + 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\ApiTicketsApi();
$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->getTicketCategories($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TicketsApi->getTicketCategories: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TicketsApi;

# 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::TicketsApi->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->getTicketCategories(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TicketsApi->getTicketCategories: $@\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.TicketsApi()
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 all ticket categories.
    api_response = api_instance.get_ticket_categories(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TicketsApi->getTicketCategories: %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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTickets

Get all tickets for user

Returns history data for all tickets requested by a specified user for a specified base store. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/tickets

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/tickets?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TicketsApi;

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

public class TicketsApiExample {

    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");

        TicketsApi apiInstance = new TicketsApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results. Currently, byDate and byTicketId are supported.
        try {
            TicketList result = apiInstance.getTickets(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTickets");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TicketsApi;

public class TicketsApiExample {

    public static void main(String[] args) {
        TicketsApi apiInstance = new TicketsApi();
        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.
        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
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results. Currently, byDate and byTicketId are supported.
        try {
            TicketList result = apiInstance.getTickets(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TicketsApi#getTickets");
            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)
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)
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. Currently, byDate and byTicketId are supported. (optional) (default to byDate)

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

// Get all tickets for user
[apiInstance getTicketsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(TicketList 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.TicketsApi()
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.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example // {{String}} Sorting method applied to the returned results. Currently, byDate and byTicketId are supported.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTickets(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 getTicketsExample
    {
        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 TicketsApi();
            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 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)
            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. Currently, byDate and byTicketId are supported. (optional)  (default to byDate)

            try
            {
                // Get all tickets for user
                TicketList result = apiInstance.getTickets(baseSiteId, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TicketsApi.getTickets: " + 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\ApiTicketsApi();
$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.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results. Currently, byDate and byTicketId are supported.

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

# 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::TicketsApi->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 $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 $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results. Currently, byDate and byTicketId are supported.

eval { 
    my $result = $api_instance->getTickets(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TicketsApi->getTickets: $@\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.TicketsApi()
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)
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)
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. Currently, byDate and byTicketId are supported. (optional) (default to byDate)

try: 
    # Get all tickets for user
    api_response = api_instance.get_tickets(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TicketsApi->getTickets: %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.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results. Currently, byDate and byTicketId are supported.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Users

createUser

Registers a customer

Registers a customer. Requires the following parameters: login, password, firstName, lastName, titleCode.


/{baseSiteId}/users

Usage and SDK Samples

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

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        UserSignUp body = ; // UserSignUp | User's object.
        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 {
            User result = apiInstance.createUser(body, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        UserSignUp body = ; // UserSignUp | User's object.
        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 {
            User result = apiInstance.createUser(body, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUser");
            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"];
UserSignUp *body = ; // User's object.
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)

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

//  Registers a customer
[apiInstance createUserWith:body
    baseSiteId:baseSiteId
    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.UsersApi()
var body = ; // {{UserSignUp}} User's object.
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.createUser(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUserExample
    {
        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 UsersApi();
            var body = new UserSignUp(); // UserSignUp | User's object.
            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
            {
                //  Registers a customer
                User result = apiInstance.createUser(body, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createUser: " + 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\ApiUsersApi();
$body = ; // UserSignUp | User's object.
$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->createUser($body, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# 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::UsersApi->new();
my $body = WWW::SwaggerClient::Object::UserSignUp->new(); # UserSignUp | User's object.
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->createUser(body => $body, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createUser: $@\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.UsersApi()
body =  # UserSignUp | User's object.
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: 
    #  Registers a customer
    api_response = api_instance.create_user(body, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createUser: %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: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUser

Get customer profile

Returns customer profile.


/{baseSiteId}/users/{userId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/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.UsersApi;

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        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.getUser(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        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.getUser(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUser");
            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)

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

// Get customer profile
[apiInstance getUserWith: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.UsersApi()
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.getUser(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 getUserExample
    {
        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 UsersApi();
            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 profile
                User result = apiInstance.getUser(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUser: " + 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\ApiUsersApi();
$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->getUser($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# 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::UsersApi->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->getUser(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUser: $@\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.UsersApi()
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 profile
    api_response = api_instance.get_user(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUser: %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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUserCustomerGroups

Get all customer groups of a customer.

Returns all customer groups of a customer.


/{baseSiteId}/users/{userId}/customergroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/customergroups?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        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 {
            UserGroupList result = apiInstance.getUserCustomerGroups(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserCustomerGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        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 {
            UserGroupList result = apiInstance.getUserCustomerGroups(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserCustomerGroups");
            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)

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

// Get all customer groups of a customer.
[apiInstance getUserCustomerGroupsWith:baseSiteId
    userId:userId
    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.UsersApi()
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.getUserCustomerGroups(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 getUserCustomerGroupsExample
    {
        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 UsersApi();
            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 all customer groups of a customer.
                UserGroupList result = apiInstance.getUserCustomerGroups(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUserCustomerGroups: " + 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\ApiUsersApi();
$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->getUserCustomerGroups($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUserCustomerGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# 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::UsersApi->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->getUserCustomerGroups(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUserCustomerGroups: $@\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.UsersApi()
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 all customer groups of a customer.
    api_response = api_instance.get_user_customer_groups(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUserCustomerGroups: %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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeUser

Delete customer profile.

Removes customer profile.


/{baseSiteId}/users/{userId}

Usage and SDK Samples

curl -X DELETE\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        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.removeUser(baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#removeUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        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.removeUser(baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#removeUser");
            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

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

// Delete customer profile.
[apiInstance removeUserWith: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.UsersApi()
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.removeUser(baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeUserExample
    {
        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 UsersApi();
            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 profile.
                apiInstance.removeUser(baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.removeUser: " + 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\ApiUsersApi();
$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->removeUser($baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->removeUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# 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::UsersApi->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

eval { 
    $api_instance->removeUser(baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->removeUser: $@\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.UsersApi()
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 profile.
    api_instance.remove_user(baseSiteId, userId)
except ApiException as e:
    print("Exception when calling UsersApi->removeUser: %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

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


replaceUser

Updates customer profile

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


/{baseSiteId}/users/{userId}

Usage and SDK Samples

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

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        User body = ; // User | User's object
        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.replaceUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        User body = ; // User | User's object
        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.replaceUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUser");
            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"];
User *body = ; // User's object
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

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

// Updates customer profile
[apiInstance replaceUserWith:body
    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.UsersApi()
var body = ; // {{User}} User's object
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.replaceUser(bodybaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUserExample
    {
        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 UsersApi();
            var body = new User(); // User | User's object
            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 customer profile
                apiInstance.replaceUser(body, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.replaceUser: " + 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\ApiUsersApi();
$body = ; // User | User's object
$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->replaceUser($body, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->replaceUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# 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::UsersApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | User's object
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->replaceUser(body => $body, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->replaceUser: $@\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.UsersApi()
body =  # User | User's object
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 customer profile
    api_instance.replace_user(body, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling UsersApi->replaceUser: %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 *

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceUserLogin

Changes customer's login name.

Changes a customer's login name. Requires the customer's current password.


/{baseSiteId}/users/{userId}/login

Usage and SDK Samples

curl -X PUT\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/login?newLogin=&password="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String newLogin = newLogin_example; // String | Customer's new login name. Customer login is case insensitive.
        String password = password_example; // String | Customer's current password.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceUserLogin(baseSiteId, newLogin, password, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserLogin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String newLogin = newLogin_example; // String | Customer's new login name. Customer login is case insensitive.
        String password = password_example; // String | Customer's current password.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceUserLogin(baseSiteId, newLogin, password, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserLogin");
            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 *newLogin = newLogin_example; // Customer's new login name. Customer login is case insensitive.
String *password = password_example; // Customer's current password.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Changes customer's login name.
[apiInstance replaceUserLoginWith:baseSiteId
    newLogin:newLogin
    password:password
    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.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var newLogin = newLogin_example; // {{String}} Customer's new login name. Customer login is case insensitive.
var password = password_example; // {{String}} Customer's current password.
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.replaceUserLogin(baseSiteId, newLogin, password, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUserLoginExample
    {
        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 UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var newLogin = newLogin_example;  // String | Customer's new login name. Customer login is case insensitive.
            var password = password_example;  // String | Customer's current password.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Changes customer's login name.
                apiInstance.replaceUserLogin(baseSiteId, newLogin, password, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.replaceUserLogin: " + 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\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$newLogin = newLogin_example; // String | Customer's new login name. Customer login is case insensitive.
$password = password_example; // String | Customer's current password.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

# 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::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $newLogin = newLogin_example; # String | Customer's new login name. Customer login is case insensitive.
my $password = password_example; # String | Customer's current password.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceUserLogin(baseSiteId => $baseSiteId, newLogin => $newLogin, password => $password, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->replaceUserLogin: $@\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.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
newLogin = newLogin_example # String | Customer's new login name. Customer login is case insensitive.
password = password_example # String | Customer's current password.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Changes customer's login name.
    api_instance.replace_user_login(baseSiteId, newLogin, password, userId)
except ApiException as e:
    print("Exception when calling UsersApi->replaceUserLogin: %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
newLogin*
String
Customer's new login name. Customer login is case insensitive.
Required
password*
String
Customer's current password.
Required

Responses

Status: 200 - OK

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceUserPassword

Changes customer's password

Changes customer's password.


/{baseSiteId}/users/{userId}/password

Usage and SDK Samples

curl -X PUT\
\
\
"//localhost:9002/occ/v2/{baseSiteId}/users/{userId}/password?new=&old="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String new = new_example; // String | New password.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String old = old_example; // String | Old password. Required only for ROLE_CUSTOMERGROUP
        try {
            apiInstance.replaceUserPassword(baseSiteId, new, userId, old);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String new = new_example; // String | New password.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String old = old_example; // String | Old password. Required only for ROLE_CUSTOMERGROUP
        try {
            apiInstance.replaceUserPassword(baseSiteId, new, userId, old);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserPassword");
            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 *new = new_example; // New password.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *old = old_example; // Old password. Required only for ROLE_CUSTOMERGROUP (optional)

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

// Changes customer's password
[apiInstance replaceUserPasswordWith:baseSiteId
    new:new
    userId:userId
    old:old
              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.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var new = new_example; // {{String}} New password.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'old': old_example // {{String}} Old password. Required only for ROLE_CUSTOMERGROUP
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceUserPassword(baseSiteId, new, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUserPasswordExample
    {
        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 UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var new = new_example;  // String | New password.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var old = old_example;  // String | Old password. Required only for ROLE_CUSTOMERGROUP (optional) 

            try
            {
                // Changes customer's password
                apiInstance.replaceUserPassword(baseSiteId, new, userId, old);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.replaceUserPassword: " + 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\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$new = new_example; // String | New password.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$old = old_example; // String | Old password. Required only for ROLE_CUSTOMERGROUP

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

# 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::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $new = new_example; # String | New password.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $old = old_example; # String | Old password. Required only for ROLE_CUSTOMERGROUP

eval { 
    $api_instance->replaceUserPassword(baseSiteId => $baseSiteId, new => $new, userId => $userId, old => $old);
};
if ($@) {
    warn "Exception when calling UsersApi->replaceUserPassword: $@\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.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
new = new_example # String | New password.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
old = old_example # String | Old password. Required only for ROLE_CUSTOMERGROUP (optional)

try: 
    # Changes customer's password
    api_instance.replace_user_password(baseSiteId, new, userId, old=old)
except ApiException as e:
    print("Exception when calling UsersApi->replaceUserPassword: %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
new*
String
New password.
Required
old
String
Old password. Required only for ROLE_CUSTOMERGROUP

Responses

Status: 201 - Created

Status: 202 - Accepted

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateUser

Updates customer profile

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


/{baseSiteId}/users/{userId}

Usage and SDK Samples

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

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

public class UsersApiExample {

    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");

        UsersApi apiInstance = new UsersApi();
        User body = ; // User | User's object.
        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.updateUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        User body = ; // User | User's object.
        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.updateUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            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"];
User *body = ; // User's object.
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

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

// Updates customer profile
[apiInstance updateUserWith:body
    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.UsersApi()
var body = ; // {{User}} User's object.
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.updateUser(bodybaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateUserExample
    {
        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 UsersApi();
            var body = new User(); // User | User's object.
            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 customer profile
                apiInstance.updateUser(body, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.updateUser: " + 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\ApiUsersApi();
$body = ; // User | User's object.
$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->updateUser($body, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# 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::UsersApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | User's object.
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->updateUser(body => $body, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->updateUser: $@\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.UsersApi()
body =  # User | User's object.
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 customer profile
    api_instance.update_user(body, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling UsersApi->updateUser: %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 *

Responses

Status: 200 - OK

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


Vouchers

getVoucher

Get a voucher based on code.

Returns details of a single voucher that is specified by its voucher identification code.


/{baseSiteId}/vouchers/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"//localhost:9002/occ/v2/{baseSiteId}/vouchers/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VouchersApi;

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

public class VouchersApiExample {

    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");

        VouchersApi apiInstance = new VouchersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Voucher identifier (code)
        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 {
            Voucher result = apiInstance.getVoucher(baseSiteId, code, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VouchersApi#getVoucher");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VouchersApi;

public class VouchersApiExample {

    public static void main(String[] args) {
        VouchersApi apiInstance = new VouchersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Voucher identifier (code)
        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 {
            Voucher result = apiInstance.getVoucher(baseSiteId, code, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VouchersApi#getVoucher");
            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 *code = code_example; // Voucher identifier (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 BASIC)

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

// Get a voucher based on code.
[apiInstance getVoucherWith:baseSiteId
    code:code
    fields:fields
              completionHandler: ^(Voucher 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.VouchersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Voucher identifier (code)
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.getVoucher(baseSiteId, code, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getVoucherExample
    {
        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 VouchersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Voucher identifier (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 BASIC)

            try
            {
                // Get a voucher based on code.
                Voucher result = apiInstance.getVoucher(baseSiteId, code, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VouchersApi.getVoucher: " + 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\ApiVouchersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Voucher identifier (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

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

# 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::VouchersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Voucher identifier (code)
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->getVoucher(baseSiteId => $baseSiteId, code => $code, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VouchersApi->getVoucher: $@\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.VouchersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Voucher identifier (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 BASIC)

try: 
    # Get a voucher based on code.
    api_response = api_instance.get_voucher(baseSiteId, code, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VouchersApi->getVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Voucher identifier (code)
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: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found