Commerce Webservices

Address

createAddress

Creates a new address.

Creates a new address with detailed information provided.


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

Usage and SDK Samples

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

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getAddress

Retrieves the address details of a customer.

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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/{addressId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

// Retrieves the address details of a customer.
[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
            {
                // Retrieves the address details of a customer.
                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: 
    # Retrieves the address details of a customer.
    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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getAddresses

Retrieves the addresses of a customer.

Retrieves a list of all the addresses associated with a customer.


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

Usage and SDK Samples

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

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

// Retrieves the addresses of a customer.
[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
            {
                // Retrieves the addresses of a customer.
                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: 
    # Retrieves the addresses of a customer.
    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 - List of customer's addresses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeAddress

Deletes the address of a customer.

Deletes the address of a customer, which means the address records are erased.


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

Usage and SDK Samples

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

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

// Deletes the address of a customer.
[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
            {
                // Deletes the address of a customer.
                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: 
    # Deletes the address of a customer.
    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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceAddress

Updates the address of a customer.

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


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

Usage and SDK Samples

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

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

try: 
    # Updates the address of a customer.
    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: 400 - Bad Request

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 "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/{addressId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


validateAddress

Verifies the address.

Validates the address of a customer.


/{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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/verification?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

try: 
    # Verifies the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BCarts

doAddOrgCartEntries

Creates additional quantity of a product in the cart.

Creates additional quantity of a product in the cart. Use this endpoint to add the quantities of the existing products. To update the products? quantities or add new products to the cart, use PUT /{baseSiteId}/orgUsers/{userId}/carts/{cartId}/entries/


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

Usage and SDK Samples

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

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

public class B2BCartsApiExample {

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

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

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

        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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.doAddOrgCartEntries(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#doAddOrgCartEntries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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.doAddOrgCartEntries(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#doAddOrgCartEntries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntryList *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Creates additional quantity of a product in the cart.
[apiInstance doAddOrgCartEntriesWith:body
    baseSiteId: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.B2BCartsApi()
var body = ; // {{OrderEntryList}} 
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, or '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.doAddOrgCartEntries(bodybaseSiteIdcartIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new B2BCartsApi();
            var body = new OrderEntryList(); // OrderEntryList | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 additional quantity of a product in the cart.
                CartModificationList result = apiInstance.doAddOrgCartEntries(body, baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.doAddOrgCartEntries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$body = ; // OrderEntryList | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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->doAddOrgCartEntries($body, $baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->doAddOrgCartEntries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

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

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntryList->new(); # OrderEntryList | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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->doAddOrgCartEntries(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->doAddOrgCartEntries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
body =  # OrderEntryList | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 additional quantity of a product in the cart.
    api_response = api_instance.do_add_org_cart_entries(body, baseSiteId, cartId, userId, 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCurrentOrgCart

Gets the current cart.

Retrieves the current cart. To get entryGroup information, set fields value as follows: fields=entryGroups(BASIC), fields=entryGroups(DEFAULT), or fields=entryGroups(FULL).


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

Usage and SDK Samples

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

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

public class B2BCartsApiExample {

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

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

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

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

public class B2BCartsApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceOrgCartCostCenter

Updates the cost center for the cart.

Updates the cost center for the cart during the checkout process.


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

Usage and SDK Samples

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

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

public class B2BCartsApiExample {

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

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

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

        B2BCartsApi apiInstance = new B2BCartsApi();
        String 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, or 'current' for the last modified cart.
        String costCenterId = costCenterId_example; // String | Cost center 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.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, or 'current' for the last modified cart.
        String costCenterId = costCenterId_example; // String | Cost center 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.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, or 'current' for the last modified cart.
String *costCenterId = costCenterId_example; // Cost center 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];

// Updates the cost center for the 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, or 'current' for the last modified cart.
var costCenterId = costCenterId_example; // {{String}} Cost center 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.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, or 'current' for the last modified cart.
            var costCenterId = costCenterId_example;  // String | Cost center identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Updates the cost center for the 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, or 'current' for the last modified cart.
$costCenterId = costCenterId_example; // String | Cost center 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->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, or 'current' for the last modified cart.
my $costCenterId = costCenterId_example; # String | Cost center 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->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, or 'current' for the last modified cart.
costCenterId = costCenterId_example # String | Cost center identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Updates the cost center for the 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, or '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
Cost center identifier.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceOrgCartDeliveryAddress

Updates the delivery address for a cart.

The updated address country must be a valid delivery country for the current base store.


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

Usage and SDK Samples

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

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

public class B2BCartsApiExample {

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

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

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

        B2BCartsApi apiInstance = new B2BCartsApi();
        String addressId = addressId_example; // String | The id of the address.
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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];

// Updates the delivery address for a 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, or '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, or '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
            {
                // Updates the delivery address for a 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, or '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, or '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, or '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: 
    # Updates the delivery address for a 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceOrgCartEntries

Updates the quantity of the specified products in a cart.

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


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

Usage and SDK Samples

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

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

public class B2BCartsApiExample {

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

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

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

        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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.replaceOrgCartEntries(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartEntries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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.replaceOrgCartEntries(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartEntries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntryList *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Updates the quantity of the specified products in a cart.
[apiInstance replaceOrgCartEntriesWith:body
    baseSiteId: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.B2BCartsApi()
var body = ; // {{OrderEntryList}} 
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, or '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.replaceOrgCartEntries(bodybaseSiteIdcartIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new B2BCartsApi();
            var body = new OrderEntryList(); // OrderEntryList | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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
            {
                // Updates the quantity of the specified products in a cart.
                CartModificationList result = apiInstance.replaceOrgCartEntries(body, baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.replaceOrgCartEntries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$body = ; // OrderEntryList | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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->replaceOrgCartEntries($body, $baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->replaceOrgCartEntries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

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

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntryList->new(); # OrderEntryList | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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->replaceOrgCartEntries(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->replaceOrgCartEntries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
body =  # OrderEntryList | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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: 
    # Updates the quantity of the specified products in a cart.
    api_response = api_instance.replace_org_cart_entries(body, baseSiteId, cartId, userId, 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceOrgCartPaymentType

Updates the payment type for the cart.

Updates the payment type for the cart during the checkout process. If the purchaseOrderNumber is not null, it will also be updated for the cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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, or 'current' for the last modified cart.
        String paymentType = paymentType_example; // String | Payment type choice. Examples:card,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 cart during the checkout process.
        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, or 'current' for the last modified cart.
        String paymentType = paymentType_example; // String | Payment type choice. Examples:card,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 cart during the checkout process.
        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, or 'current' for the last modified cart.
String *paymentType = paymentType_example; // Payment type choice. Examples:card,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 cart during the checkout process. (optional)

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

// Updates the payment type for the 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, or 'current' for the last modified cart.
var paymentType = paymentType_example; // {{String}} Payment type choice. Examples:card,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 cart during the checkout process.
};
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, or 'current' for the last modified cart.
            var paymentType = paymentType_example;  // String | Payment type choice. Examples:card,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 cart during the checkout process. (optional) 

            try
            {
                // Updates the payment type for the 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, or 'current' for the last modified cart.
$paymentType = paymentType_example; // String | Payment type choice. Examples:card,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 cart during the checkout process.

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, or 'current' for the last modified cart.
my $paymentType = paymentType_example; # String | Payment type choice. Examples:card,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 cart during the checkout process.

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, or 'current' for the last modified cart.
paymentType = paymentType_example # String | Payment type choice. Examples:card,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 cart during the checkout process. (optional)

try: 
    # Updates the payment type for the 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, or '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. Examples:card,account
Required
purchaseOrderNumber
String
Purchase order number to assign to the cart during the checkout process.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BCategories

getProductsByCategory

Retrieves a list of products for a category.

Retrieves a list of products and related product search data, such as available facets, available sorting, and spelling suggestions, for a category. To enable spelling suggestions, you need to have indexed properties configured to be used for spell checking.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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 | Category identifier.
        Integer currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
        String query = query_example; // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
        String sort = sort_example; // String | Sorting method applied to the return 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 | Category identifier.
        Integer currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
        String query = query_example; // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
        String sort = sort_example; // String | Sorting method applied to the return 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; // Category identifier.
Integer *currentPage = 56; // Current result page. Default value is 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; // Number of results returned per page. (optional) (default to 20)
String *query = query_example; // Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::. (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Retrieves a list of products for a 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}} Category identifier.
var opts = { 
  'currentPage': 56, // {{Integer}} Current result page. Default value is 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 results returned per page.
  'query': query_example, // {{String}} Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
  '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.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 | Category identifier.
            var currentPage = 56;  // Integer | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var query = query_example;  // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::. (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves a list of products for a 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 | Category identifier.
$currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
$query = query_example; // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
$sort = sort_example; // String | Sorting method applied to the return 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 | Category identifier.
my $currentPage = 56; # Integer | Current result page. Default value is 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 results returned per page.
my $query = query_example; # String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
my $sort = sort_example; # String | Sorting method applied to the return 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 | Category identifier.
currentPage = 56 # Integer | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
query = query_example # String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::. (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves a list of products for a 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
Category identifier.
Required
Query parameters
Name Description
currentPage
Integer (int32)
Current result page. Default value is 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 results returned per page.
query
String
Formatted query string. It contains query criteria like free text search, facet. The format is <freeTextSearch>:<sort>:<facetKey1>:<facetValue1>:...:<facetKeyN>:<facetValueN>.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BCostCenters

createCostCenter

Creates a cost center.


/{baseSiteId}/costcenters

Usage and SDK Samples

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

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

public class B2BCostCentersApiExample {

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

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

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

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

public class B2BCostCentersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

try: 
    # Creates a 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doAddBudgetToCostCenter

Creates a budget for the cost center.


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

Usage and SDK Samples

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

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

public class B2BCostCentersApiExample {

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

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

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

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget that will be added to a specific cost center.
        String costCenterCode = costCenterCode_example; // String | 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 | Budget that will be added to a specific cost center.
        String costCenterCode = costCenterCode_example; // String | 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; // Budget that will be added to a specific cost center.
String *costCenterCode = costCenterCode_example; // 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];

// Creates a budget for the 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}} Budget that will be added to a specific cost center.
var costCenterCode = costCenterCode_example; // {{String}} 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 | Budget that will be added to a specific cost center.
            var costCenterCode = costCenterCode_example;  // String | 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
            {
                // Creates a budget for the 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 | Budget that will be added to a specific cost center.
$costCenterCode = costCenterCode_example; // String | 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 | Budget that will be added to a specific cost center.
my $costCenterCode = costCenterCode_example; # String | 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 | Budget that will be added to a specific cost center.
costCenterCode = costCenterCode_example # String | 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: 
    # Creates a budget for the 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
Cost center to which the budget will be added.
Required
Query parameters
Name Description
budgetCode*
String
Budget that 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getActiveCostCenters

Retrieves active cost centers.


/{baseSiteId}/costcenters

Usage and SDK Samples

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

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

public class B2BCostCentersApiExample {

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

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

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

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        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];

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getBudgetsForCostCenter

Retrieves all budgets and certain budgets associated with the specified cost center.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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; // Current result page. Default value is 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; // 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];

// Retrieves all budgets and certain budgets associated with the specified 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}} Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves all budgets and certain budgets associated with the specified 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves all budgets and certain budgets associated with the specified 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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCostCenter

Retrieves the cost center.

Retrieves the cost center details.


/{baseSiteId}/costcenters/{costCenterCode}

Usage and SDK Samples

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

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

public class B2BCostCentersApiExample {

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

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

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

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        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];

// Retrieves the 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
            {
                // Retrieves the 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: 
    # Retrieves the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCostCenters

Retrieves the cost centers.

Retrieves a list of cost centers.


/{baseSiteId}/costcentersall

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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; // Current result page. Default value is 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; // 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];

// Retrieves the 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}} Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves the 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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeBudgetFromCostCenter

Deletes the budget from a cost center.


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

Usage and SDK Samples

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

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

public class B2BCostCentersApiExample {

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

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

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

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget that will be removed from a specific cost center.
        String costCenterCode = costCenterCode_example; // String | 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 | Budget that will be removed from a specific cost center.
        String costCenterCode = costCenterCode_example; // String | 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; // Budget that will be removed from a specific cost center.
String *costCenterCode = costCenterCode_example; // 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];

// Deletes the budget from a 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}} Budget that will be removed from a specific cost center.
var costCenterCode = costCenterCode_example; // {{String}} 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 | Budget that will be removed from a specific cost center.
            var costCenterCode = costCenterCode_example;  // String | 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
            {
                // Deletes the budget from a 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 | Budget that will be removed from a specific cost center.
$costCenterCode = costCenterCode_example; // String | 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 | Budget that will be removed from a specific cost center.
my $costCenterCode = costCenterCode_example; # String | 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 | Budget that will be removed from a specific cost center.
costCenterCode = costCenterCode_example # String | 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: 
    # Deletes the budget from a 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
Budget that will be removed from a specific cost center.
Required
costCenterCode*
String
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateCostCenter

Updates the cost center.

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


/{baseSiteId}/costcenters/{costCenterCode}

Usage and SDK Samples

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

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

public class B2BCostCentersApiExample {

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

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

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

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        B2BCostCenter body = ; // B2BCostCenter | 
        String 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 | 
        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 = ; // 
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];

// Updates the 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}} 
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 | 
            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
            {
                // Updates the 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 | 
$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 | 
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 | 
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: 
    # Updates the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BMiscs

getPaymentTypes

Retrieves the available payment types.

Retrieves the payment types that are available during the B2B checkout process.


/{baseSiteId}/paymenttypes

Usage and SDK Samples

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

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

public class B2BMiscsApiExample {

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

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

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

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

public class B2BMiscsApiExample {

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

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

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BOrders

createCartFromOrder

Creates a cart from a previous order.

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


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{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 | 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 | 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; // 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)

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

// Creates a cart from 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}} 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 | 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) 

            try
            {
                // Creates a cart from 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 | 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 | 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 | 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)

try: 
    # Creates a cart from 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
Order code.
Required

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createReplenishmentOrder

Creates replenishment orders.

Creates and schedules replenishment orders. By default, the payment type is ACCOUNT. Set payment type to CARD if placing an order using credit card.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{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 | 
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
        Boolean termsChecked = true; // Boolean | Whether terms were accepted or not.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ReplenishmentOrder result = apiInstance.createReplenishmentOrder(body, cartId, termsChecked, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#createReplenishmentOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BOrdersApi;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        B2BOrdersApi apiInstance = new B2BOrdersApi();
        ScheduleReplenishmentForm body = ; // ScheduleReplenishmentForm | 
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
        Boolean termsChecked = true; // Boolean | Whether terms were accepted or not.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ReplenishmentOrder result = apiInstance.createReplenishmentOrder(body, cartId, termsChecked, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#createReplenishmentOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ScheduleReplenishmentForm *body = ; // 
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 replenishment orders.
[apiInstance createReplenishmentOrderWith:body
    cartId:cartId
    termsChecked:termsChecked
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ReplenishmentOrder output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

            var apiInstance = new B2BOrdersApi();
            var body = new ScheduleReplenishmentForm(); // ScheduleReplenishmentForm | 
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 replenishment orders.
                ReplenishmentOrder result = apiInstance.createReplenishmentOrder(body, cartId, termsChecked, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BOrdersApi.createReplenishmentOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

# create an instance of the API class
api_instance = swagger_client.B2BOrdersApi()
body =  # ScheduleReplenishmentForm | 
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 replenishment orders.
    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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getBranchOrder

Retrieves the order from the customer's organization branch.

Retrieves the details of the order using a unique order code in the customer's default organization branch. To get entryGroup information, set fields value as follows: fields=entryGroups(BASIC), fields=entryGroups(DEFAULT), or fields=entryGroups(FULL).


/{baseSiteId}/users/{userId}/orgUnits/orders/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/orders/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BOrdersApi;

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

public class B2BOrdersApiExample {

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

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

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

        B2BOrdersApi apiInstance = new B2BOrdersApi();
        String 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
        String fields = 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.getBranchOrder(baseSiteId, code, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#getBranchOrder");
            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 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
        String fields = 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.getBranchOrder(baseSiteId, code, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#getBranchOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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 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)

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

// Retrieves the order from the customer's organization branch.
[apiInstance getBranchOrderWith: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.B2BOrdersApi()
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 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.getBranchOrder(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 getBranchOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            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 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 fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Retrieves the order from the customer's organization branch.
                Order result = apiInstance.getBranchOrder(baseSiteId, code, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BOrdersApi.getBranchOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_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
$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
$fields = 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->getBranchOrder($baseSiteId, $code, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BOrdersApi->getBranchOrder: ', $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 $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
my $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->getBranchOrder(baseSiteId => $baseSiteId, code => $code, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BOrdersApi->getBranchOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token 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
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
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Retrieves the order from the customer's organization branch.
    api_response = api_instance.get_branch_order(baseSiteId, code, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BOrdersApi->getBranchOrder: %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
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUserBranchOrderHistory

Retrieves the order history for the customer's organization branch.

Retrieves the order history of a default organization branch for a base site. The response may display the results across multiple pages, when applicable.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/orders?currentPage=&fields=&filters=&pageSize=&sort=&statuses="
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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | Current result page. Default value is 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
        String filters = filters_example; // String | Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'.
        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.getUserBranchOrderHistory(baseSiteId, userId, currentPage, fields, filters, pageSize, sort, statuses);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#getUserBranchOrderHistory");
            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 userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | Current result page. Default value is 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
        String filters = filters_example; // String | Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'.
        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.getUserBranchOrderHistory(baseSiteId, userId, currentPage, fields, filters, pageSize, sort, statuses);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#getUserBranchOrderHistory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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; // Current result page. Default value is 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)
String *filters = filters_example; // Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'. (optional)
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)

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

// Retrieves the order history for the customer's organization branch.
[apiInstance getUserBranchOrderHistoryWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    filters:filters
    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.B2BOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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}} Current result page. Default value is 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
  'filters': filters_example, // {{String}} Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'.
  '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.getUserBranchOrderHistory(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 getUserBranchOrderHistoryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            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 userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | Current result page. Default value is 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 filters = filters_example;  // String | Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'. (optional) 
            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
            {
                // Retrieves the order history for the customer's organization branch.
                OrderHistoryList result = apiInstance.getUserBranchOrderHistory(baseSiteId, userId, currentPage, fields, filters, pageSize, sort, statuses);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BOrdersApi.getUserBranchOrderHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_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
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | Current result page. Default value is 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
$filters = filters_example; // String | Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'.
$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->getUserBranchOrderHistory($baseSiteId, $userId, $currentPage, $fields, $filters, $pageSize, $sort, $statuses);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BOrdersApi->getUserBranchOrderHistory: ', $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 $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | Current result page. Default value is 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 $filters = filters_example; # String | Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'.
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->getUserBranchOrderHistory(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, filters => $filters, pageSize => $pageSize, sort => $sort, statuses => $statuses);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BOrdersApi->getUserBranchOrderHistory: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token 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
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | Current result page. Default value is 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)
filters = filters_example # String | Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'. (optional)
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: 
    # Retrieves the order history for the customer's organization branch.
    api_response = api_instance.get_user_branch_order_history(baseSiteId, userId, currentPage=currentPage, fields=fields, filters=filters, pageSize=pageSize, sort=sort, statuses=statuses)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BOrdersApi->getUserBranchOrderHistory: %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)
Current result page. Default value is 0.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
filters
String
Serialized filters applied to the query in the following format: ::facetKey1:facetValue1:facetKey2:facetValue2. Correct values for facetKey are 'user' and 'unit'.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


placeOrgOrder

Creates a B2B order.

Creates a B2B order. By default the payment type is ACCOUNT. Set payment type to CARD if placing an order using credit card.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{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, or '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, or '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, or '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];

// Creates 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, or '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, or '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
            {
                // Creates 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, or '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, or '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, or '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: 
    # Creates 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BProducts

getOrgProduct

Retrieves product details.

Retrieves the details of a single product using the product identifier.


/{baseSiteId}/products/{productCode}

Usage and SDK Samples

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

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

public class B2BProductsApiExample {

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

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

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

        B2BProductsApi apiInstance = new B2BProductsApi();
        String 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.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 | 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.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; // 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)

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

// Retrieves product details.
[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}} 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.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 | 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
            {
                // Retrieves product details.
                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 | 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->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 | 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->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 | 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: 
    # Retrieves product details.
    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
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


B2BUsers

createRegistrationRequest

Creates a registration request for a B2B customer.


/{baseSiteId}/orgUsers

Usage and SDK Samples

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

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

public class B2BUsersApiExample {

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

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

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

        B2BUsersApi apiInstance = new B2BUsersApi();
        OrgUserRegistrationData body = ; // OrgUserRegistrationData | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example; // String | The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            apiInstance.createRegistrationRequest(body, baseSiteId, sapCommerceCloudCaptchaToken, fields);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BUsersApi#createRegistrationRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BUsersApi;

public class B2BUsersApiExample {

    public static void main(String[] args) {
        B2BUsersApi apiInstance = new B2BUsersApi();
        OrgUserRegistrationData body = ; // OrgUserRegistrationData | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example; // String | The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            apiInstance.createRegistrationRequest(body, baseSiteId, sapCommerceCloudCaptchaToken, fields);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BUsersApi#createRegistrationRequest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgUserRegistrationData *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example; // The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate. (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)

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

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

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

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

var api = new CommerceWebservices.B2BUsersApi()
var body = ; // {{OrgUserRegistrationData}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'sapCommerceCloudCaptchaToken': sapCommerceCloudCaptchaToken_example // {{String}} The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createRegistrationRequest(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new B2BUsersApi();
            var body = new OrgUserRegistrationData(); // OrgUserRegistrationData | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example;  // String | The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

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

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

$api_instance = new Swagger\Client\ApiB2BUsersApi();
$body = ; // OrgUserRegistrationData | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example; // String | The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

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

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

my $api_instance = WWW::SwaggerClient::B2BUsersApi->new();
my $body = WWW::SwaggerClient::Object::OrgUserRegistrationData->new(); # OrgUserRegistrationData | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example; # String | The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

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

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

# create an instance of the API class
api_instance = swagger_client.B2BUsersApi()
body =  # OrgUserRegistrationData | 
baseSiteId = baseSiteId_example # String | Base site identifier
sapCommerceCloudCaptchaToken = sapCommerceCloudCaptchaToken_example # String | The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

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

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
sap-commerce-cloud-captcha-token
String
The user's response token returned by captcha provider, for example, the g-recaptcha-response returned by google recaptcha client. When the captchaCheckEnabled = true for the store, the field is mandatory and will call the provider to validate.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgUser

Retrieves a B2B customer profile.


/{baseSiteId}/users/{userId}

Usage and SDK Samples

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

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

public class B2BUsersApiExample {

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

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

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

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

public class B2BUsersApiExample {

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

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

// Retrieves a B2B customer 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
            {
                // Retrieves a B2B customer 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: 
    # Retrieves a B2B customer 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


BaseSites

getBaseSites

Retrieves the base sites.

Retrieves the base sites and the details of the corresponding base stores.


/basesites

Usage and SDK Samples

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

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

public class BaseSitesApiExample {

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

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

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

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

public class BaseSitesApiExample {

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

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

// Retrieves the 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
            {
                // Retrieves the 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: 
    # Retrieves the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


BaseStores

getBaseStore

Retrieves a base store.

Retrieves the details of the base store.


/{baseSiteId}/basestores/{baseStoreUid}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/basestores/{baseStoreUid}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BaseStoresApi;

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

public class BaseStoresApiExample {

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

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

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

        BaseStoresApi apiInstance = new BaseStoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String baseStoreUid = baseStoreUid_example; // String | Base 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 {
            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 identifier.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BaseStore result = apiInstance.getBaseStore(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 identifier.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

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

// Retrieves 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 identifier.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBaseStore(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 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
            {
                // Retrieves 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 identifier.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getBaseStore($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 identifier.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getBaseStore(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 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: 
    # Retrieves 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


BudgetManagement

createBudget

Creates a new budget.


/{baseSiteId}/users/{userId}/budgets

Usage and SDK Samples

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

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

public class BudgetManagementApiExample {

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

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

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

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

public class BudgetManagementApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getBudget

Retrieves the details of a budget.

Retrieves the budget details that are available to the user for a base site.


/{baseSiteId}/users/{userId}/budgets/{budgetCode}

Usage and SDK Samples

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

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

public class BudgetManagementApiExample {

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

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

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

        BudgetManagementApi apiInstance = new BudgetManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID 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 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 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];

// Retrieves the details of a budget.
[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 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 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
            {
                // Retrieves the details of a budget.
                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 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 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 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: 
    # Retrieves the details of a budget.
    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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getBudgets

Retrieves the list of budgets.

Retrieves the list of budgets available to a customer and base store. The response may display the results across multiple pages, when applicable.


/{baseSiteId}/users/{userId}/budgets

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Current result page. Default value is 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 results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return 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 | Current result page. Default value is 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 results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return 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; // Current result page. Default value is 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; // Number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional) (default to code)

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

// Retrieves the list of budgets.
[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}} Current result page. Default value is 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 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.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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional)  (default to code)

            try
            {
                // Retrieves the list of budgets.
                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 | Current result page. Default value is 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 results returned per page.
$sort = sort_example; // String | Sorting method applied to the return 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 | Current result page. Default value is 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 results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return 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 | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional) (default to code)

try: 
    # Retrieves the list of budgets.
    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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateBudget

Updates the budget.

Updates the budget. Only the 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,application/xml"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/budgets/{budgetCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BudgetManagementApi;

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

public class BudgetManagementApiExample {

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

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

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

        BudgetManagementApi apiInstance = new BudgetManagementApi();
        Budget body = ; // Budget | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID 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 | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String budgetCode = budgetCode_example; // String | Budget GUID 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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *budgetCode = budgetCode_example; // Budget GUID 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}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var budgetCode = budgetCode_example; // {{String}} Budget GUID 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 | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var budgetCode = budgetCode_example;  // String | Budget GUID 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$budgetCode = budgetCode_example; // String | Budget GUID 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 | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $budgetCode = budgetCode_example; # String | Budget GUID 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 | 
baseSiteId = baseSiteId_example # String | Base site identifier
budgetCode = budgetCode_example # String | Budget GUID 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartAddresses

createCartDeliveryAddress

Creates a delivery address for the cart.


/{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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartAddressesApi;

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

public class CartAddressesApiExample {

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

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

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

        CartAddressesApi apiInstance = new CartAddressesApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
        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, or '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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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}} 
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, or '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 | 
            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, or '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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
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, or '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 | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartDeliveryAddress

Deletes the delivery address.

Deletes the delivery address associated with a cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartAddressesApi;

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

public class CartAddressesApiExample {

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

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

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

        CartAddressesApi apiInstance = new CartAddressesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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.
[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, or '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, or '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.
                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, or '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, or '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, or '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.
    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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartDeliveryModes

getCartDeliveryMode

Retrieves the delivery mode for the cart.

Retrieves information about the delivery mode selected for the cart, including the delivery mode code, name, cost, and so on.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

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

public class CartDeliveryModesApiExample {

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

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

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

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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];

// Retrieves the delivery mode 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, or '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, or '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
            {
                // Retrieves the delivery mode 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, or '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, or '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, or '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: 
    # Retrieves the delivery mode 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartDeliveryModes

Retrieves the delivery modes for the current store and delivery address.

Retrieves the delivery modes defined for the current base store and the cart delivery address. If the cart does not have a delivery address, 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

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

public class CartDeliveryModesApiExample {

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

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

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

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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];

// Retrieves the 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, or '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, or '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
            {
                // Retrieves the 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, or '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, or '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, or '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: 
    # Retrieves the 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartDeliveryMode

Deletes the delivery mode from the cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

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

public class CartDeliveryModesApiExample {

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

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

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

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartDeliveryMode

Updates the delivery mode for the cart.

Updates the delivery mode details for the cart based on the specified delivery mode identifier.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode?deliveryModeId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

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

public class CartDeliveryModesApiExample {

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

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

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

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String 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, or '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, or '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, or '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];

// Updates the delivery mode for the 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, or '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, or '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
            {
                // Updates the delivery mode for the 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, or '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, or '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, or '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: 
    # Updates the delivery mode for the 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartEntries

createCartEntry

Assigns a product to the cart.

Adds a product to the specified cart.


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

Usage and SDK Samples

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

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
        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, or '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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Assigns 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}} 
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, or '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 | 
            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, or '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
            {
                // Assigns 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
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, or '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 | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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: 
    # Assigns 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartEntries

Retrieves the cart entries.

Retrieves a list of cart entries with the product data.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.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, or '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, or '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, or '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];

// Retrieves the 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, or '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, or '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
            {
                // Retrieves the 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, or '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, or '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, or '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: 
    # Retrieves the 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartEntry

Retrieves the details of a cart entry.


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

Usage and SDK Samples

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

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        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, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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, or 'current' for the last modified cart.
Long *entryNumber = 789; // Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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];

// Retrieves the details of a cart entry.
[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, or 'current' for the last modified cart.
var entryNumber = 789; // {{Long}} Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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, or 'current' for the last modified cart.
            var entryNumber = 789;  // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
            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
            {
                // Retrieves the details of a cart entry.
                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, or 'current' for the last modified cart.
$entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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, or 'current' for the last modified cart.
my $entryNumber = 789; # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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, or 'current' for the last modified cart.
entryNumber = 789 # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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: 
    # Retrieves the details of a cart entry.
    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, or 'current' for the last modified cart.
Required
entryNumber*
Long (int64)
Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartEntry

Deletes the cart entry.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        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, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        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, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        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, or 'current' for the last modified cart.
Long *entryNumber = 789; // Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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 the 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, or 'current' for the last modified cart.
var entryNumber = 789; // {{Long}} Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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, or 'current' for the last modified cart.
            var entryNumber = 789;  // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.

            try
            {
                // Deletes the 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, or 'current' for the last modified cart.
$entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
$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, or 'current' for the last modified cart.
my $entryNumber = 789; # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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, or 'current' for the last modified cart.
entryNumber = 789 # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.

try: 
    # Deletes the 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, or 'current' for the last modified cart.
Required
entryNumber*
Long (int64)
Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartEntry

Updates the details of a cart entry.

Updates the quantity of a single cart entry and the details of the pickup store. Attributes not provided in the 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 | 
        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, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
Long *entryNumber = 789; // Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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];

// Updates the 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}} 
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, or 'current' for the last modified cart.
var entryNumber = 789; // {{Long}} Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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 | 
            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, or 'current' for the last modified cart.
            var entryNumber = 789;  // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
            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 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
$entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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 | 
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, or 'current' for the last modified cart.
my $entryNumber = 789; # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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 | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
entryNumber = 789 # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 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, or 'current' for the last modified cart.
Required
entryNumber*
Long (int64)
Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateCartEntry

Updates the details of a cart entry.

Updates the quantity of a single cart entry and the details of the pickup store.


/{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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 | 
        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, or 'current' for the last modified cart.
        Long entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
Long *entryNumber = 789; // Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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];

// Updates the 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}} 
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, or 'current' for the last modified cart.
var entryNumber = 789; // {{Long}} Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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 | 
            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, or 'current' for the last modified cart.
            var entryNumber = 789;  // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
            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 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
$entryNumber = 789; // Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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 | 
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, or 'current' for the last modified cart.
my $entryNumber = 789; # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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 | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or 'current' for the last modified cart.
entryNumber = 789 # Long | Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 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, or 'current' for the last modified cart.
Required
entryNumber*
Long (int64)
Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartEntryGroups

addToCartEntryGroup

Assigns 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntryGroupsApi;

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

public class CartEntryGroupsApiExample {

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

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

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

        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
        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, or '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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Assigns 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}} 
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, or '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 | 
            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, or '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
            {
                // Assigns 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
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, or '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 | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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: 
    # Assigns 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartEntryGroup

Deletes an entry group.

Deletes an entry group from the associated cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntryGroupsApi;

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

public class CartEntryGroupsApiExample {

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

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

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

        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        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, or '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, or '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, or '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];

// Deletes 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, or '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, or '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
            {
                // Deletes 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, or '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, or '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, or '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: 
    # Deletes 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartPayments

createCartPaymentDetails

Creates details of a new credit card payment for the cart.

Creates the details of a new credit card payment and assigns it 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetails?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPaymentsApi;

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

public class CartPaymentsApiExample {

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

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

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

        CartPaymentsApi apiInstance = new CartPaymentsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
        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, or '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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Creates details of a new credit card payment for 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}} 
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, or '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 | 
            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, or '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 details of a new credit card payment for 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 | 
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, or '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 | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 details of a new credit card payment for 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, or '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: 400 - Bad Request

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 specified cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetails?paymentDetailsId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPaymentsApi;

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

public class CartPaymentsApiExample {

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

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

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

        CartPaymentsApi apiInstance = new CartPaymentsApi();
        String 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, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartPromotions

doApplyCartPromotion

Assigns a promotion to the cart.

Applies a promotion to the cart using the promotion identifier. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions?promotionId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String 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, or 'current' for the last modified cart.
        String promotionId = promotionId_example; // String | Promotion identifier.
        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, or 'current' for the last modified cart.
        String promotionId = promotionId_example; // String | Promotion identifier.
        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, or 'current' for the last modified cart.
String *promotionId = promotionId_example; // Promotion identifier.
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];

// Assigns a promotion to 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, or 'current' for the last modified cart.
var promotionId = promotionId_example; // {{String}} Promotion 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.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, or 'current' for the last modified cart.
            var promotionId = promotionId_example;  // String | Promotion identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.

            try
            {
                // Assigns a promotion to 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, or 'current' for the last modified cart.
$promotionId = promotionId_example; // String | Promotion identifier.
$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, or 'current' for the last modified cart.
my $promotionId = promotionId_example; # String | Promotion 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->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, or 'current' for the last modified cart.
promotionId = promotionId_example # String | Promotion identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.

try: 
    # Assigns a promotion to 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, or '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.
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doApplyCartVoucher

Assigns a voucher to the cart.

Assigns a voucher to the cart using the voucher identifier.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers?voucherId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String 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, or '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, or '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, or '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];

// Assigns a voucher to 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, or '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, or '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
            {
                // Assigns a voucher to 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, or '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, or '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, or '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: 
    # Assigns a voucher to 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartPromotion

Retrieves information about the promotion.

Retrieves information about the promotion using the promotion identifier associated with 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String 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, or 'current' for the last modified cart.
        String promotionId = promotionId_example; // String | Promotion 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 {
            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, or 'current' for the last modified cart.
        String promotionId = promotionId_example; // String | Promotion 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 {
            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, or 'current' for the last modified cart.
String *promotionId = promotionId_example; // Promotion 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)

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

// Retrieves information about the promotion.
[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, or 'current' for the last modified cart.
var promotionId = promotionId_example; // {{String}} Promotion 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.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, or 'current' for the last modified cart.
            var promotionId = promotionId_example;  // String | Promotion 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
            {
                // Retrieves information about the promotion.
                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, or 'current' for the last modified cart.
$promotionId = promotionId_example; // String | Promotion 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->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, or 'current' for the last modified cart.
my $promotionId = promotionId_example; # String | Promotion 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->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, or 'current' for the last modified cart.
promotionId = promotionId_example # String | Promotion 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: 
    # Retrieves information about the promotion.
    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, or 'current' for the last modified cart.
Required
promotionId*
String
Promotion 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartPromotions

Retrieves the cart promotions.

Retrieves information about the promotions applied to 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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];

// Retrieves the cart promotions.
[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, or '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, or '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
            {
                // Retrieves the cart promotions.
                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, or '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, or '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, or '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: 
    # Retrieves the cart promotions.
    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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartVouchers

Retrieves a list of vouchers.

Retrieves a list of vouchers associated with the cart.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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];

// Retrieves a list of vouchers.
[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, or '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, or '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
            {
                // Retrieves a list of vouchers.
                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, or '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, or '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, or '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: 
    # Retrieves a list of vouchers.
    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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartPromotion

Deletes the promotion.

Deletes the promotion of the order using the promotion identifier defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String 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, or 'current' for the last modified cart.
        String promotionId = promotionId_example; // String | Promotion identifier.
        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, or 'current' for the last modified cart.
        String promotionId = promotionId_example; // String | Promotion identifier.
        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, or 'current' for the last modified cart.
String *promotionId = promotionId_example; // Promotion identifier.
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];

// Deletes the promotion.
[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, or 'current' for the last modified cart.
var promotionId = promotionId_example; // {{String}} Promotion 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.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, or 'current' for the last modified cart.
            var promotionId = promotionId_example;  // String | Promotion identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.

            try
            {
                // Deletes the promotion.
                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, or 'current' for the last modified cart.
$promotionId = promotionId_example; // String | Promotion identifier.
$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, or 'current' for the last modified cart.
my $promotionId = promotionId_example; # String | Promotion 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->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, or 'current' for the last modified cart.
promotionId = promotionId_example # String | Promotion identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.

try: 
    # Deletes the promotion.
    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, or 'current' for the last modified cart.
Required
promotionId*
String
Promotion 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartVoucher

Deletes a voucher defined for the current cart.

Deletes a voucher associated with the current cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers/{voucherId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

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

public class CartPromotionsApiExample {

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

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

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

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String 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, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


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"\
"http://localhost:9001/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 cart GUID 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 cart GUID 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 cart GUID 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 cart GUID 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 cart GUID 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 cart GUID 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 cart GUID 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 cart GUID 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 cart GUID that will be merged with the anonymous cart.

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createConsolidatedPickupLocation

Creates a consolidated pickup location.

Creates the store location where the customer will pick up all the products. Note: If any product is out of stock at the specified location, this product is removed from the cart.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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.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, or '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 CartsApi#createConsolidatedPickupLocation");
            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, or '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 CartsApi#createConsolidatedPickupLocation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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)

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

// Creates a consolidated pickup location.
[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.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, or '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 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, or '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
            {
                // Creates a consolidated pickup location.
                CartModificationList result = apiInstance.createConsolidatedPickupLocation(baseSiteId, cartId, storeName, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.createConsolidatedPickupLocation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->createConsolidatedPickupLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $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, or '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 CartsApi->createConsolidatedPickupLocation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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: 
    # Creates a consolidated pickup location.
    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 CartsApi->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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doHandleSopPaymentResponse

Creates the SOP payment details.

If the SOP payment subscription was successfully created, the payment details are defined and returned. Note: The execution of the ?Try it out? button always returns an error because the extended carts controller handles parameters differently, depending on which payment provider is used.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi#doHandleSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi#doHandleSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Creates the SOP 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.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, or '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 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, or '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 the SOP payment details.
                PaymentDetails result = apiInstance.doHandleSopPaymentResponse(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.doHandleSopPaymentResponse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->doHandleSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->doHandleSopPaymentResponse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 the SOP 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 CartsApi->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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCart

Retrieves a cart.

Retrieves a cart using the cart identifier. To get entryGroup information, set fields value as follows: fields=entryGroups(BASIC), fields=entryGroups(DEFAULT), or fields=entryGroups(FULL).


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

Usage and SDK Samples

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

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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];

// Retrieves a cart.
[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, or '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, or '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
            {
                // Retrieves a cart.
                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, or '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, or '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, or '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: 
    # Retrieves a cart.
    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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCarts

Retrieves the carts of a customer.

Retrieves a list of all the carts associated with a customer.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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 | Pagination for savedCartsOnly. Default value is 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 results returned per page if the savedCartsOnly parameter is set to true. Default value: 20.
        Boolean savedCartsOnly = true; // Boolean | If the value is true, only saved carts are returned.
        String sort = sort_example; // String | Sorting method applied to the return results if the savedCartsOnly parameter is set to true.
        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 | Pagination for savedCartsOnly. Default value is 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 results returned per page if the savedCartsOnly parameter is set to true. Default value: 20.
        Boolean savedCartsOnly = true; // Boolean | If the value is true, only saved carts are returned.
        String sort = sort_example; // String | Sorting method applied to the return results if the savedCartsOnly parameter is set to true.
        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; // Pagination for savedCartsOnly. Default value is 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; // Number of results returned per page if the savedCartsOnly parameter is set to true. Default value: 20. (optional) (default to 20)
Boolean *savedCartsOnly = true; // If the value is true, only saved carts are returned. (optional) (default to false)
String *sort = sort_example; // Sorting method applied to the return results if the savedCartsOnly parameter is set to true. (optional)

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

// Retrieves the carts of a customer.
[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}} Pagination for savedCartsOnly. Default value is 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 results returned per page if the savedCartsOnly parameter is set to true. Default value: 20.
  'savedCartsOnly': true, // {{Boolean}} If the value is true, only saved carts are returned.
  'sort': sort_example // {{String}} Sorting method applied to the return results if the savedCartsOnly parameter is set to true.
};
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 | Pagination for savedCartsOnly. Default value is 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 | Number of results returned per page if the savedCartsOnly parameter is set to true. Default value: 20. (optional)  (default to 20)
            var savedCartsOnly = true;  // Boolean | If the value is true, only saved carts are returned. (optional)  (default to false)
            var sort = sort_example;  // String | Sorting method applied to the return results if the savedCartsOnly parameter is set to true. (optional) 

            try
            {
                // Retrieves the carts of a customer.
                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 | Pagination for savedCartsOnly. Default value is 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 results returned per page if the savedCartsOnly parameter is set to true. Default value: 20.
$savedCartsOnly = true; // Boolean | If the value is true, only saved carts are returned.
$sort = sort_example; // String | Sorting method applied to the return results if the savedCartsOnly parameter is set to true.

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 | Pagination for savedCartsOnly. Default value is 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 results returned per page if the savedCartsOnly parameter is set to true. Default value: 20.
my $savedCartsOnly = true; # Boolean | If the value is true, only saved carts are returned.
my $sort = sort_example; # String | Sorting method applied to the return results if the savedCartsOnly parameter is set to true.

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 | Pagination for savedCartsOnly. Default value is 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 | Number of results returned per page if the savedCartsOnly parameter is set to true. Default value: 20. (optional) (default to 20)
savedCartsOnly = true # Boolean | If the value is true, only saved carts are returned. (optional) (default to false)
sort = sort_example # String | Sorting method applied to the return results if the savedCartsOnly parameter is set to true. (optional)

try: 
    # Retrieves the carts of a customer.
    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)
Pagination for savedCartsOnly. Default value is 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 results returned per page if the savedCartsOnly parameter is set to true. Default value: 20.
savedCartsOnly
Boolean
If the value is true, only saved carts are returned.
sort
String
Sorting method applied to the return results if the savedCartsOnly parameter is set to true.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConsolidatedPickupLocations

Retrieves a list of pickup options.

Retrieves a list of stores that have all the cart entries in stock and ready for pickup. Note: The response returns an empty list if no store has all the products in stock or if the products are all associated with the same pickup location.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/consolidate?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi#getConsolidatedPickupLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi#getConsolidatedPickupLocations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Retrieves a list of 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.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, or '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 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, or '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
            {
                // Retrieves a list of pickup options.
                PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getConsolidatedPickupLocations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->getConsolidatedPickupLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->getConsolidatedPickupLocations: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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: 
    # Retrieves a list of 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 CartsApi->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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSopPaymentRequestDetails

Retrieves the information required to create a subscription.

Retrieves the information required to create a subscription that contacts the payment provider directly. This information contains the URL of the payment provider and a list of required parameters.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/request

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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.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 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 CartsApi#getSopPaymentRequestDetails");
            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 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 CartsApi#getSopPaymentRequestDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *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)

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

// Retrieves the information required to create a 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.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 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 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 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
            {
                // Retrieves the information required to create a subscription.
                PaymentRequest result = apiInstance.getSopPaymentRequestDetails(baseSiteId, cartId, responseUrl, userId, extendedMerchantCallback, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getSopPaymentRequestDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$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 CartsApi->getSopPaymentRequestDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $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 CartsApi->getSopPaymentRequestDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
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: 
    # Retrieves the information required to create a 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 CartsApi->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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSopPaymentResponse

Retrieves the create subscription response from the payment provider.

Retrieves the response from the payment provider after creating the SOP payment subscription. If the payment subscription was created successfully, the payment details are returned. If no response from the payment provider, a "202 Accepted" status is returned. Otherwise, an error response is returned. Note: The execution of the ?Try it out? button always returns an error because the extended carts controller handles parameters differently depending on which payment provider is used.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi#getSopPaymentResponse");
            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, or '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 CartsApi#getSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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];

// Retrieves the create subscription response from the payment provider.
[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.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, or '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 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, or '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
            {
                // Retrieves the create subscription response from the payment provider.
                PaymentDetails result = apiInstance.getSopPaymentResponse(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getSopPaymentResponse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->getSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $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, or '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 CartsApi->getSopPaymentResponse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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: 
    # Retrieves the create subscription response from the payment provider.
    api_response = api_instance.get_sop_payment_response(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCart

Deletes the cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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 the cart.
[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, or '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, or '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 cart.
                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, or '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, or '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, or '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 cart.
    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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeSopPaymentResponse

Deletes the response from the payment provider.

Deletes the payment provider response for the SOP payment subscription.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String 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, or '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 CartsApi#removeSopPaymentResponse");
            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, or '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 CartsApi#removeSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 the response from the payment provider.
[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.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, or '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 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, or '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 response from the payment provider.
                apiInstance.removeSopPaymentResponse(baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.removeSopPaymentResponse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 CartsApi->removeSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $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, or '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 CartsApi->removeSopPaymentResponse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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 response from the payment provider.
    api_instance.remove_sop_payment_response(baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling CartsApi->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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartGuestUser

Assigns an email address to the cart.

Assigns an email to the cart.


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

Usage and SDK Samples

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

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String 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, or '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, or '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, or '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 address 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, or '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, or '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 address 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, or '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, or '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, or '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 address 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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


setCartRequestedRetrievalDate

Sets the requested retrieval date for a cart.

Sets the requested retrieval date with a given date for the cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/requestedretrievaldate?requestedRetrievalAt="
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, or '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 requestedRetrievalAt = requestedRetrievalAt_example; // String | Customer requested date for order retrieval
        try {
            apiInstance.setCartRequestedRetrievalDate(baseSiteId, cartId, userId, requestedRetrievalAt);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#setCartRequestedRetrievalDate");
            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, or '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 requestedRetrievalAt = requestedRetrievalAt_example; // String | Customer requested date for order retrieval
        try {
            apiInstance.setCartRequestedRetrievalDate(baseSiteId, cartId, userId, requestedRetrievalAt);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#setCartRequestedRetrievalDate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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, or '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 *requestedRetrievalAt = requestedRetrievalAt_example; // Customer requested date for order retrieval (optional)

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

// Sets the requested retrieval date for a cart.
[apiInstance setCartRequestedRetrievalDateWith:baseSiteId
    cartId:cartId
    userId:userId
    requestedRetrievalAt:requestedRetrievalAt
              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, or '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 = { 
  'requestedRetrievalAt': requestedRetrievalAt_example // {{String}} Customer requested date for order retrieval
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.setCartRequestedRetrievalDate(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 setCartRequestedRetrievalDateExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            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, or '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 requestedRetrievalAt = requestedRetrievalAt_example;  // String | Customer requested date for order retrieval (optional) 

            try
            {
                // Sets the requested retrieval date for a cart.
                apiInstance.setCartRequestedRetrievalDate(baseSiteId, cartId, userId, requestedRetrievalAt);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.setCartRequestedRetrievalDate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_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, or '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.
$requestedRetrievalAt = requestedRetrievalAt_example; // String | Customer requested date for order retrieval

try {
    $api_instance->setCartRequestedRetrievalDate($baseSiteId, $cartId, $userId, $requestedRetrievalAt);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->setCartRequestedRetrievalDate: ', $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, or '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 $requestedRetrievalAt = requestedRetrievalAt_example; # String | Customer requested date for order retrieval

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

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token 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, or '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.
requestedRetrievalAt = requestedRetrievalAt_example # String | Customer requested date for order retrieval (optional)

try: 
    # Sets the requested retrieval date for a cart.
    api_instance.set_cart_requested_retrieval_date(baseSiteId, cartId, userId, requestedRetrievalAt=requestedRetrievalAt)
except ApiException as e:
    print("Exception when calling CartsApi->setCartRequestedRetrievalDate: %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, or '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
requestedRetrievalAt
String
Customer requested date for order retrieval

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


validateCart

Validates the cart.

Validates the cart and returns the cart data during checkout and quotation.


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

Usage and SDK Samples

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

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

public class CartsApiExample {

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

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

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

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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, or '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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Catalogs

getCatalog

Retrieves a catalog.

Retrieves information about the catalog using catalog identifier.


/{baseSiteId}/catalogs/{catalogId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

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

public class CatalogsApiExample {

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

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

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

        CatalogsApi apiInstance = new CatalogsApi();
        String 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];

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCatalogVersion

Retrieves information about the catalog version.

Retrieves information about the catalog version using catalog identifier and catalog version identifier.


/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

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

public class CatalogsApiExample {

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

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

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

        CatalogsApi apiInstance = new CatalogsApi();
        String 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];

// Retrieves information about the 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
            {
                // Retrieves information about the 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: 
    # Retrieves information about the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCatalogs

Retrieves a list of catalogs.


/{baseSiteId}/catalogs

Usage and SDK Samples

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

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

public class CatalogsApiExample {

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

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

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

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

public class CatalogsApiExample {

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

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

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCategories

Retrieves information about the category.

Retrieves information about the category that exists in a catalog version available.


/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

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

public class CatalogsApiExample {

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

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

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

        CatalogsApi apiInstance = new CatalogsApi();
        String 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];

// Retrieves information about the category.
[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
            {
                // Retrieves information about the category.
                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: 
    # Retrieves information about the category.
    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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Consents

doGiveConsent

Creates consent.

Creates consent to collect or transfer the personal data of a customer.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consents?consentTemplateId=&consentTemplateVersion="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

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

public class ConsentsApiExample {

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

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

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

        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template identifier.
        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 identifier.
        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 identifier.
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];

// Creates 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 identifier.
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 identifier.
            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
            {
                // Creates 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 identifier.
$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 identifier.
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 identifier.
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: 
    # Creates 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 identifier.
Required
consentTemplateVersion*
Integer (int32)
Consent template version.
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConsentTemplate

Retrieves the consent.

Retrieves the consent using the template identifier. If a customer has not given or has withdrawn their consent to the template, a date is not returned.


/{baseSiteId}/users/{userId}/consenttemplates/{consentTemplateId}

Usage and SDK Samples

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

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

public class ConsentsApiExample {

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

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

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

        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ConsentTemplate result = apiInstance.getConsentTemplate(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 identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ConsentTemplate result = apiInstance.getConsentTemplate(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 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];

// Retrieves 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 identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getConsentTemplate(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 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
            {
                // Retrieves 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 identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getConsentTemplate($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 identifier.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getConsentTemplate(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 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: 
    # Retrieves 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConsentTemplates

Retrieves the consents.

If a customer has not given or has withdrawn their consent to the template, a date is not returned.


/{baseSiteId}/users/{userId}/consenttemplates

Usage and SDK Samples

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

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

public class ConsentsApiExample {

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

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

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

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

public class ConsentsApiExample {

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

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

// Retrieves the 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
            {
                // Retrieves the 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: 
    # Retrieves the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeConsent

Deletes the user consent.

If the consent was given, then the consent is deleted. If the consent was withdrawn, then it returns a withdrawal error. If the consent doesn't exist, it returns a "not found" error. If the customer is anonymous, then it returns an "access denied" error.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consents/{consentCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

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

public class ConsentsApiExample {

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

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

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

        ConsentsApi apiInstance = new ConsentsApi();
        String 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];

// Deletes the user consent.
[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
            {
                // Deletes the user consent.
                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: 
    # Deletes the user consent.
    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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Countries

getCountries

Retrieves a list of countries.

Retrieves a list of shipping or billing countries. Set the type parameter to SHIPPING to retrieve the shipping countries. Set the type parameter to BILLING to retrieve the billing countries. Leave the type parameter blank to retrieve all of the countries. The list is sorted alphabetically.


/{baseSiteId}/countries

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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];

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCountryRegions

Retrieves a list of regions.

Retrieves the list of regions in a country.


/{baseSiteId}/countries/{countyIsoCode}/regions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/countries/{countyIsoCode}/regions?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CountriesApi;

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

public class CountriesApiExample {

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

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

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

        CountriesApi apiInstance = new CountriesApi();
        String 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];

// Retrieves a list of regions.
[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
            {
                // Retrieves a list of regions.
                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: 
    # Retrieves a list of regions.
    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: 400 - Bad Request

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 "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

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

public class CustomerGroupsApiExample {

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

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

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

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

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        UserGroup body = ; // UserGroup | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.createCustomerGroup(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#createCustomerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
UserGroup *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier

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

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

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

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

var api = new CommerceWebservices.CustomerGroupsApi()
var body = ; // {{UserGroup}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

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

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

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

            var apiInstance = new CustomerGroupsApi();
            var body = new UserGroup(); // UserGroup | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Creates a new customer group.
                apiInstance.createCustomerGroup(body, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.createCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$body = ; // UserGroup | 
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

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

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $body = WWW::SwaggerClient::Object::UserGroup->new(); # UserGroup | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier

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

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

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
body =  # UserGroup | 
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Creates a new customer group.
    api_instance.create_customer_group(body, baseSiteId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->createCustomerGroup: %s\n" % e)

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCustomerGroup

Retrieves a customer group.

Retrieves a customer group. To try out the methods of the customer groups controller, authorize a customer who belongs to the customermanagergroup.


/{baseSiteId}/customergroups/{groupId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

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

public class CustomerGroupsApiExample {

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

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

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

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String 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];

// Retrieves a 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
            {
                // Retrieves a 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: 
    # Retrieves a 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCustomerGroups

Retrieves the subgroups of a customer group.

Retrieves the subgroup information of a customer group. To perform this call, you must be an authorized member of the customermanagergroup.


/{baseSiteId}/customergroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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 result page. Default value is 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 results returned per 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 result page. Default value is 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 results returned per 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 result page. Default value is 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 results returned per page. (optional) (default to 20)

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

// Retrieves the subgroups of a customer group.
[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 result page. Default value is 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 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.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 result page. Default value is 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 results returned per page. (optional)  (default to 20)

            try
            {
                // Retrieves the subgroups of a customer group.
                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 result page. Default value is 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 results returned per 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 result page. Default value is 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 results returned per 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 result page. Default value is 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 results returned per page. (optional) (default to 20)

try: 
    # Retrieves the subgroups of a customer group.
    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 result page. Default value is 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 results returned per page.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeUsersFromCustomerGroup

Deletes the customer from a customer group.

Deletes the customer from a customer group. To try out the methods in the customer groups controller, authorize a customer who belongs to the customermanagergroup.


/{baseSiteId}/customergroups/{groupId}/members/{userId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}/members/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

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

public class CustomerGroupsApiExample {

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

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

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

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | 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.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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.
        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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.

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

// Deletes the customer 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 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.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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.

            try
            {
                // Deletes the customer 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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.

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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.

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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.

try: 
    # Deletes the customer 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 or one of the literals: ?current? for currently authenticated user, ?anonymous? for anonymous user.
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceUsersForCustomerGroup

Sets members for a user group.

Sets members for a user group. The list of existing members is overwritten with a new one. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups/{groupId}/members

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}/members"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

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

public class CustomerGroupsApiExample {

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

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

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

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        MemberList body = ; // MemberList | 
        String 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 | 
        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 = ; // 
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}} 
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 | 
            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 | 
$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 | 
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 | 
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateCustomerGroupWithUsers

Assigns members to a customer group.

Assigns members to a customer group. To perform this call, you must be an authorized member of the customermanagergroup.


/{baseSiteId}/customergroups/{groupId}/members

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}/members"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

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

public class CustomerGroupsApiExample {

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

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

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

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        MemberList body = ; // MemberList | 
        String 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 | 
        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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *groupId = groupId_example; // Group identifier. 

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

// Assigns members 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}} 
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 | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group identifier. 

            try
            {
                // Assigns members 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 | 
$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 | 
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 | 
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group identifier. 

try: 
    # Assigns members 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Export

getExportedProducts

Retrieves a list of exported products.

Retrieves all of the products or only the products that were modified after the time in the timestamp parameter.


/{baseSiteId}/export/products

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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 | Only products from this catalog are returned. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
        String timestamp = timestamp_example; // String | Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000.
        String version = version_example; // String | Only products from this catalog version are returned. 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 | Only products from this catalog are returned. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
        String timestamp = timestamp_example; // String | Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000.
        String version = version_example; // String | Only products from this catalog version are returned. 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; // Only products from this catalog are returned. The catalog must be provided along with the version. (optional)
Integer *currentPage = 56; // Current result page. Default value is 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; // Number of results returned per page. (optional) (default to 20)
String *timestamp = timestamp_example; // Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000. (optional)
String *version = version_example; // Only products from this catalog version are returned. The catalog version must be provided along with the catalog. (optional)

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

// Retrieves a list of exported products.
[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}} Only products from this catalog are returned. The catalog must be provided along with the version.
  'currentPage': 56, // {{Integer}} Current result page. Default value is 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 results returned per page.
  'timestamp': timestamp_example, // {{String}} Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000.
  'version': version_example // {{String}} Only products from this catalog version are returned. 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 | Only products from this catalog are returned. The catalog must be provided along with the version. (optional) 
            var currentPage = 56;  // Integer | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var timestamp = timestamp_example;  // String | Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000. (optional) 
            var version = version_example;  // String | Only products from this catalog version are returned. The catalog version must be provided along with the catalog. (optional) 

            try
            {
                // Retrieves a list of exported products.
                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 | Only products from this catalog are returned. The catalog must be provided along with the version.
$currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
$timestamp = timestamp_example; // String | Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000.
$version = version_example; // String | Only products from this catalog version are returned. 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 | Only products from this catalog are returned. The catalog must be provided along with the version.
my $currentPage = 56; # Integer | Current result page. Default value is 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 results returned per page.
my $timestamp = timestamp_example; # String | Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000.
my $version = version_example; # String | Only products from this catalog version are returned. 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 | Only products from this catalog are returned. The catalog must be provided along with the version. (optional)
currentPage = 56 # Integer | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
timestamp = timestamp_example # String | Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000. (optional)
version = version_example # String | Only products from this catalog version are returned. The catalog version must be provided along with the catalog. (optional)

try: 
    # Retrieves a list of exported products.
    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
Only products from this catalog are returned. The catalog must be provided along with the version.
currentPage
Integer (int32)
Current result page. Default value is 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 results returned per page.
timestamp
String
Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000.
version
String
Only products from this catalog version are returned. The catalog version must be provided along with the catalog.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Feeds

getOrderStatusFeed

Retrieves a list of orders with status updates.

Retrieves the orders that have changed status. Only the properties from the current baseSite that have been updated after the specified timestamp are returned.


/{baseSiteId}/feeds/orders/statusfeed

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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];

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


ForgottenPasswords

doResetPassword

Resets a forgotten password.

Reset password after customer's clicked forgotten password link. A new password needs to be provided.


/{baseSiteId}/resetpassword

Usage and SDK Samples

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

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

public class ForgottenPasswordsApiExample {

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

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

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

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

public class ForgottenPasswordsApiExample {

    public static void main(String[] args) {
        ForgottenPasswordsApi apiInstance = new ForgottenPasswordsApi();
        ResetPassword body = ; // ResetPassword | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doResetPassword(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ForgottenPasswordsApi#doResetPassword");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ResetPassword *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier

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

// Resets a forgotten password.
[apiInstance doResetPasswordWith:body
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ForgottenPasswordsApi()
var body = ; // {{ResetPassword}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

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

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

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

            var apiInstance = new ForgottenPasswordsApi();
            var body = new ResetPassword(); // ResetPassword | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Resets a forgotten password.
                apiInstance.doResetPassword(body, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ForgottenPasswordsApi.doResetPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiForgottenPasswordsApi();
$body = ; // ResetPassword | 
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

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

my $api_instance = WWW::SwaggerClient::ForgottenPasswordsApi->new();
my $body = WWW::SwaggerClient::Object::ResetPassword->new(); # ResetPassword | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier

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

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

# create an instance of the API class
api_instance = swagger_client.ForgottenPasswordsApi()
body =  # ResetPassword | 
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Resets a forgotten password.
    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: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doRestorePassword

Creates a token to restore a forgotten password.

Creates a token so that customers can restore their forgotten passwords.


/{baseSiteId}/forgottenpasswordtokens

Usage and SDK Samples

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

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

public class ForgottenPasswordsApiExample {

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

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

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

        ForgottenPasswordsApi apiInstance = new ForgottenPasswordsApi();
        String 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];

// Creates a token to restore a 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
            {
                // Creates a token to restore a 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: 
    # Creates a token to restore a 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: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


FutureStocks

getFutureStocks

Retrieves the future availability of a product.


/{baseSiteId}/users/{userId}/futureStocks/{productCode}

Usage and SDK Samples

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

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

public class FutureStocksApiExample {

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

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

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

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

public class FutureStocksApiExample {

    public static void main(String[] args) {
        FutureStocksApi apiInstance = new FutureStocksApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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 {
            ProductFutureStocks result = apiInstance.getFutureStocks(baseSiteId, productCode, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FutureStocksApi#getFutureStocks");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
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)

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

// Retrieves the future availability of a product.
[apiInstance getFutureStocksWith:baseSiteId
    productCode:productCode
    userId:userId
    fields:fields
              completionHandler: ^(ProductFutureStocks output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.FutureStocksApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
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.getFutureStocks(baseSiteId, 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 getFutureStocksExample
    {
        public void main()
        {

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

            var apiInstance = new FutureStocksApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            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
            {
                // Retrieves the future availability of a product.
                ProductFutureStocks result = apiInstance.getFutureStocks(baseSiteId, productCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FutureStocksApi.getFutureStocks: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiFutureStocksApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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->getFutureStocks($baseSiteId, $productCode, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FutureStocksApi->getFutureStocks: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FutureStocksApi;

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

my $api_instance = WWW::SwaggerClient::FutureStocksApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
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->getFutureStocks(baseSiteId => $baseSiteId, productCode => $productCode, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FutureStocksApi->getFutureStocks: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.FutureStocksApi()
baseSiteId = baseSiteId_example # String | Base site identifier
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: 
    # Retrieves the future availability of a product.
    api_response = api_instance.get_future_stocks(baseSiteId, productCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FutureStocksApi->getFutureStocks: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getFutureStocksList

Retrieves the future availability of the products.

Retrieves the products and their future availabilities.


/{baseSiteId}/users/{userId}/futureStocks

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/futureStocks?fields=&productCodes="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FutureStocksApi;

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

public class FutureStocksApiExample {

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

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

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

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

public class FutureStocksApiExample {

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

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

// Retrieves the future availability of the products.
[apiInstance getFutureStocksListWith:baseSiteId
    productCodes:productCodes
    userId:userId
    fields:fields
              completionHandler: ^(ProductFutureStocksList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

            var apiInstance = new FutureStocksApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCodes = productCodes_example;  // String | Products identifiers.
            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
            {
                // Retrieves the future availability of the products.
                ProductFutureStocksList result = apiInstance.getFutureStocksList(baseSiteId, productCodes, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FutureStocksApi.getFutureStocksList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

# create an instance of the API class
api_instance = swagger_client.FutureStocksApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCodes = productCodes_example # String | Products identifiers.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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: 
    # Retrieves the future availability of the products.
    api_response = api_instance.get_future_stocks_list(baseSiteId, productCodes, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FutureStocksApi->getFutureStocksList: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Invoices

getUserOrderInvoiceBinary

Get binary invoice of an order

Get invoice of an order in encoded byte array


/{baseSiteId}/users/{userId}/orders/{code}/invoices/{invoiceId}/download

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/octet-stream,application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{code}/invoices/{invoiceId}/download?externalSystemId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InvoicesApi;

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

public class InvoicesApiExample {

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

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

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

        InvoicesApi apiInstance = new InvoicesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order Code
        String invoiceId = invoiceId_example; // String | Invoice ID
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String externalSystemId = externalSystemId_example; // String | External system identifier where the invoice resides.
        try {
            array[byte[]] result = apiInstance.getUserOrderInvoiceBinary(baseSiteId, code, invoiceId, userId, externalSystemId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InvoicesApi#getUserOrderInvoiceBinary");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InvoicesApi;

public class InvoicesApiExample {

    public static void main(String[] args) {
        InvoicesApi apiInstance = new InvoicesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order Code
        String invoiceId = invoiceId_example; // String | Invoice ID
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String externalSystemId = externalSystemId_example; // String | External system identifier where the invoice resides.
        try {
            array[byte[]] result = apiInstance.getUserOrderInvoiceBinary(baseSiteId, code, invoiceId, userId, externalSystemId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InvoicesApi#getUserOrderInvoiceBinary");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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 Code
String *invoiceId = invoiceId_example; // Invoice ID
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *externalSystemId = externalSystemId_example; // External system identifier where the invoice resides. (optional)

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

// Get binary invoice of an order
[apiInstance getUserOrderInvoiceBinaryWith:baseSiteId
    code:code
    invoiceId:invoiceId
    userId:userId
    externalSystemId:externalSystemId
              completionHandler: ^(array[byte[]] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.InvoicesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Order Code
var invoiceId = invoiceId_example; // {{String}} Invoice ID
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'externalSystemId': externalSystemId_example // {{String}} External system identifier where the invoice resides.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserOrderInvoiceBinary(baseSiteId, code, invoiceId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new InvoicesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Order Code
            var invoiceId = invoiceId_example;  // String | Invoice ID
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var externalSystemId = externalSystemId_example;  // String | External system identifier where the invoice resides. (optional) 

            try
            {
                // Get binary invoice of an order
                array[byte[]] result = apiInstance.getUserOrderInvoiceBinary(baseSiteId, code, invoiceId, userId, externalSystemId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InvoicesApi.getUserOrderInvoiceBinary: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiInvoicesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Order Code
$invoiceId = invoiceId_example; // String | Invoice ID
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$externalSystemId = externalSystemId_example; // String | External system identifier where the invoice resides.

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

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

my $api_instance = WWW::SwaggerClient::InvoicesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Order Code
my $invoiceId = invoiceId_example; # String | Invoice ID
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $externalSystemId = externalSystemId_example; # String | External system identifier where the invoice resides.

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

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

# create an instance of the API class
api_instance = swagger_client.InvoicesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Order Code
invoiceId = invoiceId_example # String | Invoice ID
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
externalSystemId = externalSystemId_example # String | External system identifier where the invoice resides. (optional)

try: 
    # Get binary invoice of an order
    api_response = api_instance.get_user_order_invoice_binary(baseSiteId, code, invoiceId, userId, externalSystemId=externalSystemId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InvoicesApi->getUserOrderInvoiceBinary: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Order Code
Required
invoiceId*
String
Invoice 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
externalSystemId
String
External system identifier where the invoice resides.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUserOrderInvoices

Get invoices for an order.

Returns invoices based on a specific order code. The response contains list of invoice information.


/{baseSiteId}/users/{userId}/orders/{code}/invoices

Usage and SDK Samples

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

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

public class InvoicesApiExample {

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

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

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

        InvoicesApi apiInstance = new InvoicesApi();
        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
        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 {
            SAPInvoiceList result = apiInstance.getUserOrderInvoices(baseSiteId, code, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InvoicesApi#getUserOrderInvoices");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InvoicesApi;

public class InvoicesApiExample {

    public static void main(String[] args) {
        InvoicesApi apiInstance = new InvoicesApi();
        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
        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 {
            SAPInvoiceList result = apiInstance.getUserOrderInvoices(baseSiteId, code, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InvoicesApi#getUserOrderInvoices");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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 Code
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)

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

// Get invoices for an order.
[apiInstance getUserOrderInvoicesWith:baseSiteId
    code:code
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(SAPInvoiceList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.InvoicesApi()
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 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.getUserOrderInvoices(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 getUserOrderInvoicesExample
    {
        public void main()
        {

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

            var apiInstance = new InvoicesApi();
            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 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 invoices for an order.
                SAPInvoiceList result = apiInstance.getUserOrderInvoices(baseSiteId, code, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InvoicesApi.getUserOrderInvoices: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiInvoicesApi();
$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
$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->getUserOrderInvoices($baseSiteId, $code, $userId, $currentPage, $fields, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InvoicesApi->getUserOrderInvoices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InvoicesApi;

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

my $api_instance = WWW::SwaggerClient::InvoicesApi->new();
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
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->getUserOrderInvoices(baseSiteId => $baseSiteId, code => $code, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InvoicesApi->getUserOrderInvoices: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.InvoicesApi()
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
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 invoices for an order.
    api_response = api_instance.get_user_order_invoices(baseSiteId, code, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InvoicesApi->getUserOrderInvoices: %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
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 - List of invoice of an order

Status: 400 - Bad Request

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\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/loginnotification"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginNotificationApi;

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

public class LoginNotificationApiExample {

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

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

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

        LoginNotificationApi apiInstance = new LoginNotificationApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier.
        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.
        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.

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.

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.

            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.

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.

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.

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.
Required

Responses

Status: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


MerchantCallback

doHandleCartMerchantCallback

Validates the decision of the merchant for a SOP payment related to a cart.

Handles and validates the decision of the merchant for a cart.The PaymentSubscriptionResult is stored for the cart. Note: The execution of the ?Try it out? button always returns an error because the merchant callback controller handles parameters differently, depending on which payment provider is used.


/{baseSiteId}/integration/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/integration/users/{userId}/carts/{cartId}/payment/sop/response"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MerchantCallbackApi;

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

public class MerchantCallbackApiExample {

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

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

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

        MerchantCallbackApi apiInstance = new MerchantCallbackApi();
        String 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];

// Validates the decision of the merchant for a SOP payment related to 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
            {
                // Validates the decision of the merchant for a SOP payment related to 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: 
    # Validates the decision of the merchant for a SOP payment related to 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doHandleMerchantCallback

Validates the decision of the merchant.

Validates the decision of the merchant. Note: The execution of the ?Try it out? button always returns an error because the merchant callback controller handles parameters differently depending on which payment provider is used.


/{baseSiteId}/integration/merchant_callback

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/integration/merchant_callback"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MerchantCallbackApi;

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

public class MerchantCallbackApiExample {

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

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

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

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

public class MerchantCallbackApiExample {

    public static void main(String[] args) {
        MerchantCallbackApi apiInstance = new MerchantCallbackApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doHandleMerchantCallback(baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MerchantCallbackApi#doHandleMerchantCallback");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier

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

// Validates 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
            {
                // Validates 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: 
    # Validates 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Miscs

getCardTypes

Retrieves a list of supported payment card types.

Retrieves the payment card types defined for the base store.


/{baseSiteId}/cardtypes

Usage and SDK Samples

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

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

public class MiscsApiExample {

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

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

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

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

public class MiscsApiExample {

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

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

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCurrencies

Retrieves a list of available currencies.

Retrieves a list of available currencies for the current base store. If the currency list is empty, all of the currencies available in the system are returned.


/{baseSiteId}/currencies

Usage and SDK Samples

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

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

public class MiscsApiExample {

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

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

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

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

public class MiscsApiExample {

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

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

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getDeliveryCountries

Retrieves a list of shipping countries.

Retrieves a list of the 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"\
"http://localhost:9001/occ/v2/{baseSiteId}/deliverycountries?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscsApi;

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

public class MiscsApiExample {

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

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

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

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

public class MiscsApiExample {

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

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

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getLanguages

Retrieves a list of available languages.

Retrieves a list of the available languages of the base store. If the language list is empty, all of the languages available in the system are returned.


/{baseSiteId}/languages

Usage and SDK Samples

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

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

public class MiscsApiExample {

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

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

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

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

public class MiscsApiExample {

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

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

// Retrieves 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
            {
                // Retrieves 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: 
    # Retrieves 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTitles

Retrieves the localized titles.


/{baseSiteId}/titles

Usage and SDK Samples

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

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

public class MiscsApiExample {

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

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

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

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

public class MiscsApiExample {

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

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

// Retrieves the 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
            {
                // Retrieves the 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: 
    # Retrieves the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrderApprovalPermissionTypes

getOrderApprovalPermissionTypes

Retrieves the order approval permission types.


/{baseSiteId}/orderApprovalPermissionTypes

Usage and SDK Samples

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

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

public class OrderApprovalPermissionTypesApiExample {

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

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

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

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

public class OrderApprovalPermissionTypesApiExample {

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

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

// Retrieves the 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
            {
                // Retrieves the 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: 
    # Retrieves the 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrderApprovalPermissions

createOrderApprovalPermission

Creates an order approval permission.

Creates an order approval permission for a user. These permissions allow the approval to exceed order, budget, or time threshold in a workflow.


/{baseSiteId}/users/{userId}/orderApprovalPermissions

Usage and SDK Samples

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

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

public class OrderApprovalPermissionsApiExample {

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

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

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

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

public class OrderApprovalPermissionsApiExample {

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

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

// Creates an order approval permission.
[apiInstance createOrderApprovalPermissionWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrderApprovalPermission output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Creates an order approval permission.
                OrderApprovalPermission result = apiInstance.createOrderApprovalPermission(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalPermissionsApi.createOrderApprovalPermission: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Creates an 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrderApprovalPermission

Retrieves the order approval permission.


/{baseSiteId}/users/{userId}/orderApprovalPermissions/{orderApprovalPermissionCode}

Usage and SDK Samples

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

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

public class OrderApprovalPermissionsApiExample {

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

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

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

        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission 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 {
            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 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 {
            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 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)

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

// Retrieves the 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 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.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 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
            {
                // Retrieves the 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 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->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 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->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 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: 
    # Retrieves the 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrderApprovalPermissions

Retrieves the order approval permissions.

Retrieves the list of order approval permissions given to a user. Such permissions allow the approval to exceed order, budget, or time threshold. The response may display the results across multiple pages, when applicable.


/{baseSiteId}/users/{userId}/orderApprovalPermissions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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; // Current result page. Default value is 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; // 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];

// Retrieves the 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}} Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves the 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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateOrderApprovalPermission

Updates the order approval permission.


/{baseSiteId}/users/{userId}/orderApprovalPermissions/{orderApprovalPermissionCode}

Usage and SDK Samples

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

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

public class OrderApprovalPermissionsApiExample {

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

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

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

        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        OrderApprovalPermission body = ; // OrderApprovalPermission | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission 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 {
            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 | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission 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 {
            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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order approval permission 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)

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

// Updates 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}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order approval permission 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.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 | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order approval permission 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 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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission 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->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 | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order approval permission 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->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 | 
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order approval permission 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 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrderApprovals

doMakeOrderApprovalDecision

Creates a decision for the order approval.

Creates a decision (approval or rejection) for the order, which 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,application/xml"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderapprovals/{orderApprovalCode}/decision?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalsApi;

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

public class OrderApprovalsApiExample {

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

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

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

        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        OrderApprovalDecision body = ; // OrderApprovalDecision | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Order approval 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 {
            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 | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Order approval 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 {
            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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderApprovalCode = orderApprovalCode_example; // Order approval 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)

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

// Creates a decision for the order approval.
[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}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderApprovalCode = orderApprovalCode_example; // {{String}} Order approval 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.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 | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderApprovalCode = orderApprovalCode_example;  // String | Order approval 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
            {
                // Creates a decision for the order approval.
                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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderApprovalCode = orderApprovalCode_example; // String | Order approval 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->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 | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderApprovalCode = orderApprovalCode_example; # String | Order approval 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->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 | 
baseSiteId = baseSiteId_example # String | Base site identifier
orderApprovalCode = orderApprovalCode_example # String | Order approval 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: 
    # Creates a decision for the order approval.
    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
Order approval 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrderApproval

Retrieves an order to approve.

Retrieves the details of an order to approve.


/{baseSiteId}/users/{userId}/orderapprovals/{orderApprovalCode}

Usage and SDK Samples

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

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

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderApprovalCode = orderApprovalCode_example; // String | Order approval 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 {
            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 | Order approval 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 {
            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; // Order approval 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)

OrderApprovalsApi *apiInstance = [[OrderApprovalsApi alloc] init];

// Retrieves 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}} Order approval 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.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 | Order approval 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
            {
                // Retrieves 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 | Order approval 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->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 | Order approval 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->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 | Order approval 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: 
    # Retrieves 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
Order approval 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrderApprovals

Retrieves the orders to approve.

Retrieves the orders that the user is allowed to approve.


/{baseSiteId}/users/{userId}/orderapprovals

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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; // Current result page. Default value is 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; // 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];

// Retrieves the 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}} Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 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 | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves the 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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Orders

countUserOrders

Retrieves the total number of orders for a customer.

Retrieves the total number of orders for a customer in the response header, under the "x-total-count" attribute.


/{baseSiteId}/users/{userId}/orders

Usage and SDK Samples

curl -X HEAD\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders?statuses="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
        try {
            apiInstance.countUserOrders(baseSiteId, userId, statuses);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#countUserOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrdersApi;

public class OrdersApiExample {

    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
        try {
            apiInstance.countUserOrders(baseSiteId, userId, statuses);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#countUserOrders");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *statuses = statuses_example; // Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional)

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Retrieves the total number of orders for a customer.
[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
            {
                // Retrieves the total number of orders for a customer.
                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: 
    # Retrieves the total number of orders for a customer.
    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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doCancelOrder

Cancels an order.

Cancels an order, completely or partially. For a complete cancellation, add all the order entry numbers and quantities in the request body. For partial cancellation, only add the order entry numbers and quantities to be cancelled.


/{baseSiteId}/users/{userId}/orders/{code}/cancellation

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{code}/cancellation"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        CancellationRequestEntryInputList body = ; // CancellationRequestEntryInputList | 
        String 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 | 
        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 = ; // 
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];

// Cancels 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}} 
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 | 
            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
            {
                // Cancels 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 | 
$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 | 
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 | 
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: 
    # Cancels 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrder

Retrieves the order.

Retrieves the details of the order using the Globally Unique Identifier (GUID) or the order code. To get entryGroup information, set fields value as follows: fields=entryGroups(BASIC), fields=entryGroups(DEFAULT), or fields=entryGroups(FULL).


/{baseSiteId}/orders/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/orders/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order GUID 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 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 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];

// Retrieves the 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 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 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
            {
                // Retrieves the 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 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 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 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: 
    # Retrieves the 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUserOrderHistory

Retrieves the order history of a customer.

Retrieves the order history of a customer. The response may display the results across multiple pages, when applicable.


/{baseSiteId}/users/{userId}/orders

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/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 | Current result page. Default value is 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 | 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 orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED
        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 | Current result page. Default value is 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 | 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 orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED
        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; // Current result page. Default value is 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; // 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 orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED (optional)

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Retrieves the order history of a customer.
[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}} Current result page. Default value is 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}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  'statuses': statuses_example // {{String}} Filters orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED
};
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 | Current result page. Default value is 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 | 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 orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED (optional) 

            try
            {
                // Retrieves the order history of a customer.
                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 | Current result page. Default value is 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 | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$statuses = statuses_example; // String | Filters orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED

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 | Current result page. Default value is 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 | 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 orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED

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 | Current result page. Default value is 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 | 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 orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY.
Options available are:
CANCELLING,
CHECKED_VALID,
CREATED,
OPEN,
READY,
CHECKED_INVALID,
ON_HOLD,
ON_VALIDATION,
PENDING_APPROVAL,
SUSPENDED,
COMPLETED,
PAYMENT_AUTHORIZED,
PENDING_APPROVAL_FROM_MERCHANT,
CANCELLED,
PAYMENT_NOT_AUTHORIZED,
PENDING_QUOTE,
APPROVED_QUOTE,
PAYMENT_AMOUNT_RESERVED,
PAYMENT_AMOUNT_NOT_RESERVED,
REJECTED_QUOTE,
APPROVED,
PAYMENT_CAPTURED,
PAYMENT_NOT_CAPTURED,
REJECTED,
APPROVED_BY_MERCHANT,
FRAUD_CHECKED,
ORDER_SPLIT,
REJECTED_BY_MERCHANT,
ASSIGNED_TO_ADMIN,
PROCESSING_ERROR,
B2B_PROCESSING_ERROR,
WAIT_FRAUD_MANUAL_CHECK,
PAYMENT_NOT_VOIDED,
TAX_NOT_VOIDED,
TAX_NOT_COMMITTED,
TAX_NOT_REQUOTED (optional)

try: 
    # Retrieves the order history of a customer.
    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)
Current result page. Default value is 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)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
statuses
String
Filters orders with specified status(es). For example, statuses = CANCELLED returns CANCELLED orders. To filter multiple statues, separate statues with "," and all orders with these statuses will be returned. For example, statuses = CANCELLED,COMPLETED,READY returns all orders with statuses CANCELLED,COMPLETED, and READY. Options available are: CANCELLING, CHECKED_VALID, CREATED, OPEN, READY, CHECKED_INVALID, ON_HOLD, ON_VALIDATION, PENDING_APPROVAL, SUSPENDED, COMPLETED, PAYMENT_AUTHORIZED, PENDING_APPROVAL_FROM_MERCHANT, CANCELLED, PAYMENT_NOT_AUTHORIZED, PENDING_QUOTE, APPROVED_QUOTE, PAYMENT_AMOUNT_RESERVED, PAYMENT_AMOUNT_NOT_RESERVED, REJECTED_QUOTE, APPROVED, PAYMENT_CAPTURED, PAYMENT_NOT_CAPTURED, REJECTED, APPROVED_BY_MERCHANT, FRAUD_CHECKED, ORDER_SPLIT, REJECTED_BY_MERCHANT, ASSIGNED_TO_ADMIN, PROCESSING_ERROR, B2B_PROCESSING_ERROR, WAIT_FRAUD_MANUAL_CHECK, PAYMENT_NOT_VOIDED, TAX_NOT_VOIDED, TAX_NOT_COMMITTED, TAX_NOT_REQUOTED

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUserOrders

Retrieves the order.

Retrieves the details of the order. To get entryGroup information, set fields value as follows: fields=entryGroups(BASIC), fields=entryGroups(DEFAULT), or fields=entryGroups(FULL).


/{baseSiteId}/users/{userId}/orders/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order GUID 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 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 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];

// Retrieves the 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 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 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
            {
                // Retrieves the 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 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 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 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: 
    # Retrieves the 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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrganizationalUnitAccountSummary

getAccountSummary

Retrieves the account summary.

Retrieves the account summary for the organizational unit.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/accountSummary

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/accountSummary"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitAccountSummaryApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitAccountSummaryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitAccountSummaryApi apiInstance = new OrganizationalUnitAccountSummaryApi();
        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 {
            AccountSummary result = apiInstance.getAccountSummary(baseSiteId, orgUnitId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitAccountSummaryApi#getAccountSummary");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitAccountSummaryApi;

public class OrganizationalUnitAccountSummaryApiExample {

    public static void main(String[] args) {
        OrganizationalUnitAccountSummaryApi apiInstance = new OrganizationalUnitAccountSummaryApi();
        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 {
            AccountSummary result = apiInstance.getAccountSummary(baseSiteId, orgUnitId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitAccountSummaryApi#getAccountSummary");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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

OrganizationalUnitAccountSummaryApi *apiInstance = [[OrganizationalUnitAccountSummaryApi alloc] init];

// Retrieves the account summary.
[apiInstance getAccountSummaryWith:baseSiteId
    orgUnitId:orgUnitId
    userId:userId
              completionHandler: ^(AccountSummary output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitAccountSummaryApi()
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. Returned data: ' + data);
  }
};
api.getAccountSummary(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 getAccountSummaryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitAccountSummaryApi();
            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
            {
                // Retrieves the account summary.
                AccountSummary result = apiInstance.getAccountSummary(baseSiteId, orgUnitId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitAccountSummaryApi.getAccountSummary: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitAccountSummaryApi();
$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 {
    $result = $api_instance->getAccountSummary($baseSiteId, $orgUnitId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitAccountSummaryApi->getAccountSummary: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitAccountSummaryApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitAccountSummaryApi->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

eval { 
    my $result = $api_instance->getAccountSummary(baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitAccountSummaryApi->getAccountSummary: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitAccountSummaryApi()
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: 
    # Retrieves the account summary.
    api_response = api_instance.get_account_summary(baseSiteId, orgUnitId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitAccountSummaryApi->getAccountSummary: %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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgDocumentAttachment

Retrieves the attachment of a document.

Retrieves the attachment associated with a given organizational document for the given attachment identifier.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgDocuments/{orgDocumentId}/attachments/{orgDocumentAttachmentId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/octet-stream,application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgDocuments/{orgDocumentId}/attachments/{orgDocumentAttachmentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitAccountSummaryApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitAccountSummaryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitAccountSummaryApi apiInstance = new OrganizationalUnitAccountSummaryApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgDocumentAttachmentId = orgDocumentAttachmentId_example; // String | Organizational document attachment identifier.
        String orgDocumentId = orgDocumentId_example; // String | Organizational document 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 {
            array[byte[]] result = apiInstance.getOrgDocumentAttachment(baseSiteId, orgDocumentAttachmentId, orgDocumentId, orgUnitId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitAccountSummaryApi#getOrgDocumentAttachment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitAccountSummaryApi;

public class OrganizationalUnitAccountSummaryApiExample {

    public static void main(String[] args) {
        OrganizationalUnitAccountSummaryApi apiInstance = new OrganizationalUnitAccountSummaryApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgDocumentAttachmentId = orgDocumentAttachmentId_example; // String | Organizational document attachment identifier.
        String orgDocumentId = orgDocumentId_example; // String | Organizational document 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 {
            array[byte[]] result = apiInstance.getOrgDocumentAttachment(baseSiteId, orgDocumentAttachmentId, orgDocumentId, orgUnitId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitAccountSummaryApi#getOrgDocumentAttachment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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 *orgDocumentAttachmentId = orgDocumentAttachmentId_example; // Organizational document attachment identifier.
String *orgDocumentId = orgDocumentId_example; // Organizational document 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

OrganizationalUnitAccountSummaryApi *apiInstance = [[OrganizationalUnitAccountSummaryApi alloc] init];

// Retrieves the attachment of a document.
[apiInstance getOrgDocumentAttachmentWith:baseSiteId
    orgDocumentAttachmentId:orgDocumentAttachmentId
    orgDocumentId:orgDocumentId
    orgUnitId:orgUnitId
    userId:userId
              completionHandler: ^(array[byte[]] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitAccountSummaryApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgDocumentAttachmentId = orgDocumentAttachmentId_example; // {{String}} Organizational document attachment identifier.
var orgDocumentId = orgDocumentId_example; // {{String}} Organizational document 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. Returned data: ' + data);
  }
};
api.getOrgDocumentAttachment(baseSiteId, orgDocumentAttachmentId, orgDocumentId, orgUnitId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgDocumentAttachmentExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitAccountSummaryApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgDocumentAttachmentId = orgDocumentAttachmentId_example;  // String | Organizational document attachment identifier.
            var orgDocumentId = orgDocumentId_example;  // String | Organizational document 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
            {
                // Retrieves the attachment of a document.
                array[byte[]] result = apiInstance.getOrgDocumentAttachment(baseSiteId, orgDocumentAttachmentId, orgDocumentId, orgUnitId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitAccountSummaryApi.getOrgDocumentAttachment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitAccountSummaryApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgDocumentAttachmentId = orgDocumentAttachmentId_example; // String | Organizational document attachment identifier.
$orgDocumentId = orgDocumentId_example; // String | Organizational document 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 {
    $result = $api_instance->getOrgDocumentAttachment($baseSiteId, $orgDocumentAttachmentId, $orgDocumentId, $orgUnitId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitAccountSummaryApi->getOrgDocumentAttachment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitAccountSummaryApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitAccountSummaryApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgDocumentAttachmentId = orgDocumentAttachmentId_example; # String | Organizational document attachment identifier.
my $orgDocumentId = orgDocumentId_example; # String | Organizational document 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 { 
    my $result = $api_instance->getOrgDocumentAttachment(baseSiteId => $baseSiteId, orgDocumentAttachmentId => $orgDocumentAttachmentId, orgDocumentId => $orgDocumentId, orgUnitId => $orgUnitId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitAccountSummaryApi->getOrgDocumentAttachment: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitAccountSummaryApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orgDocumentAttachmentId = orgDocumentAttachmentId_example # String | Organizational document attachment identifier.
orgDocumentId = orgDocumentId_example # String | Organizational document 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: 
    # Retrieves the attachment of a document.
    api_response = api_instance.get_org_document_attachment(baseSiteId, orgDocumentAttachmentId, orgDocumentId, orgUnitId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitAccountSummaryApi->getOrgDocumentAttachment: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orgDocumentAttachmentId*
String
Organizational document attachment identifier.
Required
orgDocumentId*
String
Organizational document 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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgDocuments

Retrieves the financial organizational documents.

Retrieves the list of financial documents for the organizational unit.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgDocuments

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgDocuments?endRange=&fields=&filterByKey=&filterByValue=&page=&pageSize=&sort=&startRange=&status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitAccountSummaryApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitAccountSummaryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitAccountSummaryApi apiInstance = new OrganizationalUnitAccountSummaryApi();
        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 endRange = endRange_example; // String | Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
        String 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 filterByKey = filterByKey_example; // String | Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange.
        String filterByValue = filterByValue_example; // String | Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.)
        Integer page = 56; // Integer | Current result page. Default value is 0.
        Integer pageSize = 56; // Integer | Number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results. Default value is: byCreatedAtDateAsc.
        String startRange = startRange_example; // String | Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
        String status = status_example; // String | Organizational document status. Possible values are: open, closed, and all.
        try {
            OrgDocumentList result = apiInstance.getOrgDocuments(baseSiteId, orgUnitId, userId, endRange, fields, filterByKey, filterByValue, page, pageSize, sort, startRange, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitAccountSummaryApi#getOrgDocuments");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitAccountSummaryApi;

public class OrganizationalUnitAccountSummaryApiExample {

    public static void main(String[] args) {
        OrganizationalUnitAccountSummaryApi apiInstance = new OrganizationalUnitAccountSummaryApi();
        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 endRange = endRange_example; // String | Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
        String 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 filterByKey = filterByKey_example; // String | Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange.
        String filterByValue = filterByValue_example; // String | Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.)
        Integer page = 56; // Integer | Current result page. Default value is 0.
        Integer pageSize = 56; // Integer | Number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results. Default value is: byCreatedAtDateAsc.
        String startRange = startRange_example; // String | Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
        String status = status_example; // String | Organizational document status. Possible values are: open, closed, and all.
        try {
            OrgDocumentList result = apiInstance.getOrgDocuments(baseSiteId, orgUnitId, userId, endRange, fields, filterByKey, filterByValue, page, pageSize, sort, startRange, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitAccountSummaryApi#getOrgDocuments");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: 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 *endRange = endRange_example; // Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).) (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 *filterByKey = filterByKey_example; // Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange. (optional) (default to orgDocumentId)
String *filterByValue = filterByValue_example; // Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.) (optional)
Integer *page = 56; // Current result page. Default value is 0. (optional) (default to 0)
Integer *pageSize = 56; // Number of results returned per page. (optional) (default to 10)
String *sort = sort_example; // Sorting method applied to the return results. Default value is: byCreatedAtDateAsc. (optional) (default to byCreatedAtDateAsc)
String *startRange = startRange_example; // Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).) (optional)
String *status = status_example; // Organizational document status. Possible values are: open, closed, and all. (optional) (default to open)

OrganizationalUnitAccountSummaryApi *apiInstance = [[OrganizationalUnitAccountSummaryApi alloc] init];

// Retrieves the financial organizational documents.
[apiInstance getOrgDocumentsWith:baseSiteId
    orgUnitId:orgUnitId
    userId:userId
    endRange:endRange
    fields:fields
    filterByKey:filterByKey
    filterByValue:filterByValue
    page:page
    pageSize:pageSize
    sort:sort
    startRange:startRange
    status:status
              completionHandler: ^(OrgDocumentList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitAccountSummaryApi()
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 = { 
  'endRange': endRange_example, // {{String}} Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'filterByKey': filterByKey_example, // {{String}} Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange.
  'filterByValue': filterByValue_example, // {{String}} Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.)
  'page': 56, // {{Integer}} Current result page. Default value is 0.
  'pageSize': 56, // {{Integer}} Number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results. Default value is: byCreatedAtDateAsc.
  'startRange': startRange_example, // {{String}} Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
  'status': status_example // {{String}} Organizational document status. Possible values are: open, closed, and all.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgDocuments(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 getOrgDocumentsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitAccountSummaryApi();
            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 endRange = endRange_example;  // String | Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).) (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 filterByKey = filterByKey_example;  // String | Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange. (optional)  (default to orgDocumentId)
            var filterByValue = filterByValue_example;  // String | Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.) (optional) 
            var page = 56;  // Integer | Current result page. Default value is 0. (optional)  (default to 0)
            var pageSize = 56;  // Integer | Number of results returned per page. (optional)  (default to 10)
            var sort = sort_example;  // String | Sorting method applied to the return results. Default value is: byCreatedAtDateAsc. (optional)  (default to byCreatedAtDateAsc)
            var startRange = startRange_example;  // String | Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).) (optional) 
            var status = status_example;  // String | Organizational document status. Possible values are: open, closed, and all. (optional)  (default to open)

            try
            {
                // Retrieves the financial organizational documents.
                OrgDocumentList result = apiInstance.getOrgDocuments(baseSiteId, orgUnitId, userId, endRange, fields, filterByKey, filterByValue, page, pageSize, sort, startRange, status);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitAccountSummaryApi.getOrgDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitAccountSummaryApi();
$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
$endRange = endRange_example; // String | Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$filterByKey = filterByKey_example; // String | Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange.
$filterByValue = filterByValue_example; // String | Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.)
$page = 56; // Integer | Current result page. Default value is 0.
$pageSize = 56; // Integer | Number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results. Default value is: byCreatedAtDateAsc.
$startRange = startRange_example; // String | Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
$status = status_example; // String | Organizational document status. Possible values are: open, closed, and all.

try {
    $result = $api_instance->getOrgDocuments($baseSiteId, $orgUnitId, $userId, $endRange, $fields, $filterByKey, $filterByValue, $page, $pageSize, $sort, $startRange, $status);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitAccountSummaryApi->getOrgDocuments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitAccountSummaryApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitAccountSummaryApi->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 $endRange = endRange_example; # String | Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
my $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 $filterByKey = filterByKey_example; # String | Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange.
my $filterByValue = filterByValue_example; # String | Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.)
my $page = 56; # Integer | Current result page. Default value is 0.
my $pageSize = 56; # Integer | Number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results. Default value is: byCreatedAtDateAsc.
my $startRange = startRange_example; # String | Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
my $status = status_example; # String | Organizational document status. Possible values are: open, closed, and all.

eval { 
    my $result = $api_instance->getOrgDocuments(baseSiteId => $baseSiteId, orgUnitId => $orgUnitId, userId => $userId, endRange => $endRange, fields => $fields, filterByKey => $filterByKey, filterByValue => $filterByValue, page => $page, pageSize => $pageSize, sort => $sort, startRange => $startRange, status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitAccountSummaryApi->getOrgDocuments: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitAccountSummaryApi()
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
endRange = endRange_example # String | Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).) (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)
filterByKey = filterByKey_example # String | Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange. (optional) (default to orgDocumentId)
filterByValue = filterByValue_example # String | Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.) (optional)
page = 56 # Integer | Current result page. Default value is 0. (optional) (default to 0)
pageSize = 56 # Integer | Number of results returned per page. (optional) (default to 10)
sort = sort_example # String | Sorting method applied to the return results. Default value is: byCreatedAtDateAsc. (optional) (default to byCreatedAtDateAsc)
startRange = startRange_example # String | Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).) (optional)
status = status_example # String | Organizational document status. Possible values are: open, closed, and all. (optional) (default to open)

try: 
    # Retrieves the financial organizational documents.
    api_response = api_instance.get_org_documents(baseSiteId, orgUnitId, userId, endRange=endRange, fields=fields, filterByKey=filterByKey, filterByValue=filterByValue, page=page, pageSize=pageSize, sort=sort, startRange=startRange, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitAccountSummaryApi->getOrgDocuments: %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
endRange
String
Upper limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
filterByKey
String
Filter to apply on the retrieved list of organizational documents. Possible values are: orgDocumentId, orgDocumentIdRange, orgDocumentType, createdAtDateRange, dueAtDateRange, amountRange, and openAmountRange.
filterByValue
String
Value for a specified filter (for single value filterByKeys: orgDocumentId and orgDocumentType.)
page
Integer (int32)
Current result page. Default value is 0.
pageSize
Integer (int32)
Number of results returned per page.
sort
String
Sorting method applied to the return results. Default value is: byCreatedAtDateAsc.
startRange
String
Lower limit for a specified range filter (for range filterByKeys: orgDocumentIdRange, createdAtDateRange (format: MM/dd/yyyy), dueAtDateRange (format: MM/dd/yyyy), amountRange (number) and openAmountRange (number).)
status
String
Organizational document status. Possible values are: open, closed, and all.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrganizationalUnitCustomerManagement

createOrgCustomer

Creates an organizational customer profile.


/{baseSiteId}/users/{userId}/orgCustomers

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerCreation body = ; // OrgCustomerCreation | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.createOrgCustomer(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#createOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerCreation body = ; // OrgCustomerCreation | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.createOrgCustomer(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#createOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgCustomerCreation *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Creates an organizational customer profile.
[apiInstance createOrgCustomerWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var body = ; // {{OrgCustomerCreation}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrgCustomer(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var body = new OrgCustomerCreation(); // OrgCustomerCreation | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Creates an organizational customer profile.
                User result = apiInstance.createOrgCustomer(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.createOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$body = ; // OrgCustomerCreation | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrgCustomer($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->createOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $body = WWW::SwaggerClient::Object::OrgCustomerCreation->new(); # OrgCustomerCreation | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrgCustomer(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->createOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
body =  # OrgCustomerCreation | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates an organizational customer profile.
    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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doAddApproverToOrgCustomer

Adds an approver for an organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String approverId = approverId_example; // String | Approver GUID.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Organizational customer GUID.
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];

// Adds an approver for an organizational 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.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Organizational customer GUID.
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.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Organizational customer GUID.
            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 an approver for an organizational 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.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Organizational customer GUID.
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.
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 an approver for an organizational 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.
Required
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Organizational customer GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doAddOrgUserGroupToOrgCustomer

Creates an Organizational organizational user group objfor an organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userGroupId = userGroupId_example; // String | Organizational user group GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 | Organizational customer GUID.
        String userGroupId = userGroupId_example; // String | Organizational user group GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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; // Organizational customer GUID.
String *userGroupId = userGroupId_example; // Organizational user group GUID.
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];

// Creates an Organizational organizational user group  objfor an organizational 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}} Organizational customer GUID.
var userGroupId = userGroupId_example; // {{String}} Organizational user group GUID.
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 | Organizational customer GUID.
            var userGroupId = userGroupId_example;  // String | Organizational user group GUID.
            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 Organizational organizational user group  objfor an organizational 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 | Organizational customer GUID.
$userGroupId = userGroupId_example; // String | Organizational user group GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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 | Organizational customer GUID.
my $userGroupId = userGroupId_example; # String | Organizational user group GUID.
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 | Organizational customer GUID.
userGroupId = userGroupId_example # String | Organizational user group GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 Organizational organizational user group  objfor an organizational 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
Organizational customer GUID.
Required
userGroupId*
String
Organizational user group GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doAddPermissionToOrgCustomer

Creates a permission for an organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String permissionId = permissionId_example; // String | Permission GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 | Organizational customer GUID.
        String permissionId = permissionId_example; // String | Permission GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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; // Organizational customer GUID.
String *permissionId = permissionId_example; // Permission GUID.
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];

// Creates a permission for an organizational 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}} Organizational customer GUID.
var permissionId = permissionId_example; // {{String}} Permission GUID.
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 | Organizational customer GUID.
            var permissionId = permissionId_example;  // String | Permission GUID.
            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 permission for an organizational 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 | Organizational customer GUID.
$permissionId = permissionId_example; // String | Permission GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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 | Organizational customer GUID.
my $permissionId = permissionId_example; # String | Permission GUID.
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 | Organizational customer GUID.
permissionId = permissionId_example # String | Permission GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 permission for an organizational 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
Organizational customer GUID.
Required
permissionId*
String
Permission GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgCustomer

Retrieves the profile of the organizational unit customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 | Organizational customer GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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; // Organizational customer GUID.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Retrieves the profile of the organizational unit customer.
[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}} Organizational customer GUID.
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 | Organizational customer GUID.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Retrieves the profile of the organizational unit customer.
                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 | Organizational customer GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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 | Organizational customer GUID.
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 | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Retrieves the profile of the organizational unit customer.
    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
Organizational customer GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgCustomerApprovers

Retrieves the approvers.

Retrieves a list of approvers for the customer in the organizational unit.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Organizational customer GUID.
        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 | Current result page. Default value is 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 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 | Organizational customer GUID.
        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 | Current result page. Default value is 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 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; // Organizational customer GUID.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // Current result page. Default value is 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; // 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];

// Retrieves the approvers.
[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}} Organizational customer GUID.
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}} Current result page. Default value is 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 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 | Organizational customer GUID.
            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 | Current result page. Default value is 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 | 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
            {
                // Retrieves the approvers.
                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 | Organizational customer GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | Current result page. Default value is 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 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 | Organizational customer GUID.
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 | Current result page. Default value is 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 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 | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | Current result page. Default value is 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 | 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: 
    # Retrieves the approvers.
    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
Organizational customer GUID.
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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgCustomerOrgUserGroups

Retrieves the organizational user groups.

Retrieves the organizational user groups in the organizational unit.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Organizational customer GUID.
        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 | Current result page. Default value is 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 results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return 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 | Organizational customer GUID.
        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 | Current result page. Default value is 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 results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return 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; // Organizational customer GUID.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // Current result page. Default value is 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; // Number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional) (default to name)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Retrieves the organizational user groups.
[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}} Organizational customer GUID.
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}} Current result page. Default value is 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 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.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 | Organizational customer GUID.
            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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional)  (default to name)

            try
            {
                // Retrieves the organizational user groups.
                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 | Organizational customer GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | Current result page. Default value is 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 results returned per page.
$sort = sort_example; // String | Sorting method applied to the return 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 | Organizational customer GUID.
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 | Current result page. Default value is 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 results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return 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 | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional) (default to name)

try: 
    # Retrieves the organizational user groups.
    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
Organizational customer GUID.
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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgCustomerPermissions

Retrieves the permissions of the customer.

Retrieves the permissions of the customer in the organizational unit.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Organizational customer GUID.
        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 | Current result page. Default value is 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 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 | Organizational customer GUID.
        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 | Current result page. Default value is 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 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; // Organizational customer GUID.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // Current result page. Default value is 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; // 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];

// Retrieves the permissions of the 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}} Organizational customer GUID.
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}} Current result page. Default value is 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 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 | Organizational customer GUID.
            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 | Current result page. Default value is 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 | 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
            {
                // Retrieves the permissions of the 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 | Organizational customer GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | Current result page. Default value is 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 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 | Organizational customer GUID.
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 | Current result page. Default value is 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 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 | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | Current result page. Default value is 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 | 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: 
    # Retrieves the permissions of the 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
Organizational customer GUID.
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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the returned results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getOrgCustomers

Retrieves the list of organizational customers.

Retrieves the list of organizational customers. The response may display the results across multiple pages, when applicable.


/{baseSiteId}/users/{userId}/orgCustomers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Current result page. Default value is 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 results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return 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 | Current result page. Default value is 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 results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return 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; // Current result page. Default value is 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; // Number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional) (default to name)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Retrieves the list of organizational customers.
[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}} Current result page. Default value is 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 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.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 | Current result page. Default value is 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 | Number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional)  (default to name)

            try
            {
                // Retrieves the list of organizational customers.
                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 | Current result page. Default value is 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 results returned per page.
$sort = sort_example; // String | Sorting method applied to the return 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 | Current result page. Default value is 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 results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return 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 | Current result page. Default value is 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 | Number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional) (default to name)

try: 
    # Retrieves the list of organizational customers.
    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)
Current result page. Default value is 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 results returned per page.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeApproverFromOrgCustomer

Deletes an approver for an organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String approverId = approverId_example; // String | Approver GUID.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Organizational customer GUID.
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 for an organizational customer.
[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.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Organizational customer GUID.
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.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Organizational customer GUID.
            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 for an organizational customer.
                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.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Organizational customer GUID.
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.
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 for an organizational customer.
    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.
Required
baseSiteId*
String
Base site identifier
Required
orgCustomerId*
String
Organizational customer GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeOrgUserGroupFromOrgCustomer

Deletes an organizational user group for an organizational customer.

Deletes an organizational user group for an organizational customer using the userGroupId.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String userGroupId = userGroupId_example; // String | Organizational user group GUID.
        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 | Organizational customer GUID.
        String userGroupId = userGroupId_example; // String | Organizational user group GUID.
        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; // Organizational customer GUID.
String *userGroupId = userGroupId_example; // Organizational user group GUID.
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 organizational user group for an organizational customer.
[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}} Organizational customer GUID.
var userGroupId = userGroupId_example; // {{String}} Organizational user group GUID.
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 | Organizational customer GUID.
            var userGroupId = userGroupId_example;  // String | Organizational user group GUID.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes an organizational user group for an organizational customer.
                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 | Organizational customer GUID.
$userGroupId = userGroupId_example; // String | Organizational user group GUID.
$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 | Organizational customer GUID.
my $userGroupId = userGroupId_example; # String | Organizational user group GUID.
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 | Organizational customer GUID.
userGroupId = userGroupId_example # String | Organizational user group GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes an organizational user group for an organizational customer.
    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
Organizational customer GUID.
Required
userGroupId*
String
Organizational user group GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removePermissionFromOrgCustomer

Deletes a permission for an organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        String permissionId = permissionId_example; // String | Permission GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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 | Organizational customer GUID.
        String permissionId = permissionId_example; // String | Permission GUID.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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; // Organizational customer GUID.
String *permissionId = permissionId_example; // Permission GUID.
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 for an organizational customer.
[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}} Organizational customer GUID.
var permissionId = permissionId_example; // {{String}} Permission GUID.
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 | Organizational customer GUID.
            var permissionId = permissionId_example;  // String | Permission GUID.
            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 for an organizational customer.
                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 | Organizational customer GUID.
$permissionId = permissionId_example; // String | Permission GUID.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, '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 | Organizational customer GUID.
my $permissionId = permissionId_example; # String | Permission GUID.
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 | Organizational customer GUID.
permissionId = permissionId_example # String | Permission GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, '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 for an organizational customer.
    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
Organizational customer GUID.
Required
permissionId*
String
Permission GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateOrgCustomer

Updates the profile of the organizational unit customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerModification body = ; // OrgCustomerModification | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        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 | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
        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 = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orgCustomerId = orgCustomerId_example; // Organizational customer GUID.
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 the profile of the organizational unit customer.
[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}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orgCustomerId = orgCustomerId_example; // {{String}} Organizational customer GUID.
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 | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orgCustomerId = orgCustomerId_example;  // String | Organizational customer GUID.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates the profile of the organizational unit customer.
                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 | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orgCustomerId = orgCustomerId_example; // String | Organizational customer GUID.
$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 | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orgCustomerId = orgCustomerId_example; # String | Organizational customer GUID.
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 | 
baseSiteId = baseSiteId_example # String | Base site identifier
orgCustomerId = orgCustomerId_example # String | Organizational customer GUID.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the profile of the organizational unit customer.
    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
Organizational customer GUID.
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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


OrganizationalUnitManagement

createOrgUnit

Creates a new organizational unit.

Creates a new organizational unit. For example, the Rustic Organization used the word 'Rustic' to refer to their organizational unit.


/{baseSiteId}/users/{userId}/orgUnits

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        B2BUnit body = ; // B2BUnit | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnit result = apiInstance.createOrgUnit(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#createOrgUnit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        B2BUnit body = ; // B2BUnit | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnit result = apiInstance.createOrgUnit(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#createOrgUnit");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
B2BUnit *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Creates a new organizational unit.
[apiInstance createOrgUnitWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BUnit output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var body = ; // {{B2BUnit}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrgUnit(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrgUnitExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var body = new B2BUnit(); // B2BUnit | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Creates a new organizational unit.
                B2BUnit result = apiInstance.createOrgUnit(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.createOrgUnit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$body = ; // B2BUnit | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrgUnit($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->createOrgUnit: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $body = WWW::SwaggerClient::Object::B2BUnit->new(); # B2BUnit | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrgUnit(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->createOrgUnit: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
body =  # B2BUnit | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createOrgUnitAddress

Creates an address for the organizational unit.

Creates a new address for the organizational unit.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        Address body = ; // Address | 
        String 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 {
            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 | 
        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 {
            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 = ; // 
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];

// Creates an address for the organizational unit.
[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}} 
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.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 | 
            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
            {
                // Creates an address for the organizational unit.
                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 | 
$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->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 | 
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->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 | 
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: 
    # Creates an address for the organizational unit.
    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 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: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doAddOrgUnitRoleToOrgCustomer

Adds an organizational unit dependent role to a specific organizational customer.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles?roleId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orgCustomerId = orgCustomerId_example; // String | Organizational customer to which the role will be added.
        String orgUnitId = orgUnitId_example; // String | Organizational unit identifier.
        String roleId = roleId_example; // String | Role that is added to the user. Example role: 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 | Organizational customer to which the role will be added.
        String orgUnitId = orgUnitId_example; // String | Organizational unit identifier.
        String roleId = roleId_example; // String | Role that is added to the user. Example role: 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; // Organizational customer to which the role will be added.
String *orgUnitId = orgUnitId_example; // Organizational unit identifier.
String *roleId = roleId_example; // Role that is added to the user. Example role: 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];

// Adds 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}} Organizational customer to which the role will be added.
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit identifier.
var roleId = roleId_example; // {{String}} Role that is added to the user. Example role: 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 | Organizational customer to which the role will be added.
            var orgUnitId = orgUnitId_example;  // String | Organizational unit identifier.
            var roleId = roleId_example;  // String | Role that is added to the user. Example role: b2bapprovergroup.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Adds 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 | Organizational customer to which the role will be added.
$orgUnitId = orgUnitId_example; // String | Organizational unit identifier.
$roleId = roleId_example; // String | Role that is added to the user. Example role: 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 | Organizational customer to which the role will be added.
my $orgUnitId = orgUnitId_example; # String | Organizational unit identifier.
my $roleId = roleId_example; # String | Role that is added to the user. Example role: 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 | Organizational customer to which the role will be added.
orgUnitId = orgUnitId_example # String | Organizational unit identifier.
roleId = roleId_example # String | Role that is added to the user. Example role: b2bapprovergroup.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Adds 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
Organizational customer to which the role will be added.
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
roleId*
String
Role that is added to the user. Example role: b2bapprovergroup.
Required

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doAddRoleToOrgCustomer

Creates a role for an organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/roles

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/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 | Organizational customer to which the role will be added.
        String roleId = roleId_example; // String | Role that is added to the user.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' 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) {
        OrganizationalUnitMa