Commerce Webservices

Address

createAddress

Creates a new address.

Creates a new address.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"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


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


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


replaceCartDeliveryAddress

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="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartAddressesApi;

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

public class CartAddressesApiExample {

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

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

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

        CartAddressesApi apiInstance = new CartAddressesApi();
        String addressId = addressId_example; // String | Address identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#replaceCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartAddressesApi;

public class CartAddressesApiExample {

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

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

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

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

var api = new CommerceWebservices.CartAddressesApi()
var addressId = addressId_example; // {{String}} Address identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier.
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CartAddressesApi();
            var addressId = addressId_example;  // String | Address identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
            {
                // Updates the delivery address for a cart.
                apiInstance.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartAddressesApi.replaceCartDeliveryAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartAddressesApi();
$addressId = addressId_example; // String | Address identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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->replaceCartDeliveryAddress($addressId, $baseSiteId, $cartId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartAddressesApi->replaceCartDeliveryAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartAddressesApi;

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

my $api_instance = WWW::SwaggerClient::CartAddressesApi->new();
my $addressId = addressId_example; # String | Address identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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->replaceCartDeliveryAddress(addressId => $addressId, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartAddressesApi->replaceCartDeliveryAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.CartAddressesApi()
addressId = addressId_example # String | Address identifier
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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: 
    # Updates the delivery address for a cart.
    api_instance.replace_cart_delivery_address(addressId, baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling CartAddressesApi->replaceCartDeliveryAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier.
Required
cartId*
String
Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
Address identifier
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

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


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), and also considers region as a distinguishing factor for merging cart entries or adding a new cart entries.


/{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 | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        String oldCartId = oldCartId_example; // String | Anonymous cart GUID.
        String toMergeCartGuid = toMergeCartGuid_example; // String | The GUID of the user's cart that will be merged with the anonymous cart.
        try {
            Cart result = apiInstance.createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        String oldCartId = oldCartId_example; // String | Anonymous cart GUID.
        String toMergeCartGuid = toMergeCartGuid_example; // String | The GUID of the user's cart that will be merged with the anonymous cart.
        try {
            Cart result = apiInstance.createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // Identifier of the Customer
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)
String *oldCartId = oldCartId_example; // Anonymous cart GUID. (optional)
String *toMergeCartGuid = toMergeCartGuid_example; // The GUID of the user's cart that will be merged with the anonymous cart. (optional)

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

// Creates or restore a cart for a user.
[apiInstance createCartWith:baseSiteId
    userId:userId
    fields:fields
    oldCartId:oldCartId
    toMergeCartGuid:toMergeCartGuid
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} Identifier of the Customer
var opts = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
  'oldCartId': oldCartId_example, // {{String}} Anonymous cart GUID.
  'toMergeCartGuid': toMergeCartGuid_example // {{String}} The GUID of the user's cart that will be merged with the anonymous cart.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCart(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | Identifier of the Customer
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 
            var oldCartId = oldCartId_example;  // String | Anonymous cart GUID. (optional) 
            var toMergeCartGuid = toMergeCartGuid_example;  // String | The GUID of the user's cart that will be merged with the anonymous cart. (optional) 

            try
            {
                // Creates or restore a cart for a user.
                Cart result = apiInstance.createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.createCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | Identifier of the Customer
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
$oldCartId = oldCartId_example; // String | Anonymous cart GUID.
$toMergeCartGuid = toMergeCartGuid_example; // String | The GUID of the user's cart that will be merged with the anonymous cart.

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

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | Identifier of the Customer
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.
my $oldCartId = oldCartId_example; # String | Anonymous cart GUID.
my $toMergeCartGuid = toMergeCartGuid_example; # String | The GUID of the user's cart that will be merged with the anonymous cart.

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

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | Identifier of the Customer
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)
oldCartId = oldCartId_example # String | Anonymous cart GUID. (optional)
toMergeCartGuid = toMergeCartGuid_example # String | The GUID of the user's cart that will be merged with the anonymous cart. (optional)

try: 
    # Creates or restore a cart for a user.
    api_response = api_instance.create_cart(baseSiteId, userId, fields=fields, oldCartId=oldCartId, toMergeCartGuid=toMergeCartGuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->createCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
Identifier of the Customer
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body.
oldCartId
String
Anonymous cart GUID.
toMergeCartGuid
String
The GUID of the user's cart that will be merged with the anonymous cart.

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createCartEntry

Adds a product to the cart.

Applies prices to the Cart entries based on the location of the customer when the attribute region is provided and stores other details like formerSupplier of the customer.


/{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.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();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Identifier of the Shopping Cart
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Identifier of the Shopping Cart
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#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; // Identifier of the Shopping Cart
String *userId = userId_example; // Identifier of the Customer
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

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

// Adds a product to the cart.
[apiInstance createCartEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Identifier of the Shopping Cart
var userId = userId_example; // {{String}} Identifier of the Customer
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.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 CartsApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Identifier of the Shopping Cart
            var userId = userId_example;  // String | Identifier of the Customer
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Adds a product to the cart.
                CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.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\ApiCartsApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Identifier of the Shopping Cart
$userId = userId_example; // String | Identifier of the Customer
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.

try {
    $result = $api_instance->createCartEntry($body, $baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->createCartEntry: ', $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 $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Identifier of the Shopping Cart
my $userId = userId_example; # String | Identifier of the Customer
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->createCartEntry(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->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.CartsApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Identifier of the Shopping Cart
userId = userId_example # String | Identifier of the Customer
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Adds a product to the cart.
    api_response = api_instance.create_cart_entry(body, baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->createCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Identifier of the Shopping Cart
Required
userId*
String
Identifier of the Customer
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.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCart

Get a cart with a given identifier.

Returns the cart with a given identifier.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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 | Identifier of the Shopping Cart
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        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 | Identifier of the Shopping Cart
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        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; // Identifier of the Shopping Cart
String *userId = userId_example; // Identifier of the Customer
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

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

// Get a cart with a given identifier.
[apiInstance getCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier.
var cartId = cartId_example; // {{String}} Identifier of the Shopping Cart
var userId = userId_example; // {{String}} Identifier of the Customer
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.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 | Identifier of the Shopping Cart
            var userId = userId_example;  // String | Identifier of the Customer
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Get a cart with a given identifier.
                Cart result = apiInstance.getCart(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | Identifier of the Shopping Cart
$userId = userId_example; // String | Identifier of the Customer
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.

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 | Identifier of the Shopping Cart
my $userId = userId_example; # String | Identifier of the Customer
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->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 | Identifier of the Shopping Cart
userId = userId_example # String | Identifier of the Customer
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Get a cart with a given identifier.
    api_response = api_instance.get_cart(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier.
Required
cartId*
String
Identifier of the Shopping Cart
Required
userId*
String
Identifier of the Customer
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


getCartEntry

Get the details of the cart entries.

Returns the details of the cart entries.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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.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.
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntry result = apiInstance.getCartEntry(baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCartEntry");
            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.
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntry result = apiInstance.getCartEntry(baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#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; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

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

// Get the details of the cart entries.
[apiInstance getCartEntryWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    fields:fields
              completionHandler: ^(OrderEntry output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.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 entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartEntry(baseSiteId, cartId, entryNumber, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new 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 entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get the details of the cart entries.
                OrderEntry result = apiInstance.getCartEntry(baseSiteId, cartId, entryNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.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\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.
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartEntry($baseSiteId, $cartId, $entryNumber, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getCartEntry: ', $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 $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->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.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.
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get the details of the cart entries.
    api_response = api_instance.get_cart_entry(baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->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)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCarts

Get all customer carts.

Lists all customer carts.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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 | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCarts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCarts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)
Integer *pageSize = 56; // Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
Boolean *savedCartsOnly = true; // Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
String *sort = sort_example; // Optional sort criterion in case of savedCartsOnly == true. No default value. (optional)

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

// Get all customer carts.
[apiInstance getCartsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    savedCartsOnly:savedCartsOnly
    sort:sort
              completionHandler: ^(CartList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
  'pageSize': 56, // {{Integer}} Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
  'savedCartsOnly': true, // {{Boolean}} Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
  'sort': sort_example // {{String}} Optional sort criterion in case of savedCartsOnly == true. No default value.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCarts(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 
            var pageSize = 56;  // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional)  (default to 20)
            var savedCartsOnly = true;  // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional)  (default to false)
            var sort = sort_example;  // String | Optional sort criterion in case of savedCartsOnly == true. No default value. (optional) 

            try
            {
                // Get all customer carts.
                CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getCarts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
$pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
$savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
$sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.

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

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

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.
my $pageSize = 56; # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
my $savedCartsOnly = true; # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
my $sort = sort_example; # String | Optional sort criterion in case of savedCartsOnly == true. No default value.

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

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

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)
pageSize = 56 # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
savedCartsOnly = true # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
sort = sort_example # String | Optional sort criterion in case of savedCartsOnly == true. No default value. (optional)

try: 
    # Get all customer carts.
    api_response = api_instance.get_carts(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, savedCartsOnly=savedCartsOnly, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getCarts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
fields
String
Response configuration. This is the list of fields that should be returned in the response body.
pageSize
Integer (int32)
Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
savedCartsOnly
Boolean
Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
sort
String
Optional sort criterion in case of savedCartsOnly == true. No default value.

Responses

Status: 200 - OK

Status: 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


removeCartEntry

Deletes cart entry.

Deletes 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.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 | The ID of the user's cart that will be cloned.
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | Identifier of the Customer
        try {
            apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#removeCartEntry");
            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 | The ID of the user's cart that will be cloned.
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | Identifier of the Customer
        try {
            apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#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; // The ID of the user's cart that will be cloned.
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // Identifier of the Customer

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

// Deletes cart entry.
[apiInstance removeCartEntryWith:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier.
var cartId = cartId_example; // {{String}} The ID of the user's cart that will be cloned.
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} Identifier of the Customer

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 CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var cartId = cartId_example;  // String | The ID of the user's cart that will be cloned.
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | Identifier of the Customer

            try
            {
                // Deletes cart entry.
                apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.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\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | The ID of the user's cart that will be cloned.
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | Identifier of the Customer

try {
    $api_instance->removeCartEntry($baseSiteId, $cartId, $entryNumber, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->removeCartEntry: ', $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 | The ID of the user's cart that will be cloned.
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | Identifier of the Customer

eval { 
    $api_instance->removeCartEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartsApi->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.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | The ID of the user's cart that will be cloned.
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | Identifier of the Customer

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

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier.
Required
cartId*
String
The ID of the user's cart that will be cloned.
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
Identifier of the Customer
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartEntry

Set quantity and store details of a cart entry.

Updates the quantity of a single cart entry and the details of the store where the cart entry will be picked up. Attributes not provided in request will be defined again (set to null or default)


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"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.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();
        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 | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#replaceCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        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 | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#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; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

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

// Set quantity and store details of a cart entry.
[apiInstance replaceCartEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
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}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
};
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 CartsApi();
            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 | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Set quantity and store details of a cart entry.
                CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.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\ApiCartsApi();
$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 | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.

try {
    $result = $api_instance->replaceCartEntry($body, $baseSiteId, $cartId, $entryNumber, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->replaceCartEntry: ', $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 $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 | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.

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 CartsApi->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.CartsApi()
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 | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Set quantity and store details of a cart entry.
    api_response = api_instance.replace_cart_entry(body, baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->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)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user.
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body.

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


updateCartEntry

Update quantity and store details of a cart entry.

Updates the quantity of a single cart entry and the details of the store where the cart entry will be picked up, and also updates the other details like region,process type, formerSupplier of the customer.


/{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.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();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | The ID of the user's cart that will be updated
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModification result = apiInstance.updateCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#updateCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String cartId = cartId_example; // String | The ID of the user's cart that will be updated
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModification result = apiInstance.updateCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#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; // The ID of the user's cart that will be updated
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // Identifier of the Customer
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

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

// Update quantity and store details of a cart entry.
[apiInstance updateCartEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.CartsApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier.
var cartId = cartId_example; // {{String}} The ID of the user's cart that will be updated
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} Identifier of the Customer
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.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 CartsApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var cartId = cartId_example;  // String | The ID of the user's cart that will be updated
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | Identifier of the Customer
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Update quantity and store details of a cart entry.
                CartModification result = apiInstance.updateCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.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\ApiCartsApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$cartId = cartId_example; // String | The ID of the user's cart that will be updated
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | Identifier of the Customer
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.

try {
    $result = $api_instance->updateCartEntry($body, $baseSiteId, $cartId, $entryNumber, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->updateCartEntry: ', $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 $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $cartId = cartId_example; # String | The ID of the user's cart that will be updated
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | Identifier of the Customer
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->updateCartEntry(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->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.CartsApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier.
cartId = cartId_example # String | The ID of the user's cart that will be updated
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | Identifier of the Customer
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Update quantity and store details of a cart entry.
    api_response = api_instance.update_cart_entry(body, baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->updateCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier.
Required
cartId*
String
The ID of the user's cart that will be updated
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
Identifier of the Customer
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.

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


Components

getComponentById

Retrieves the component data.

Retrieves the CMS component data.


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

Usage and SDK Samples

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

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

public class ComponentsApiExample {

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

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

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

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

public class ComponentsApiExample {

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

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

// Retrieves the component data.
[apiInstance getComponentByIdWith:baseSiteId
    componentId:componentId
    catalogCode:catalogCode
    categoryCode:categoryCode
    fields:fields
    productCode:productCode
              completionHandler: ^(Component output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

            var apiInstance = new ComponentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var componentId = componentId_example;  // String | Component identifier
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. (optional) 
            var productCode = productCode_example;  // String | Product code (optional) 

            try
            {
                // Retrieves the component data.
                Component result = apiInstance.getComponentById(baseSiteId, componentId, catalogCode, categoryCode, fields, productCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.getComponentById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiComponentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$componentId = componentId_example; // String | Component identifier
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
$productCode = productCode_example; // String | Product code

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

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

my $api_instance = WWW::SwaggerClient::ComponentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $componentId = componentId_example; # String | Component identifier
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
my $productCode = productCode_example; # String | Product code

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

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

# create an instance of the API class
api_instance = swagger_client.ComponentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
componentId = componentId_example # String | Component identifier
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. (optional)
productCode = productCode_example # String | Product code (optional)

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

Parameters

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

Responses

Status: 200 - ComponentWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getComponentByIdAndUser

Retrieves the component data.

Retrieves the CMS component data.


/{baseSiteId}/users/{userId}/cms/components/{componentId}

Usage and SDK Samples

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

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

public class ComponentsApiExample {

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

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

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

        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String componentId = componentId_example; // String | Component identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category 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.
        String productCode = productCode_example; // String | Product code
        try {
            Component result = apiInstance.getComponentByIdAndUser(baseSiteId, componentId, userId, catalogCode, categoryCode, fields, productCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentByIdAndUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String componentId = componentId_example; // String | Component identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category 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.
        String productCode = productCode_example; // String | Product code
        try {
            Component result = apiInstance.getComponentByIdAndUser(baseSiteId, componentId, userId, catalogCode, categoryCode, fields, productCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentByIdAndUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *componentId = componentId_example; // Component identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (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)
String *productCode = productCode_example; // Product code (optional)

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

// Retrieves the component data.
[apiInstance getComponentByIdAndUserWith:baseSiteId
    componentId:componentId
    userId:userId
    catalogCode:catalogCode
    categoryCode:categoryCode
    fields:fields
    productCode:productCode
              completionHandler: ^(Component output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ComponentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var componentId = componentId_example; // {{String}} Component identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'catalogCode': catalogCode_example, // {{String}} Catalog code
  'categoryCode': categoryCode_example, // {{String}} Category 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.
  'productCode': productCode_example // {{String}} Product code
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getComponentByIdAndUser(baseSiteId, componentId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ComponentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var componentId = componentId_example;  // String | Component identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (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) 
            var productCode = productCode_example;  // String | Product code (optional) 

            try
            {
                // Retrieves the component data.
                Component result = apiInstance.getComponentByIdAndUser(baseSiteId, componentId, userId, catalogCode, categoryCode, fields, productCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.getComponentByIdAndUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiComponentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$componentId = componentId_example; // String | Component identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category 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.
$productCode = productCode_example; // String | Product code

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

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

my $api_instance = WWW::SwaggerClient::ComponentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $componentId = componentId_example; # String | Component identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category 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.
my $productCode = productCode_example; # String | Product code

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

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

# create an instance of the API class
api_instance = swagger_client.ComponentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
componentId = componentId_example # String | Component identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (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)
productCode = productCode_example # String | Product code (optional)

try: 
    # Retrieves the component data.
    api_response = api_instance.get_component_by_id_and_user(baseSiteId, componentId, userId, catalogCode=catalogCode, categoryCode=categoryCode, fields=fields, productCode=productCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComponentsApi->getComponentByIdAndUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
componentId*
String
Component 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
catalogCode
String
Catalog code
categoryCode
String
Category code
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
productCode
String
Product code

Responses

Status: 200 - ComponentWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getComponentsByIds

Retrieves the component data.

Retrieves the CMS components using the specified identifiers. If you don't provide any component identifiers, all of the components will be retrieved. The components list is filtered by the specified catalog, product, or category restrictions. The result is sorted according to the sort parameter.


/{baseSiteId}/cms/components

Usage and SDK Samples

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

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

public class ComponentsApiExample {

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

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

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

        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        array[String] componentIds = ; // array[String] | List of Component identifiers
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ComponentList result = apiInstance.getComponentsByIds(baseSiteId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentsByIds");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        array[String] componentIds = ; // array[String] | List of Component identifiers
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ComponentList result = apiInstance.getComponentsByIds(baseSiteId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentsByIds");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (optional)
array[String] *componentIds = ; // List of Component identifiers (optional)
Integer *currentPage = 56; // 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)
Integer *pageSize = 56; // Number of results returned per page. Default value: 10. (optional) (default to 10)
String *productCode = productCode_example; // Product code (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Retrieves the component data.
[apiInstance getComponentsByIdsWith:baseSiteId
    catalogCode:catalogCode
    categoryCode:categoryCode
    componentIds:componentIds
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    productCode:productCode
    sort:sort
              completionHandler: ^(ComponentList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ComponentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'catalogCode': catalogCode_example, // {{String}} Catalog code
  'categoryCode': categoryCode_example, // {{String}} Category code
  'componentIds': , // {{array[String]}} List of Component identifiers
  'currentPage': 56, // {{Integer}} 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. Default value: 10.
  'productCode': productCode_example, // {{String}} Product code
  '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.getComponentsByIds(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ComponentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var componentIds = new array[String](); // array[String] | List of Component identifiers (optional) 
            var currentPage = 56;  // Integer | 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) 
            var pageSize = 56;  // Integer | Number of results returned per page. Default value: 10. (optional)  (default to 10)
            var productCode = productCode_example;  // String | Product code (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the component data.
                ComponentList result = apiInstance.getComponentsByIds(baseSiteId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.getComponentsByIds: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiComponentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$componentIds = ; // array[String] | List of Component identifiers
$currentPage = 56; // Integer | 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. Default value: 10.
$productCode = productCode_example; // String | Product code
$sort = sort_example; // String | Sorting method applied to the return results.

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

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

my $api_instance = WWW::SwaggerClient::ComponentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $componentIds = []; # array[String] | List of Component identifiers
my $currentPage = 56; # Integer | 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. Default value: 10.
my $productCode = productCode_example; # String | Product code
my $sort = sort_example; # String | Sorting method applied to the return results.

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

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

# create an instance of the API class
api_instance = swagger_client.ComponentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (optional)
componentIds =  # array[String] | List of Component identifiers (optional)
currentPage = 56 # Integer | 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)
pageSize = 56 # Integer | Number of results returned per page. Default value: 10. (optional) (default to 10)
productCode = productCode_example # String | Product code (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

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

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
catalogCode
String
Catalog code
categoryCode
String
Category code
componentIds
array[String]
List of Component identifiers
currentPage
Integer (int32)
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. Default value: 10.
productCode
String
Product code
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - ComponentIDListWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getComponentsByIdsAndUser

Retrieves the component data.

Retrieves the CMS components using the specified identifiers. If you don't provide any component identifiers, all of the components will be retrieved. The components list is filtered by the specified catalog, product, or category restrictions.The result is sorted according to the sort parameter.


/{baseSiteId}/users/{userId}/cms/components

Usage and SDK Samples

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

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

public class ComponentsApiExample {

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

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

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

        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        array[String] componentIds = ; // array[String] | List of Component identifiers
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ComponentList result = apiInstance.getComponentsByIdsAndUser(baseSiteId, userId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentsByIdsAndUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        array[String] componentIds = ; // array[String] | List of Component identifiers
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ComponentList result = apiInstance.getComponentsByIdsAndUser(baseSiteId, userId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#getComponentsByIdsAndUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (optional)
array[String] *componentIds = ; // List of Component identifiers (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)
Integer *pageSize = 56; // Number of results returned per page. Default value: 10. (optional) (default to 10)
String *productCode = productCode_example; // Product code (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Retrieves the component data.
[apiInstance getComponentsByIdsAndUserWith:baseSiteId
    userId:userId
    catalogCode:catalogCode
    categoryCode:categoryCode
    componentIds:componentIds
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    productCode:productCode
    sort:sort
              completionHandler: ^(ComponentList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ComponentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'catalogCode': catalogCode_example, // {{String}} Catalog code
  'categoryCode': categoryCode_example, // {{String}} Category code
  'componentIds': , // {{array[String]}} List of Component identifiers
  '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. Default value: 10.
  'productCode': productCode_example, // {{String}} Product code
  '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.getComponentsByIdsAndUser(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 getComponentsByIdsAndUserExample
    {
        public void main()
        {

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

            var apiInstance = new ComponentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var componentIds = new array[String](); // array[String] | List of Component identifiers (optional) 
            var currentPage = 56;  // Integer | 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) 
            var pageSize = 56;  // Integer | Number of results returned per page. Default value: 10. (optional)  (default to 10)
            var productCode = productCode_example;  // String | Product code (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the component data.
                ComponentList result = apiInstance.getComponentsByIdsAndUser(baseSiteId, userId, catalogCode, categoryCode, componentIds, currentPage, fields, pageSize, productCode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.getComponentsByIdsAndUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiComponentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$componentIds = ; // array[String] | List of Component identifiers
$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. Default value: 10.
$productCode = productCode_example; // String | Product code
$sort = sort_example; // String | Sorting method applied to the return results.

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

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

my $api_instance = WWW::SwaggerClient::ComponentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $componentIds = []; # array[String] | List of Component identifiers
my $currentPage = 56; # Integer | 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. Default value: 10.
my $productCode = productCode_example; # String | Product code
my $sort = sort_example; # String | Sorting method applied to the return results.

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

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

# create an instance of the API class
api_instance = swagger_client.ComponentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (optional)
componentIds =  # array[String] | List of Component identifiers (optional)
currentPage = 56 # Integer | 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)
pageSize = 56 # Integer | Number of results returned per page. Default value: 10. (optional) (default to 10)
productCode = productCode_example # String | Product code (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves the component data.
    api_response = api_instance.get_components_by_ids_and_user(baseSiteId, userId, catalogCode=catalogCode, categoryCode=categoryCode, componentIds=componentIds, currentPage=currentPage, fields=fields, pageSize=pageSize, productCode=productCode, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComponentsApi->getComponentsByIdsAndUser: %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
catalogCode
String
Catalog code
categoryCode
String
Category code
componentIds
array[String]
List of Component identifiers
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. Default value: 10.
productCode
String
Product code
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - ComponentIDListWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


searchComponentsByIds

Retrieves the component data.


/{baseSiteId}/cms/components

Usage and SDK Samples

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

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

public class ComponentsApiExample {

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

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

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

        ComponentsApi apiInstance = new ComponentsApi();
        ComponentIDList body = ; // ComponentIDList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ComponentList result = apiInstance.searchComponentsByIds(body, baseSiteId, catalogCode, categoryCode, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#searchComponentsByIds");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentsApi;

public class ComponentsApiExample {

    public static void main(String[] args) {
        ComponentsApi apiInstance = new ComponentsApi();
        ComponentIDList body = ; // ComponentIDList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalogCode = catalogCode_example; // String | Catalog code
        String categoryCode = categoryCode_example; // String | Category code
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String productCode = productCode_example; // String | Product code
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            ComponentList result = apiInstance.searchComponentsByIds(body, baseSiteId, catalogCode, categoryCode, currentPage, fields, pageSize, productCode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentsApi#searchComponentsByIds");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ComponentIDList *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *catalogCode = catalogCode_example; // Catalog code (optional)
String *categoryCode = categoryCode_example; // Category code (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)
Integer *pageSize = 56; // Number of results returned per page. Default value: 10. (optional) (default to 10)
String *productCode = productCode_example; // Product code (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Retrieves the component data.
[apiInstance searchComponentsByIdsWith:body
    baseSiteId:baseSiteId
    catalogCode:catalogCode
    categoryCode:categoryCode
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    productCode:productCode
    sort:sort
              completionHandler: ^(ComponentList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ComponentsApi()
var body = ; // {{ComponentIDList}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'catalogCode': catalogCode_example // {{String}} Catalog code
  'categoryCode': categoryCode_example // {{String}} Category code
  'currentPage': 56 // {{Integer}} 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. Default value: 10.
  'productCode': productCode_example // {{String}} Product code
  '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.searchComponentsByIds(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ComponentsApi();
            var body = new ComponentIDList(); // ComponentIDList | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogCode = catalogCode_example;  // String | Catalog code (optional) 
            var categoryCode = categoryCode_example;  // String | Category code (optional) 
            var currentPage = 56;  // Integer | 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) 
            var pageSize = 56;  // Integer | Number of results returned per page. Default value: 10. (optional)  (default to 10)
            var productCode = productCode_example;  // String | Product code (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the component data.
                ComponentList result = apiInstance.searchComponentsByIds(body, baseSiteId, catalogCode, categoryCode, currentPage, fields, pageSize, productCode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentsApi.searchComponentsByIds: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiComponentsApi();
$body = ; // ComponentIDList | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogCode = catalogCode_example; // String | Catalog code
$categoryCode = categoryCode_example; // String | Category code
$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. Default value: 10.
$productCode = productCode_example; // String | Product code
$sort = sort_example; // String | Sorting method applied to the return results.

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

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

my $api_instance = WWW::SwaggerClient::ComponentsApi->new();
my $body = WWW::SwaggerClient::Object::ComponentIDList->new(); # ComponentIDList | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogCode = catalogCode_example; # String | Catalog code
my $categoryCode = categoryCode_example; # String | Category code
my $currentPage = 56; # Integer | 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. Default value: 10.
my $productCode = productCode_example; # String | Product code
my $sort = sort_example; # String | Sorting method applied to the return results.

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

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

# create an instance of the API class
api_instance = swagger_client.ComponentsApi()
body =  # ComponentIDList | 
baseSiteId = baseSiteId_example # String | Base site identifier
catalogCode = catalogCode_example # String | Catalog code (optional)
categoryCode = categoryCode_example # String | Category code (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)
pageSize = 56 # Integer | Number of results returned per page. Default value: 10. (optional) (default to 10)
productCode = productCode_example # String | Product code (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

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

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *
Query parameters
Name Description
catalogCode
String
Catalog code
categoryCode
String
Category code
currentPage
Integer (int32)
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. Default value: 10.
productCode
String
Product code
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - ComponentIDListWsDTO

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

exportProducts

Get a list of product exports.

Used for product export. Depending on the timestamp parameter, it can return all products or only products modified after the given time.


/{baseSiteId}/export/products

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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 | The catalog to retrieve products from. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | The current result page requested.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        try {
            ProductList result = apiInstance.exportProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportApi#exportProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportApi;

public class ExportApiExample {

    public static void main(String[] args) {
        ExportApi apiInstance = new ExportApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | The current result page requested.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        try {
            ProductList result = apiInstance.exportProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportApi#exportProducts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *catalog = catalog_example; // The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *timestamp = timestamp_example; // When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional)
String *version = version_example; // The catalog version. The catalog version must be provided along with the catalog. (optional)

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

// Get a list of product exports.
[apiInstance exportProductsWith:baseSiteId
    catalog:catalog
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    timestamp:timestamp
    version:version
              completionHandler: ^(ProductList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ExportApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'catalog': catalog_example, // {{String}} The catalog to retrieve products from. The catalog must be provided along with the version.
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'timestamp': timestamp_example, // {{String}} When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
  'version': version_example // {{String}} The catalog version. The catalog version must be provided along with the catalog.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.exportProducts(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ExportApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalog = catalog_example;  // String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional) 
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var timestamp = timestamp_example;  // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional) 
            var version = version_example;  // String | The catalog version. The catalog version must be provided along with the catalog. (optional) 

            try
            {
                // Get a list of product exports.
                ProductList result = apiInstance.exportProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportApi.exportProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiExportApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
$pageSize = 56; // Integer | The number of results returned per page.
$timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
$version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.

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

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

my $api_instance = WWW::SwaggerClient::ExportApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalog = catalog_example; # String | The catalog to retrieve products from. The catalog must be provided along with the version.
my $currentPage = 56; # Integer | The current result page requested.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.
my $pageSize = 56; # Integer | The number of results returned per page.
my $timestamp = timestamp_example; # String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
my $version = version_example; # String | The catalog version. The catalog version must be provided along with the catalog.

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

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

# create an instance of the API class
api_instance = swagger_client.ExportApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalog = catalog_example # String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
timestamp = timestamp_example # String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional)
version = version_example # String | The catalog version. The catalog version must be provided along with the catalog. (optional)

try: 
    # Get a list of product exports.
    api_response = api_instance.export_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->exportProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
catalog
String
The catalog to retrieve products from. The catalog must be provided along with the version.
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body.
pageSize
Integer (int32)
The number of results returned per page.
timestamp
String
When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
version
String
The catalog version. The catalog version must be provided along with the catalog.

Responses

Status: 200 - OK

Status: 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


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


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.


/{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.


/{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


placeOrder

Place a order.

Authorizes the cart and places the order. The response contains the new order data.


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

Usage and SDK Samples

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

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

public class OrdersApiExample {

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

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

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

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

public class OrdersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

try: 
    # Place a order.
    api_response = api_instance.place_order(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->placeOrder: %s\n" % e)

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Pages

getAllPages

Retrieves the page data.


/{baseSiteId}/cms/sitepages

Usage and SDK Samples

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

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

public class PagesApiExample {

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

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

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

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String pageType = pageType_example; // String | Page type.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            CMSPageList result = apiInstance.getAllPages(baseSiteId, currentPage, fields, pageSize, pageType, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getAllPages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | 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. Default value: 10.
        String pageType = pageType_example; // String | Page type.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            CMSPageList result = apiInstance.getAllPages(baseSiteId, currentPage, fields, pageSize, pageType, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getAllPages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *currentPage = 56; // 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)
Integer *pageSize = 56; // Number of results returned per page. Default value: 10. (optional) (default to 10)
String *pageType = pageType_example; // Page type. (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Retrieves the page data.
[apiInstance getAllPagesWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    pageType:pageType
    sort:sort
              completionHandler: ^(CMSPageList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} 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. Default value: 10.
  'pageType': pageType_example, // {{String}} Page type.
  '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.getAllPages(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | 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) 
            var pageSize = 56;  // Integer | Number of results returned per page. Default value: 10. (optional)  (default to 10)
            var pageType = pageType_example;  // String | Page type. (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the page data.
                CMSPageList result = apiInstance.getAllPages(baseSiteId, currentPage, fields, pageSize, pageType, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getAllPages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | 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. Default value: 10.
$pageType = pageType_example; // String | Page type.
$sort = sort_example; // String | Sorting method applied to the return results.

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

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

my $api_instance = WWW::SwaggerClient::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | 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. Default value: 10.
my $pageType = pageType_example; # String | Page type.
my $sort = sort_example; # String | Sorting method applied to the return results.

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

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

# create an instance of the API class
api_instance = swagger_client.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | 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)
pageSize = 56 # Integer | Number of results returned per page. Default value: 10. (optional) (default to 10)
pageType = pageType_example # String | Page type. (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves the page data.
    api_response = api_instance.get_all_pages(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize, pageType=pageType, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getAllPages: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
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. Default value: 10.
pageType
String
Page type.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - CMSPageListWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getAllPagesWithUser

Retrieves the page data.


/{baseSiteId}/users/{userId}/cms/sitepages

Usage and SDK Samples

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

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

public class PagesApiExample {

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

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

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

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        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. Default value: 10.
        String pageType = pageType_example; // String | Page type.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            CMSPageList result = apiInstance.getAllPagesWithUser(baseSiteId, userId, currentPage, fields, pageSize, pageType, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getAllPagesWithUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String 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. Default value: 10.
        String pageType = pageType_example; // String | Page type.
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            CMSPageList result = apiInstance.getAllPagesWithUser(baseSiteId, userId, currentPage, fields, pageSize, pageType, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getAllPagesWithUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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)
Integer *pageSize = 56; // Number of results returned per page. Default value: 10. (optional) (default to 10)
String *pageType = pageType_example; // Page type. (optional)
String *sort = sort_example; // Sorting method applied to the return results. (optional)

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

// Retrieves the page data.
[apiInstance getAllPagesWithUserWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    pageType:pageType
    sort:sort
              completionHandler: ^(CMSPageList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var 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. Default value: 10.
  'pageType': pageType_example, // {{String}} Page type.
  '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.getAllPagesWithUser(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 getAllPagesWithUserExample
    {
        public void main()
        {

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

            var apiInstance = new PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var 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) 
            var pageSize = 56;  // Integer | Number of results returned per page. Default value: 10. (optional)  (default to 10)
            var pageType = pageType_example;  // String | Page type. (optional) 
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 

            try
            {
                // Retrieves the page data.
                CMSPageList result = apiInstance.getAllPagesWithUser(baseSiteId, userId, currentPage, fields, pageSize, pageType, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getAllPagesWithUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$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. Default value: 10.
$pageType = pageType_example; // String | Page type.
$sort = sort_example; // String | Sorting method applied to the return results.

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

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

my $api_instance = WWW::SwaggerClient::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $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. Default value: 10.
my $pageType = pageType_example; # String | Page type.
my $sort = sort_example; # String | Sorting method applied to the return results.

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

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

# create an instance of the API class
api_instance = swagger_client.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
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)
pageSize = 56 # Integer | Number of results returned per page. Default value: 10. (optional) (default to 10)
pageType = pageType_example # String | Page type. (optional)
sort = sort_example # String | Sorting method applied to the return results. (optional)

try: 
    # Retrieves the page data.
    api_response = api_instance.get_all_pages_with_user(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, pageType=pageType, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getAllPagesWithUser: %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. Default value: 10.
pageType
String
Page type.
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - CMSPageListWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPage

Retrieves the page data and the CMS content slots.

Retrieves the page data and CMS content slots using the pageLabelOrId or the code parameter. If you don't provide a value for one of these parameters, the homepage CMS content slots are retrieved. Content pages can be filtered using pageLabelOrId while the other page types can be filtered using the specified code.


/{baseSiteId}/cms/pages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/cms/pages?code=&fields=&pageLabelOrId=&pageType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PagesApi;

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

public class PagesApiExample {

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

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

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

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Page code. Examples: homepage, electronics, cameras, 585.
        String 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 pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
        String pageType = pageType_example; // String | Page type
        try {
            CMSPage result = apiInstance.getPage(baseSiteId, code, fields, pageLabelOrId, pageType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Page code. Examples: homepage, electronics, cameras, 585.
        String 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 pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
        String pageType = pageType_example; // String | Page type
        try {
            CMSPage result = apiInstance.getPage(baseSiteId, code, fields, pageLabelOrId, pageType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPage");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *code = code_example; // Page code. Examples: homepage, electronics, cameras, 585. (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)
String *pageLabelOrId = pageLabelOrId_example; // Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters. (optional)
String *pageType = pageType_example; // Page type (optional)

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

// Retrieves the page data and the CMS content slots.
[apiInstance getPageWith:baseSiteId
    code:code
    fields:fields
    pageLabelOrId:pageLabelOrId
    pageType:pageType
              completionHandler: ^(CMSPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'code': code_example, // {{String}} Page code. Examples: homepage, electronics, cameras, 585.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
  'pageLabelOrId': pageLabelOrId_example, // {{String}} Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
  'pageType': pageType_example // {{String}} Page type
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPage(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Page code. Examples: homepage, electronics, cameras, 585. (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) 
            var pageLabelOrId = pageLabelOrId_example;  // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters. (optional) 
            var pageType = pageType_example;  // String | Page type (optional) 

            try
            {
                // Retrieves the page data and the CMS content slots.
                CMSPage result = apiInstance.getPage(baseSiteId, code, fields, pageLabelOrId, pageType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Page code. Examples: homepage, electronics, cameras, 585.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
$pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
$pageType = pageType_example; // String | Page type

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

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

my $api_instance = WWW::SwaggerClient::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Page code. Examples: homepage, electronics, cameras, 585.
my $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 $pageLabelOrId = pageLabelOrId_example; # String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
my $pageType = pageType_example; # String | Page type

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

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

# create an instance of the API class
api_instance = swagger_client.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Page code. Examples: homepage, electronics, cameras, 585. (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)
pageLabelOrId = pageLabelOrId_example # String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters. (optional)
pageType = pageType_example # String | Page type (optional)

try: 
    # Retrieves the page data and the CMS content slots.
    api_response = api_instance.get_page(baseSiteId, code=code, fields=fields, pageLabelOrId=pageLabelOrId, pageType=pageType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getPage: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
code
String
Page code. Examples: homepage, electronics, cameras, 585.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
pageLabelOrId
String
Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters.
pageType
String
Page type

Responses

Status: 200 - CMSPageWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPageById

Retrieves the page data and CMS content slots using the page identifier.

Retrieves the page data and CMS content slots, each of which contains a list of CMS component data. The page identifier is required.


/{baseSiteId}/cms/pages/{pageId}

Usage and SDK Samples

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

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

public class PagesApiExample {

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

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

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

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

public class PagesApiExample {

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

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

// Retrieves the page data and CMS content slots using the page identifier.
[apiInstance getPageByIdWith:baseSiteId
    pageId:pageId
    fields:fields
              completionHandler: ^(CMSPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves the page data and CMS content slots using the page identifier.
                CMSPage result = apiInstance.getPageById(baseSiteId, pageId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getPageById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves the page data and CMS content slots using the page identifier.
    api_response = api_instance.get_page_by_id(baseSiteId, pageId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getPageById: %s\n" % e)

Parameters

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

Responses

Status: 200 - CMSPageWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPageByIdAndUser

Retrieves the page data and CMS content slots using the page identifier.

Retrieves the page data and CMS content slots, each of which contains a list of CMS component data. The page identifier is required.


/{baseSiteId}/users/{userId}/cms/pages/{pageId}

Usage and SDK Samples

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

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

public class PagesApiExample {

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

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

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

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

public class PagesApiExample {

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

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

// Retrieves the page data and CMS content slots using the page identifier.
[apiInstance getPageByIdAndUserWith:baseSiteId
    pageId:pageId
    userId:userId
    fields:fields
              completionHandler: ^(CMSPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var pageId = pageId_example; // {{String}} Page Id
var 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.getPageByIdAndUser(baseSiteId, pageId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var pageId = pageId_example;  // String | Page Id
            var 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) 

            try
            {
                // Retrieves the page data and CMS content slots using the page identifier.
                CMSPage result = apiInstance.getPageByIdAndUser(baseSiteId, pageId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getPageByIdAndUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

my $api_instance = WWW::SwaggerClient::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $pageId = pageId_example; # String | Page Id
my $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->getPageByIdAndUser(baseSiteId => $baseSiteId, pageId => $pageId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PagesApi->getPageByIdAndUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

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

try: 
    # Retrieves the page data and CMS content slots using the page identifier.
    api_response = api_instance.get_page_by_id_and_user(baseSiteId, pageId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getPageByIdAndUser: %s\n" % e)

Parameters

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

Responses

Status: 200 - CMSPageWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPageWithUser

Retrieves the page data and the CMS content slots.

Retrieves the page data and CMS content slots using the pageLabelOrId or the code parameter. If you don't provide a value for one of these parameters, the homepage CMS content slots are retrieved. Content pages can be filtered using pageLabelOrId while the other page types can be filtered using the specified code.


/{baseSiteId}/users/{userId}/cms/pages

Usage and SDK Samples

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

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

public class PagesApiExample {

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

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

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

        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String code = code_example; // String | Page code. Examples: homepage, electronics, cameras, 585.
        String 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 pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
        String pageType = pageType_example; // String | Page type
        try {
            CMSPage result = apiInstance.getPageWithUser(baseSiteId, userId, code, fields, pageLabelOrId, pageType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPageWithUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PagesApi;

public class PagesApiExample {

    public static void main(String[] args) {
        PagesApi apiInstance = new PagesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String code = code_example; // String | Page code. Examples: homepage, electronics, cameras, 585.
        String 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 pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
        String pageType = pageType_example; // String | Page type
        try {
            CMSPage result = apiInstance.getPageWithUser(baseSiteId, userId, code, fields, pageLabelOrId, pageType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PagesApi#getPageWithUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *code = code_example; // Page code. Examples: homepage, electronics, cameras, 585. (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)
String *pageLabelOrId = pageLabelOrId_example; // Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters. (optional)
String *pageType = pageType_example; // Page type (optional)

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

// Retrieves the page data and the CMS content slots.
[apiInstance getPageWithUserWith:baseSiteId
    userId:userId
    code:code
    fields:fields
    pageLabelOrId:pageLabelOrId
    pageType:pageType
              completionHandler: ^(CMSPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PagesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'code': code_example, // {{String}} Page code. Examples: homepage, electronics, cameras, 585.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
  'pageLabelOrId': pageLabelOrId_example, // {{String}} Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
  'pageType': pageType_example // {{String}} Page type
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPageWithUser(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 getPageWithUserExample
    {
        public void main()
        {

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

            var apiInstance = new PagesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var code = code_example;  // String | Page code. Examples: homepage, electronics, cameras, 585. (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) 
            var pageLabelOrId = pageLabelOrId_example;  // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters. (optional) 
            var pageType = pageType_example;  // String | Page type (optional) 

            try
            {
                // Retrieves the page data and the CMS content slots.
                CMSPage result = apiInstance.getPageWithUser(baseSiteId, userId, code, fields, pageLabelOrId, pageType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.getPageWithUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPagesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$code = code_example; // String | Page code. Examples: homepage, electronics, cameras, 585.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
$pageLabelOrId = pageLabelOrId_example; // String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
$pageType = pageType_example; // String | Page type

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

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

my $api_instance = WWW::SwaggerClient::PagesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $code = code_example; # String | Page code. Examples: homepage, electronics, cameras, 585.
my $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 $pageLabelOrId = pageLabelOrId_example; # String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters.
my $pageType = pageType_example; # String | Page type

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

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

# create an instance of the API class
api_instance = swagger_client.PagesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
code = code_example # String | Page code. Examples: homepage, electronics, cameras, 585. (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)
pageLabelOrId = pageLabelOrId_example # String | Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
Note: URL encoding on the page label should be applied when the label contains special characters. (optional)
pageType = pageType_example # String | Page type (optional)

try: 
    # Retrieves the page data and the CMS content slots.
    api_response = api_instance.get_page_with_user(baseSiteId, userId, code=code, fields=fields, pageLabelOrId=pageLabelOrId, pageType=pageType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PagesApi->getPageWithUser: %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
code
String
Page code. Examples: homepage, electronics, cameras, 585.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL.
pageLabelOrId
String
Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id. Note: URL encoding on the page label should be applied when the label contains special characters.
pageType
String
Page type

Responses

Status: 200 - CMSPageWsDTO

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


PaymentDetails

getPaymentDetails

Retrieves detailed information for a specific credit card payment.

Retrieves specific credit card payment details made by the customer using the paymentDetailsId.


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

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

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

public class PaymentDetailsApiExample {

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

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

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

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

public class PaymentDetailsApiExample {

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

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

// Retrieves detailed information for a specific credit card payment.
[apiInstance getPaymentDetailsWith:baseSiteId
    paymentDetailsId:paymentDetailsId
    userId:userId
    fields:fields
              completionHandler: ^(PaymentDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves detailed information for a specific credit card payment.
                PaymentDetails result = apiInstance.getPaymentDetails(baseSiteId, paymentDetailsId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.getPaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves detailed information for a specific credit card payment.
    api_response = api_instance.get_payment_details(baseSiteId, paymentDetailsId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->getPaymentDetails: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPaymentDetailsList

Retrieves all credit card payment details of the customer.

Retrieves all credit card payment details made by the customer.


/{baseSiteId}/users/{userId}/paymentdetails

Usage and SDK Samples

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

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

public class PaymentDetailsApiExample {

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

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

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

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

public class PaymentDetailsApiExample {

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

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

// Retrieves all credit card payment details of the customer.
[apiInstance getPaymentDetailsListWith:baseSiteId
    userId:userId
    fields:fields
    saved:saved
              completionHandler: ^(PaymentDetailsList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves all credit card payment details of the customer.
                PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, fields, saved);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.getPaymentDetailsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves all credit card payment details of the customer.
    api_response = api_instance.get_payment_details_list(baseSiteId, userId, fields=fields, saved=saved)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->getPaymentDetailsList: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removePaymentDetails

Deletes detailed information for a specific credit card payment.

Deletes specific credit card payment details made by the customer using the paymentDetailsId.


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

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

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

public class PaymentDetailsApiExample {

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

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

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

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

public class PaymentDetailsApiExample {

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

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

// Deletes detailed information for a specific credit card payment.
[apiInstance removePaymentDetailsWith:baseSiteId
    paymentDetailsId:paymentDetailsId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PaymentDetailsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new PaymentDetailsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes detailed information for a specific credit card payment.
                apiInstance.removePaymentDetails(baseSiteId, paymentDetailsId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.removePaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Deletes detailed information for a specific credit card payment.
    api_instance.remove_payment_details(baseSiteId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->removePaymentDetails: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replacePaymentDetails

Updates existing detailed information for a specific credit card payment.

Updates existing credit card payment details made by the customer using the paymentDetailsId. Attributes not given in request will be defined again (set to null or default).


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

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

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

public class PaymentDetailsApiExample {

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

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

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

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

public class PaymentDetailsApiExample {

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

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

// Updates existing detailed information for a specific credit card payment. 
[apiInstance replacePaymentDetailsWith:body
    baseSiteId:baseSiteId
    paymentDetailsId:paymentDetailsId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PaymentDetailsApi()
var body = ; // {{PaymentDetails}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new PaymentDetailsApi();
            var body = new PaymentDetails(); // PaymentDetails | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates existing detailed information for a specific credit card payment. 
                apiInstance.replacePaymentDetails(body, baseSiteId, paymentDetailsId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.replacePaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$body = ; // PaymentDetails | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

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

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

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
body =  # PaymentDetails | 
baseSiteId = baseSiteId_example # String | Base site identifier
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates existing detailed information for a specific credit card payment. 
    api_instance.replace_payment_details(body, baseSiteId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->replacePaymentDetails: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updatePaymentDetails

Updates existing detailed information for a specific credit card payment.

Updates existing credit card payment details made by the customer using the paymentDetailsId. Only those attributes provided in the request will be updated.


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

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

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

public class PaymentDetailsApiExample {

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

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

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

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

public class PaymentDetailsApiExample {

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

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

// Updates existing detailed information for a specific credit card payment. 
[apiInstance updatePaymentDetailsWith:body
    baseSiteId:baseSiteId
    paymentDetailsId:paymentDetailsId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PaymentDetailsApi()
var body = ; // {{PaymentDetails}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new PaymentDetailsApi();
            var body = new PaymentDetails(); // PaymentDetails | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates existing detailed information for a specific credit card payment. 
                apiInstance.updatePaymentDetails(body, baseSiteId, paymentDetailsId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.updatePaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$body = ; // PaymentDetails | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

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

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

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
body =  # PaymentDetails | 
baseSiteId = baseSiteId_example # String | Base site identifier
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates existing detailed information for a specific credit card payment. 
    api_instance.update_payment_details(body, baseSiteId, paymentDetailsId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->updatePaymentDetails: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


PaymentModes

getPaymentModes

Retrieves the available payment modes.

Retrieves the payment modes defined for the base store.


/{baseSiteId}/paymentmodes

Usage and SDK Samples

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

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

public class PaymentModesApiExample {

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

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

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

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

public class PaymentModesApiExample {

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

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

// Retrieves the available payment modes.
[apiInstance getPaymentModesWith:baseSiteId
    fields:fields
              completionHandler: ^(PaymentModeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves the available payment modes.
                PaymentModeList result = apiInstance.getPaymentModes(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentModesApi.getPaymentModes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves the available payment modes.
    api_response = api_instance.get_payment_modes(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentModesApi->getPaymentModes: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Products

countProductStockByLocation

Retrieves the total number of stock levels of a product.

In the response header, the "x-total-count" property indicates the total number of stock levels of a product. Either location parameter or longitude and latitude parameters are required.


/{baseSiteId}/products/{productCode}/stock

Usage and SDK Samples

curl -X HEAD\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/products/{productCode}/stock?latitude=&location=&longitude="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductsApi;

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier.
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        try {
            apiInstance.countProductStockByLocation(baseSiteId, productCode, latitude, location, longitude);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProductStockByLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier.
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        try {
            apiInstance.countProductStockByLocation(baseSiteId, productCode, latitude, location, longitude);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProductStockByLocation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *productCode = productCode_example; // Product identifier.
Double *latitude = 1.2; // Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
String *location = location_example; // Free-text location (optional)
Double *longitude = 1.2; // Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)

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

// Retrieves the total number of stock levels of a product.
[apiInstance countProductStockByLocationWith:baseSiteId
    productCode:productCode
    latitude:latitude
    location:location
    longitude:longitude
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier.
var opts = { 
  'latitude': 1.2, // {{Double}} Coordinate that specifies the north-south position of a point on the Earth's surface.
  'location': location_example, // {{String}} Free-text location
  'longitude': 1.2 // {{Double}} Coordinate that specifies the east-west position of a point on the Earth's surface.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countProductStockByLocation(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier.
            var latitude = 1.2;  // Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional) 
            var location = location_example;  // String | Free-text location (optional) 
            var longitude = 1.2;  // Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional) 

            try
            {
                // Retrieves the total number of stock levels of a product.
                apiInstance.countProductStockByLocation(baseSiteId, productCode, latitude, location, longitude);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.countProductStockByLocation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier.
$latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
$location = location_example; // String | Free-text location
$longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.

try {
    $api_instance->countProductStockByLocation($baseSiteId, $productCode, $latitude, $location, $longitude);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->countProductStockByLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductsApi;

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier.
my $latitude = 1.2; # Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
my $location = location_example; # String | Free-text location
my $longitude = 1.2; # Double | Coordinate that specifies the east-west position of a point on the Earth's surface.

eval { 
    $api_instance->countProductStockByLocation(baseSiteId => $baseSiteId, productCode => $productCode, latitude => $latitude, location => $location, longitude => $longitude);
};
if ($@) {
    warn "Exception when calling ProductsApi->countProductStockByLocation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product identifier.
latitude = 1.2 # Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
location = location_example # String | Free-text location (optional)
longitude = 1.2 # Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)

try: 
    # Retrieves the total number of stock levels of a product.
    api_instance.count_product_stock_by_location(baseSiteId, productCode, latitude=latitude, location=location, longitude=longitude)
except ApiException as e:
    print("Exception when calling ProductsApi->countProductStockByLocation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier.
Required
Query parameters
Name Description
latitude
Double (double)
Coordinate that specifies the north-south position of a point on the Earth's surface.
location
String
Free-text location
longitude
Double (double)
Coordinate that specifies the east-west position of a point on the Earth's surface.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


countProducts

Retrieves the total number of products.

In the response header, the "x-total-count" property indicates the total number of products for the query.


/{baseSiteId}/products/search

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String query = query_example; // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
        try {
            apiInstance.countProducts(baseSiteId, query);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String query = query_example; // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
        try {
            apiInstance.countProducts(baseSiteId, query);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProducts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *query = query_example; // Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::. (optional)

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

// Retrieves the total number of products.
[apiInstance countProductsWith:baseSiteId
    query:query
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'query': query_example // {{String}} Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countProducts(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var query = query_example;  // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::. (optional) 

            try
            {
                // Retrieves the total number of products.
                apiInstance.countProducts(baseSiteId, query);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.countProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$query = query_example; // String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.

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

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $query = query_example; # String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::.

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

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
query = query_example # String | Formatted query string. It contains query criteria like free text search, facet. The format is ::::...::. (optional)

try: 
    # Retrieves the total number of products.
    api_instance.count_products(baseSiteId, query=query)
except ApiException as e:
    print("Exception when calling ProductsApi->countProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
query
String
Formatted query string. It contains query criteria like free text search, facet. The format is <freeTextSearch>:<sort>:<facetKey1>:<facetValue1>:...:<facetKeyN>:<facetValueN>.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createProductReview

Creates a customer review as an anonymous user.

Creates a customer review for a product as an anonymous user.


/{baseSiteId}/products/{productCode}/reviews

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

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

public class ProductsApiExample {

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

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

// Creates a customer review as an anonymous user.
[apiInstance createProductReviewWith:body
    baseSiteId:baseSiteId
    productCode:productCode
    fields:fields
              completionHandler: ^(Review output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Creates a customer review as an anonymous user.
                Review result = apiInstance.createProductReview(body, baseSiteId, productCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.createProductReview: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Creates a customer review as an anonymous user.
    api_response = api_instance.create_product_review(body, baseSiteId, productCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->createProductReview: %s\n" % e)

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getExpressUpdateProducts

Retrieves products that were added to the express update feed.

Retrieves products that were added to the express update feed. Only the properties that were updated after the specified timestamp are returned. The queue is cleared using a defined cronjob.


/{baseSiteId}/products/expressupdate

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String timestamp = timestamp_example; // String | Only 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 catalog = catalog_example; // String | Only products from this catalog are returned. Format: catalogId:catalogVersion.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductExpressUpdateElementList result = apiInstance.getExpressUpdateProducts(baseSiteId, timestamp, catalog, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getExpressUpdateProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String timestamp = timestamp_example; // String | Only 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 catalog = catalog_example; // String | Only products from this catalog are returned. Format: catalogId:catalogVersion.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductExpressUpdateElementList result = apiInstance.getExpressUpdateProducts(baseSiteId, timestamp, catalog, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getExpressUpdateProducts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *timestamp = timestamp_example; // Only 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 *catalog = catalog_example; // Only products from this catalog are returned. Format: catalogId:catalogVersion. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

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

// Retrieves products that were added to the express update feed.
[apiInstance getExpressUpdateProductsWith:baseSiteId
    timestamp:timestamp
    catalog:catalog
    fields:fields
              completionHandler: ^(ProductExpressUpdateElementList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var timestamp = timestamp_example; // {{String}} Only 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.
var opts = { 
  'catalog': catalog_example, // {{String}} Only products from this catalog are returned. Format: catalogId:catalogVersion.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getExpressUpdateProducts(baseSiteId, timestamp, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var timestamp = timestamp_example;  // String | Only 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.
            var catalog = catalog_example;  // String | Only products from this catalog are returned. Format: catalogId:catalogVersion. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Retrieves products that were added to the express update feed.
                ProductExpressUpdateElementList result = apiInstance.getExpressUpdateProducts(baseSiteId, timestamp, catalog, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getExpressUpdateProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$timestamp = timestamp_example; // String | Only 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.
$catalog = catalog_example; // String | Only products from this catalog are returned. Format: catalogId:catalogVersion.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

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

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $timestamp = timestamp_example; # String | Only 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 $catalog = catalog_example; # String | Only products from this catalog are returned. Format: catalogId:catalogVersion.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

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

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
timestamp = timestamp_example # String | Only 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.
catalog = catalog_example # String | Only products from this catalog are returned. Format: catalogId:catalogVersion. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Retrieves products that were added to the express update feed.
    api_response = api_instance.get_express_update_products(baseSiteId, timestamp, catalog=catalog, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getExpressUpdateProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
catalog
String
Only products from this catalog are returned. Format: catalogId:catalogVersion.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
timestamp*
String
Only 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.
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getLocationProductStock

Retrieves the stock level of a product.

The stock levels are sorted by distance from the specified location, which is defined using the free-text location parameter or the longitude and latitude parameters. Either location parameter or longitude and latitude parameters are required.


/{baseSiteId}/products/{productCode}/stock

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier.
        Integer currentPage = 56; // Integer | 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
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        Integer pageSize = 56; // Integer | Number of results returned per page.
        try {
            StoreFinderStockSearchPage result = apiInstance.getLocationProductStock(baseSiteId, productCode, currentPage, fields, latitude, location, longitude, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getLocationProductStock");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier.
        Integer currentPage = 56; // Integer | 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
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        String location = location_example; // String | Free-text location
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        Integer pageSize = 56; // Integer | Number of results returned per page.
        try {
            StoreFinderStockSearchPage result = apiInstance.getLocationProductStock(baseSiteId, productCode, currentPage, fields, latitude, location, longitude, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getLocationProductStock");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *productCode = productCode_example; // Product identifier.
Integer *currentPage = 56; // 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)
Double *latitude = 1.2; // Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
String *location = location_example; // Free-text location (optional)
Double *longitude = 1.2; // Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
Integer *pageSize = 56; // Number of results returned per page. (optional) (default to 20)

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

// Retrieves the stock level of a product.
[apiInstance getLocationProductStockWith:baseSiteId
    productCode:productCode
    currentPage:currentPage
    fields:fields
    latitude:latitude
    location:location
    longitude:longitude
    pageSize:pageSize
              completionHandler: ^(StoreFinderStockSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier.
var opts = { 
  'currentPage': 56, // {{Integer}} 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
  'latitude': 1.2, // {{Double}} Coordinate that specifies the north-south position of a point on the Earth's surface.
  'location': location_example, // {{String}} Free-text location
  'longitude': 1.2, // {{Double}} Coordinate that specifies the east-west position of a point on the Earth's surface.
  '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.getLocationProductStock(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier.
            var currentPage = 56;  // Integer | 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 latitude = 1.2;  // Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional) 
            var location = location_example;  // String | Free-text location (optional) 
            var longitude = 1.2;  // Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional) 
            var pageSize = 56;  // Integer | Number of results returned per page. (optional)  (default to 20)

            try
            {
                // Retrieves the stock level of a product.
                StoreFinderStockSearchPage result = apiInstance.getLocationProductStock(baseSiteId, productCode, currentPage, fields, latitude, location, longitude, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getLocationProductStock: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier.
$currentPage = 56; // Integer | 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
$latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
$location = location_example; // String | Free-text location
$longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
$pageSize = 56; // Integer | Number of results returned per page.

try {
    $result = $api_instance->getLocationProductStock($baseSiteId, $productCode, $currentPage, $fields, $latitude, $location, $longitude, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->getLocationProductStock: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductsApi;

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier.
my $currentPage = 56; # Integer | 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 $latitude = 1.2; # Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
my $location = location_example; # String | Free-text location
my $longitude = 1.2; # Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
my $pageSize = 56; # Integer | Number of results returned per page.

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

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product identifier.
currentPage = 56 # Integer | 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)
latitude = 1.2 # Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
location = location_example # String | Free-text location (optional)
longitude = 1.2 # Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
pageSize = 56 # Integer | Number of results returned per page. (optional) (default to 20)

try: 
    # Retrieves the stock level of a product.
    api_response = api_instance.get_location_product_stock(baseSiteId, productCode, currentPage=currentPage, fields=fields, latitude=latitude, location=location, longitude=longitude, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getLocationProductStock: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier.
Required
Query parameters
Name Description
currentPage
Integer (int32)
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
latitude
Double (double)
Coordinate that specifies the north-south position of a point on the Earth's surface.
location
String
Free-text location
longitude
Double (double)
Coordinate that specifies the east-west position of a point on the Earth's surface.
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


getProductByCode

Get product details

Returns details of a single product according to a product code.


/{baseSiteId}/products/{productCode}

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        String processType = processType_example; // String | Process Type, for filtering product prices based on Process Type
        String region = region_example; // String | Region identifier for filtering product prices based on region
        String userId = userId_example; // String | User ID, for filtering product prices based on Customer
        try {
            Product result = apiInstance.getProductByCode(baseSiteId, productCode, fields, processType, region, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductByCode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        String processType = processType_example; // String | Process Type, for filtering product prices based on Process Type
        String region = region_example; // String | Region identifier for filtering product prices based on region
        String userId = userId_example; // String | User ID, for filtering product prices based on Customer
        try {
            Product result = apiInstance.getProductByCode(baseSiteId, productCode, fields, processType, region, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductByCode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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. (optional)
String *processType = processType_example; // Process Type, for filtering product prices based on Process Type (optional)
String *region = region_example; // Region identifier for filtering product prices based on region (optional)
String *userId = userId_example; // User ID, for filtering product prices based on Customer (optional)

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

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

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier
var opts = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
  'processType': processType_example, // {{String}} Process Type, for filtering product prices based on Process Type
  'region': region_example, // {{String}} Region identifier for filtering product prices based on region
  'userId': userId_example // {{String}} User ID, for filtering product prices based on Customer
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductByCode(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 getProductByCodeExample
    {
        public void main()
        {

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 
            var processType = processType_example;  // String | Process Type, for filtering product prices based on Process Type (optional) 
            var region = region_example;  // String | Region identifier for filtering product prices based on region (optional) 
            var userId = userId_example;  // String | User ID, for filtering product prices based on Customer (optional) 

            try
            {
                // Get product details
                Product result = apiInstance.getProductByCode(baseSiteId, productCode, fields, processType, region, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProductByCode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
$processType = processType_example; // String | Process Type, for filtering product prices based on Process Type
$region = region_example; // String | Region identifier for filtering product prices based on region
$userId = userId_example; // String | User ID, for filtering product prices based on Customer

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

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.
my $processType = processType_example; # String | Process Type, for filtering product prices based on Process Type
my $region = region_example; # String | Region identifier for filtering product prices based on region
my $userId = userId_example; # String | User ID, for filtering product prices based on Customer

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

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)
processType = processType_example # String | Process Type, for filtering product prices based on Process Type (optional)
region = region_example # String | Region identifier for filtering product prices based on region (optional)
userId = userId_example # String | User ID, for filtering product prices based on Customer (optional)

try: 
    # Get product details
    api_response = api_instance.get_product_by_code(baseSiteId, productCode, fields=fields, processType=processType, region=region, userId=userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProductByCode: %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.
processType
String
Process Type, for filtering product prices based on Process Type
region
String
Region identifier for filtering product prices based on region
userId
String
User ID, for filtering product prices based on Customer

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductReferences

Retrieves the product references.

Retrieves the references using the product code and reference type.


/{baseSiteId}/products/{productCode}/references

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Number of results returned per page.
        String referenceType = referenceType_example; // String | Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT.
        try {
            ProductReferenceList result = apiInstance.getProductReferences(baseSiteId, productCode, fields, pageSize, referenceType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductReferences");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String productCode = productCode_example; // String | Product identifier.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Number of results returned per page.
        String referenceType = referenceType_example; // String | Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT.
        try {
            ProductReferenceList result = apiInstance.getProductReferences(baseSiteId, productCode, fields, pageSize, referenceType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getProductReferences");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *productCode = productCode_example; // Product identifier.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
Integer *pageSize = 56; // Number of results returned per page. (optional) (default to 2147483647)
String *referenceType = referenceType_example; // Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT. (optional)

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

// Retrieves the product references.
[apiInstance getProductReferencesWith:baseSiteId
    productCode:productCode
    fields:fields
    pageSize:pageSize
    referenceType:referenceType
              completionHandler: ^(ProductReferenceList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var productCode = productCode_example; // {{String}} Product identifier.
var opts = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'pageSize': 56, // {{Integer}} Number of results returned per page.
  'referenceType': referenceType_example // {{String}} Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductReferences(baseSiteId, productCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var pageSize = 56;  // Integer | Number of results returned per page. (optional)  (default to 2147483647)
            var referenceType = referenceType_example;  // String | Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT. (optional) 

            try
            {
                // Retrieves the product references.
                ProductReferenceList result = apiInstance.getProductReferences(baseSiteId, productCode, fields, pageSize, referenceType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProductReferences: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$pageSize = 56; // Integer | Number of results returned per page.
$referenceType = referenceType_example; // String | Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT.

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

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $pageSize = 56; # Integer | Number of results returned per page.
my $referenceType = referenceType_example; # String | Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT.

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

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
productCode = productCode_example # String | Product identifier.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
pageSize = 56 # Integer | Number of results returned per page. (optional) (default to 2147483647)
referenceType = referenceType_example # String | Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT. (optional)

try: 
    # Retrieves the product references.
    api_response = api_instance.get_product_references(baseSiteId, productCode, fields=fields, pageSize=pageSize, referenceType=referenceType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProductReferences: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier.
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
pageSize
Integer (int32)
Number of results returned per page.
referenceType
String
Comma-separated list of reference types. If not specified, all types of product references will be used. Example: ACCESSORIES,BASE_PRODUCT.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProductReviews

Retrieves the reviews of a product.

Retrieves all the reviews for a product. To limit the number of reviews returned, use the maxCount parameter.


/{baseSiteId}/products/{productCode}/reviews

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

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

public class ProductsApiExample {

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

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

// Retrieves the reviews of a product.
[apiInstance getProductReviewsWith:baseSiteId
    productCode:productCode
    fields:fields
    maxCount:maxCount
              completionHandler: ^(ReviewList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var productCode = productCode_example;  // String | Product identifier.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var maxCount = 56;  // Integer | Maximum number of reviews. (optional) 

            try
            {
                // Retrieves the reviews of a product.
                ReviewList result = apiInstance.getProductReviews(baseSiteId, productCode, fields, maxCount);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProductReviews: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$productCode = productCode_example; // String | Product identifier.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$maxCount = 56; // Integer | Maximum number of reviews.

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

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $productCode = productCode_example; # String | Product identifier.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $maxCount = 56; # Integer | Maximum number of reviews.

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

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

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

try: 
    # Retrieves the reviews of a product.
    api_response = api_instance.get_product_reviews(baseSiteId, productCode, fields=fields, maxCount=maxCount)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProductReviews: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
productCode*
String
Product identifier.
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
maxCount
Integer (int32)
Maximum number of reviews.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getProducts

Get a list of products and additional data

Returns a list of products and additional data, such as available facets, available sorting, and pagination options. It can also include spelling suggestions. To make spelling suggestions work, you need to make sure that "enableSpellCheck" on the SearchQuery is set to "true" (by default, it should already be set to "true"). You also need to have indexed properties configured to be used for spellchecking.


/{baseSiteId}/products/search

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

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

public class ProductsApiExample {

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

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

// Get a list of products and additional data
[apiInstance getProductsWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    query:query
    searchQueryContext:searchQueryContext
    sort:sort
              completionHandler: ^(ProductSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Get a list of products and additional data
                ProductSearchPage result = apiInstance.getProducts(baseSiteId, currentPage, fields, pageSize, query, searchQueryContext, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Get a list of products and additional data
    api_response = api_instance.get_products(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize, query=query, searchQueryContext=searchQueryContext, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getProducts: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoreProductStock

Retrieves the stock level of a product.

Retrieves the stock level of a product for the store.


/{baseSiteId}/products/{productCode}/stock/{storeName}

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

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

public class ProductsApiExample {

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

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

// Retrieves the stock level of a product.
[apiInstance getStoreProductStockWith:baseSiteId
    productCode:productCode
    storeName:storeName
    fields:fields
              completionHandler: ^(Stock output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves the stock level of a product.
                Stock result = apiInstance.getStoreProductStock(baseSiteId, productCode, storeName, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getStoreProductStock: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves the stock level of a product.
    api_response = api_instance.get_store_product_stock(baseSiteId, productCode, storeName, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getStoreProductStock: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSuggestions

Retrieves the available suggestions.

Retrieves the suggestions related to a specified term and limits the results according to the value of the max parameter.


/{baseSiteId}/products/suggestions

Usage and SDK Samples

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

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

public class ProductsApiExample {

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

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

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

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String term = term_example; // String | Specified term. The suggestions will be given based on it.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer max = 56; // Integer | Maximum number of results.
        try {
            SuggestionList result = apiInstance.getSuggestions(baseSiteId, term, fields, max);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getSuggestions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String term = term_example; // String | Specified term. The suggestions will be given based on it.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer max = 56; // Integer | Maximum number of results.
        try {
            SuggestionList result = apiInstance.getSuggestions(baseSiteId, term, fields, max);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#getSuggestions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *term = term_example; // Specified term. The suggestions will be given based on it.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
Integer *max = 56; // Maximum number of results. (optional) (default to 10)

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

// Retrieves the available suggestions.
[apiInstance getSuggestionsWith:baseSiteId
    term:term
    fields:fields
    max:max
              completionHandler: ^(SuggestionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var term = term_example; // {{String}} Specified term. The suggestions will be given based on it.
var opts = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'max': 56 // {{Integer}} Maximum number of results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSuggestions(baseSiteId, term, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var term = term_example;  // String | Specified term. The suggestions will be given based on it.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var max = 56;  // Integer | Maximum number of results. (optional)  (default to 10)

            try
            {
                // Retrieves the available suggestions.
                SuggestionList result = apiInstance.getSuggestions(baseSiteId, term, fields, max);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.getSuggestions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$term = term_example; // String | Specified term. The suggestions will be given based on it.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$max = 56; // Integer | Maximum number of results.

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

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

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $term = term_example; # String | Specified term. The suggestions will be given based on it.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $max = 56; # Integer | Maximum number of results.

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

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

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
term = term_example # String | Specified term. The suggestions will be given based on it.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
max = 56 # Integer | Maximum number of results. (optional) (default to 10)

try: 
    # Retrieves the available suggestions.
    api_response = api_instance.get_suggestions(baseSiteId, term, fields=fields, max=max)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->getSuggestions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
max
Integer (int32)
Maximum number of results.
term*
String
Specified term. The suggestions will be given based on it.
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Promotions

getPromotion

Retrieves the promotion.

Retrieves the details of a promotion using the specified code. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers and therefore some of them are currently not compatible with the new promotion engine.


/{baseSiteId}/promotions/{code}

Usage and SDK Samples

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

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

public class PromotionsApiExample {

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

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

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

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

public class PromotionsApiExample {

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

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

// Retrieves the promotion.
[apiInstance getPromotionWith:baseSiteId
    code:code
    fields:fields
              completionHandler: ^(Promotion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves the promotion.
                Promotion result = apiInstance.getPromotion(baseSiteId, code, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PromotionsApi.getPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves the promotion.
    api_response = api_instance.get_promotion(baseSiteId, code, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PromotionsApi->getPromotion: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getPromotions

Retrieves the promotions.

Retrieves the promotions defined for a current base site. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers and therefore some of them are currently not compatible with the new promotion engine.


/{baseSiteId}/promotions

Usage and SDK Samples

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

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

public class PromotionsApiExample {

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

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

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

        PromotionsApi apiInstance = new PromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String type = type_example; // String | Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL String promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned try { PromotionList result = apiInstance.getPromotions(baseSiteId, type, fields, promotionGroup); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PromotionsApi#getPromotions"); e.printStackTrace(); } } }
import io.swagger.client.api.PromotionsApi;

public class PromotionsApiExample {

    public static void main(String[] args) {
        PromotionsApi apiInstance = new PromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String type = type_example; // String | Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL String promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned try { PromotionList result = apiInstance.getPromotions(baseSiteId, type, fields, promotionGroup); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PromotionsApi#getPromotions"); e.printStackTrace(); } } }
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *type = type_example; // Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC) String *promotionGroup = promotionGroup_example; // Only promotions from this group are returned (optional) PromotionsApi *apiInstance = [[PromotionsApi alloc] init]; // Retrieves the promotions. [apiInstance getPromotionsWith:baseSiteId type:type fields:fields promotionGroup:promotionGroup completionHandler: ^(PromotionList output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.PromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var type = type_example; // {{String}} Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
var opts = { 'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL 'promotionGroup': promotionGroup_example // {{String}} Only promotions from this group are returned }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getPromotions(baseSiteId, type, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new PromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var type = type_example;  // String | Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
var fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC) var promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned (optional) try { // Retrieves the promotions. PromotionList result = apiInstance.getPromotions(baseSiteId, type, fields, promotionGroup); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling PromotionsApi.getPromotions: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$type = type_example; // String | Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL $promotionGroup = promotionGroup_example; // String | Only promotions from this group are returned try { $result = $api_instance->getPromotions($baseSiteId, $type, $fields, $promotionGroup); print_r($result); } catch (Exception $e) { echo 'Exception when calling PromotionsApi->getPromotions: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PromotionsApi;

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

my $api_instance = WWW::SwaggerClient::PromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $type = type_example; # String | Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL my $promotionGroup = promotionGroup_example; # String | Only promotions from this group are returned eval { my $result = $api_instance->getPromotions(baseSiteId => $baseSiteId, type => $type, fields => $fields, promotionGroup => $promotionGroup); print Dumper($result); }; if ($@) { warn "Exception when calling PromotionsApi->getPromotions: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.PromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
type = type_example # String | Type of promotions that should be returned. Possible values are: 
  • all: All available promotions are returned.
  • product: Only product promotions are returned.
  • order: Only order promotions are returned.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC) promotionGroup = promotionGroup_example # String | Only promotions from this group are returned (optional) try: # Retrieves the promotions. api_response = api_instance.get_promotions(baseSiteId, type, fields=fields, promotionGroup=promotionGroup) pprint(api_response) except ApiException as e: print("Exception when calling PromotionsApi->getPromotions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
promotionGroup
String
Only promotions from this group are returned
type*
String
Type of promotions that should be returned. Possible values are: <ul><li>all: All available promotions are returned. </li><li>product: Only product promotions are returned. </li><li>order: Only order promotions are returned. </li></ul>
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Recommendation

getProcessTypes

Get customer eligible process types

Returns customer eligible process types.


/{baseSiteId}/users/{userId}/qualifiedProcessTypes

Usage and SDK Samples

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

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

public class RecommendationApiExample {

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

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

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

        RecommendationApi apiInstance = new RecommendationApi();
        String baseSiteId = baseSiteId_example; // String | 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 | This is the list of fields that should be returned in the response body.
        try {
            TmaProcessTypeList result = apiInstance.getProcessTypes(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecommendationApi#getProcessTypes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecommendationApi;

public class RecommendationApiExample {

    public static void main(String[] args) {
        RecommendationApi apiInstance = new RecommendationApi();
        String baseSiteId = baseSiteId_example; // String | 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 | This is the list of fields that should be returned in the response body.
        try {
            TmaProcessTypeList result = apiInstance.getProcessTypes(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecommendationApi#getProcessTypes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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; // This is the list of fields that should be returned in the response body. (optional)

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

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

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

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

var api = new CommerceWebservices.RecommendationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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}} 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.getProcessTypes(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 getProcessTypesExample
    {
        public void main()
        {

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

            var apiInstance = new RecommendationApi();
            var baseSiteId = baseSiteId_example;  // String | Base 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 | This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Get customer eligible process types
                TmaProcessTypeList result = apiInstance.getProcessTypes(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecommendationApi.getProcessTypes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiRecommendationApi();
$baseSiteId = baseSiteId_example; // 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 | This is the list of fields that should be returned in the response body.

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

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

my $api_instance = WWW::SwaggerClient::RecommendationApi->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 | This is the list of fields that should be returned in the response body.

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

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

# create an instance of the API class
api_instance = swagger_client.RecommendationApi()
baseSiteId = baseSiteId_example # 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 | This is the list of fields that should be returned in the response body. (optional)

try: 
    # Get customer eligible process types
    api_response = api_instance.get_process_types(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecommendationApi->getProcessTypes: %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
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


getRecommendations

Get recommended product offering list for the given subscription

Returns list of recommended product offering.


/{baseSiteId}/users/{userId}/recommendations

Usage and SDK Samples

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

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

public class RecommendationApiExample {

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

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

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

        RecommendationApi apiInstance = new RecommendationApi();
        String baseSiteId = baseSiteId_example; // String | 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 affectedProductCode = affectedProductCode_example; // String | Affected product id.
        String fields = fields_example; // String | This is the list of fields that should be returned in the response body.
        String processType = processType_example; // String | Process type for the subscription.
        String subscriberIdentities = subscriberIdentities_example; // String | List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2.
        try {
            TmaRecommendationProducts result = apiInstance.getRecommendations(baseSiteId, userId, affectedProductCode, fields, processType, subscriberIdentities);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecommendationApi#getRecommendations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecommendationApi;

public class RecommendationApiExample {

    public static void main(String[] args) {
        RecommendationApi apiInstance = new RecommendationApi();
        String baseSiteId = baseSiteId_example; // String | 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 affectedProductCode = affectedProductCode_example; // String | Affected product id.
        String fields = fields_example; // String | This is the list of fields that should be returned in the response body.
        String processType = processType_example; // String | Process type for the subscription.
        String subscriberIdentities = subscriberIdentities_example; // String | List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2.
        try {
            TmaRecommendationProducts result = apiInstance.getRecommendations(baseSiteId, userId, affectedProductCode, fields, processType, subscriberIdentities);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecommendationApi#getRecommendations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *affectedProductCode = affectedProductCode_example; // Affected product id. (optional)
String *fields = fields_example; // This is the list of fields that should be returned in the response body. (optional)
String *processType = processType_example; // Process type for the subscription. (optional)
String *subscriberIdentities = subscriberIdentities_example; // List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2. (optional)

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

// Get recommended product offering list for the given subscription
[apiInstance getRecommendationsWith:baseSiteId
    userId:userId
    affectedProductCode:affectedProductCode
    fields:fields
    processType:processType
    subscriberIdentities:subscriberIdentities
              completionHandler: ^(TmaRecommendationProducts output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.RecommendationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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 = { 
  'affectedProductCode': affectedProductCode_example, // {{String}} Affected product id.
  'fields': fields_example, // {{String}} This is the list of fields that should be returned in the response body.
  'processType': processType_example, // {{String}} Process type for the subscription.
  'subscriberIdentities': subscriberIdentities_example // {{String}} List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRecommendations(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 getRecommendationsExample
    {
        public void main()
        {

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

            var apiInstance = new RecommendationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var affectedProductCode = affectedProductCode_example;  // String | Affected product id. (optional) 
            var fields = fields_example;  // String | This is the list of fields that should be returned in the response body. (optional) 
            var processType = processType_example;  // String | Process type for the subscription. (optional) 
            var subscriberIdentities = subscriberIdentities_example;  // String | List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2. (optional) 

            try
            {
                // Get recommended product offering list for the given subscription
                TmaRecommendationProducts result = apiInstance.getRecommendations(baseSiteId, userId, affectedProductCode, fields, processType, subscriberIdentities);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecommendationApi.getRecommendations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiRecommendationApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$affectedProductCode = affectedProductCode_example; // String | Affected product id.
$fields = fields_example; // String | This is the list of fields that should be returned in the response body.
$processType = processType_example; // String | Process type for the subscription.
$subscriberIdentities = subscriberIdentities_example; // String | List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2.

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

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

my $api_instance = WWW::SwaggerClient::RecommendationApi->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 $affectedProductCode = affectedProductCode_example; # String | Affected product id.
my $fields = fields_example; # String | This is the list of fields that should be returned in the response body.
my $processType = processType_example; # String | Process type for the subscription.
my $subscriberIdentities = subscriberIdentities_example; # String | List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2.

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

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

# create an instance of the API class
api_instance = swagger_client.RecommendationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
affectedProductCode = affectedProductCode_example # String | Affected product id. (optional)
fields = fields_example # String | This is the list of fields that should be returned in the response body. (optional)
processType = processType_example # String | Process type for the subscription. (optional)
subscriberIdentities = subscriberIdentities_example # String | List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2. (optional)

try: 
    # Get recommended product offering list for the given subscription
    api_response = api_instance.get_recommendations(baseSiteId, userId, affectedProductCode=affectedProductCode, fields=fields, processType=processType, subscriberIdentities=subscriberIdentities)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecommendationApi->getRecommendations: %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
affectedProductCode
String
Affected product id.
fields
String
This is the list of fields that should be returned in the response body.
processType
String
Process type for the subscription.
subscriberIdentities
String
List of subscriberIdentities. The format of a subscriberIdentities : subscriberIdentity1\_\_billingSystemId1, subscriberIdentity2\_\_billingSystemId2.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSubscriptionBases

Get subscriptions of customer based on process type and eligibility rules

Returns subscriptions details of the customer based on process type and eligibility rules


/{baseSiteId}/users/{userId}/{processType}/subscriptionBases

Usage and SDK Samples

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

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

public class RecommendationApiExample {

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

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

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

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

public class RecommendationApiExample {

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

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

// Get subscriptions of customer based on process type and eligibility rules
[apiInstance getSubscriptionBasesWith:baseSiteId
    processType:processType
    userId:userId
    fields:fields
              completionHandler: ^(TmaEligibleSubscriptionSelectionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.RecommendationApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var processType = processType_example; // {{String}} process type.
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}} 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.getSubscriptionBases(baseSiteId, processType, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new RecommendationApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var processType = processType_example;  // String | process type.
            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 | This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Get subscriptions of customer based on process type and eligibility rules
                TmaEligibleSubscriptionSelectionList result = apiInstance.getSubscriptionBases(baseSiteId, processType, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecommendationApi.getSubscriptionBases: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

my $api_instance = WWW::SwaggerClient::RecommendationApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $processType = processType_example; # String | process type.
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 | This is the list of fields that should be returned in the response body.

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

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

# create an instance of the API class
api_instance = swagger_client.RecommendationApi()
baseSiteId = baseSiteId_example # String | Base site identifier
processType = processType_example # String | process type.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | This is the list of fields that should be returned in the response body. (optional)

try: 
    # Get subscriptions of customer based on process type and eligibility rules
    api_response = api_instance.get_subscription_bases(baseSiteId, processType, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecommendationApi->getSubscriptionBases: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
processType*
String
process type.
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
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


ReturnRequests

createReturnRequest

Creates an order return request.

Creates an order return request. An order can be completely or partially returned. For a complete return, add all order entry numbers and quantities in the request body. For a partial return, only add the order entry numbers and quantities of the selected products.


/{baseSiteId}/users/{userId}/orderReturns

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}/orderReturns?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnRequestsApi;

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

public class ReturnRequestsApiExample {

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

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

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

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

public class ReturnRequestsApiExample {

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

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

// Creates an order return request.
[apiInstance createReturnRequestWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ReturnRequest output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

            var apiInstance = new ReturnRequestsApi();
            var body = new ReturnRequestEntryInputList(); // ReturnRequestEntryInputList | 
            var baseSiteId = baseSiteId_example;  // String | Base 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 return request.
                ReturnRequest result = apiInstance.createReturnRequest(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.createReturnRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

# create an instance of the API class
api_instance = swagger_client.ReturnRequestsApi()
body =  # ReturnRequestEntryInputList | 
baseSiteId = baseSiteId_example # 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 return request.
    api_response = api_instance.create_return_request(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->createReturnRequest: %s\n" % e)

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getReturnRequest

Retrieves the details of a return request.


/{baseSiteId}/users/{userId}/orderReturns/{returnRequestCode}

Usage and SDK Samples

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

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

public class ReturnRequestsApiExample {

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

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

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

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

public class ReturnRequestsApiExample {

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

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

// Retrieves the details of a return request.
[apiInstance getReturnRequestWith:baseSiteId
    returnRequestCode:returnRequestCode
    userId:userId
    fields:fields
              completionHandler: ^(ReturnRequest output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Retrieves the details of a return request.
                ReturnRequest result = apiInstance.getReturnRequest(baseSiteId, returnRequestCode, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.getReturnRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Retrieves the details of a return request.
    api_response = api_instance.get_return_request(baseSiteId, returnRequestCode, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->getReturnRequest: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getReturnRequests

Retrieves the return request history of the customer.

Retrieves the order history for all return requests associated with a customer.


/{baseSiteId}/users/{userId}/orderReturns

Usage and SDK Samples

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

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

public class ReturnRequestsApiExample {

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

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

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

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

public class ReturnRequestsApiExample {

    public static void main(String[] args) {
        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | 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 {
            ReturnRequestList result = apiInstance.getReturnRequests(baseSiteId, userId, currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#getReturnRequests");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // 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)

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

// Retrieves the return request history of the customer.
[apiInstance getReturnRequestsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(ReturnRequestList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ReturnRequestsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} 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.getReturnRequests(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new ReturnRequestsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | 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 return request history of the customer.
                ReturnRequestList result = apiInstance.getReturnRequests(baseSiteId, userId, currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.getReturnRequests: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiReturnRequestsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | 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->getReturnRequests($baseSiteId, $userId, $currentPage, $fields, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReturnRequestsApi->getReturnRequests: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReturnRequestsApi;

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

my $api_instance = WWW::SwaggerClient::ReturnRequestsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | 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->getReturnRequests(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReturnRequestsApi->getReturnRequests: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.ReturnRequestsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | 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 return request history of the customer.
    api_response = api_instance.get_return_requests(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->getReturnRequests: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
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


updateReturnRequest

Updates the order return request using the specified code.

Updates the order return request. Only cancellation of the request is supported by setting the attribute status to CANCELLING. Cancellation of the return request cannot be reverted


/{baseSiteId}/users/{userId}/orderReturns/{returnRequestCode}

Usage and SDK Samples

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

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

public class ReturnRequestsApiExample {

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

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

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

        ReturnRequestsApi apiInstance = new ReturnRequestsApi();
        ReturnRequestModification body = ; // ReturnRequestModification | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String returnRequestCode = returnRequestCode_example; // String | Order returns request code.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateReturnRequest(body, baseSiteId, returnRequestCode, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnRequestsApi#updateReturnRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnRequestsApi;

public class ReturnRequestsApiExample {

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

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

// Updates the order return request using the specified code.
[apiInstance updateReturnRequestWith:body
    baseSiteId:baseSiteId
    returnRequestCode:returnRequestCode
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.ReturnRequestsApi()
var body = ; // {{ReturnRequestModification}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var returnRequestCode = returnRequestCode_example; // {{String}} Order returns request code.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new ReturnRequestsApi();
            var body = new ReturnRequestModification(); // ReturnRequestModification | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var returnRequestCode = returnRequestCode_example;  // String | Order returns request code.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates the order return request using the specified code.
                apiInstance.updateReturnRequest(body, baseSiteId, returnRequestCode, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnRequestsApi.updateReturnRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiReturnRequestsApi();
$body = ; // ReturnRequestModification | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$returnRequestCode = returnRequestCode_example; // String | Order returns request code.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::ReturnRequestsApi->new();
my $body = WWW::SwaggerClient::Object::ReturnRequestModification->new(); # ReturnRequestModification | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $returnRequestCode = returnRequestCode_example; # String | Order returns request code.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.ReturnRequestsApi()
body =  # ReturnRequestModification | 
baseSiteId = baseSiteId_example # String | Base site identifier
returnRequestCode = returnRequestCode_example # String | Order returns request code.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the order return request using the specified code.
    api_instance.update_return_request(body, baseSiteId, returnRequestCode, userId)
except ApiException as e:
    print("Exception when calling ReturnRequestsApi->updateReturnRequest: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


SaveCart

doCartClone

Explicitly clones a cart.

Explicitly clones a cart.


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

Usage and SDK Samples

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

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

public class SaveCartApiExample {

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

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

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

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | Identifier of the Customer
        String description = description_example; // String | The description that should be applied to the cloned cart.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        String name = name_example; // String | The name that should be applied to the cloned cart.
        try {
            SaveCartResult result = apiInstance.doCartClone(baseSiteId, cartId, userId, description, fields, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doCartClone");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

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

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

// Explicitly clones a cart.
[apiInstance doCartCloneWith:baseSiteId
    cartId:cartId
    userId:userId
    description:description
    fields:fields
    name:name
              completionHandler: ^(SaveCartResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} Identifier of the Customer
var opts = { 
  'description': description_example, // {{String}} The description that should be applied to the cloned cart.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'name': name_example // {{String}} The name that should be applied to the cloned cart.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doCartClone(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | Identifier of the Customer
            var description = description_example;  // String | The description that should be applied to the cloned cart. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var name = name_example;  // String | The name that should be applied to the cloned cart. (optional) 

            try
            {
                // Explicitly clones a cart.
                SaveCartResult result = apiInstance.doCartClone(baseSiteId, cartId, userId, description, fields, name);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doCartClone: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | Identifier of the Customer
$description = description_example; // String | The description that should be applied to the cloned cart.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$name = name_example; // String | The name that should be applied to the cloned cart.

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

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

my $api_instance = WWW::SwaggerClient::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | Identifier of the Customer
my $description = description_example; # String | The description that should be applied to the cloned cart.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $name = name_example; # String | The name that should be applied to the cloned cart.

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

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

# create an instance of the API class
api_instance = swagger_client.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | Identifier of the Customer
description = description_example # String | The description that should be applied to the cloned cart. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
name = name_example # String | The name that should be applied to the cloned cart. (optional)

try: 
    # Explicitly clones a cart.
    api_response = api_instance.do_cart_clone(baseSiteId, cartId, userId, description=description, fields=fields, name=name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doCartClone: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
Identifier of the Customer
Required
Query parameters
Name Description
description
String
The description that should be applied to the cloned cart.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
name
String
The name that should be applied to the cloned cart.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doSaveCart

Updates a cart to save it.

Updates a cart to explicitly save it. Adds the name and description of the saved cart if specified.


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

Usage and SDK Samples

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

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

public class SaveCartApiExample {

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

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

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

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
        String saveCartDescription = saveCartDescription_example; // String | Description of the saved cart.
        String saveCartName = saveCartName_example; // String | Name of the saved cart.
        try {
            SaveCartResult result = apiInstance.doSaveCart(baseSiteId, cartId, userId, fields, saveCartDescription, saveCartName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doSaveCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
        String saveCartDescription = saveCartDescription_example; // String | Description of the saved cart.
        String saveCartName = saveCartName_example; // String | Name of the saved cart.
        try {
            SaveCartResult result = apiInstance.doSaveCart(baseSiteId, cartId, userId, fields, saveCartDescription, saveCartName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doSaveCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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)
String *saveCartDescription = saveCartDescription_example; // Description of the saved cart. (optional)
String *saveCartName = saveCartName_example; // Name of the saved cart. (optional)

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

// Updates a cart to save it.
[apiInstance doSaveCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
    saveCartDescription:saveCartDescription
    saveCartName:saveCartName
              completionHandler: ^(SaveCartResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
  'saveCartDescription': saveCartDescription_example, // {{String}} Description of the saved cart.
  'saveCartName': saveCartName_example // {{String}} Name of the saved cart.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doSaveCart(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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)
            var saveCartDescription = saveCartDescription_example;  // String | Description of the saved cart. (optional) 
            var saveCartName = saveCartName_example;  // String | Name of the saved cart. (optional) 

            try
            {
                // Updates a cart to save it.
                SaveCartResult result = apiInstance.doSaveCart(baseSiteId, cartId, userId, fields, saveCartDescription, saveCartName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doSaveCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
$saveCartDescription = saveCartDescription_example; // String | Description of the saved cart.
$saveCartName = saveCartName_example; // String | Name of the saved cart.

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

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

my $api_instance = WWW::SwaggerClient::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
my $saveCartDescription = saveCartDescription_example; # String | Description of the saved cart.
my $saveCartName = saveCartName_example; # String | Name of the saved cart.

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

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

# create an instance of the API class
api_instance = swagger_client.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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)
saveCartDescription = saveCartDescription_example # String | Description of the saved cart. (optional)
saveCartName = saveCartName_example # String | Name of the saved cart. (optional)

try: 
    # Updates a cart to save it.
    api_response = api_instance.do_save_cart(baseSiteId, cartId, userId, fields=fields, saveCartDescription=saveCartDescription, saveCartName=saveCartName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doSaveCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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
saveCartDescription
String
Description of the saved cart.
saveCartName
String
Name of the saved cart.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doUpdateFlagForDeletion

Updates the cart by flagging it for deletion.

Updates the cart without corresponding saved cart attributes by flagging it for deletion. The cart is not deleted from the database, but without the saved cart properties, the cart will be handled by the cart removal job just like any other cart.


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

Usage and SDK Samples

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

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

public class SaveCartApiExample {

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

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

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

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

public class SaveCartApiExample {

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

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

// Updates the cart by flagging it for deletion.
[apiInstance doUpdateFlagForDeletionWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(SaveCartResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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.doUpdateFlagForDeletion(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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 cart by flagging it for deletion.
                SaveCartResult result = apiInstance.doUpdateFlagForDeletion(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doUpdateFlagForDeletion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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->doUpdateFlagForDeletion($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SaveCartApi->doUpdateFlagForDeletion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SaveCartApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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->doUpdateFlagForDeletion(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->doUpdateFlagForDeletion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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 cart by flagging it for deletion.
    api_response = api_instance.do_update_flag_for_deletion(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doUpdateFlagForDeletion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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


doUpdateSavedCart

Restore a saved cart.

Restore a saved cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/restoresavedcart

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/restoresavedcart?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

import java.io.File;
import java.util.*;

public class SaveCartApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            SaveCartResult result = apiInstance.doUpdateSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doUpdateSavedCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | Identifier of the Customer
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            SaveCartResult result = apiInstance.doUpdateSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#doUpdateSavedCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // Identifier of the Customer
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

SaveCartApi *apiInstance = [[SaveCartApi alloc] init];

// Restore a saved cart.
[apiInstance doUpdateSavedCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(SaveCartResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} Identifier of the Customer
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doUpdateSavedCart(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doUpdateSavedCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | Identifier of the Customer
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Restore a saved cart.
                SaveCartResult result = apiInstance.doUpdateSavedCart(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.doUpdateSavedCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | Identifier of the Customer
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doUpdateSavedCart($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SaveCartApi->doUpdateSavedCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SaveCartApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | Identifier of the Customer
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doUpdateSavedCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->doUpdateSavedCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | Identifier of the Customer
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Restore a saved cart.
    api_response = api_instance.do_update_saved_cart(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->doUpdateSavedCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
Identifier of the Customer
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


getSavedCart

Retrieves the saved cart.

Retrieves the saved cart for an authenticated customer using the cart identifier.


/{baseSiteId}/users/{userId}/carts/{cartId}/savedcart

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/savedcart?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SaveCartApi;

import java.io.File;
import java.util.*;

public class SaveCartApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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 {
            SaveCartResult result = apiInstance.getSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#getSavedCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SaveCartApi;

public class SaveCartApiExample {

    public static void main(String[] args) {
        SaveCartApi apiInstance = new SaveCartApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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 {
            SaveCartResult result = apiInstance.getSavedCart(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SaveCartApi#getSavedCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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)

SaveCartApi *apiInstance = [[SaveCartApi alloc] init];

// Retrieves the saved cart.
[apiInstance getSavedCartWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(SaveCartResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.SaveCartApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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.getSavedCart(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSavedCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SaveCartApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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 saved cart.
                SaveCartResult result = apiInstance.getSavedCart(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SaveCartApi.getSavedCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiSaveCartApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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->getSavedCart($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SaveCartApi->getSavedCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SaveCartApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::SaveCartApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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->getSavedCart(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SaveCartApi->getSavedCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SaveCartApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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 saved cart.
    api_response = api_instance.get_saved_cart(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SaveCartApi->getSavedCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged-in user, cart GUID for anonymous user, 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


Stores

countStoreLocations

Retrieves a header that indicates the number of store locations.

In the response header, the "x-total-count" indicates the number of all stores that are near the location specified in the query or based on latitude and longitude.


/{baseSiteId}/stores

Usage and SDK Samples

curl -X HEAD\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/stores?accuracy=&latitude=&longitude=&query=&radius="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

import java.io.File;
import java.util.*;

public class StoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        String query = query_example; // String | Location in plain text. Example: USA or New York City
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        try {
            apiInstance.countStoreLocations(baseSiteId, accuracy, latitude, longitude, query, radius);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#countStoreLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        String query = query_example; // String | Location in plain text. Example: USA or New York City
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        try {
            apiInstance.countStoreLocations(baseSiteId, accuracy, latitude, longitude, query, radius);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#countStoreLocations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Double *accuracy = 1.2; // Accuracy in meters. (optional) (default to 0.0)
Double *latitude = 1.2; // Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
Double *longitude = 1.2; // Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
String *query = query_example; // Location in plain text. Example: USA or New York City (optional)
Double *radius = 1.2; // Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)

StoresApi *apiInstance = [[StoresApi alloc] init];

// Retrieves a header that indicates the number of store locations.
[apiInstance countStoreLocationsWith:baseSiteId
    accuracy:accuracy
    latitude:latitude
    longitude:longitude
    query:query
    radius:radius
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'accuracy': 1.2, // {{Double}} Accuracy in meters.
  'latitude': 1.2, // {{Double}} Coordinate that specifies the north-south position of a point on the Earth's surface.
  'longitude': 1.2, // {{Double}} Coordinate that specifies the east-west position of a point on the Earth's surface.
  'query': query_example, // {{String}} Location in plain text. Example: USA or New York City
  'radius': 1.2 // {{Double}} Radius in meters. Max value: 40075000.0 (Earth's perimeter).
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countStoreLocations(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class countStoreLocationsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var accuracy = 1.2;  // Double | Accuracy in meters. (optional)  (default to 0.0)
            var latitude = 1.2;  // Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional) 
            var longitude = 1.2;  // Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional) 
            var query = query_example;  // String | Location in plain text. Example: USA or New York City (optional) 
            var radius = 1.2;  // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional)  (default to 100000.0)

            try
            {
                // Retrieves a header that indicates the number of store locations.
                apiInstance.countStoreLocations(baseSiteId, accuracy, latitude, longitude, query, radius);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.countStoreLocations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$accuracy = 1.2; // Double | Accuracy in meters.
$latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
$longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
$query = query_example; // String | Location in plain text. Example: USA or New York City
$radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).

try {
    $api_instance->countStoreLocations($baseSiteId, $accuracy, $latitude, $longitude, $query, $radius);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->countStoreLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $accuracy = 1.2; # Double | Accuracy in meters.
my $latitude = 1.2; # Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
my $longitude = 1.2; # Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
my $query = query_example; # String | Location in plain text. Example: USA or New York City
my $radius = 1.2; # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).

eval { 
    $api_instance->countStoreLocations(baseSiteId => $baseSiteId, accuracy => $accuracy, latitude => $latitude, longitude => $longitude, query => $query, radius => $radius);
};
if ($@) {
    warn "Exception when calling StoresApi->countStoreLocations: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
accuracy = 1.2 # Double | Accuracy in meters. (optional) (default to 0.0)
latitude = 1.2 # Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
longitude = 1.2 # Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
query = query_example # String | Location in plain text. Example: USA or New York City (optional)
radius = 1.2 # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)

try: 
    # Retrieves a header that indicates the number of store locations.
    api_instance.count_store_locations(baseSiteId, accuracy=accuracy, latitude=latitude, longitude=longitude, query=query, radius=radius)
except ApiException as e:
    print("Exception when calling StoresApi->countStoreLocations: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
accuracy
Double (double)
Accuracy in meters.
latitude
Double (double)
Coordinate that specifies the north-south position of a point on the Earth's surface.
longitude
Double (double)
Coordinate that specifies the east-west position of a point on the Earth's surface.
query
String
Location in plain text. Example: USA or New York City
radius
Double (double)
Radius in meters. Max value: 40075000.0 (Earth's perimeter).

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getLocationCounts

Retrieves store counts.

Retrieves store counts per country and region.


/{baseSiteId}/stores/storescounts

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/stores/storescounts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

import java.io.File;
import java.util.*;

public class StoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            StoreCountList result = apiInstance.getLocationCounts(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getLocationCounts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            StoreCountList result = apiInstance.getLocationCounts(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getLocationCounts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier

StoresApi *apiInstance = [[StoresApi alloc] init];

// Retrieves store counts.
[apiInstance getLocationCountsWith:baseSiteId
              completionHandler: ^(StoreCountList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLocationCounts(baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLocationCountsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Retrieves store counts.
                StoreCountList result = apiInstance.getLocationCounts(baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getLocationCounts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $result = $api_instance->getLocationCounts($baseSiteId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getLocationCounts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    my $result = $api_instance->getLocationCounts(baseSiteId => $baseSiteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getLocationCounts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Retrieves store counts.
    api_response = api_instance.get_location_counts(baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getLocationCounts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoreLocation

Retrieves a store location.

Retrieves a store location using its unique name.


/{baseSiteId}/stores/{storeId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/stores/{storeId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

import java.io.File;
import java.util.*;

public class StoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String storeId = storeId_example; // String | Store identifier (currently store name)
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfService result = apiInstance.getStoreLocation(baseSiteId, storeId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String storeId = storeId_example; // String | Store identifier (currently store name)
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfService result = apiInstance.getStoreLocation(baseSiteId, storeId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *storeId = storeId_example; // Store identifier (currently store name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

StoresApi *apiInstance = [[StoresApi alloc] init];

// Retrieves a store location.
[apiInstance getStoreLocationWith:baseSiteId
    storeId:storeId
    fields:fields
              completionHandler: ^(PointOfService output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var storeId = storeId_example; // {{String}} Store identifier (currently store name)
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStoreLocation(baseSiteId, storeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoreLocationExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var storeId = storeId_example;  // String | Store identifier (currently store name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Retrieves a store location.
                PointOfService result = apiInstance.getStoreLocation(baseSiteId, storeId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoreLocation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$storeId = storeId_example; // String | Store identifier (currently store name)
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getStoreLocation($baseSiteId, $storeId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getStoreLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $storeId = storeId_example; # String | Store identifier (currently store name)
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getStoreLocation(baseSiteId => $baseSiteId, storeId => $storeId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoreLocation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
storeId = storeId_example # String | Store identifier (currently store name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Retrieves a store location.
    api_response = api_instance.get_store_location(baseSiteId, storeId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoreLocation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
storeId*
String
Store identifier (currently store name)
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoreLocations

Retrieves the store locations.

Retrieves the store locations that are near the location specified in a query or the latitude and longitude parameters.


/{baseSiteId}/stores

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/stores?accuracy=¤tPage=&fields=&latitude=&longitude=&pageSize=&query=&radius=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

import java.io.File;
import java.util.*;

public class StoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Integer currentPage = 56; // Integer | 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
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        Integer pageSize = 56; // Integer | Number of results returned per page.
        String query = query_example; // String | Location in plain text. Example: USA or New York City
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            StoreFinderSearchPage result = apiInstance.getStoreLocations(baseSiteId, accuracy, currentPage, fields, latitude, longitude, pageSize, query, radius, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Double accuracy = 1.2; // Double | Accuracy in meters.
        Integer currentPage = 56; // Integer | 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
        Double latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
        Double longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
        Integer pageSize = 56; // Integer | Number of results returned per page.
        String query = query_example; // String | Location in plain text. Example: USA or New York City
        Double radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
        String sort = sort_example; // String | Sorting method applied to the return results.
        try {
            StoreFinderSearchPage result = apiInstance.getStoreLocations(baseSiteId, accuracy, currentPage, fields, latitude, longitude, pageSize, query, radius, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoreLocations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Double *accuracy = 1.2; // Accuracy in meters. (optional) (default to 0.0)
Integer *currentPage = 56; // 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)
Double *latitude = 1.2; // Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
Double *longitude = 1.2; // Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
Integer *pageSize = 56; // Number of results returned per page. (optional) (default to 20)
String *query = query_example; // Location in plain text. Example: USA or New York City (optional)
Double *radius = 1.2; // Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)
String *sort = sort_example; // Sorting method applied to the return results. (optional) (default to asc)

StoresApi *apiInstance = [[StoresApi alloc] init];

// Retrieves the store locations.
[apiInstance getStoreLocationsWith:baseSiteId
    accuracy:accuracy
    currentPage:currentPage
    fields:fields
    latitude:latitude
    longitude:longitude
    pageSize:pageSize
    query:query
    radius:radius
    sort:sort
              completionHandler: ^(StoreFinderSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'accuracy': 1.2, // {{Double}} Accuracy in meters.
  'currentPage': 56, // {{Integer}} 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
  'latitude': 1.2, // {{Double}} Coordinate that specifies the north-south position of a point on the Earth's surface.
  'longitude': 1.2, // {{Double}} Coordinate that specifies the east-west position of a point on the Earth's surface.
  'pageSize': 56, // {{Integer}} Number of results returned per page.
  'query': query_example, // {{String}} Location in plain text. Example: USA or New York City
  'radius': 1.2, // {{Double}} Radius in meters. Max value: 40075000.0 (Earth's perimeter).
  'sort': sort_example // {{String}} Sorting method applied to the return results.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStoreLocations(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoreLocationsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var accuracy = 1.2;  // Double | Accuracy in meters. (optional)  (default to 0.0)
            var currentPage = 56;  // Integer | 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 latitude = 1.2;  // Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional) 
            var longitude = 1.2;  // Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional) 
            var pageSize = 56;  // Integer | Number of results returned per page. (optional)  (default to 20)
            var query = query_example;  // String | Location in plain text. Example: USA or New York City (optional) 
            var radius = 1.2;  // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional)  (default to 100000.0)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional)  (default to asc)

            try
            {
                // Retrieves the store locations.
                StoreFinderSearchPage result = apiInstance.getStoreLocations(baseSiteId, accuracy, currentPage, fields, latitude, longitude, pageSize, query, radius, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoreLocations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$accuracy = 1.2; // Double | Accuracy in meters.
$currentPage = 56; // Integer | 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
$latitude = 1.2; // Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
$longitude = 1.2; // Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
$pageSize = 56; // Integer | Number of results returned per page.
$query = query_example; // String | Location in plain text. Example: USA or New York City
$radius = 1.2; // Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
$sort = sort_example; // String | Sorting method applied to the return results.

try {
    $result = $api_instance->getStoreLocations($baseSiteId, $accuracy, $currentPage, $fields, $latitude, $longitude, $pageSize, $query, $radius, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getStoreLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $accuracy = 1.2; # Double | Accuracy in meters.
my $currentPage = 56; # Integer | 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 $latitude = 1.2; # Double | Coordinate that specifies the north-south position of a point on the Earth's surface.
my $longitude = 1.2; # Double | Coordinate that specifies the east-west position of a point on the Earth's surface.
my $pageSize = 56; # Integer | Number of results returned per page.
my $query = query_example; # String | Location in plain text. Example: USA or New York City
my $radius = 1.2; # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter).
my $sort = sort_example; # String | Sorting method applied to the return results.

eval { 
    my $result = $api_instance->getStoreLocations(baseSiteId => $baseSiteId, accuracy => $accuracy, currentPage => $currentPage, fields => $fields, latitude => $latitude, longitude => $longitude, pageSize => $pageSize, query => $query, radius => $radius, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoreLocations: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
accuracy = 1.2 # Double | Accuracy in meters. (optional) (default to 0.0)
currentPage = 56 # Integer | 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)
latitude = 1.2 # Double | Coordinate that specifies the north-south position of a point on the Earth's surface. (optional)
longitude = 1.2 # Double | Coordinate that specifies the east-west position of a point on the Earth's surface. (optional)
pageSize = 56 # Integer | Number of results returned per page. (optional) (default to 20)
query = query_example # String | Location in plain text. Example: USA or New York City (optional)
radius = 1.2 # Double | Radius in meters. Max value: 40075000.0 (Earth's perimeter). (optional) (default to 100000.0)
sort = sort_example # String | Sorting method applied to the return results. (optional) (default to asc)

try: 
    # Retrieves the store locations.
    api_response = api_instance.get_store_locations(baseSiteId, accuracy=accuracy, currentPage=currentPage, fields=fields, latitude=latitude, longitude=longitude, pageSize=pageSize, query=query, radius=radius, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoreLocations: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
accuracy
Double (double)
Accuracy in meters.
currentPage
Integer (int32)
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
latitude
Double (double)
Coordinate that specifies the north-south position of a point on the Earth's surface.
longitude
Double (double)
Coordinate that specifies the east-west position of a point on the Earth's surface.
pageSize
Integer (int32)
Number of results returned per page.
query
String
Location in plain text. Example: USA or New York City
radius
Double (double)
Radius in meters. Max value: 40075000.0 (Earth's perimeter).
sort
String
Sorting method applied to the return results.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoresByCountry

Retrieves the store locations in a country.

Retrieves the store locations that are in the specified country.


/{baseSiteId}/stores/country/{countryIso}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/stores/country/{countryIso}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

import java.io.File;
import java.util.*;

public class StoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfServiceList result = apiInstance.getStoresByCountry(baseSiteId, countryIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfServiceList result = apiInstance.getStoresByCountry(baseSiteId, countryIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *countryIso = countryIso_example; // Country ISO code.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

StoresApi *apiInstance = [[StoresApi alloc] init];

// Retrieves the store locations in a country.
[apiInstance getStoresByCountryWith:baseSiteId
    countryIso:countryIso
    fields:fields
              completionHandler: ^(PointOfServiceList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var countryIso = countryIso_example; // {{String}} Country ISO code.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStoresByCountry(baseSiteId, countryIso, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoresByCountryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var countryIso = countryIso_example;  // String | Country ISO code.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Retrieves the store locations in a country.
                PointOfServiceList result = apiInstance.getStoresByCountry(baseSiteId, countryIso, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoresByCountry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$countryIso = countryIso_example; // String | Country ISO code.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getStoresByCountry($baseSiteId, $countryIso, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getStoresByCountry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $countryIso = countryIso_example; # String | Country ISO code.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getStoresByCountry(baseSiteId => $baseSiteId, countryIso => $countryIso, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoresByCountry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
countryIso = countryIso_example # String | Country ISO code.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Retrieves the store locations in a country.
    api_response = api_instance.get_stores_by_country(baseSiteId, countryIso, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoresByCountry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
countryIso*
String
Country ISO code.
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getStoresByCountryAndRegion

Retrieves the store locations.

Retrieves the store locations in the specified country and region.


/{baseSiteId}/stores/country/{countryIso}/region/{regionIso}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/stores/country/{countryIso}/region/{regionIso}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StoresApi;

import java.io.File;
import java.util.*;

public class StoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code.
        String regionIso = regionIso_example; // String | Region ISO code.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfServiceList result = apiInstance.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountryAndRegion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StoresApi;

public class StoresApiExample {

    public static void main(String[] args) {
        StoresApi apiInstance = new StoresApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String countryIso = countryIso_example; // String | Country ISO code.
        String regionIso = regionIso_example; // String | Region ISO code.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfServiceList result = apiInstance.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StoresApi#getStoresByCountryAndRegion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *countryIso = countryIso_example; // Country ISO code.
String *regionIso = regionIso_example; // Region ISO code.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

StoresApi *apiInstance = [[StoresApi alloc] init];

// Retrieves the store locations.
[apiInstance getStoresByCountryAndRegionWith:baseSiteId
    countryIso:countryIso
    regionIso:regionIso
    fields:fields
              completionHandler: ^(PointOfServiceList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.StoresApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var countryIso = countryIso_example; // {{String}} Country ISO code.
var regionIso = regionIso_example; // {{String}} Region ISO code.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStoresByCountryAndRegionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var countryIso = countryIso_example;  // String | Country ISO code.
            var regionIso = regionIso_example;  // String | Region ISO code.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Retrieves the store locations.
                PointOfServiceList result = apiInstance.getStoresByCountryAndRegion(baseSiteId, countryIso, regionIso, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.getStoresByCountryAndRegion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiStoresApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$countryIso = countryIso_example; // String | Country ISO code.
$regionIso = regionIso_example; // String | Region ISO code.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getStoresByCountryAndRegion($baseSiteId, $countryIso, $regionIso, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getStoresByCountryAndRegion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::StoresApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $countryIso = countryIso_example; # String | Country ISO code.
my $regionIso = regionIso_example; # String | Region ISO code.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getStoresByCountryAndRegion(baseSiteId => $baseSiteId, countryIso => $countryIso, regionIso => $regionIso, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StoresApi->getStoresByCountryAndRegion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StoresApi()
baseSiteId = baseSiteId_example # String | Base site identifier
countryIso = countryIso_example # String | Country ISO code.
regionIso = regionIso_example # String | Region ISO code.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Retrieves the store locations.
    api_response = api_instance.get_stores_by_country_and_region(baseSiteId, countryIso, regionIso, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StoresApi->getStoresByCountryAndRegion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
countryIso*
String
Country ISO code.
Required
regionIso*
String
Region ISO code.
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Users

createUser

Registers a customer

Registers a customer. Captures customers identification details if provided. Requires the following parameters:login, password, firstName, lastName, titleCode, identifications


/{baseSiteId}/users

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?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        UserSignUp body = ; // UserSignUp | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.createUser(body, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        UserSignUp body = ; // UserSignUp | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.createUser(body, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
UserSignUp *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Registers a customer
[apiInstance createUserWith:body
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var body = ; // {{UserSignUp}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createUser(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var body = new UserSignUp(); // UserSignUp | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Registers a customer
                User result = apiInstance.createUser(body, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$body = ; // UserSignUp | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createUser($body, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::UserSignUp->new(); # UserSignUp | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createUser(body => $body, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # UserSignUp | 
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Registers a customer
    api_response = api_instance.create_user(body, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUser

Retrieves the 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.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.getUser(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.getUser(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Retrieves the customer profile.
[apiInstance getUserWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUser(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Retrieves the customer profile.
                User result = apiInstance.getUser(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getUser($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getUser(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Retrieves the customer profile.
    api_response = api_instance.get_user(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getUserCustomerGroups

Retrieves the customer groups.


/{baseSiteId}/users/{userId}/customergroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/customergroups?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            UserGroupList result = apiInstance.getUserCustomerGroups(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserCustomerGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            UserGroupList result = apiInstance.getUserCustomerGroups(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserCustomerGroups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier.
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Retrieves the customer groups.
[apiInstance getUserCustomerGroupsWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(UserGroupList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserCustomerGroups(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserCustomerGroupsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier.
            var fields = fields_example;  // String | Response 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 customer groups.
                UserGroupList result = apiInstance.getUserCustomerGroups(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUserCustomerGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getUserCustomerGroups($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUserCustomerGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getUserCustomerGroups(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUserCustomerGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier.
fields = fields_example # String | Response 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 customer groups.
    api_response = api_instance.get_user_customer_groups(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUserCustomerGroups: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier.
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


removeUser

Deletes the customer profile.


/{baseSiteId}/users/{userId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeUser(baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#removeUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeUser(baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#removeUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

UsersApi *apiInstance = [[UsersApi alloc] init];

// Deletes the customer profile.
[apiInstance removeUserWith:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeUser(baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes the customer profile.
                apiInstance.removeUser(baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.removeUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeUser($baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->removeUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeUser(baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->removeUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes the customer profile.
    api_instance.remove_user(baseSiteId, userId)
except ApiException as e:
    print("Exception when calling UsersApi->removeUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceUser

Updates customer profile

Updates customer profile and identification details. Attributes not provided in the request body will be defined again (set to null or default).


/{baseSiteId}/users/{userId}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        User body = ; // User | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        User body = ; // User | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
User *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

UsersApi *apiInstance = [[UsersApi alloc] init];

// Updates customer profile
[apiInstance replaceUserWith:body
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var body = ; // {{User}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceUser(bodybaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var body = new User(); // User | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates customer profile
                apiInstance.replaceUser(body, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.replaceUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$body = ; // User | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceUser($body, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->replaceUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceUser(body => $body, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->replaceUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # User | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates customer profile
    api_instance.replace_user(body, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling UsersApi->replaceUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceUserLogin

Changes customer's login name.

Changes a customer's login name. Requires the customer's current password.


/{baseSiteId}/users/{userId}/login

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/login?newLogin=&password="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String newLogin = newLogin_example; // String | New login name of a customer. The name is case insensitive.
        String password = password_example; // String | Current password of a customer.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceUserLogin(baseSiteId, newLogin, password, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserLogin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String newLogin = newLogin_example; // String | New login name of a customer. The name is case insensitive.
        String password = password_example; // String | Current password of a customer.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceUserLogin(baseSiteId, newLogin, password, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserLogin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *newLogin = newLogin_example; // New login name of a customer. The name is case insensitive.
String *password = password_example; // Current password of a customer.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

UsersApi *apiInstance = [[UsersApi alloc] init];

// Changes customer's login name.
[apiInstance replaceUserLoginWith:baseSiteId
    newLogin:newLogin
    password:password
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var newLogin = newLogin_example; // {{String}} New login name of a customer. The name is case insensitive.
var password = password_example; // {{String}} Current password of a customer.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceUserLogin(baseSiteId, newLogin, password, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUserLoginExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var newLogin = newLogin_example;  // String | New login name of a customer. The name is case insensitive.
            var password = password_example;  // String | Current password of a customer.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Changes customer's login name.
                apiInstance.replaceUserLogin(baseSiteId, newLogin, password, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.replaceUserLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$newLogin = newLogin_example; // String | New login name of a customer. The name is case insensitive.
$password = password_example; // String | Current password of a customer.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceUserLogin($baseSiteId, $newLogin, $password, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->replaceUserLogin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $newLogin = newLogin_example; # String | New login name of a customer. The name is case insensitive.
my $password = password_example; # String | Current password of a customer.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceUserLogin(baseSiteId => $baseSiteId, newLogin => $newLogin, password => $password, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->replaceUserLogin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
newLogin = newLogin_example # String | New login name of a customer. The name is case insensitive.
password = password_example # String | Current password of a customer.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Changes customer's login name.
    api_instance.replace_user_login(baseSiteId, newLogin, password, userId)
except ApiException as e:
    print("Exception when calling UsersApi->replaceUserLogin: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
newLogin*
String
New login name of a customer. The name is case insensitive.
Required
password*
String
Current password of a customer.
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceUserPassword

Updates the password of a customer.


/{baseSiteId}/users/{userId}/password

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/password?new=&old="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String new = new_example; // String | New password.
        String old = old_example; // String | Old password.
        String userId = userId_example; // String | User identifier.
        try {
            apiInstance.replaceUserPassword(baseSiteId, new, old, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String new = new_example; // String | New password.
        String old = old_example; // String | Old password.
        String userId = userId_example; // String | User identifier.
        try {
            apiInstance.replaceUserPassword(baseSiteId, new, old, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#replaceUserPassword");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *new = new_example; // New password.
String *old = old_example; // Old password.
String *userId = userId_example; // User identifier.

UsersApi *apiInstance = [[UsersApi alloc] init];

// Updates the password of a customer.
[apiInstance replaceUserPasswordWith:baseSiteId
    new:new
    old:old
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var new = new_example; // {{String}} New password.
var old = old_example; // {{String}} Old password.
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.replaceUserPassword(baseSiteId, new, old, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUserPasswordExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var new = new_example;  // String | New password.
            var old = old_example;  // String | Old password.
            var userId = userId_example;  // String | User identifier.

            try
            {
                // Updates the password of a customer.
                apiInstance.replaceUserPassword(baseSiteId, new, old, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.replaceUserPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$new = new_example; // String | New password.
$old = old_example; // String | Old password.
$userId = userId_example; // String | User identifier.

try {
    $api_instance->replaceUserPassword($baseSiteId, $new, $old, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->replaceUserPassword: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $new = new_example; # String | New password.
my $old = old_example; # String | Old password.
my $userId = userId_example; # String | User identifier.

eval { 
    $api_instance->replaceUserPassword(baseSiteId => $baseSiteId, new => $new, old => $old, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->replaceUserPassword: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
new = new_example # String | New password.
old = old_example # String | Old password.
userId = userId_example # String | User identifier.

try: 
    # Updates the password of a customer.
    api_instance.replace_user_password(baseSiteId, new, old, userId)
except ApiException as e:
    print("Exception when calling UsersApi->replaceUserPassword: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier.
Required
Query parameters
Name Description
new*
String
New password.
Required
old*
String
Old password.
Required

Responses

Status: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateUser

Updates customer profile

Updates customer profile and identification details. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}

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}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        User body = ; // User | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        User body = ; // User | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateUser(body, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
User *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

UsersApi *apiInstance = [[UsersApi alloc] init];

// Updates customer profile
[apiInstance updateUserWith:body
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.UsersApi()
var body = ; // {{User}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateUser(bodybaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var body = new User(); // User | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates customer profile
                apiInstance.updateUser(body, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.updateUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiUsersApi();
$body = ; // User | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateUser($body, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateUser(body => $body, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->updateUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # User | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates customer profile
    api_instance.update_user(body, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling UsersApi->updateUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Vouchers

getVoucher

Retrieves the voucher.

Retrieves the details of the voucher using the voucher identifier.


/{baseSiteId}/vouchers/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/vouchers/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VouchersApi;

import java.io.File;
import java.util.*;

public class VouchersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        VouchersApi apiInstance = new VouchersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Voucher identifier (code)
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Voucher result = apiInstance.getVoucher(baseSiteId, code, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VouchersApi#getVoucher");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VouchersApi;

public class VouchersApiExample {

    public static void main(String[] args) {
        VouchersApi apiInstance = new VouchersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Voucher identifier (code)
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Voucher result = apiInstance.getVoucher(baseSiteId, code, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VouchersApi#getVoucher");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *code = code_example; // Voucher identifier (code)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

VouchersApi *apiInstance = [[VouchersApi alloc] init];

// Retrieves the voucher.
[apiInstance getVoucherWith:baseSiteId
    code:code
    fields:fields
              completionHandler: ^(Voucher output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.VouchersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Voucher identifier (code)
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getVoucher(baseSiteId, code, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getVoucherExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new VouchersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Voucher identifier (code)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to BASIC)

            try
            {
                // Retrieves the voucher.
                Voucher result = apiInstance.getVoucher(baseSiteId, code, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VouchersApi.getVoucher: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiVouchersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Voucher identifier (code)
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getVoucher($baseSiteId, $code, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VouchersApi->getVoucher: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VouchersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::VouchersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Voucher identifier (code)
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getVoucher(baseSiteId => $baseSiteId, code => $code, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VouchersApi->getVoucher: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.VouchersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Voucher identifier (code)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

try: 
    # Retrieves the voucher.
    api_response = api_instance.get_voucher(baseSiteId, code, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VouchersApi->getVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Voucher identifier (code)
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found