Commerce Webservices

AccommodationCarts

addLeadGuestDetails

Add lead guest details

Adds or updates the lead guest details for a room stays in the cart. Also specifies the expected guest occupancy for the given room stay.


/{baseSiteId}/users/{userId}/carts/{cartId}/roomStays/{roomStayRefNumber}/leadGuest

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        LeadGuest body = ; // LeadGuest | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addLeadGuestDetails(body, baseSiteId, cartId, roomStayRefNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#addLeadGuestDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        LeadGuest body = ; // LeadGuest | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addLeadGuestDetails(body, baseSiteId, cartId, roomStayRefNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#addLeadGuestDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
LeadGuest *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, 'current' for the last modified cart
Integer *roomStayRefNumber = 56; // Room Stay unique identifier - identifies a room stay in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Add lead guest details
[apiInstance addLeadGuestDetailsWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    roomStayRefNumber:roomStayRefNumber
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
var body = ; // {{LeadGuest}} 
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 roomStayRefNumber = 56; // {{Integer}} Room Stay unique identifier - identifies a room stay in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationCartsApi();
            var body = new LeadGuest(); // LeadGuest | 
            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 roomStayRefNumber = 56;  // Integer | Room Stay unique identifier - identifies a room stay in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add lead guest details
                'String' result = apiInstance.addLeadGuestDetails(body, baseSiteId, cartId, roomStayRefNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.addLeadGuestDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$body = ; // LeadGuest | 
$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
$roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->new();
my $body = WWW::SwaggerClient::Object::LeadGuest->new(); # LeadGuest | 
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 $roomStayRefNumber = 56; # Integer | Room Stay unique identifier - identifies a room stay in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
body =  # LeadGuest | 
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
roomStayRefNumber = 56 # Integer | Room Stay unique identifier - identifies a room stay in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add lead guest details
    api_response = api_instance.add_lead_guest_details(body, baseSiteId, cartId, roomStayRefNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->addLeadGuestDetails: %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
roomStayRefNumber*
Integer (int32)
Room Stay unique identifier - identifies a room stay in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


addRoomStay

Perform the add room stays to cart.

Add rates and included services to the cart for the period specified in the request.


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

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}/roomStays"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationCartsApi;

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        AddRoomStayToCartRequest body = ; // AddRoomStayToCartRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addRoomStay(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#addRoomStay");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        AddRoomStayToCartRequest body = ; // AddRoomStayToCartRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addRoomStay(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#addRoomStay");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AddRoomStayToCartRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Perform the add room stays to cart.
[apiInstance addRoomStayWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
var body = ; // {{AddRoomStayToCartRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationCartsApi();
            var body = new AddRoomStayToCartRequest(); // AddRoomStayToCartRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Perform the add room stays to cart.
                'String' result = apiInstance.addRoomStay(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.addRoomStay: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$body = ; // AddRoomStayToCartRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->new();
my $body = WWW::SwaggerClient::Object::AddRoomStayToCartRequest->new(); # AddRoomStayToCartRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
body =  # AddRoomStayToCartRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Perform the add room stays to cart.
    api_response = api_instance.add_room_stay(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->addRoomStay: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


changeRoomStayDates

Modifies check in and check out dates against room rates in the cart

Applies dates change to all the room stays in the cart, in case of availability of all the selected accommodations and all the selected rate plans.


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

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}/changeStayDates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationCartsApi;

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        UpdateRoomStaysRequest body = ; // UpdateRoomStaysRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.changeRoomStayDates(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#changeRoomStayDates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        UpdateRoomStaysRequest body = ; // UpdateRoomStaysRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.changeRoomStayDates(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#changeRoomStayDates");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
UpdateRoomStaysRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Modifies check in and check out dates against room rates in the cart
[apiInstance changeRoomStayDatesWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    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.AccommodationCartsApi()
var body = ; // {{UpdateRoomStaysRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationCartsApi();
            var body = new UpdateRoomStaysRequest(); // UpdateRoomStaysRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Modifies check in and check out dates against room rates in the cart
                apiInstance.changeRoomStayDates(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.changeRoomStayDates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$body = ; // UpdateRoomStaysRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->changeRoomStayDates($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->changeRoomStayDates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->new();
my $body = WWW::SwaggerClient::Object::UpdateRoomStaysRequest->new(); # UpdateRoomStaysRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
body =  # UpdateRoomStaysRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Modifies check in and check out dates against room rates in the cart
    api_instance.change_room_stay_dates(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->changeRoomStayDates: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Internal Server Error


createServiceEntry

Add accommodation service entry to cart

Adds an accommodation service entry linked to the specified room stay


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

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}/serviceEntries"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationCartsApi;

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        AddServiceEntryRequest body = ; // AddServiceEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createServiceEntry(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#createServiceEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        AddServiceEntryRequest body = ; // AddServiceEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.createServiceEntry(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#createServiceEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AddServiceEntryRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Add accommodation service entry to cart
[apiInstance createServiceEntryWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    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.AccommodationCartsApi()
var body = ; // {{AddServiceEntryRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationCartsApi();
            var body = new AddServiceEntryRequest(); // AddServiceEntryRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add accommodation service entry to cart
                apiInstance.createServiceEntry(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.createServiceEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$body = ; // AddServiceEntryRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->createServiceEntry($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->createServiceEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->new();
my $body = WWW::SwaggerClient::Object::AddServiceEntryRequest->new(); # AddServiceEntryRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
body =  # AddServiceEntryRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add accommodation service entry to cart
    api_instance.create_service_entry(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->createServiceEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


deleteAccommodationServiceEntry

Delete accommodation service entry from cart

Deletes an accommodation service entry linked to the specified room stay


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

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 entryId = entryId_example; // String | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.deleteAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#deleteAccommodationServiceEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 entryId = entryId_example; // String | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.deleteAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#deleteAccommodationServiceEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *entryId = entryId_example; // The entry identifier. Each entry in a cart has an entry identifier.
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Delete accommodation service entry from cart
[apiInstance deleteAccommodationServiceEntryWith:baseSiteId
    cartId:cartId
    entryId:entryId
    sap.cxSalesApplication:sap.cxSalesApplication
    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.AccommodationCartsApi()
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 entryId = entryId_example; // {{String}} The entry identifier. Each entry in a cart has an entry identifier.
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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.deleteAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            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 entryId = entryId_example;  // String | The entry identifier. Each entry in a cart has an entry identifier.
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Delete accommodation service entry from cart
                apiInstance.deleteAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.deleteAccommodationServiceEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$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
$entryId = entryId_example; // String | The entry identifier. Each entry in a cart has an entry identifier.
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->deleteAccommodationServiceEntry($baseSiteId, $cartId, $entryId, $sap.cxSalesApplication, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->deleteAccommodationServiceEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->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 $entryId = entryId_example; # String | The entry identifier. Each entry in a cart has an entry identifier.
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application 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->deleteAccommodationServiceEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
};
if ($@) {
    warn "Exception when calling AccommodationCartsApi->deleteAccommodationServiceEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
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
entryId = entryId_example # String | The entry identifier. Each entry in a cart has an entry identifier.
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Delete accommodation service entry from cart
    api_instance.delete_accommodation_service_entry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->deleteAccommodationServiceEntry: %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
entryId*
String
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


deleteRoomStay

Deletes a room stay from cart.

Deletes the specified room stay from the cart, if present, and all the associated products.


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

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer roomStayRefNumber = 56; // Integer | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.deleteRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#deleteRoomStay");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer roomStayRefNumber = 56; // Integer | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.deleteRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#deleteRoomStay");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *roomStayRefNumber = 56; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Deletes a room stay from cart.
[apiInstance deleteRoomStayWith:baseSiteId
    cartId:cartId
    roomStayRefNumber:roomStayRefNumber
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
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 roomStayRefNumber = 56; // {{Integer}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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. Returned data: ' + data);
  }
};
api.deleteRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            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 roomStayRefNumber = 56;  // Integer | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes a room stay from cart.
                'String' result = apiInstance.deleteRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.deleteRoomStay: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$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
$roomStayRefNumber = 56; // Integer | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->deleteRoomStay($baseSiteId, $cartId, $roomStayRefNumber, $sap.cxSalesApplication, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->deleteRoomStay: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->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 $roomStayRefNumber = 56; # Integer | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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->deleteRoomStay(baseSiteId => $baseSiteId, cartId => $cartId, roomStayRefNumber => $roomStayRefNumber, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccommodationCartsApi->deleteRoomStay: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
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
roomStayRefNumber = 56 # Integer | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes a room stay from cart.
    api_response = api_instance.delete_room_stay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->deleteRoomStay: %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
roomStayRefNumber*
Integer (int32)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


getAccommodationServiceEntry

Gets details of an accommodation service entry.

Gets the details of an accommodation service cart entry, such as the product added, the quantity in cart, and price information.


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

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.getAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getAccommodationServiceEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.getAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getAccommodationServiceEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier.
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Gets details of an accommodation service entry.
[apiInstance getAccommodationServiceEntryWith:baseSiteId
    cartId:cartId
    entryId:entryId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier.
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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. Returned data: ' + data);
  }
};
api.getAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry identifier.
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Gets details of an accommodation service entry.
                'String' result = apiInstance.getAccommodationServiceEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.getAccommodationServiceEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->getAccommodationServiceEntry($baseSiteId, $cartId, $entryId, $sap.cxSalesApplication, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->getAccommodationServiceEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier.
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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->getAccommodationServiceEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccommodationCartsApi->getAccommodationServiceEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier.
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Gets details of an accommodation service entry.
    api_response = api_instance.get_accommodation_service_entry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->getAccommodationServiceEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getAvailableAccommodationServices

Searches for all available services

Searches for all available services for the room stays present in the cart with the given ID


/{baseSiteId}/users/{userId}/carts/{cartId}/roomStays/{roomStayRefNumber}/accommodationServices

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 roomStayRefNumber = roomStayRefNumber_example; // String | The room stay reference number for which the services are returned
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAvailableAccommodationServices(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getAvailableAccommodationServices");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 roomStayRefNumber = roomStayRefNumber_example; // String | The room stay reference number for which the services are returned
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAvailableAccommodationServices(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getAvailableAccommodationServices");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *roomStayRefNumber = roomStayRefNumber_example; // The room stay reference number for which the services are returned
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Searches for all available services
[apiInstance getAvailableAccommodationServicesWith:baseSiteId
    cartId:cartId
    roomStayRefNumber:roomStayRefNumber
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
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 roomStayRefNumber = roomStayRefNumber_example; // {{String}} The room stay reference number for which the services are returned
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableAccommodationServices(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            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 roomStayRefNumber = roomStayRefNumber_example;  // String | The room stay reference number for which the services are returned
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Searches for all available services
                'String' result = apiInstance.getAvailableAccommodationServices(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.getAvailableAccommodationServices: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$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
$roomStayRefNumber = roomStayRefNumber_example; // String | The room stay reference number for which the services are returned
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getAvailableAccommodationServices($baseSiteId, $cartId, $roomStayRefNumber, $sap.cxSalesApplication, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->getAvailableAccommodationServices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->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 $roomStayRefNumber = roomStayRefNumber_example; # String | The room stay reference number for which the services are returned
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
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
roomStayRefNumber = roomStayRefNumber_example # String | The room stay reference number for which the services are returned
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Searches for all available services
    api_response = api_instance.get_available_accommodation_services(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->getAvailableAccommodationServices: %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
roomStayRefNumber*
String
The room stay reference number for which the services are returned
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity)

Status: 500 - Server Error


getGuaranteesForRoomStay

Returns guarantees for a room stay

Returns information about the guarantees applied to the given room stays according with the selected rate plan


/{baseSiteId}/users/{userId}/carts/{cartId}/roomStays/{roomStayRefNumber}/guarantees

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 roomStayRefNumber = roomStayRefNumber_example; // String | The room stay reference number for which the services are returned
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            GuaranteeList result = apiInstance.getGuaranteesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getGuaranteesForRoomStay");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 roomStayRefNumber = roomStayRefNumber_example; // String | The room stay reference number for which the services are returned
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            GuaranteeList result = apiInstance.getGuaranteesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getGuaranteesForRoomStay");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *roomStayRefNumber = roomStayRefNumber_example; // The room stay reference number for which the services are returned
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Returns guarantees for a room stay
[apiInstance getGuaranteesForRoomStayWith:baseSiteId
    cartId:cartId
    roomStayRefNumber:roomStayRefNumber
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^(GuaranteeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
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 roomStayRefNumber = roomStayRefNumber_example; // {{String}} The room stay reference number for which the services are returned
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGuaranteesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            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 roomStayRefNumber = roomStayRefNumber_example;  // String | The room stay reference number for which the services are returned
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns guarantees for a room stay
                GuaranteeList result = apiInstance.getGuaranteesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.getGuaranteesForRoomStay: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$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
$roomStayRefNumber = roomStayRefNumber_example; // String | The room stay reference number for which the services are returned
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getGuaranteesForRoomStay($baseSiteId, $cartId, $roomStayRefNumber, $sap.cxSalesApplication, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->getGuaranteesForRoomStay: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->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 $roomStayRefNumber = roomStayRefNumber_example; # String | The room stay reference number for which the services are returned
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
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
roomStayRefNumber = roomStayRefNumber_example # String | The room stay reference number for which the services are returned
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns guarantees for a room stay
    api_response = api_instance.get_guarantees_for_room_stay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->getGuaranteesForRoomStay: %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
roomStayRefNumber*
String
The room stay reference number for which the services are returned
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


getPenaltiesForRoomStay

Returns cancel penalties for a room stay

Returns information about the cancel penalties applied to the given room stays according with the selected rate plan


/{baseSiteId}/users/{userId}/carts/{cartId}/roomStays/{roomStayRefNumber}/cancelPenalties

Usage and SDK Samples

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

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 roomStayRefNumber = roomStayRefNumber_example; // String | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            CancelPenaltyList result = apiInstance.getPenaltiesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getPenaltiesForRoomStay");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        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 roomStayRefNumber = roomStayRefNumber_example; // String | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            CancelPenaltyList result = apiInstance.getPenaltiesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#getPenaltiesForRoomStay");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *roomStayRefNumber = roomStayRefNumber_example; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Returns cancel penalties for a room stay
[apiInstance getPenaltiesForRoomStayWith:baseSiteId
    cartId:cartId
    roomStayRefNumber:roomStayRefNumber
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^(CancelPenaltyList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationCartsApi()
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 roomStayRefNumber = roomStayRefNumber_example; // {{String}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPenaltiesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            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 roomStayRefNumber = roomStayRefNumber_example;  // String | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns cancel penalties for a room stay
                CancelPenaltyList result = apiInstance.getPenaltiesForRoomStay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.getPenaltiesForRoomStay: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$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
$roomStayRefNumber = roomStayRefNumber_example; // String | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getPenaltiesForRoomStay($baseSiteId, $cartId, $roomStayRefNumber, $sap.cxSalesApplication, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->getPenaltiesForRoomStay: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->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 $roomStayRefNumber = roomStayRefNumber_example; # String | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
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
roomStayRefNumber = roomStayRefNumber_example # String | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns cancel penalties for a room stay
    api_response = api_instance.get_penalties_for_room_stay(baseSiteId, cartId, roomStayRefNumber, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->getPenaltiesForRoomStay: %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
roomStayRefNumber*
String
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
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


updateAccommodationServiceEntry

Update accommodation service entry to cart

Updates an accommodation service entry linked to the specified room stay


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

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}/carts/{cartId}/serviceEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationCartsApi;

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

public class AccommodationCartsApiExample {

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

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

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

        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        AddServiceEntryRequest body = ; // AddServiceEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        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 entryId = entryId_example; // String | The entry identifier. Each entry in a cart has an entry identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateAccommodationServiceEntry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#updateAccommodationServiceEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationCartsApi;

public class AccommodationCartsApiExample {

    public static void main(String[] args) {
        AccommodationCartsApi apiInstance = new AccommodationCartsApi();
        AddServiceEntryRequest body = ; // AddServiceEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        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 entryId = entryId_example; // String | The entry identifier. Each entry in a cart has an entry identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateAccommodationServiceEntry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationCartsApi#updateAccommodationServiceEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AddServiceEntryRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
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 *entryId = entryId_example; // The entry identifier. Each entry in a cart has an entry identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Update accommodation service entry to cart
[apiInstance updateAccommodationServiceEntryWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    entryId:entryId
    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.AccommodationCartsApi()
var body = ; // {{AddServiceEntryRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
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 entryId = entryId_example; // {{String}} The entry identifier. Each entry in a cart has an entry 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.updateAccommodationServiceEntry(bodysap.cxSalesApplicationbaseSiteIdcartIdentryIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationCartsApi();
            var body = new AddServiceEntryRequest(); // AddServiceEntryRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            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 entryId = entryId_example;  // String | The entry identifier. Each entry in a cart has an entry identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Update accommodation service entry to cart
                apiInstance.updateAccommodationServiceEntry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationCartsApi.updateAccommodationServiceEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationCartsApi();
$body = ; // AddServiceEntryRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$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
$entryId = entryId_example; // String | The entry identifier. Each entry in a cart has an entry identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateAccommodationServiceEntry($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $entryId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationCartsApi->updateAccommodationServiceEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationCartsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationCartsApi->new();
my $body = WWW::SwaggerClient::Object::AddServiceEntryRequest->new(); # AddServiceEntryRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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 $entryId = entryId_example; # String | The entry identifier. Each entry in a cart has an entry 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->updateAccommodationServiceEntry(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, userId => $userId);
};
if ($@) {
    warn "Exception when calling AccommodationCartsApi->updateAccommodationServiceEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationCartsApi()
body =  # AddServiceEntryRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
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
entryId = entryId_example # String | The entry identifier. Each entry in a cart has an entry identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Update accommodation service entry to cart
    api_instance.update_accommodation_service_entry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId)
except ApiException as e:
    print("Exception when calling AccommodationCartsApi->updateAccommodationServiceEntry: %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
entryId*
String
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


AccommodationOfferings

getAccommodationOffering

Returns information about a specific accommodation offering

Returns detailed information about the given accommodation offering, alongside with the available rates for any room type defined in the property


/{baseSiteId}/accommodationOfferings/{accommodationOfferingCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/accommodationOfferings/{accommodationOfferingCode}?checkInDate=&checkOutDate=&roomGuestOccupancy="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOfferingsApi;

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

public class AccommodationOfferingsApiExample {

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

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

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

        AccommodationOfferingsApi apiInstance = new AccommodationOfferingsApi();
        String accommodationOfferingCode = accommodationOfferingCode_example; // String | Accommodation offering identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String checkInDate = checkInDate_example; // String | The check in date
        String checkOutDate = checkOutDate_example; // String | The check out date
        String roomGuestOccupancy = roomGuestOccupancy_example; // String | The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            AccommodationOfferingDetails result = apiInstance.getAccommodationOffering(accommodationOfferingCode, baseSiteId, checkInDate, checkOutDate, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOfferingsApi#getAccommodationOffering");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOfferingsApi;

public class AccommodationOfferingsApiExample {

    public static void main(String[] args) {
        AccommodationOfferingsApi apiInstance = new AccommodationOfferingsApi();
        String accommodationOfferingCode = accommodationOfferingCode_example; // String | Accommodation offering identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String checkInDate = checkInDate_example; // String | The check in date
        String checkOutDate = checkOutDate_example; // String | The check out date
        String roomGuestOccupancy = roomGuestOccupancy_example; // String | The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            AccommodationOfferingDetails result = apiInstance.getAccommodationOffering(accommodationOfferingCode, baseSiteId, checkInDate, checkOutDate, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOfferingsApi#getAccommodationOffering");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *accommodationOfferingCode = accommodationOfferingCode_example; // Accommodation offering identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *checkInDate = checkInDate_example; // The check in date
String *checkOutDate = checkOutDate_example; // The check out date
String *roomGuestOccupancy = roomGuestOccupancy_example; // The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
String *sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // Requested Currency for the client (optional)

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

// Returns information about a specific accommodation offering
[apiInstance getAccommodationOfferingWith:accommodationOfferingCode
    baseSiteId:baseSiteId
    checkInDate:checkInDate
    checkOutDate:checkOutDate
    roomGuestOccupancy:roomGuestOccupancy
    sap.cxSalesApplication:sap.cxSalesApplication
    acceptLanguage:acceptLanguage
    sap.cxAcceptCurrency:sap.cxAcceptCurrency
              completionHandler: ^(AccommodationOfferingDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationOfferingsApi()
var accommodationOfferingCode = accommodationOfferingCode_example; // {{String}} Accommodation offering identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var checkInDate = checkInDate_example; // {{String}} The check in date
var checkOutDate = checkOutDate_example; // {{String}} The check out date
var roomGuestOccupancy = roomGuestOccupancy_example; // {{String}} The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'sap.cxAcceptCurrency': sap.cxAcceptCurrency_example // {{String}} Requested Currency for the client
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccommodationOffering(accommodationOfferingCode, baseSiteId, checkInDate, checkOutDate, roomGuestOccupancy, sap.cxSalesApplication, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationOfferingsApi();
            var accommodationOfferingCode = accommodationOfferingCode_example;  // String | Accommodation offering identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var checkInDate = checkInDate_example;  // String | The check in date
            var checkOutDate = checkOutDate_example;  // String | The check out date
            var roomGuestOccupancy = roomGuestOccupancy_example;  // String | The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var sap.cxAcceptCurrency = sap.cxAcceptCurrency_example;  // String | Requested Currency for the client (optional) 

            try
            {
                // Returns information about a specific accommodation offering
                AccommodationOfferingDetails result = apiInstance.getAccommodationOffering(accommodationOfferingCode, baseSiteId, checkInDate, checkOutDate, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage, sap.cxAcceptCurrency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOfferingsApi.getAccommodationOffering: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOfferingsApi();
$accommodationOfferingCode = accommodationOfferingCode_example; // String | Accommodation offering identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$checkInDate = checkInDate_example; // String | The check in date
$checkOutDate = checkOutDate_example; // String | The check out date
$roomGuestOccupancy = roomGuestOccupancy_example; // String | The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client

try {
    $result = $api_instance->getAccommodationOffering($accommodationOfferingCode, $baseSiteId, $checkInDate, $checkOutDate, $roomGuestOccupancy, $sap.cxSalesApplication, $acceptLanguage, $sap.cxAcceptCurrency);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationOfferingsApi->getAccommodationOffering: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationOfferingsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationOfferingsApi->new();
my $accommodationOfferingCode = accommodationOfferingCode_example; # String | Accommodation offering identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $checkInDate = checkInDate_example; # String | The check in date
my $checkOutDate = checkOutDate_example; # String | The check out date
my $roomGuestOccupancy = roomGuestOccupancy_example; # String | The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; # String | Requested Currency for the client

eval { 
    my $result = $api_instance->getAccommodationOffering(accommodationOfferingCode => $accommodationOfferingCode, baseSiteId => $baseSiteId, checkInDate => $checkInDate, checkOutDate => $checkOutDate, roomGuestOccupancy => $roomGuestOccupancy, sap.cxSalesApplication => $sap.cxSalesApplication, acceptLanguage => $acceptLanguage, sap.cxAcceptCurrency => $sap.cxAcceptCurrency);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccommodationOfferingsApi->getAccommodationOffering: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOfferingsApi()
accommodationOfferingCode = accommodationOfferingCode_example # String | Accommodation offering identifier
baseSiteId = baseSiteId_example # String | Base site identifier
checkInDate = checkInDate_example # String | The check in date
checkOutDate = checkOutDate_example # String | The check out date
roomGuestOccupancy = roomGuestOccupancy_example # String | The guest occupancy per room in form of - comma separated. For example, 2-adult:1-child:1-infant
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
sap.cxAcceptCurrency = sap.cxAcceptCurrency_example # String | Requested Currency for the client (optional)

try: 
    # Returns information about a specific accommodation offering
    api_response = api_instance.get_accommodation_offering(accommodationOfferingCode, baseSiteId, checkInDate, checkOutDate, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage=acceptLanguage, sap.cxAcceptCurrency=sap.cxAcceptCurrency)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationOfferingsApi->getAccommodationOffering: %s\n" % e)

Parameters

Path parameters
Name Description
accommodationOfferingCode*
String
Accommodation offering identifier
Required
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-accept-currency
String
Requested Currency for the client
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
checkInDate*
String
The check in date
Required
checkOutDate*
String
The check out date
Required
roomGuestOccupancy*
String
The guest occupancy per room in form of <qty>-<ptc> comma separated. For example, 2-adult:1-child:1-infant
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getAllReviews

Returns the list of reviews

Returns the list of reviews for a given property proving information about the rating and the user who submitted it


/{baseSiteId}/accommodationOfferings/{accommodationOfferingCode}/reviews

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/accommodationOfferings/{accommodationOfferingCode}/reviews"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOfferingsApi;

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

public class AccommodationOfferingsApiExample {

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

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

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

        AccommodationOfferingsApi apiInstance = new AccommodationOfferingsApi();
        String accommodationOfferingCode = accommodationOfferingCode_example; // String | Accommodation offering identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            CustomerReviewList result = apiInstance.getAllReviews(accommodationOfferingCode, baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOfferingsApi#getAllReviews");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOfferingsApi;

public class AccommodationOfferingsApiExample {

    public static void main(String[] args) {
        AccommodationOfferingsApi apiInstance = new AccommodationOfferingsApi();
        String accommodationOfferingCode = accommodationOfferingCode_example; // String | Accommodation offering identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            CustomerReviewList result = apiInstance.getAllReviews(accommodationOfferingCode, baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOfferingsApi#getAllReviews");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *accommodationOfferingCode = accommodationOfferingCode_example; // Accommodation offering identifier
String *baseSiteId = baseSiteId_example; // Base site identifier

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

// Returns the list of reviews
[apiInstance getAllReviewsWith:accommodationOfferingCode
    baseSiteId:baseSiteId
              completionHandler: ^(CustomerReviewList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationOfferingsApi()
var accommodationOfferingCode = accommodationOfferingCode_example; // {{String}} Accommodation offering identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

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

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

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

            var apiInstance = new AccommodationOfferingsApi();
            var accommodationOfferingCode = accommodationOfferingCode_example;  // String | Accommodation offering identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Returns the list of reviews
                CustomerReviewList result = apiInstance.getAllReviews(accommodationOfferingCode, baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOfferingsApi.getAllReviews: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOfferingsApi();
$accommodationOfferingCode = accommodationOfferingCode_example; // String | Accommodation offering identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier

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

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

my $api_instance = WWW::SwaggerClient::AccommodationOfferingsApi->new();
my $accommodationOfferingCode = accommodationOfferingCode_example; # String | Accommodation offering identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOfferingsApi()
accommodationOfferingCode = accommodationOfferingCode_example # String | Accommodation offering identifier
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Returns the list of reviews
    api_response = api_instance.get_all_reviews(accommodationOfferingCode, baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationOfferingsApi->getAllReviews: %s\n" % e)

Parameters

Path parameters
Name Description
accommodationOfferingCode*
String
Accommodation offering identifier
Required
baseSiteId*
String
Base site identifier
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


AccommodationOrders

addRoomRequest

Add a room request

Add a request to the room stay in the form of a text message


/{baseSiteId}/users/{userId}/orders/{orderId}/roomStays/{roomStayRefNumber}/requests

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/{orderId}/roomStays/{roomStayRefNumber}/requests"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOrdersApi;

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

public class AccommodationOrdersApiExample {

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

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

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

        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        RequestMessage body = ; // RequestMessage | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.addRoomRequest(body, baseSiteId, orderId, roomStayRefNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#addRoomRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOrdersApi;

public class AccommodationOrdersApiExample {

    public static void main(String[] args) {
        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        RequestMessage body = ; // RequestMessage | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.addRoomRequest(body, baseSiteId, orderId, roomStayRefNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#addRoomRequest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
RequestMessage *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
Integer *roomStayRefNumber = 56; // Room Stay unique identifier - identifies a room stay in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Add a room request
[apiInstance addRoomRequestWith:body
    baseSiteId:baseSiteId
    orderId:orderId
    roomStayRefNumber:roomStayRefNumber
    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.AccommodationOrdersApi()
var body = ; // {{RequestMessage}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var roomStayRefNumber = 56; // {{Integer}} Room Stay unique identifier - identifies a room stay in the 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.addRoomRequest(bodybaseSiteIdorderIdroomStayRefNumberuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationOrdersApi();
            var body = new RequestMessage(); // RequestMessage | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var roomStayRefNumber = 56;  // Integer | Room Stay unique identifier - identifies a room stay in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add a room request
                apiInstance.addRoomRequest(body, baseSiteId, orderId, roomStayRefNumber, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOrdersApi.addRoomRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOrdersApi();
$body = ; // RequestMessage | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationOrdersApi->new();
my $body = WWW::SwaggerClient::Object::RequestMessage->new(); # RequestMessage | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $roomStayRefNumber = 56; # Integer | Room Stay unique identifier - identifies a room stay in the 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->addRoomRequest(body => $body, baseSiteId => $baseSiteId, orderId => $orderId, roomStayRefNumber => $roomStayRefNumber, userId => $userId);
};
if ($@) {
    warn "Exception when calling AccommodationOrdersApi->addRoomRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOrdersApi()
body =  # RequestMessage | 
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
roomStayRefNumber = 56 # Integer | Room Stay unique identifier - identifies a room stay in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add a room request
    api_instance.add_room_request(body, baseSiteId, orderId, roomStayRefNumber, userId)
except ApiException as e:
    print("Exception when calling AccommodationOrdersApi->addRoomRequest: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
roomStayRefNumber*
Integer (int32)
Room Stay unique identifier - identifies a room stay in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found)

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


cancelAccommodationReservation

Cancels the accommodation reservation from the given order

Cancel the accommodation reservation, releasing stocks and triggering refund procedure when applicable


/{baseSiteId}/users/{userId}/orders/{orderId}/reservations/accommodationReservation/cancel

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/reservations/accommodationReservation/cancel"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOrdersApi;

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

public class AccommodationOrdersApiExample {

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

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

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

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

public class AccommodationOrdersApiExample {

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

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

// Cancels the accommodation reservation from the given order
[apiInstance cancelAccommodationReservationWith:baseSiteId
    orderId:orderId
    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.AccommodationOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Cancels the accommodation reservation from the given order
                apiInstance.cancelAccommodationReservation(baseSiteId, orderId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOrdersApi.cancelAccommodationReservation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

try: 
    # Cancels the accommodation reservation from the given order
    api_instance.cancel_accommodation_reservation(baseSiteId, orderId, userId)
except ApiException as e:
    print("Exception when calling AccommodationOrdersApi->cancelAccommodationReservation: %s\n" % e)

Parameters

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

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found)

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


evaluateStayDatesChange

Evaluate if stay dates can be amended

Evaluate if changing the stay dates is possible also in terms of availability and returns pricing indication when allowed.


/{baseSiteId}/users/{userId}/orders/{orderId}/evaluateStayDatesChange

Usage and SDK Samples

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

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

public class AccommodationOrdersApiExample {

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

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

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

        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String checkInDate = checkInDate_example; // String | The new check in date
        String checkOutDate = checkOutDate_example; // String | The new check out date
        String orderId = orderId_example; // String | Order unique identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.evaluateStayDatesChange(baseSiteId, checkInDate, checkOutDate, orderId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#evaluateStayDatesChange");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOrdersApi;

public class AccommodationOrdersApiExample {

    public static void main(String[] args) {
        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String checkInDate = checkInDate_example; // String | The new check in date
        String checkOutDate = checkOutDate_example; // String | The new check out date
        String orderId = orderId_example; // String | Order unique identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.evaluateStayDatesChange(baseSiteId, checkInDate, checkOutDate, orderId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#evaluateStayDatesChange");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *checkInDate = checkInDate_example; // The new check in date
String *checkOutDate = checkOutDate_example; // The new check out date
String *orderId = orderId_example; // Order unique identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Evaluate if stay dates can be amended
[apiInstance evaluateStayDatesChangeWith:baseSiteId
    checkInDate:checkInDate
    checkOutDate:checkOutDate
    orderId:orderId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var checkInDate = checkInDate_example; // {{String}} The new check in date
var checkOutDate = checkOutDate_example; // {{String}} The new check out date
var orderId = orderId_example; // {{String}} Order unique identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var checkInDate = checkInDate_example;  // String | The new check in date
            var checkOutDate = checkOutDate_example;  // String | The new check out date
            var orderId = orderId_example;  // String | Order unique identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Evaluate if stay dates can be amended
                'String' result = apiInstance.evaluateStayDatesChange(baseSiteId, checkInDate, checkOutDate, orderId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOrdersApi.evaluateStayDatesChange: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$checkInDate = checkInDate_example; // String | The new check in date
$checkOutDate = checkOutDate_example; // String | The new check out date
$orderId = orderId_example; // String | Order unique identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $checkInDate = checkInDate_example; # String | The new check in date
my $checkOutDate = checkOutDate_example; # String | The new check out date
my $orderId = orderId_example; # String | Order unique identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
checkInDate = checkInDate_example # String | The new check in date
checkOutDate = checkOutDate_example # String | The new check out date
orderId = orderId_example # String | Order unique identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Evaluate if stay dates can be amended
    api_response = api_instance.evaluate_stay_dates_change(baseSiteId, checkInDate, checkOutDate, orderId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationOrdersApi->evaluateStayDatesChange: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
checkInDate*
String
The new check in date
Required
checkOutDate*
String
The new check out date
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Internal Server Error


getRoomRequests

Gets all room request

Gets all the request for the specified room stay


/{baseSiteId}/users/{userId}/orders/{orderId}/roomStays/{roomStayRefNumber}/requests

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/roomStays/{roomStayRefNumber}/requests"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOrdersApi;

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

public class AccommodationOrdersApiExample {

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

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

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

        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            RoomStayRequestList result = apiInstance.getRoomRequests(baseSiteId, orderId, roomStayRefNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#getRoomRequests");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOrdersApi;

public class AccommodationOrdersApiExample {

    public static void main(String[] args) {
        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            RoomStayRequestList result = apiInstance.getRoomRequests(baseSiteId, orderId, roomStayRefNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#getRoomRequests");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
Integer *roomStayRefNumber = 56; // Room Stay unique identifier - identifies a room stay in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Gets all room request
[apiInstance getRoomRequestsWith:baseSiteId
    orderId:orderId
    roomStayRefNumber:roomStayRefNumber
    userId:userId
              completionHandler: ^(RoomStayRequestList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var roomStayRefNumber = 56; // {{Integer}} Room Stay unique identifier - identifies a room stay in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var roomStayRefNumber = 56;  // Integer | Room Stay unique identifier - identifies a room stay in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Gets all room request
                RoomStayRequestList result = apiInstance.getRoomRequests(baseSiteId, orderId, roomStayRefNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOrdersApi.getRoomRequests: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $roomStayRefNumber = 56; # Integer | Room Stay unique identifier - identifies a room stay in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
roomStayRefNumber = 56 # Integer | Room Stay unique identifier - identifies a room stay in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Gets all room request
    api_response = api_instance.get_room_requests(baseSiteId, orderId, roomStayRefNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationOrdersApi->getRoomRequests: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
roomStayRefNumber*
Integer (int32)
Room Stay unique identifier - identifies a room stay in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found)

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


removeRoomRequests

Removes a room stay request

Removes a room stay request from the list of requests for a given room stay


/{baseSiteId}/users/{userId}/orders/{orderId}/roomStays/{roomStayRefNumber}/requests/{requestId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/roomStays/{roomStayRefNumber}/requests/{requestId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOrdersApi;

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

public class AccommodationOrdersApiExample {

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

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

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

        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String requestId = requestId_example; // String | Request identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeRoomRequests(baseSiteId, orderId, requestId, roomStayRefNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#removeRoomRequests");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOrdersApi;

public class AccommodationOrdersApiExample {

    public static void main(String[] args) {
        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String requestId = requestId_example; // String | Request identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeRoomRequests(baseSiteId, orderId, requestId, roomStayRefNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#removeRoomRequests");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
String *requestId = requestId_example; // Request identifier
Integer *roomStayRefNumber = 56; // Room Stay unique identifier - identifies a room stay in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Removes a room stay request
[apiInstance removeRoomRequestsWith:baseSiteId
    orderId:orderId
    requestId:requestId
    roomStayRefNumber:roomStayRefNumber
    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.AccommodationOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var requestId = requestId_example; // {{String}} Request identifier
var roomStayRefNumber = 56; // {{Integer}} Room Stay unique identifier - identifies a room stay in the 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.removeRoomRequests(baseSiteId, orderId, requestId, roomStayRefNumber, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var requestId = requestId_example;  // String | Request identifier
            var roomStayRefNumber = 56;  // Integer | Room Stay unique identifier - identifies a room stay in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Removes a room stay request
                apiInstance.removeRoomRequests(baseSiteId, orderId, requestId, roomStayRefNumber, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOrdersApi.removeRoomRequests: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$requestId = requestId_example; // String | Request identifier
$roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeRoomRequests($baseSiteId, $orderId, $requestId, $roomStayRefNumber, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationOrdersApi->removeRoomRequests: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationOrdersApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $requestId = requestId_example; # String | Request identifier
my $roomStayRefNumber = 56; # Integer | Room Stay unique identifier - identifies a room stay in the 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->removeRoomRequests(baseSiteId => $baseSiteId, orderId => $orderId, requestId => $requestId, roomStayRefNumber => $roomStayRefNumber, userId => $userId);
};
if ($@) {
    warn "Exception when calling AccommodationOrdersApi->removeRoomRequests: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
requestId = requestId_example # String | Request identifier
roomStayRefNumber = 56 # Integer | Room Stay unique identifier - identifies a room stay in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Removes a room stay request
    api_instance.remove_room_requests(baseSiteId, orderId, requestId, roomStayRefNumber, userId)
except ApiException as e:
    print("Exception when calling AccommodationOrdersApi->removeRoomRequests: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
requestId*
String
Request identifier
Required
roomStayRefNumber*
Integer (int32)
Room Stay unique identifier - identifies a room stay in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found)

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


writeReview

Allows the user to write a customer review

Allows the user to write a customer review for the property for which the booking has been placed and for the specific room stay passed as parameter. The review will be then visible if approved among the reviews for the relative property.


/{baseSiteId}/users/{userId}/orders/{orderId}/roomStays/{roomStayRefNumber}/writeReview

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/{orderId}/roomStays/{roomStayRefNumber}/writeReview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationOrdersApi;

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

public class AccommodationOrdersApiExample {

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

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

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

        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        CustomerReviewRequest body = ; // CustomerReviewRequest | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.writeReview(body, baseSiteId, orderId, roomStayRefNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#writeReview");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationOrdersApi;

public class AccommodationOrdersApiExample {

    public static void main(String[] args) {
        AccommodationOrdersApi apiInstance = new AccommodationOrdersApi();
        CustomerReviewRequest body = ; // CustomerReviewRequest | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        Integer roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.writeReview(body, baseSiteId, orderId, roomStayRefNumber, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationOrdersApi#writeReview");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
CustomerReviewRequest *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
Integer *roomStayRefNumber = 56; // Room Stay unique identifier - identifies a room stay in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Allows the user to write a customer review
[apiInstance writeReviewWith:body
    baseSiteId:baseSiteId
    orderId:orderId
    roomStayRefNumber:roomStayRefNumber
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationOrdersApi()
var body = ; // {{CustomerReviewRequest}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var roomStayRefNumber = 56; // {{Integer}} Room Stay unique identifier - identifies a room stay in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new AccommodationOrdersApi();
            var body = new CustomerReviewRequest(); // CustomerReviewRequest | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var roomStayRefNumber = 56;  // Integer | Room Stay unique identifier - identifies a room stay in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Allows the user to write a customer review
                'String' result = apiInstance.writeReview(body, baseSiteId, orderId, roomStayRefNumber, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationOrdersApi.writeReview: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationOrdersApi();
$body = ; // CustomerReviewRequest | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$roomStayRefNumber = 56; // Integer | Room Stay unique identifier - identifies a room stay in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AccommodationOrdersApi->new();
my $body = WWW::SwaggerClient::Object::CustomerReviewRequest->new(); # CustomerReviewRequest | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $roomStayRefNumber = 56; # Integer | Room Stay unique identifier - identifies a room stay in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationOrdersApi()
body =  # CustomerReviewRequest | 
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
roomStayRefNumber = 56 # Integer | Room Stay unique identifier - identifies a room stay in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Allows the user to write a customer review
    api_response = api_instance.write_review(body, baseSiteId, orderId, roomStayRefNumber, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationOrdersApi->writeReview: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
roomStayRefNumber*
Integer (int32)
Room Stay unique identifier - identifies a room stay in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


AccommodationSearch

doAccommodationSearch


/{baseSiteId}/accommodations

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/accommodations?checkInDate=&checkOutDate=¤tPage=&destinationLocation=&filter=&pageSize=&roomGuestOccupancy=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccommodationSearchApi;

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

public class AccommodationSearchApiExample {

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

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

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

        AccommodationSearchApi apiInstance = new AccommodationSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String checkInDate = checkInDate_example; // String | The check in date
        String checkOutDate = checkOutDate_example; // String | The check out date
        String destinationLocation = destinationLocation_example; // String | The destination location code
        String roomGuestOccupancy = roomGuestOccupancy_example; // String | The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        Integer currentPage = 56; // Integer | The page number
        String filter = filter_example; // String | The attribute for which the results are filtered. Multiple filters are allowed.
        Integer pageSize = 56; // Integer | The page size
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        String sort = sort_example; // String | The attribute for which the results are sorted.
        try {
            AccommodationSearchResponse result = apiInstance.doAccommodationSearch(baseSiteId, checkInDate, checkOutDate, destinationLocation, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage, currentPage, filter, pageSize, sap.cxAcceptCurrency, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationSearchApi#doAccommodationSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationSearchApi;

public class AccommodationSearchApiExample {

    public static void main(String[] args) {
        AccommodationSearchApi apiInstance = new AccommodationSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String checkInDate = checkInDate_example; // String | The check in date
        String checkOutDate = checkOutDate_example; // String | The check out date
        String destinationLocation = destinationLocation_example; // String | The destination location code
        String roomGuestOccupancy = roomGuestOccupancy_example; // String | The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        Integer currentPage = 56; // Integer | The page number
        String filter = filter_example; // String | The attribute for which the results are filtered. Multiple filters are allowed.
        Integer pageSize = 56; // Integer | The page size
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        String sort = sort_example; // String | The attribute for which the results are sorted.
        try {
            AccommodationSearchResponse result = apiInstance.doAccommodationSearch(baseSiteId, checkInDate, checkOutDate, destinationLocation, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage, currentPage, filter, pageSize, sap.cxAcceptCurrency, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationSearchApi#doAccommodationSearch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *checkInDate = checkInDate_example; // The check in date
String *checkOutDate = checkOutDate_example; // The check out date
String *destinationLocation = destinationLocation_example; // The destination location code
String *roomGuestOccupancy = roomGuestOccupancy_example; // The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
Integer *currentPage = 56; // The page number (optional) (default to 1)
String *filter = filter_example; // The attribute for which the results are filtered. Multiple filters are allowed. (optional)
Integer *pageSize = 56; // The page size (optional) (default to 10)
String *sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // Requested Currency for the client (optional)
String *sort = sort_example; // The attribute for which the results are sorted. (optional)

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

[apiInstance doAccommodationSearchWith:baseSiteId
    checkInDate:checkInDate
    checkOutDate:checkOutDate
    destinationLocation:destinationLocation
    roomGuestOccupancy:roomGuestOccupancy
    sap.cxSalesApplication:sap.cxSalesApplication
    acceptLanguage:acceptLanguage
    currentPage:currentPage
    filter:filter
    pageSize:pageSize
    sap.cxAcceptCurrency:sap.cxAcceptCurrency
    sort:sort
              completionHandler: ^(AccommodationSearchResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationSearchApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var checkInDate = checkInDate_example; // {{String}} The check in date
var checkOutDate = checkOutDate_example; // {{String}} The check out date
var destinationLocation = destinationLocation_example; // {{String}} The destination location code
var roomGuestOccupancy = roomGuestOccupancy_example; // {{String}} The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'currentPage': 56, // {{Integer}} The page number
  'filter': filter_example, // {{String}} The attribute for which the results are filtered. Multiple filters are allowed.
  'pageSize': 56, // {{Integer}} The page size
  'sap.cxAcceptCurrency': sap.cxAcceptCurrency_example, // {{String}} Requested Currency for the client
  'sort': sort_example // {{String}} The attribute for which the results are sorted.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAccommodationSearch(baseSiteId, checkInDate, checkOutDate, destinationLocation, roomGuestOccupancy, sap.cxSalesApplication, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var checkInDate = checkInDate_example;  // String | The check in date
            var checkOutDate = checkOutDate_example;  // String | The check out date
            var destinationLocation = destinationLocation_example;  // String | The destination location code
            var roomGuestOccupancy = roomGuestOccupancy_example;  // String | The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var currentPage = 56;  // Integer | The page number (optional)  (default to 1)
            var filter = filter_example;  // String | The attribute for which the results are filtered. Multiple filters are allowed. (optional) 
            var pageSize = 56;  // Integer | The page size (optional)  (default to 10)
            var sap.cxAcceptCurrency = sap.cxAcceptCurrency_example;  // String | Requested Currency for the client (optional) 
            var sort = sort_example;  // String | The attribute for which the results are sorted. (optional) 

            try
            {
                AccommodationSearchResponse result = apiInstance.doAccommodationSearch(baseSiteId, checkInDate, checkOutDate, destinationLocation, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage, currentPage, filter, pageSize, sap.cxAcceptCurrency, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationSearchApi.doAccommodationSearch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$checkInDate = checkInDate_example; // String | The check in date
$checkOutDate = checkOutDate_example; // String | The check out date
$destinationLocation = destinationLocation_example; // String | The destination location code
$roomGuestOccupancy = roomGuestOccupancy_example; // String | The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$currentPage = 56; // Integer | The page number
$filter = filter_example; // String | The attribute for which the results are filtered. Multiple filters are allowed.
$pageSize = 56; // Integer | The page size
$sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
$sort = sort_example; // String | The attribute for which the results are sorted.

try {
    $result = $api_instance->doAccommodationSearch($baseSiteId, $checkInDate, $checkOutDate, $destinationLocation, $roomGuestOccupancy, $sap.cxSalesApplication, $acceptLanguage, $currentPage, $filter, $pageSize, $sap.cxAcceptCurrency, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationSearchApi->doAccommodationSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationSearchApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $checkInDate = checkInDate_example; # String | The check in date
my $checkOutDate = checkOutDate_example; # String | The check out date
my $destinationLocation = destinationLocation_example; # String | The destination location code
my $roomGuestOccupancy = roomGuestOccupancy_example; # String | The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $currentPage = 56; # Integer | The page number
my $filter = filter_example; # String | The attribute for which the results are filtered. Multiple filters are allowed.
my $pageSize = 56; # Integer | The page size
my $sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; # String | Requested Currency for the client
my $sort = sort_example; # String | The attribute for which the results are sorted.

eval { 
    my $result = $api_instance->doAccommodationSearch(baseSiteId => $baseSiteId, checkInDate => $checkInDate, checkOutDate => $checkOutDate, destinationLocation => $destinationLocation, roomGuestOccupancy => $roomGuestOccupancy, sap.cxSalesApplication => $sap.cxSalesApplication, acceptLanguage => $acceptLanguage, currentPage => $currentPage, filter => $filter, pageSize => $pageSize, sap.cxAcceptCurrency => $sap.cxAcceptCurrency, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccommodationSearchApi->doAccommodationSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccommodationSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier
checkInDate = checkInDate_example # String | The check in date
checkOutDate = checkOutDate_example # String | The check out date
destinationLocation = destinationLocation_example # String | The destination location code
roomGuestOccupancy = roomGuestOccupancy_example # String | The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
currentPage = 56 # Integer | The page number (optional) (default to 1)
filter = filter_example # String | The attribute for which the results are filtered. Multiple filters are allowed. (optional)
pageSize = 56 # Integer | The page size (optional) (default to 10)
sap.cxAcceptCurrency = sap.cxAcceptCurrency_example # String | Requested Currency for the client (optional)
sort = sort_example # String | The attribute for which the results are sorted. (optional)

try: 
    api_response = api_instance.do_accommodation_search(baseSiteId, checkInDate, checkOutDate, destinationLocation, roomGuestOccupancy, sap.cxSalesApplication, acceptLanguage=acceptLanguage, currentPage=currentPage, filter=filter, pageSize=pageSize, sap.cxAcceptCurrency=sap.cxAcceptCurrency, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationSearchApi->doAccommodationSearch: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-accept-currency
String
Requested Currency for the client
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
checkInDate*
String
The check in date
Required
checkOutDate*
String
The check out date
Required
currentPage
Integer (int32)
The page number
destinationLocation*
String
The destination location code
Required
filter
String
The attribute for which the results are filtered. Multiple filters are allowed.
pageSize
Integer (int32)
The page size
roomGuestOccupancy*
String
The guest occupancy per room, with occupancy per type of guest comma separated and in the form -. For example, 2-adult:1-child:1-infant
Required
sort
String
The attribute for which the results are sorted.

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


AccommodationSuggestions

getAccommodationSuggestions

Returns a list of suggestions for the given text

Returns a list of suggestions for the given text. A suggestion can be a location or a specific property matching the criteria.


/{baseSiteId}/accommodationSuggestions

Usage and SDK Samples

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

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

public class AccommodationSuggestionsApiExample {

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

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

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

        AccommodationSuggestionsApi apiInstance = new AccommodationSuggestionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String searchText = searchText_example; // String | The text to search
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            AccommodationSuggestionList result = apiInstance.getAccommodationSuggestions(baseSiteId, sap.cxSalesApplication, searchText, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationSuggestionsApi#getAccommodationSuggestions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccommodationSuggestionsApi;

public class AccommodationSuggestionsApiExample {

    public static void main(String[] args) {
        AccommodationSuggestionsApi apiInstance = new AccommodationSuggestionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String searchText = searchText_example; // String | The text to search
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            AccommodationSuggestionList result = apiInstance.getAccommodationSuggestions(baseSiteId, sap.cxSalesApplication, searchText, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccommodationSuggestionsApi#getAccommodationSuggestions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *searchText = searchText_example; // The text to search
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Returns a list of suggestions for the given text
[apiInstance getAccommodationSuggestionsWith:baseSiteId
    sap.cxSalesApplication:sap.cxSalesApplication
    searchText:searchText
    acceptLanguage:acceptLanguage
              completionHandler: ^(AccommodationSuggestionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AccommodationSuggestionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var searchText = searchText_example; // {{String}} The text to search
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccommodationSuggestions(baseSiteId, sap.cxSalesApplication, searchText, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AccommodationSuggestionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var searchText = searchText_example;  // String | The text to search
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns a list of suggestions for the given text
                AccommodationSuggestionList result = apiInstance.getAccommodationSuggestions(baseSiteId, sap.cxSalesApplication, searchText, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccommodationSuggestionsApi.getAccommodationSuggestions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccommodationSuggestionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$searchText = searchText_example; // String | The text to search
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getAccommodationSuggestions($baseSiteId, $sap.cxSalesApplication, $searchText, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccommodationSuggestionsApi->getAccommodationSuggestions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccommodationSuggestionsApi;

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

my $api_instance = WWW::SwaggerClient::AccommodationSuggestionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $searchText = searchText_example; # String | The text to search
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

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

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

# create an instance of the API class
api_instance = swagger_client.AccommodationSuggestionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
searchText = searchText_example # String | The text to search
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns a list of suggestions for the given text
    api_response = api_instance.get_accommodation_suggestions(baseSiteId, sap.cxSalesApplication, searchText, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccommodationSuggestionsApi->getAccommodationSuggestions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
searchText*
String
The text to search
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


Address

validateAddress

Verifies address.

Verifies provided address.


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

Usage and SDK Samples

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

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

public class AddressApiExample {

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

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

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

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

public class AddressApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Addresses

createAddress

Creates a new address.

Creates a new address and adds it to the customer's address list.


/{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"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressesApi;

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

public class AddressesApiExample {

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

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

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

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

public class AddressesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.AddressesApi()
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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAddress(bodybaseSiteIduserId, 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 AddressesApi();
            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

            try
            {
                // Creates a new address.
                'String' result = apiInstance.createAddress(body, baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressesApi.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\ApiAddressesApi();
$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

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

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

my $api_instance = WWW::SwaggerClient::AddressesApi->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

eval { 
    my $result = $api_instance->createAddress(body => $body, baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressesApi->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.AddressesApi()
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

try: 
    # Creates a new address.
    api_response = api_instance.create_address(body, baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->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 *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


getAddress

Get details of a specific address.

Returns detailed information about address with a given id.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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.AddressesApi;

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

public class AddressesApiExample {

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

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

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

        AddressesApi apiInstance = new AddressesApi();
        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 acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAddress(addressId, baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressesApi#getAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressesApi;

public class AddressesApiExample {

    public static void main(String[] args) {
        AddressesApi apiInstance = new AddressesApi();
        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 acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAddress(addressId, baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressesApi#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 *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Get details of a specific address.
[apiInstance getAddressWith:addressId
    baseSiteId:baseSiteId
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AddressesApi()
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 = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
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 AddressesApi();
            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 acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get details of a specific address.
                'String' result = apiInstance.getAddress(addressId, baseSiteId, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressesApi.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\ApiAddressesApi();
$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
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

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

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

my $api_instance = WWW::SwaggerClient::AddressesApi->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 $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getAddress(addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressesApi->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.AddressesApi()
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
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get details of a specific address.
    api_response = api_instance.get_address(addressId, baseSiteId, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->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
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


getAddresses

Get customer's addresses

Returns the list of customer's addresses.


/{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"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressesApi;

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

public class AddressesApiExample {

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

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

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

        AddressesApi apiInstance = new AddressesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAddresses(baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressesApi#getAddresses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressesApi;

public class AddressesApiExample {

    public static void main(String[] args) {
        AddressesApi apiInstance = new AddressesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAddresses(baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressesApi#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 *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

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

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

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

var api = new CommerceWebservices.AddressesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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 = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
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 AddressesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get customer's addresses
                'String' result = apiInstance.getAddresses(baseSiteId, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressesApi.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\ApiAddressesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

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

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

my $api_instance = WWW::SwaggerClient::AddressesApi->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 $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getAddresses(baseSiteId => $baseSiteId, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressesApi->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.AddressesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get customer's addresses
    api_response = api_instance.get_addresses(baseSiteId, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->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
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


removeAddress

Delete customer's address.

Deletes customer's address and removes it from the list.


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

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

public class AddressesApiExample {

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

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

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

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

public class AddressesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.AddressesApi()
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. Returned data: ' + data);
  }
};
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 AddressesApi();
            var addressId = addressId_example;  // String | Address identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Delete customer's address.
                'String' result = apiInstance.removeAddress(addressId, baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressesApi.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\ApiAddressesApi();
$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 {
    $result = $api_instance->removeAddress($addressId, $baseSiteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressesApi->removeAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressesApi;

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

my $api_instance = WWW::SwaggerClient::AddressesApi->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 { 
    my $result = $api_instance->removeAddress(addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressesApi->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.AddressesApi()
addressId = addressId_example # String | Address identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Delete customer's address.
    api_response = api_instance.remove_address(addressId, baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->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: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


replaceAddress

Updates the address

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


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: 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.AddressesApi;

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

public class AddressesApiExample {

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

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

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

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

public class AddressesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.AddressesApi()
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. Returned data: ' + data);
  }
};
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 AddressesApi();
            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
                'String' result = apiInstance.replaceAddress(body, addressId, baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressesApi.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\ApiAddressesApi();
$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 {
    $result = $api_instance->replaceAddress($body, $addressId, $baseSiteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressesApi->replaceAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressesApi;

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

my $api_instance = WWW::SwaggerClient::AddressesApi->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 { 
    my $result = $api_instance->replaceAddress(body => $body, addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressesApi->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.AddressesApi()
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_response = api_instance.replace_address(body, addressId, baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->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: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


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.AddressesApi;

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

public class AddressesApiExample {

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

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

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

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

public class AddressesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.AddressesApi()
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. Returned data: ' + data);
  }
};
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 AddressesApi();
            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.
                'String' result = apiInstance.updateAddress(body, addressId, baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressesApi.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\ApiAddressesApi();
$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 {
    $result = $api_instance->updateAddress($body, $addressId, $baseSiteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressesApi->updateAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressesApi;

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

my $api_instance = WWW::SwaggerClient::AddressesApi->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 { 
    my $result = $api_instance->updateAddress(body => $body, addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressesApi->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.AddressesApi()
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_response = api_instance.update_address(body, addressId, baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->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: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


AirlineBaseSites

getCurrencies

Get a list of available currencies.

Lists all available currencies (all usable currencies for the current store). If the list of currencies for a base store is empty, a list of all currencies available in the system is returned.


/{baseSiteId}/currencies

Usage and SDK Samples

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

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

public class AirlineBaseSitesApiExample {

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

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

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

        AirlineBaseSitesApi apiInstance = new AirlineBaseSitesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            CurrencyList result = apiInstance.getCurrencies(baseSiteId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineBaseSitesApi#getCurrencies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineBaseSitesApi;

public class AirlineBaseSitesApiExample {

    public static void main(String[] args) {
        AirlineBaseSitesApi apiInstance = new AirlineBaseSitesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            CurrencyList result = apiInstance.getCurrencies(baseSiteId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineBaseSitesApi#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 *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Get a list of available currencies.
[apiInstance getCurrenciesWith:baseSiteId
    acceptLanguage:acceptLanguage
              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.AirlineBaseSitesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
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 AirlineBaseSitesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get a list of available currencies.
                CurrencyList result = apiInstance.getCurrencies(baseSiteId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineBaseSitesApi.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\ApiAirlineBaseSitesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

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

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

my $api_instance = WWW::SwaggerClient::AirlineBaseSitesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getCurrencies(baseSiteId => $baseSiteId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AirlineBaseSitesApi->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.AirlineBaseSitesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get a list of available currencies.
    api_response = api_instance.get_currencies(baseSiteId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineBaseSitesApi->getCurrencies: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


getLanguages

Get a list of available languages.

Lists all available languages (all languages used for a particular store). If the list of languages for a base store is empty, a list of all languages available in the system will be returned.


/{baseSiteId}/languages

Usage and SDK Samples

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

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

public class AirlineBaseSitesApiExample {

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

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

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

        AirlineBaseSitesApi apiInstance = new AirlineBaseSitesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            LanguageList result = apiInstance.getLanguages(baseSiteId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineBaseSitesApi#getLanguages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineBaseSitesApi;

public class AirlineBaseSitesApiExample {

    public static void main(String[] args) {
        AirlineBaseSitesApi apiInstance = new AirlineBaseSitesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            LanguageList result = apiInstance.getLanguages(baseSiteId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineBaseSitesApi#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 *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Get a list of available languages.
[apiInstance getLanguagesWith:baseSiteId
    acceptLanguage:acceptLanguage
              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.AirlineBaseSitesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
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 AirlineBaseSitesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get a list of available languages.
                LanguageList result = apiInstance.getLanguages(baseSiteId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineBaseSitesApi.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\ApiAirlineBaseSitesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

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

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

my $api_instance = WWW::SwaggerClient::AirlineBaseSitesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getLanguages(baseSiteId => $baseSiteId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AirlineBaseSitesApi->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.AirlineBaseSitesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get a list of available languages.
    api_response = api_instance.get_languages(baseSiteId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineBaseSitesApi->getLanguages: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


AirlineCarts

assignEmail

Assigns an email to the cart.

Assigns an email to the cart. This step is required to make a guest checkout.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: 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.AirlineCartsApi;

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String email = email_example; // String | Email of the guest user. It will be used during the checkout process.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.assignEmail(baseSiteId, cartId, email, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#assignEmail");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String email = email_example; // String | Email of the guest user. It will be used during the checkout process.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.assignEmail(baseSiteId, cartId, email, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#assignEmail");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *email = email_example; // Email of the guest user. It will be used during the checkout process.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.assignEmail(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 assignEmailExample
    {
        public void main()
        {

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

            var apiInstance = new AirlineCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var email = email_example;  // String | Email of the guest user. It will be used during the checkout process.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Assigns an email to the cart.
                apiInstance.assignEmail(baseSiteId, cartId, email, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.assignEmail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$email = email_example; // String | Email of the guest user. It will be used during the checkout process.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $email = email_example; # String | Email of the guest user. It will be used during the checkout process.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
email = email_example # String | Email of the guest user. It will be used during the checkout process.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

Parameters

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

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


changeCurrency

Changes currency against the given cart

Sets the currency specified in the request parameter if allowed and recalculates the cart.


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

Usage and SDK Samples

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

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        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 currencyISO = currencyISO_example; // String | The ISO code if the currency to be set
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.changeCurrency(baseSiteId, cartId, currencyISO, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#changeCurrency");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        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 currencyISO = currencyISO_example; // String | The ISO code if the currency to be set
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.changeCurrency(baseSiteId, cartId, currencyISO, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#changeCurrency");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *currencyISO = currencyISO_example; // The ISO code if the currency to be set
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Changes currency against the given cart
[apiInstance changeCurrencyWith:baseSiteId
    cartId:cartId
    currencyISO:currencyISO
    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.AirlineCartsApi()
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 currencyISO = currencyISO_example; // {{String}} The ISO code if the currency to be set
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.changeCurrency(baseSiteId, cartId, currencyISO, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AirlineCartsApi();
            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 currencyISO = currencyISO_example;  // String | The ISO code if the currency to be set
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Changes currency against the given cart
                apiInstance.changeCurrency(baseSiteId, cartId, currencyISO, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.changeCurrency: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineCartsApi();
$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
$currencyISO = currencyISO_example; // String | The ISO code if the currency to be set
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->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 $currencyISO = currencyISO_example; # String | The ISO code if the currency to be set
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineCartsApi()
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
currencyISO = currencyISO_example # String | The ISO code if the currency to be set
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Changes currency against the given cart
    api_instance.change_currency(baseSiteId, cartId, currencyISO, userId)
except ApiException as e:
    print("Exception when calling AirlineCartsApi->changeCurrency: %s\n" % e)

Parameters

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

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


createCart

Creates or restore a cart for a user.

Creates a new cart or restores an anonymous cart as a user's cart (if an old Cart Id is given in the request).


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

Usage and SDK Samples

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

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fromOrderGuid = fromOrderGuid_example; // String | Guest existing order unique identifier
        String fromOrderId = fromOrderId_example; // String | Existing order unique identifier
        String oldCartId = oldCartId_example; // String | Anonymous cart GUID.
        try {
            apiInstance.createCart(baseSiteId, userId, fromOrderGuid, fromOrderId, oldCartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#createCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fromOrderGuid = fromOrderGuid_example; // String | Guest existing order unique identifier
        String fromOrderId = fromOrderId_example; // String | Existing order unique identifier
        String oldCartId = oldCartId_example; // String | Anonymous cart GUID.
        try {
            apiInstance.createCart(baseSiteId, userId, fromOrderGuid, fromOrderId, oldCartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#createCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fromOrderGuid = fromOrderGuid_example; // Guest existing order unique identifier (optional)
String *fromOrderId = fromOrderId_example; // Existing order unique identifier (optional)
String *oldCartId = oldCartId_example; // Anonymous cart GUID. (optional)

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

// Creates or restore a cart for a user.
[apiInstance createCartWith:baseSiteId
    userId:userId
    fromOrderGuid:fromOrderGuid
    fromOrderId:fromOrderId
    oldCartId:oldCartId
              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.AirlineCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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 = { 
  'fromOrderGuid': fromOrderGuid_example, // {{String}} Guest existing order unique identifier
  'fromOrderId': fromOrderId_example, // {{String}} Existing order unique identifier
  'oldCartId': oldCartId_example // {{String}} Anonymous cart GUID.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
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 AirlineCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fromOrderGuid = fromOrderGuid_example;  // String | Guest existing order unique identifier (optional) 
            var fromOrderId = fromOrderId_example;  // String | Existing order unique identifier (optional) 
            var oldCartId = oldCartId_example;  // String | Anonymous cart GUID. (optional) 

            try
            {
                // Creates or restore a cart for a user.
                apiInstance.createCart(baseSiteId, userId, fromOrderGuid, fromOrderId, oldCartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.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\ApiAirlineCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fromOrderGuid = fromOrderGuid_example; // String | Guest existing order unique identifier
$fromOrderId = fromOrderId_example; // String | Existing order unique identifier
$oldCartId = oldCartId_example; // String | Anonymous cart GUID.

try {
    $api_instance->createCart($baseSiteId, $userId, $fromOrderGuid, $fromOrderId, $oldCartId);
} catch (Exception $e) {
    echo 'Exception when calling AirlineCartsApi->createCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AirlineCartsApi;

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->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 $fromOrderGuid = fromOrderGuid_example; # String | Guest existing order unique identifier
my $fromOrderId = fromOrderId_example; # String | Existing order unique identifier
my $oldCartId = oldCartId_example; # String | Anonymous cart GUID.

eval { 
    $api_instance->createCart(baseSiteId => $baseSiteId, userId => $userId, fromOrderGuid => $fromOrderGuid, fromOrderId => $fromOrderId, oldCartId => $oldCartId);
};
if ($@) {
    warn "Exception when calling AirlineCartsApi->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.AirlineCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fromOrderGuid = fromOrderGuid_example # String | Guest existing order unique identifier (optional)
fromOrderId = fromOrderId_example # String | Existing order unique identifier (optional)
oldCartId = oldCartId_example # String | Anonymous cart GUID. (optional)

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

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fromOrderGuid
String
Guest existing order unique identifier
fromOrderId
String
Existing order unique identifier
oldCartId
String
Anonymous cart GUID.

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


createCartPaymentDetails

Defines and assigns details of a new credit card payment to the cart.

Defines the details of a new credit card, and assigns this payment option to the cart.


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

Usage and SDK Samples

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

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        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, '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.createCartPaymentDetails(body, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#createCartPaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        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, '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.createCartPaymentDetails(body, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#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, '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

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

// Defines and assigns details of a new credit card payment to the cart.
[apiInstance createCartPaymentDetailsWith:body
    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.AirlineCartsApi()
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, '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.createCartPaymentDetails(bodybaseSiteIdcartIduserId, 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 AirlineCartsApi();
            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, '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
            {
                // Defines and assigns details of a new credit card payment to the cart.
                apiInstance.createCartPaymentDetails(body, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.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\ApiAirlineCartsApi();
$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, '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->createCartPaymentDetails($body, $baseSiteId, $cartId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AirlineCartsApi->createCartPaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AirlineCartsApi;

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->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, '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->createCartPaymentDetails(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
if ($@) {
    warn "Exception when calling AirlineCartsApi->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.AirlineCartsApi()
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, '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: 
    # Defines and assigns details of a new credit card payment to the cart.
    api_instance.create_cart_payment_details(body, baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling AirlineCartsApi->createCartPaymentDetails: %s\n" % e)

Parameters

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

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable entity: business rules validation errors, e.g., travel restrictions

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getCartReservationDetails

Get the reservation details

Returns the reservation details.


/{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}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineCartsApi;

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getCartReservationDetails(baseSiteId, cartId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#getCartReservationDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getCartReservationDetails(baseSiteId, cartId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#getCartReservationDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Get the reservation details
[apiInstance getCartReservationDetailsWith:baseSiteId
    cartId:cartId
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartReservationDetails(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 getCartReservationDetailsExample
    {
        public void main()
        {

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

            var apiInstance = new AirlineCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get the reservation details
                'String' result = apiInstance.getCartReservationDetails(baseSiteId, cartId, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.getCartReservationDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get the reservation details
    api_response = api_instance.get_cart_reservation_details(baseSiteId, cartId, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineCartsApi->getCartReservationDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found


getPaymentOptions

Get payment options

Retrieves all the available payment options.


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

Usage and SDK Samples

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

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.getPaymentOptions(baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#getPaymentOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.getPaymentOptions(baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#getPaymentOptions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Get payment options
[apiInstance getPaymentOptionsWith:baseSiteId
    cartId:cartId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPaymentOptions(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 getPaymentOptionsExample
    {
        public void main()
        {

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

            var apiInstance = new AirlineCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Get payment options
                'String' result = apiInstance.getPaymentOptions(baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.getPaymentOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Get payment options
    api_response = api_instance.get_payment_options(baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineCartsApi->getPaymentOptions: %s\n" % e)

Parameters

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

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


removeCart

Deletes a cart with a given cart id.

Deletes a cart with a given cart id.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-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.AirlineCartsApi;

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.removeCart(baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#removeCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.removeCart(baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#removeCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

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

var api = new CommerceWebservices.AirlineCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.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 AirlineCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes a cart with a given cart id.
                'String' result = apiInstance.removeCart(baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.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\ApiAirlineCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

Parameters

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

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Unprocessable Entity

Status: 500 - Server Error


replaceCartPaymentDetails

Sets credit card payment details for the cart.

Sets credit card payment details for the cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
-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.AirlineCartsApi;

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.replaceCartPaymentDetails(baseSiteId, cartId, paymentDetailsId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#replaceCartPaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

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

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

// Sets credit card payment details for the cart.
[apiInstance replaceCartPaymentDetailsWith:baseSiteId
    cartId:cartId
    paymentDetailsId:paymentDetailsId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
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 AirlineCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details identifier.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

Parameters

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

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


validateCart

Validate the cart having all the necessary information to place the order

Validate the cart having all the necessary information to place the order: Cart is not empty, all the passenger have provided their basic profile details, a payment method is associated with the cart


/{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"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineCartsApi;

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

public class AirlineCartsApiExample {

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

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

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

        AirlineCartsApi apiInstance = new AirlineCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.validateCart(baseSiteId, cartId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#validateCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineCartsApi;

public class AirlineCartsApiExample {

    public static void main(String[] args) {
        AirlineCartsApi apiInstance = new AirlineCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.validateCart(baseSiteId, cartId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineCartsApi#validateCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Validate the cart having all the necessary information to place the order
[apiInstance validateCartWith:baseSiteId
    cartId:cartId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineCartsApi()
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 sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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. Returned data: ' + data);
  }
};
api.validateCart(baseSiteId, cartId, sap.cxSalesApplication, userId, 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 AirlineCartsApi();
            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 sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Validate the cart having all the necessary information to place the order
                'String' result = apiInstance.validateCart(baseSiteId, cartId, sap.cxSalesApplication, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineCartsApi.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\ApiAirlineCartsApi();
$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
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AirlineCartsApi->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 $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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->validateCart(baseSiteId => $baseSiteId, cartId => $cartId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AirlineCartsApi->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.AirlineCartsApi()
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
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Validate the cart having all the necessary information to place the order
    api_response = api_instance.validate_cart(baseSiteId, cartId, sap.cxSalesApplication, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineCartsApi->validateCart: %s\n" % e)

Parameters

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

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


AirlineOrderSearch

getOrderForIdLastNameAndPassengerReference

Get the details of a specific booking for a specific owner

Returns the details of the booking having the code passed as a parameter with a specific section for each part of the journey. The booking must be associated to the customer having the specified last name. In case additional security has been activated the traveller reference must be passed to retrieve a specific subset of information for the specific traveller.


/{baseSiteId}/orders

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/orders?lastName=&orderId=&passengerReference="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineOrderSearchApi;

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

public class AirlineOrderSearchApiExample {

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

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

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

        AirlineOrderSearchApi apiInstance = new AirlineOrderSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String lastName = lastName_example; // String | The customer last name
        String orderId = orderId_example; // String | The booking reference
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String passengerReference = passengerReference_example; // String | The passenger reference
        try {
            'String' result = apiInstance.getOrderForIdLastNameAndPassengerReference(baseSiteId, lastName, orderId, acceptLanguage, passengerReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrderSearchApi#getOrderForIdLastNameAndPassengerReference");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineOrderSearchApi;

public class AirlineOrderSearchApiExample {

    public static void main(String[] args) {
        AirlineOrderSearchApi apiInstance = new AirlineOrderSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String lastName = lastName_example; // String | The customer last name
        String orderId = orderId_example; // String | The booking reference
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String passengerReference = passengerReference_example; // String | The passenger reference
        try {
            'String' result = apiInstance.getOrderForIdLastNameAndPassengerReference(baseSiteId, lastName, orderId, acceptLanguage, passengerReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrderSearchApi#getOrderForIdLastNameAndPassengerReference");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *lastName = lastName_example; // The customer last name
String *orderId = orderId_example; // The booking reference
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
String *passengerReference = passengerReference_example; // The passenger reference (optional)

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

// Get the details of a specific booking for a specific owner
[apiInstance getOrderForIdLastNameAndPassengerReferenceWith:baseSiteId
    lastName:lastName
    orderId:orderId
    acceptLanguage:acceptLanguage
    passengerReference:passengerReference
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineOrderSearchApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var lastName = lastName_example; // {{String}} The customer last name
var orderId = orderId_example; // {{String}} The booking reference
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'passengerReference': passengerReference_example // {{String}} The passenger reference
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderForIdLastNameAndPassengerReference(baseSiteId, lastName, orderId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AirlineOrderSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var lastName = lastName_example;  // String | The customer last name
            var orderId = orderId_example;  // String | The booking reference
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var passengerReference = passengerReference_example;  // String | The passenger reference (optional) 

            try
            {
                // Get the details of a specific booking for a specific owner
                'String' result = apiInstance.getOrderForIdLastNameAndPassengerReference(baseSiteId, lastName, orderId, acceptLanguage, passengerReference);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineOrderSearchApi.getOrderForIdLastNameAndPassengerReference: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineOrderSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$lastName = lastName_example; // String | The customer last name
$orderId = orderId_example; // String | The booking reference
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$passengerReference = passengerReference_example; // String | The passenger reference

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

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

my $api_instance = WWW::SwaggerClient::AirlineOrderSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $lastName = lastName_example; # String | The customer last name
my $orderId = orderId_example; # String | The booking reference
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $passengerReference = passengerReference_example; # String | The passenger reference

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineOrderSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier
lastName = lastName_example # String | The customer last name
orderId = orderId_example # String | The booking reference
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
passengerReference = passengerReference_example # String | The passenger reference (optional)

try: 
    # Get the details of a specific booking for a specific owner
    api_response = api_instance.get_order_for_id_last_name_and_passenger_reference(baseSiteId, lastName, orderId, acceptLanguage=acceptLanguage, passengerReference=passengerReference)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineOrderSearchApi->getOrderForIdLastNameAndPassengerReference: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
Query parameters
Name Description
lastName*
String
The customer last name
Required
orderId*
String
The booking reference
Required
passengerReference
String
The passenger reference

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found


AirlineOrders

cancelOrder

Cancels the entire order

Cancel the entire order, releasing stocks and triggering refund procedure when applicable


/{baseSiteId}/users/{userId}/orders/{orderId}/cancel

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/cancel"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineOrdersApi;

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

public class AirlineOrdersApiExample {

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

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

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

        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.cancelOrder(baseSiteId, orderId, sap.cxSalesApplication, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#cancelOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineOrdersApi;

public class AirlineOrdersApiExample {

    public static void main(String[] args) {
        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.cancelOrder(baseSiteId, orderId, sap.cxSalesApplication, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#cancelOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Cancels the entire order
[apiInstance cancelOrderWith:baseSiteId
    orderId:orderId
    sap.cxSalesApplication:sap.cxSalesApplication
    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.AirlineOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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.cancelOrder(baseSiteId, orderId, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AirlineOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Cancels the entire order
                apiInstance.cancelOrder(baseSiteId, orderId, sap.cxSalesApplication, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineOrdersApi.cancelOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->cancelOrder($baseSiteId, $orderId, $sap.cxSalesApplication, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AirlineOrdersApi->cancelOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AirlineOrdersApi;

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

my $api_instance = WWW::SwaggerClient::AirlineOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application 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->cancelOrder(baseSiteId => $baseSiteId, orderId => $orderId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
};
if ($@) {
    warn "Exception when calling AirlineOrdersApi->cancelOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AirlineOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Cancels the entire order
    api_instance.cancel_order(baseSiteId, orderId, sap.cxSalesApplication, userId)
except ApiException as e:
    print("Exception when calling AirlineOrdersApi->cancelOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


evaluateBookingCancel

Evaluates the cancellation of the entire order

Evaluates if the entire booking can be cancelled, returning information about total refunded amount when applicable


/{baseSiteId}/users/{userId}/orders/{orderId}/evaluateCancel

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/evaluateCancel"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineOrdersApi;

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

public class AirlineOrdersApiExample {

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

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

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

        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateCancelBookingResponse result = apiInstance.evaluateBookingCancel(baseSiteId, orderId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#evaluateBookingCancel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineOrdersApi;

public class AirlineOrdersApiExample {

    public static void main(String[] args) {
        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateCancelBookingResponse result = apiInstance.evaluateBookingCancel(baseSiteId, orderId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#evaluateBookingCancel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Evaluates the cancellation of the entire order
[apiInstance evaluateBookingCancelWith:baseSiteId
    orderId:orderId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
              completionHandler: ^(EvaluateCancelBookingResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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. Returned data: ' + data);
  }
};
api.evaluateBookingCancel(baseSiteId, orderId, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new AirlineOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Evaluates the cancellation of the entire order
                EvaluateCancelBookingResponse result = apiInstance.evaluateBookingCancel(baseSiteId, orderId, sap.cxSalesApplication, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineOrdersApi.evaluateBookingCancel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->evaluateBookingCancel($baseSiteId, $orderId, $sap.cxSalesApplication, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AirlineOrdersApi->evaluateBookingCancel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AirlineOrdersApi;

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

my $api_instance = WWW::SwaggerClient::AirlineOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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->evaluateBookingCancel(baseSiteId => $baseSiteId, orderId => $orderId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AirlineOrdersApi->evaluateBookingCancel: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AirlineOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Evaluates the cancellation of the entire order
    api_response = api_instance.evaluate_booking_cancel(baseSiteId, orderId, sap.cxSalesApplication, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineOrdersApi->evaluateBookingCancel: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getOrders

Get the booking list for user

Returns a list with the details of bookings for the given user. The level of information returned is configured via field attribute. The list can be also paginated.


/{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?activeOnly=¤tPage=&fields=&pageSize="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineOrdersApi;

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

public class AirlineOrdersApiExample {

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

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

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

        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        Boolean activeOnly = true; // Boolean | When true only the active booking will be returned
        Integer currentPage = 56; // Integer | Assuming the response arranged in pages, it represents the number of the page to be returned
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Assuming the response arranged in pages, it represents the number of results to be returned for every page
        try {
            GlobalTravelReservationList result = apiInstance.getOrders(baseSiteId, userId, acceptLanguage, activeOnly, currentPage, fields, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#getOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineOrdersApi;

public class AirlineOrdersApiExample {

    public static void main(String[] args) {
        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        Boolean activeOnly = true; // Boolean | When true only the active booking will be returned
        Integer currentPage = 56; // Integer | Assuming the response arranged in pages, it represents the number of the page to be returned
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Assuming the response arranged in pages, it represents the number of results to be returned for every page
        try {
            GlobalTravelReservationList result = apiInstance.getOrders(baseSiteId, userId, acceptLanguage, activeOnly, currentPage, fields, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#getOrders");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
Boolean *activeOnly = true; // When true only the active booking will be returned (optional)
Integer *currentPage = 56; // Assuming the response arranged in pages, it represents the number of the page to be returned (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; // Assuming the response arranged in pages, it represents the number of results to be returned for every page (optional) (default to 20)

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

// Get the booking list for user
[apiInstance getOrdersWith:baseSiteId
    userId:userId
    acceptLanguage:acceptLanguage
    activeOnly:activeOnly
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
              completionHandler: ^(GlobalTravelReservationList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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 = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'activeOnly': true, // {{Boolean}} When true only the active booking will be returned
  'currentPage': 56, // {{Integer}} Assuming the response arranged in pages, it represents the number of the page to be returned
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'pageSize': 56 // {{Integer}} Assuming the response arranged in pages, it represents the number of results to be returned for every page
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrders(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 getOrdersExample
    {
        public void main()
        {

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

            var apiInstance = new AirlineOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var activeOnly = true;  // Boolean | When true only the active booking will be returned (optional) 
            var currentPage = 56;  // Integer | Assuming the response arranged in pages, it represents the number of the page to be returned (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 | Assuming the response arranged in pages, it represents the number of results to be returned for every page (optional)  (default to 20)

            try
            {
                // Get the booking list for user
                GlobalTravelReservationList result = apiInstance.getOrders(baseSiteId, userId, acceptLanguage, activeOnly, currentPage, fields, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineOrdersApi.getOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$activeOnly = true; // Boolean | When true only the active booking will be returned
$currentPage = 56; // Integer | Assuming the response arranged in pages, it represents the number of the page to be returned
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$pageSize = 56; // Integer | Assuming the response arranged in pages, it represents the number of results to be returned for every page

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

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

my $api_instance = WWW::SwaggerClient::AirlineOrdersApi->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 $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $activeOnly = true; # Boolean | When true only the active booking will be returned
my $currentPage = 56; # Integer | Assuming the response arranged in pages, it represents the number of the page to be returned
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $pageSize = 56; # Integer | Assuming the response arranged in pages, it represents the number of results to be returned for every page

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
activeOnly = true # Boolean | When true only the active booking will be returned (optional)
currentPage = 56 # Integer | Assuming the response arranged in pages, it represents the number of the page to be returned (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 | Assuming the response arranged in pages, it represents the number of results to be returned for every page (optional) (default to 20)

try: 
    # Get the booking list for user
    api_response = api_instance.get_orders(baseSiteId, userId, acceptLanguage=acceptLanguage, activeOnly=activeOnly, currentPage=currentPage, fields=fields, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineOrdersApi->getOrders: %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
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
Query parameters
Name Description
activeOnly
Boolean
When true only the active booking will be returned
currentPage
Integer (int32)
Assuming the response arranged in pages, it represents the number of the page to be returned
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)
Assuming the response arranged in pages, it represents the number of results to be returned for every page

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getTravelReservationDetails

Get the booking details

Returns the details of a booking with a specific section for each part of the journey.


/{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}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AirlineOrdersApi;

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

public class AirlineOrdersApiExample {

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

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

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

        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order unique identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getTravelReservationDetails(baseSiteId, code, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#getTravelReservationDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineOrdersApi;

public class AirlineOrdersApiExample {

    public static void main(String[] args) {
        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String code = code_example; // String | Order unique identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getTravelReservationDetails(baseSiteId, code, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#getTravelReservationDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 unique identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

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

// Get the booking details
[apiInstance getTravelReservationDetailsWith:baseSiteId
    code:code
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var code = code_example; // {{String}} Order unique identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTravelReservationDetails(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 getTravelReservationDetailsExample
    {
        public void main()
        {

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

            var apiInstance = new AirlineOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var code = code_example;  // String | Order unique identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get the booking details
                'String' result = apiInstance.getTravelReservationDetails(baseSiteId, code, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineOrdersApi.getTravelReservationDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAirlineOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$code = code_example; // String | Order unique identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

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

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

my $api_instance = WWW::SwaggerClient::AirlineOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $code = code_example; # String | Order unique identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

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

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

# create an instance of the API class
api_instance = swagger_client.AirlineOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
code = code_example # String | Order unique identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get the booking details
    api_response = api_instance.get_travel_reservation_details(baseSiteId, code, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineOrdersApi->getTravelReservationDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
code*
String
Order unique identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


placeOrder

Place an airline order

Validates the consistency of the cart and when successful persist the booking into the system.


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

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

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

public class AirlineOrdersApiExample {

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

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

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

        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        PlaceOrderRequest body = ; // PlaceOrderRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.placeOrder(body, sap.cxSalesApplication, baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#placeOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AirlineOrdersApi;

public class AirlineOrdersApiExample {

    public static void main(String[] args) {
        AirlineOrdersApi apiInstance = new AirlineOrdersApi();
        PlaceOrderRequest body = ; // PlaceOrderRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.placeOrder(body, sap.cxSalesApplication, baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AirlineOrdersApi#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"];
PlaceOrderRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

// Place an airline order
[apiInstance placeOrderWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

var api = new CommerceWebservices.AirlineOrdersApi()
var body = ; // {{PlaceOrderRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.placeOrder(bodysap.cxSalesApplicationbaseSiteIduserId, 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 AirlineOrdersApi();
            var body = new PlaceOrderRequest(); // PlaceOrderRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Place an airline order
                'String' result = apiInstance.placeOrder(body, sap.cxSalesApplication, baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AirlineOrdersApi.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\ApiAirlineOrdersApi();
$body = ; // PlaceOrderRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::AirlineOrdersApi->new();
my $body = WWW::SwaggerClient::Object::PlaceOrderRequest->new(); # PlaceOrderRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->placeOrder(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AirlineOrdersApi->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.AirlineOrdersApi()
body =  # PlaceOrderRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Place an airline order
    api_response = api_instance.place_order(body, sap.cxSalesApplication, baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AirlineOrdersApi->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
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


BaseSites

getBaseSites

Get all base sites.

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


/basesites

Usage and SDK Samples

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

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

public class BaseSitesApiExample {

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

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

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

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

public class BaseSitesApiExample {

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

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

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

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

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

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

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

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

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

            try
            {
                // Get all base sites.
                BaseSiteList result = apiInstance.getBaseSites(fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BaseSitesApi.getBaseSites: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Get all base sites.
    api_response = api_instance.get_base_sites(fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BaseSitesApi->getBaseSites: %s\n" % e)

Parameters

Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


BaseStores

getBaseStore

Get a base store.

Returns details of a specific base store based on its identifier. The response contains detailed base store information.


/{baseSiteId}/basestores/{baseStoreUid}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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 name
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BaseStore result = apiInstance.getBaseStore(baseSiteId, baseStoreUid, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BaseStoresApi#getBaseStore");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BaseStoresApi;

public class BaseStoresApiExample {

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

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

// Get a base store.
[apiInstance getBaseStoreWith:baseSiteId
    baseStoreUid:baseStoreUid
    fields:fields
              completionHandler: ^(BaseStore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Get a base store.
                BaseStore result = apiInstance.getBaseStore(baseSiteId, baseStoreUid, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BaseStoresApi.getBaseStore: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Get a base store.
    api_response = api_instance.get_base_store(baseSiteId, baseStoreUid, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BaseStoresApi->getBaseStore: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartAddresses

createCartDeliveryAddress

Creates a delivery address for the cart.

Creates an address and assigns it to the cart as the delivery address.


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

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"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, '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, '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, '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, '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, '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, '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, '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, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates a delivery address for the cart.
    api_response = api_instance.create_cart_delivery_address(body, baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartAddressesApi->createCartDeliveryAddress: %s\n" % e)

Parameters

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

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartDeliveryAddress

Deletes the delivery address from the cart.

Deletes the delivery address from the specified cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: 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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartDeliveryAddress(baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#removeCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartAddressesApi;

public class CartAddressesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.CartAddressesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new CartAddressesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes the delivery address from the cart.
                apiInstance.removeCartDeliveryAddress(baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartAddressesApi.removeCartDeliveryAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartAddressesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::CartAddressesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.CartAddressesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartDeliveryAddress

Sets a delivery address for the cart.

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


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

Usage and SDK Samples

curl -X PUT\
\
\
-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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#replaceCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartAddressesApi;

public class CartAddressesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.CartAddressesApi()
var addressId = addressId_example; // {{String}} Address identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new CartAddressesApi();
            var addressId = addressId_example;  // String | Address identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Sets a delivery address for the cart.
                apiInstance.replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartAddressesApi.replaceCartDeliveryAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartAddressesApi();
$addressId = addressId_example; // String | Address identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::CartAddressesApi->new();
my $addressId = addressId_example; # String | Address identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.CartAddressesApi()
addressId = addressId_example # String | Address identifier
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartDeliveryModes

getCartDeliveryMode

Get the delivery mode selected for the cart.

Returns the delivery mode selected for the cart.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#getCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

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

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

// Get the delivery mode selected for the cart.
[apiInstance getCartDeliveryModeWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(DeliveryMode output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Get the delivery mode selected for the cart.
                DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.getCartDeliveryMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Get the delivery mode selected for the cart.
    api_response = api_instance.get_cart_delivery_mode(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->getCartDeliveryMode: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartDeliveryModes

Get all delivery modes for the current store and delivery address.

Returns all delivery modes supported for the current base store and cart delivery address. A delivery address must be set for the cart, otherwise an empty list will be returned.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#getCartDeliveryModes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

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

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

// Get all delivery modes for the current store and delivery address.
[apiInstance getCartDeliveryModesWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(DeliveryModeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

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

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

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

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

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

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

            try
            {
                // Get all delivery modes for the current store and delivery address.
                DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.getCartDeliveryModes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Get all delivery modes for the current store and delivery address.
    api_response = api_instance.get_cart_delivery_modes(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->getCartDeliveryModes: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartDeliveryMode

Deletes the delivery mode from the cart.

Deletes the delivery mode from the specified cart.


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

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: 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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartDeliveryMode(baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#removeCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

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

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

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

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

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

var api = new CommerceWebservices.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new CartDeliveryModesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes the delivery mode from the cart.
                apiInstance.removeCartDeliveryMode(baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.removeCartDeliveryMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartDeliveryModesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::CartDeliveryModesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.CartDeliveryModesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


replaceCartDeliveryMode

Sets the delivery mode for a cart.

Sets the delivery mode with a given identifier for the cart.


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

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: 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, 'current' for the last modified cart
        String deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#replaceCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#replaceCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *deliveryModeId = deliveryModeId_example; // Delivery mode identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

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

var api = new CommerceWebservices.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var deliveryModeId = deliveryModeId_example; // {{String}} Delivery mode identifier (code)
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

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

            var apiInstance = new CartDeliveryModesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var deliveryModeId = deliveryModeId_example;  // String | Delivery mode identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Sets the delivery mode for a cart.
                apiInstance.replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.replaceCartDeliveryMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartDeliveryModesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

my $api_instance = WWW::SwaggerClient::CartDeliveryModesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $deliveryModeId = deliveryModeId_example; # String | Delivery mode identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

# create an instance of the API class
api_instance = swagger_client.CartDeliveryModesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
deliveryModeId = deliveryModeId_example # String | Delivery mode identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartEntries

createCartEntry

Adds a product to the cart.

Adds a product to the specified cart.


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

Usage and SDK Samples

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

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

public class CartEntriesApiExample {

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

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

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

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

public class CartEntriesApiExample {

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

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

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

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

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

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

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

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

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

            try
            {
                // Adds a product to the cart.
                CartModification result = apiInstance.createCartEntry(body, baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.createCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartEntries

Get cart entries.

Returns cart entries.


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

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntryList result = apiInstance.getCartEntries(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

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

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

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

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

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

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

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

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

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

            try
            {
                // Get cart entries.
                OrderEntryList result = apiInstance.getCartEntries(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.getCartEntries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

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

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

try: 
    # Get cart entries.
    api_response = api_instance.get_cart_entries(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->getCartEntries: %s\n" % e)

Parameters

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

Responses

Status: 200 - OK

Status: 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.CartEntriesApi;

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntry result = apiInstance.getCartEntry(baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntry result = apiInstance.getCartEntry(baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

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

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

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

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

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

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

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

            var apiInstance = new CartEntriesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get the details of the cart entries.
                OrderEntry result = apiInstance.getCartEntry(baseSiteId, cartId, entryNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.getCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

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

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

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

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

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

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get the details of the cart entries.
    api_response = api_instance.get_cart_entry(baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->getCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartEntry

Deletes cart entry.

Deletes cart entry by entry number.


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

Usage and SDK Samples

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

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

public class CartEntriesApiExample {

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

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

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

        CartEntriesApi apiInstance = new CartEntriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#removeCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#removeCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

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

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

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartEntry(baseSiteId, cartId, entryNumber, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes cart entry.
                apiInstance.removeCartEntry(baseSiteId, cartId, entryNumber, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.removeCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCartEntry($baseSiteId, $cartId, $entryNumber, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->removeCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCartEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->removeCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes cart entry.
    api_instance.remove_cart_entry(baseSiteId, cartId, entryNumber, userId)
except ApiException as e:
    print("Exception when calling CartEntriesApi->removeCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 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.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#replaceCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#replaceCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntry *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Set quantity and store details of a cart entry.
[apiInstance replaceCartEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceCartEntry(bodybaseSiteIdcartIdentryNumberuserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Set quantity and store details of a cart entry.
                CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.replaceCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->replaceCartEntry($body, $baseSiteId, $cartId, $entryNumber, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->replaceCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->replaceCartEntry(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->replaceCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Set quantity and store details of a cart entry.
    api_response = api_instance.replace_cart_entry(body, baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->replaceCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 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.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.updateCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#updateCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.updateCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#updateCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntry *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Update quantity and store details of a cart entry.
[apiInstance updateCartEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryNumber:entryNumber
    userId:userId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateCartEntry(bodybaseSiteIdcartIdentryNumberuserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Update quantity and store details of a cart entry.
                CartModification result = apiInstance.updateCartEntry(body, baseSiteId, cartId, entryNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.updateCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->updateCartEntry($body, $baseSiteId, $cartId, $entryNumber, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->updateCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->updateCartEntry(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, entryNumber => $entryNumber, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->updateCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Update quantity and store details of a cart entry.
    api_response = api_instance.update_cart_entry(body, baseSiteId, cartId, entryNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->updateCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartEntryGroups

addToCartEntryGroup

Add a product to a cart entry group.

Adds a product to a cart entry group.


/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"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, '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, '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, 'current' for the last modified cart
Integer *entryGroupNumber = 56; // Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntryGroupsApi *apiInstance = [[CartEntryGroupsApi alloc] init];

// Add a product to a cart entry group.
[apiInstance addToCartEntryGroupWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryGroupNumber:entryGroupNumber
    userId:userId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntryGroupsApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var entryGroupNumber = 56; // {{Integer}} Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addToCartEntryGroup(bodybaseSiteIdcartIdentryGroupNumberuserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addToCartEntryGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntryGroupsApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var entryGroupNumber = 56;  // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add a product to a cart entry group.
                CartModification result = apiInstance.addToCartEntryGroup(body, baseSiteId, cartId, entryGroupNumber, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntryGroupsApi.addToCartEntryGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntryGroupsApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->addToCartEntryGroup($body, $baseSiteId, $cartId, $entryGroupNumber, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntryGroupsApi->addToCartEntryGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntryGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntryGroupsApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $entryGroupNumber = 56; # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->addToCartEntryGroup(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, entryGroupNumber => $entryGroupNumber, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntryGroupsApi->addToCartEntryGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntryGroupsApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryGroupNumber = 56 # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add a product to a cart entry group.
    api_response = api_instance.add_to_cart_entry_group(body, baseSiteId, cartId, entryGroupNumber, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntryGroupsApi->addToCartEntryGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryGroupNumber*
Integer (int32)
Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartEntryGroup

Delete an entry group.

Removes an entry group from an associated cart. The entry group is identified by an entryGroupNumber. The cart is identified by the cartId.


/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}

Usage and SDK Samples

curl -X DELETE\
\
\
-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, 'current' for the last modified cart
        Integer entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntryGroupsApi#removeCartEntryGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntryGroupsApi;

public class CartEntryGroupsApiExample {

    public static void main(String[] args) {
        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntryGroupsApi#removeCartEntryGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryGroupNumber = 56; // Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

CartEntryGroupsApi *apiInstance = [[CartEntryGroupsApi alloc] init];

// Delete an entry group.
[apiInstance removeCartEntryGroupWith:baseSiteId
    cartId:cartId
    entryGroupNumber:entryGroupNumber
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntryGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var entryGroupNumber = 56; // {{Integer}} Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartEntryGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntryGroupsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var entryGroupNumber = 56;  // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Delete an entry group.
                apiInstance.removeCartEntryGroup(baseSiteId, cartId, entryGroupNumber, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntryGroupsApi.removeCartEntryGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntryGroupsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCartEntryGroup($baseSiteId, $cartId, $entryGroupNumber, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartEntryGroupsApi->removeCartEntryGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntryGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntryGroupsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $entryGroupNumber = 56; # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCartEntryGroup(baseSiteId => $baseSiteId, cartId => $cartId, entryGroupNumber => $entryGroupNumber, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartEntryGroupsApi->removeCartEntryGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntryGroupsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
entryGroupNumber = 56 # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Delete an entry group.
    api_instance.remove_cart_entry_group(baseSiteId, cartId, entryGroupNumber, userId)
except ApiException as e:
    print("Exception when calling CartEntryGroupsApi->removeCartEntryGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
entryGroupNumber*
Integer (int32)
Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CartPromotions

doApplyCartPromotion

Enables promotions based on the promotionsId of the cart.

Enables a promotion for the order based on the promotionId defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions

Usage and SDK Samples

curl -X POST\
\
\
-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, 'current' for the last modified cart
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartPromotion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *promotionId = promotionId_example; // Promotion identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Enables promotions based on the promotionsId of the cart.
[apiInstance doApplyCartPromotionWith:baseSiteId
    cartId:cartId
    promotionId:promotionId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doApplyCartPromotionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var promotionId = promotionId_example;  // String | Promotion identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Enables promotions based on the promotionsId of the cart.
                apiInstance.doApplyCartPromotion(baseSiteId, cartId, promotionId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.doApplyCartPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$promotionId = promotionId_example; // String | Promotion identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doApplyCartPromotion($baseSiteId, $cartId, $promotionId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->doApplyCartPromotion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $promotionId = promotionId_example; # String | Promotion identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doApplyCartPromotion(baseSiteId => $baseSiteId, cartId => $cartId, promotionId => $promotionId, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->doApplyCartPromotion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
promotionId = promotionId_example # String | Promotion identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Enables promotions based on the promotionsId of the cart.
    api_instance.do_apply_cart_promotion(baseSiteId, cartId, promotionId, userId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->doApplyCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
promotionId*
String
Promotion identifier (code)
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


doApplyCartVoucher

Applies a voucher based on the voucherId defined for the cart.

Applies a voucher based on the voucherId defined for the specified cart.


/{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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartVoucher");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartVoucher");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *voucherId = voucherId_example; // Voucher identifier (code)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Applies a voucher based on the voucherId defined for the cart.
[apiInstance doApplyCartVoucherWith:baseSiteId
    cartId:cartId
    userId:userId
    voucherId:voucherId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var voucherId = voucherId_example; // {{String}} Voucher identifier (code)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doApplyCartVoucherExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var voucherId = voucherId_example;  // String | Voucher identifier (code)

            try
            {
                // Applies a voucher based on the voucherId defined for the cart.
                apiInstance.doApplyCartVoucher(baseSiteId, cartId, userId, voucherId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.doApplyCartVoucher: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$voucherId = voucherId_example; // String | Voucher identifier (code)

try {
    $api_instance->doApplyCartVoucher($baseSiteId, $cartId, $userId, $voucherId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->doApplyCartVoucher: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $voucherId = voucherId_example; # String | Voucher identifier (code)

eval { 
    $api_instance->doApplyCartVoucher(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, voucherId => $voucherId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->doApplyCartVoucher: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
voucherId = voucherId_example # String | Voucher identifier (code)

try: 
    # Applies a voucher based on the voucherId defined for the cart.
    api_instance.do_apply_cart_voucher(baseSiteId, cartId, userId, voucherId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->doApplyCartVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
voucherId*
String
Voucher identifier (code)
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartPromotion

Get information about promotion applied on cart.

Returns information about a promotion (with a specific promotionId), that has been applied on the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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, 'current' for the last modified cart
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotion(baseSiteId, cartId, promotionId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotion(baseSiteId, cartId, promotionId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *promotionId = promotionId_example; // Promotion identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Get information about promotion applied on cart.
[apiInstance getCartPromotionWith:baseSiteId
    cartId:cartId
    promotionId:promotionId
    userId:userId
    fields:fields
              completionHandler: ^(PromotionResultList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartPromotion(baseSiteId, cartId, promotionId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartPromotionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var promotionId = promotionId_example;  // String | Promotion identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about promotion applied on cart.
                PromotionResultList result = apiInstance.getCartPromotion(baseSiteId, cartId, promotionId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.getCartPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$promotionId = promotionId_example; // String | Promotion identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartPromotion($baseSiteId, $cartId, $promotionId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->getCartPromotion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $promotionId = promotionId_example; # String | Promotion identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartPromotion(baseSiteId => $baseSiteId, cartId => $cartId, promotionId => $promotionId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->getCartPromotion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
promotionId = promotionId_example # String | Promotion identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about promotion applied on cart.
    api_response = api_instance.get_cart_promotion(baseSiteId, cartId, promotionId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
promotionId*
String
Promotion identifier (code)
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartPromotions

Get information about promotions applied on cart.

Returns information about the promotions applied on the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Get information about promotions applied on cart.
[apiInstance getCartPromotionsWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(PromotionResultList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartPromotions(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartPromotionsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about promotions applied on cart.
                PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.getCartPromotions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartPromotions($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->getCartPromotions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartPromotions(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->getCartPromotions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about promotions applied on cart.
    api_response = api_instance.get_cart_promotions(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartPromotions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCartVouchers

Get a list of vouchers applied to the cart.

Returns a list of vouchers applied to the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            VoucherList result = apiInstance.getCartVouchers(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartVouchers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            VoucherList result = apiInstance.getCartVouchers(baseSiteId, cartId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartVouchers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Get a list of vouchers applied to the cart.
[apiInstance getCartVouchersWith:baseSiteId
    cartId:cartId
    userId:userId
    fields:fields
              completionHandler: ^(VoucherList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartVouchers(baseSiteId, cartId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartVouchersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of vouchers applied to the cart.
                VoucherList result = apiInstance.getCartVouchers(baseSiteId, cartId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.getCartVouchers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartVouchers($baseSiteId, $cartId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->getCartVouchers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartVouchers(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->getCartVouchers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of vouchers applied to the cart.
    api_response = api_instance.get_cart_vouchers(baseSiteId, cartId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartVouchers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeCartPromotion

Disables the promotion based on the promotionsId of the cart.

Disables the promotion for the order based on the promotionId defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}

Usage and SDK Samples

curl -X DELETE\
\
\
-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, 'current' for the last modified cart
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartPromotion(baseSiteId, cartId, promotionId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeCartPromotion(baseSiteId, cartId, promotionId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartPromotion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *promotionId = promotionId_example; // Promotion identifier (code)
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Disables the promotion based on the promotionsId of the cart.
[apiInstance removeCartPromotionWith:baseSiteId
    cartId:cartId
    promotionId:promotionId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartPromotion(baseSiteId, cartId, promotionId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartPromotionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var promotionId = promotionId_example;  // String | Promotion identifier (code)
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Disables the promotion based on the promotionsId of the cart.
                apiInstance.removeCartPromotion(baseSiteId, cartId, promotionId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.removeCartPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$promotionId = promotionId_example; // String | Promotion identifier (code)
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeCartPromotion($baseSiteId, $cartId, $promotionId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->removeCartPromotion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $promotionId = promotionId_example; # String | Promotion identifier (code)
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeCartPromotion(baseSiteId => $baseSiteId, cartId => $cartId, promotionId => $promotionId, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->removeCartPromotion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
promotionId = promotionId_example # String | Promotion identifier (code)
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Disables the promotion based on the promotionsId of the cart.
    api_instance.remove_cart_promotion(baseSiteId, cartId, promotionId, userId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->removeCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
promotionId*
String
Promotion identifier (code)
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - OK

Status: 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 based on the voucherId defined for the current cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers/{voucherId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: 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, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.removeCartVoucher(baseSiteId, cartId, userId, voucherId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartVoucher");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        try {
            apiInstance.removeCartVoucher(baseSiteId, cartId, userId, voucherId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartVoucher");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *voucherId = voucherId_example; // Voucher identifier (code)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Deletes a voucher defined for the current cart.
[apiInstance removeCartVoucherWith:baseSiteId
    cartId:cartId
    userId:userId
    voucherId:voucherId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var voucherId = voucherId_example; // {{String}} Voucher identifier (code)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartVoucher(baseSiteId, cartId, userId, voucherId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartVoucherExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var voucherId = voucherId_example;  // String | Voucher identifier (code)

            try
            {
                // Deletes a voucher defined for the current cart.
                apiInstance.removeCartVoucher(baseSiteId, cartId, userId, voucherId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.removeCartVoucher: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$voucherId = voucherId_example; // String | Voucher identifier (code)

try {
    $api_instance->removeCartVoucher($baseSiteId, $cartId, $userId, $voucherId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->removeCartVoucher: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $voucherId = voucherId_example; # String | Voucher identifier (code)

eval { 
    $api_instance->removeCartVoucher(baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId, voucherId => $voucherId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->removeCartVoucher: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
voucherId = voucherId_example # String | Voucher identifier (code)

try: 
    # Deletes a voucher defined for the current cart.
    api_instance.remove_cart_voucher(baseSiteId, cartId, userId, voucherId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->removeCartVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
voucherId*
String
Voucher identifier (code)
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Carts

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. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCarts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCarts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
Integer *pageSize = 56; // Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
Boolean *savedCartsOnly = true; // Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
String *sort = sort_example; // Optional sort criterion in case of savedCartsOnly == true. No default value. (optional)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Get all customer carts.
[apiInstance getCartsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    savedCartsOnly:savedCartsOnly
    sort:sort
              completionHandler: ^(CartList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'pageSize': 56, // {{Integer}} Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
  'savedCartsOnly': true, // {{Boolean}} Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
  'sort': sort_example // {{String}} Optional sort criterion in case of savedCartsOnly == true. No default value.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCarts(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var pageSize = 56;  // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional)  (default to 20)
            var savedCartsOnly = true;  // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional)  (default to false)
            var sort = sort_example;  // String | Optional sort criterion in case of savedCartsOnly == true. No default value. (optional) 

            try
            {
                // Get all customer carts.
                CartList result = apiInstance.getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getCarts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
$savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
$sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.

try {
    $result = $api_instance->getCarts($baseSiteId, $userId, $currentPage, $fields, $pageSize, $savedCartsOnly, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getCarts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $pageSize = 56; # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
my $savedCartsOnly = true; # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
my $sort = sort_example; # String | Optional sort criterion in case of savedCartsOnly == true. No default value.

eval { 
    my $result = $api_instance->getCarts(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, savedCartsOnly => $savedCartsOnly, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->getCarts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
pageSize = 56 # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
savedCartsOnly = true # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
sort = sort_example # String | Optional sort criterion in case of savedCartsOnly == true. No default value. (optional)

try: 
    # Get all customer carts.
    api_response = api_instance.get_carts(baseSiteId, userId, currentPage=currentPage, fields=fields, pageSize=pageSize, savedCartsOnly=savedCartsOnly, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getCarts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
pageSize
Integer (int32)
Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
savedCartsOnly
Boolean
Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
sort
String
Optional sort criterion in case of savedCartsOnly == true. No default value.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Catalogs

getCatalog

Get a catalog

Returns information about a catalog based on its ID, along with the versions defined for the current base store.


/{baseSiteId}/catalogs/{catalogId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Get a catalog
[apiInstance getCatalogWith:baseSiteId
    catalogId:catalogId
    fields:fields
              completionHandler: ^(Catalog output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var catalogId = catalogId_example; // {{String}} Catalog identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCatalog(baseSiteId, catalogId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCatalogExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogId = catalogId_example;  // String | Catalog identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a catalog
                Catalog result = apiInstance.getCatalog(baseSiteId, catalogId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCatalog: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogId = catalogId_example; // String | Catalog identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCatalog($baseSiteId, $catalogId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCatalog: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogId = catalogId_example; # String | Catalog identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCatalog(baseSiteId => $baseSiteId, catalogId => $catalogId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCatalog: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogId = catalogId_example # String | Catalog identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a catalog
    api_response = api_instance.get_catalog(baseSiteId, catalogId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalog: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
catalogId*
String
Catalog identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCatalogVersion

Get information about catalog version

Returns information about the catalog version that exists for the current base store.


/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Get information about catalog version
[apiInstance getCatalogVersionWith:baseSiteId
    catalogId:catalogId
    catalogVersionId:catalogVersionId
    fields:fields
              completionHandler: ^(CatalogVersion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var catalogId = catalogId_example; // {{String}} Catalog identifier
var catalogVersionId = catalogVersionId_example; // {{String}} Catalog version identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCatalogVersion(baseSiteId, catalogId, catalogVersionId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCatalogVersionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogId = catalogId_example;  // String | Catalog identifier
            var catalogVersionId = catalogVersionId_example;  // String | Catalog version identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about catalog version
                CatalogVersion result = apiInstance.getCatalogVersion(baseSiteId, catalogId, catalogVersionId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCatalogVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogId = catalogId_example; // String | Catalog identifier
$catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCatalogVersion($baseSiteId, $catalogId, $catalogVersionId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCatalogVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogId = catalogId_example; # String | Catalog identifier
my $catalogVersionId = catalogVersionId_example; # String | Catalog version identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCatalogVersion(baseSiteId => $baseSiteId, catalogId => $catalogId, catalogVersionId => $catalogVersionId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCatalogVersion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogId = catalogId_example # String | Catalog identifier
catalogVersionId = catalogVersionId_example # String | Catalog version identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about catalog version
    api_response = api_instance.get_catalog_version(baseSiteId, catalogId, catalogVersionId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalogVersion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
catalogId*
String
Catalog identifier
Required
catalogVersionId*
String
Catalog version identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCatalogs

Get a list of catalogs

Returns all catalogs with versions defined for the base store.


/{baseSiteId}/catalogs

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

import java.io.File;
import java.util.*;

public class CatalogsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CatalogsApi apiInstance = new CatalogsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CatalogList result = apiInstance.getCatalogs(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalogs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CatalogsApi;

public class CatalogsApiExample {

    public static void main(String[] args) {
        CatalogsApi apiInstance = new CatalogsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CatalogList result = apiInstance.getCatalogs(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalogs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CatalogsApi *apiInstance = [[CatalogsApi alloc] init];

// Get a list of catalogs
[apiInstance getCatalogsWith:baseSiteId
    fields:fields
              completionHandler: ^(CatalogList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCatalogs(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCatalogsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of catalogs
                CatalogList result = apiInstance.getCatalogs(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCatalogs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCatalogs($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCatalogs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCatalogs(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCatalogs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of catalogs
    api_response = api_instance.get_catalogs(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalogs: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCategories

Get information about catagory in a catalog version

Returns information about a specified category that exists in a catalog version available for the current base store.


/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Get information about catagory in a catalog version
[apiInstance getCategoriesWith:baseSiteId
    catalogId:catalogId
    catalogVersionId:catalogVersionId
    categoryId:categoryId
    fields:fields
              completionHandler: ^(CategoryHierarchy output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var catalogId = catalogId_example; // {{String}} Catalog identifier
var catalogVersionId = catalogVersionId_example; // {{String}} Catalog version identifier
var categoryId = categoryId_example; // {{String}} Category identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCategories(baseSiteId, catalogId, catalogVersionId, categoryId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCategoriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalogId = catalogId_example;  // String | Catalog identifier
            var catalogVersionId = catalogVersionId_example;  // String | Catalog version identifier
            var categoryId = categoryId_example;  // String | Category identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about catagory in a catalog version
                CategoryHierarchy result = apiInstance.getCategories(baseSiteId, catalogId, catalogVersionId, categoryId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCategories: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalogId = catalogId_example; // String | Catalog identifier
$catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
$categoryId = categoryId_example; // String | Category identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCategories($baseSiteId, $catalogId, $catalogVersionId, $categoryId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCategories: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalogId = catalogId_example; # String | Catalog identifier
my $catalogVersionId = catalogVersionId_example; # String | Catalog version identifier
my $categoryId = categoryId_example; # String | Category identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCategories(baseSiteId => $baseSiteId, catalogId => $catalogId, catalogVersionId => $catalogVersionId, categoryId => $categoryId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCategories: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalogId = catalogId_example # String | Catalog identifier
catalogVersionId = catalogVersionId_example # String | Catalog version identifier
categoryId = categoryId_example # String | Category identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about catagory in a catalog version
    api_response = api_instance.get_categories(baseSiteId, catalogId, catalogVersionId, categoryId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCategories: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
catalogId*
String
Catalog identifier
Required
catalogVersionId*
String
Catalog version identifier
Required
categoryId*
String
Category identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Consents

fetchAllConsents

Fetch the list of consents

Fetch the list of all consents available in the system for a given base site


/{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"
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
        try {
            ConsentTemplateList result = apiInstance.fetchAllConsents(baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#fetchAllConsents");
            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
        try {
            ConsentTemplateList result = apiInstance.fetchAllConsents(baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#fetchAllConsents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// Fetch the list of consents
[apiInstance fetchAllConsentsWith:baseSiteId
    userId:userId
              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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchAllConsents(baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchAllConsentsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            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

            try
            {
                // Fetch the list of consents
                ConsentTemplateList result = apiInstance.fetchAllConsents(baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.fetchAllConsents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_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

try {
    $result = $api_instance->fetchAllConsents($baseSiteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->fetchAllConsents: ', $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

eval { 
    my $result = $api_instance->fetchAllConsents(baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsentsApi->fetchAllConsents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token 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

try: 
    # Fetch the list of consents
    api_response = api_instance.fetch_all_consents(baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->fetchAllConsents: %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 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getConsentTemplate

Fetch the consent.

If user has not given or withdrawn consent to the template, no given or withdraw date is returned.


/{baseSiteId}/users/{userId}/consenttemplates/{consentTemplateId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consenttemplates/{consentTemplateId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

import java.io.File;
import java.util.*;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template id.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            ConsentTemplate result = apiInstance.getConsentTemplate(baseSiteId, consentTemplateId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#getConsentTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsentsApi;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template id.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            ConsentTemplate result = apiInstance.getConsentTemplate(baseSiteId, consentTemplateId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#getConsentTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *consentTemplateId = consentTemplateId_example; // Consent template id.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// Fetch the consent.
[apiInstance getConsentTemplateWith:baseSiteId
    consentTemplateId:consentTemplateId
    userId:userId
              completionHandler: ^(ConsentTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ConsentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var consentTemplateId = consentTemplateId_example; // {{String}} Consent template id.
var 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.getConsentTemplate(baseSiteId, consentTemplateId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConsentTemplateExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ConsentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var consentTemplateId = consentTemplateId_example;  // String | Consent template id.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Fetch the consent.
                ConsentTemplate result = apiInstance.getConsentTemplate(baseSiteId, consentTemplateId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.getConsentTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiConsentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$consentTemplateId = consentTemplateId_example; // String | Consent template id.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->getConsentTemplate($baseSiteId, $consentTemplateId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->getConsentTemplate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ConsentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $consentTemplateId = consentTemplateId_example; # String | Consent template id.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->getConsentTemplate(baseSiteId => $baseSiteId, consentTemplateId => $consentTemplateId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsentsApi->getConsentTemplate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ConsentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
consentTemplateId = consentTemplateId_example # String | Consent template id.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Fetch the consent.
    api_response = api_instance.get_consent_template(baseSiteId, consentTemplateId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->getConsentTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
consentTemplateId*
String
Consent template id.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


grantConsent

Allows to grant a consent

Allows to give a consent on a specific consent template


/{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 ID.
        Integer consentTemplateVersion = 56; // Integer | Consent template version.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.grantConsent(baseSiteId, consentTemplateId, consentTemplateVersion, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#grantConsent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsentsApi;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String consentTemplateId = consentTemplateId_example; // String | Consent template ID.
        Integer consentTemplateVersion = 56; // Integer | Consent template version.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.grantConsent(baseSiteId, consentTemplateId, consentTemplateVersion, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#grantConsent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *consentTemplateId = consentTemplateId_example; // Consent template ID.
Integer *consentTemplateVersion = 56; // Consent template version.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// Allows to grant a consent
[apiInstance grantConsentWith:baseSiteId
    consentTemplateId:consentTemplateId
    consentTemplateVersion:consentTemplateVersion
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ConsentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var consentTemplateId = consentTemplateId_example; // {{String}} Consent template ID.
var consentTemplateVersion = 56; // {{Integer}} Consent template version.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.grantConsent(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 grantConsentExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ConsentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var consentTemplateId = consentTemplateId_example;  // String | Consent template ID.
            var consentTemplateVersion = 56;  // Integer | Consent template version.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Allows to grant a consent
                'String' result = apiInstance.grantConsent(baseSiteId, consentTemplateId, consentTemplateVersion, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.grantConsent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiConsentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$consentTemplateId = consentTemplateId_example; // String | Consent template ID.
$consentTemplateVersion = 56; // Integer | Consent template version.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->grantConsent($baseSiteId, $consentTemplateId, $consentTemplateVersion, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->grantConsent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ConsentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $consentTemplateId = consentTemplateId_example; # String | Consent template ID.
my $consentTemplateVersion = 56; # Integer | Consent template version.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->grantConsent(baseSiteId => $baseSiteId, consentTemplateId => $consentTemplateId, consentTemplateVersion => $consentTemplateVersion, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsentsApi->grantConsent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ConsentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
consentTemplateId = consentTemplateId_example # String | Consent template ID.
consentTemplateVersion = 56 # Integer | Consent template version.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Allows to grant a consent
    api_response = api_instance.grant_consent(baseSiteId, consentTemplateId, consentTemplateVersion, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->grantConsent: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
consentTemplateId*
String
Consent template ID.
Required
consentTemplateVersion*
Integer (int32)
Consent template version.
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


removeConsent

Withdraws the user consent for a given consent code.

If the user consent was given, the consent is withdrawn. If consent was already withdrawn then returns consent already withdrawn error. If there is no such consent then returns not found. If the current user is an anonymous user then returns access denied error.


/{baseSiteId}/users/{userId}/consents/{consentCode}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: 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 {
            'String' result = apiInstance.removeConsent(baseSiteId, consentCode, userId);
            System.out.println(result);
        } 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 {
            'String' result = apiInstance.removeConsent(baseSiteId, consentCode, userId);
            System.out.println(result);
        } 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];

// Withdraws the user consent for a given consent code.
[apiInstance removeConsentWith:baseSiteId
    consentCode:consentCode
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for 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. Returned data: ' + data);
  }
};
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
            {
                // Withdraws the user consent for a given consent code.
                'String' result = apiInstance.removeConsent(baseSiteId, consentCode, userId);
                Debug.WriteLine(result);
            }
            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 {
    $result = $api_instance->removeConsent($baseSiteId, $consentCode, $userId);
    print_r($result);
} 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 { 
    my $result = $api_instance->removeConsent(baseSiteId => $baseSiteId, consentCode => $consentCode, userId => $userId);
    print Dumper($result);
};
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: 
    # Withdraws the user consent for a given consent code.
    api_response = api_instance.remove_consent(baseSiteId, consentCode, userId)
    pprint(api_response)
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: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity: business rules validation errors

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


Countries

getCountries

Get a list of countries.

If the value of type equals to shipping, then return shipping countries. If the value of type equals to billing, then return billing countries. If the value of type is not given, return all countries. The list is sorted alphabetically.


/{baseSiteId}/countries

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Get a list of countries.
[apiInstance getCountriesWith:baseSiteId
    fields:fields
    type:type
              completionHandler: ^(CountryList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CountriesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'type': type_example // {{String}} The type of countries.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountries(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CountriesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var type = type_example;  // String | The type of countries. (optional) 

            try
            {
                // Get a list of countries.
                CountryList result = apiInstance.getCountries(baseSiteId, fields, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CountriesApi.getCountries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCountriesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$type = type_example; // String | The type of countries.

try {
    $result = $api_instance->getCountries($baseSiteId, $fields, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CountriesApi->getCountries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CountriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CountriesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $type = type_example; # String | The type of countries.

eval { 
    my $result = $api_instance->getCountries(baseSiteId => $baseSiteId, fields => $fields, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CountriesApi->getCountries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CountriesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
type = type_example # String | The type of countries. (optional)

try: 
    # Get a list of countries.
    api_response = api_instance.get_countries(baseSiteId, fields=fields, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CountriesApi->getCountries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
type
String
The type of countries.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCountryRegions

Fetch the list of regions for the provided country.

Lists all regions.


/{baseSiteId}/countries/{countyIsoCode}/regions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Fetch the list of regions for the provided country.
[apiInstance getCountryRegionsWith:baseSiteId
    countyIsoCode:countyIsoCode
    fields:fields
              completionHandler: ^(RegionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CountriesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var countyIsoCode = countyIsoCode_example; // {{String}} An ISO code for a country
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountryRegions(baseSiteId, countyIsoCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountryRegionsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CountriesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var countyIsoCode = countyIsoCode_example;  // String | An ISO code for a country
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Fetch the list of regions for the provided country.
                RegionList result = apiInstance.getCountryRegions(baseSiteId, countyIsoCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CountriesApi.getCountryRegions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCountriesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCountryRegions($baseSiteId, $countyIsoCode, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CountriesApi->getCountryRegions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CountriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CountriesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $countyIsoCode = countyIsoCode_example; # String | An ISO code for a country
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCountryRegions(baseSiteId => $baseSiteId, countyIsoCode => $countyIsoCode, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CountriesApi->getCountryRegions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CountriesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
countyIsoCode = countyIsoCode_example # String | An ISO code for a country
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Fetch the list of regions for the provided country.
    api_response = api_instance.get_country_regions(baseSiteId, countyIsoCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CountriesApi->getCountryRegions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
countyIsoCode*
String
An ISO code for a country
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 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

Get a specific customer group.

Returns a customer group with a specific groupId. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the “customermanagergroup”.


/{baseSiteId}/customergroups/{groupId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Get a specific customer group.
[apiInstance getCustomerGroupWith:baseSiteId
    groupId:groupId
    fields:fields
              completionHandler: ^(UserGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var groupId = groupId_example; // {{String}} Group identifier.
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCustomerGroup(baseSiteId, groupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCustomerGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group identifier.
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to BASIC)

            try
            {
                // Get a specific customer group.
                UserGroup result = apiInstance.getCustomerGroup(baseSiteId, groupId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.getCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$groupId = groupId_example; // String | Group identifier.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCustomerGroup($baseSiteId, $groupId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->getCustomerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $groupId = groupId_example; # String | Group identifier.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCustomerGroup(baseSiteId => $baseSiteId, groupId => $groupId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->getCustomerGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group identifier.
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

try: 
    # Get a specific customer group.
    api_response = api_instance.get_customer_group(baseSiteId, groupId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->getCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group identifier.
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getCustomerGroups

Get all subgroups of a customergroup.

Returns all customer groups that are direct subgroups of a customergroup. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the “customermanagergroup”.


/{baseSiteId}/customergroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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 page number (starts with 0).
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Number of customer group returned in one page.
        try {
            UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, fields, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#getCustomerGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | Current page number (starts with 0).
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | Number of customer group returned in one page.
        try {
            UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, fields, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#getCustomerGroups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *currentPage = 56; // Current page number (starts with 0). (optional) (default to 0)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)
Integer *pageSize = 56; // Number of customer group returned in one page. (optional) (default to 20)

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Get all subgroups of a customergroup.
[apiInstance getCustomerGroupsWith:baseSiteId
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
              completionHandler: ^(UserGroupList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} Current page number (starts with 0).
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'pageSize': 56 // {{Integer}} Number of customer group returned in one page.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCustomerGroups(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCustomerGroupsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | Current page number (starts with 0). (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to BASIC)
            var pageSize = 56;  // Integer | Number of customer group returned in one page. (optional)  (default to 20)

            try
            {
                // Get all subgroups of a customergroup.
                UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, fields, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.getCustomerGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | Current page number (starts with 0).
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$pageSize = 56; // Integer | Number of customer group returned in one page.

try {
    $result = $api_instance->getCustomerGroups($baseSiteId, $currentPage, $fields, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->getCustomerGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | Current page number (starts with 0).
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $pageSize = 56; # Integer | Number of customer group returned in one page.

eval { 
    my $result = $api_instance->getCustomerGroups(baseSiteId => $baseSiteId, currentPage => $currentPage, fields => $fields, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->getCustomerGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | Current page number (starts with 0). (optional) (default to 0)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)
pageSize = 56 # Integer | Number of customer group returned in one page. (optional) (default to 20)

try: 
    # Get all subgroups of a customergroup.
    api_response = api_instance.get_customer_groups(baseSiteId, currentPage=currentPage, fields=fields, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->getCustomerGroups: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
Current page number (starts with 0).
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
pageSize
Integer (int32)
Number of customer group returned in one page.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


removeUsersFromCustomerGroup

Deletes a user from a customer group.

Deletes user from a customer group. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the “customermanagergroup”.


/{baseSiteId}/customergroups/{groupId}/members/{userId}

Usage and SDK Samples

curl -X DELETE\
\
\
-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.
        try {
            apiInstance.removeUsersFromCustomerGroup(baseSiteId, groupId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#removeUsersFromCustomerGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String groupId = groupId_example; // String | Group identifier.
        String userId = userId_example; // String | User identifier.
        try {
            apiInstance.removeUsersFromCustomerGroup(baseSiteId, groupId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#removeUsersFromCustomerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *groupId = groupId_example; // Group identifier.
String *userId = userId_example; // User identifier.

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Deletes a user from a customer group.
[apiInstance removeUsersFromCustomerGroupWith:baseSiteId
    groupId:groupId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var groupId = groupId_example; // {{String}} Group identifier.
var userId = userId_example; // {{String}} User identifier.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeUsersFromCustomerGroup(baseSiteId, groupId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeUsersFromCustomerGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var groupId = groupId_example;  // String | Group identifier.
            var userId = userId_example;  // String | User identifier.

            try
            {
                // Deletes a user from a customer group.
                apiInstance.removeUsersFromCustomerGroup(baseSiteId, groupId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.removeUsersFromCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$groupId = groupId_example; // String | Group identifier.
$userId = userId_example; // String | User identifier.

try {
    $api_instance->removeUsersFromCustomerGroup($baseSiteId, $groupId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $groupId = groupId_example; # String | Group identifier.
my $userId = userId_example; # String | User identifier.

eval { 
    $api_instance->removeUsersFromCustomerGroup(baseSiteId => $baseSiteId, groupId => $groupId, userId => $userId);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
groupId = groupId_example # String | Group identifier.
userId = userId_example # String | User identifier.

try: 
    # Deletes a user from a customer group.
    api_instance.remove_users_from_customer_group(baseSiteId, groupId, userId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group identifier.
Required
userId*
String
User identifier.
Required

Responses

Status: 200 - OK

Status: 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 user(s) to a customer group.

Assigns user(s) to a customer group. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the “customermanagergroup”.


/{baseSiteId}/customergroups/{groupId}/members

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: 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 user(s) to a customer group.
[apiInstance updateCustomerGroupWithUsersWith:body
    baseSiteId:baseSiteId
    groupId:groupId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var body = ; // {{MemberList}} 
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 user(s) to a customer group.
                apiInstance.updateCustomerGroupWithUsers(body, baseSiteId, groupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.updateCustomerGroupWithUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$body = ; // MemberList | 
$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 user(s) to a customer group.
    api_instance.update_customer_group_with_users(body, baseSiteId, groupId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->updateCustomerGroupWithUsers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
groupId*
String
Group identifier.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


DealCarts

addDealToCart

Perform the add deal to cart.

Add a deal to the cart, as a combination of transportation for a return journey, and associated room stays and additional products. Only one deal can be in the cart at the same time.


/{baseSiteId}/users/{userId}/carts/{cartId}/deals

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}/deals"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DealCartsApi;

import java.io.File;
import java.util.*;

public class DealCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        DealCartsApi apiInstance = new DealCartsApi();
        AddDealToCart body = ; // AddDealToCart | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addDealToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealCartsApi#addDealToCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DealCartsApi;

public class DealCartsApiExample {

    public static void main(String[] args) {
        DealCartsApi apiInstance = new DealCartsApi();
        AddDealToCart body = ; // AddDealToCart | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addDealToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealCartsApi#addDealToCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AddDealToCart *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

DealCartsApi *apiInstance = [[DealCartsApi alloc] init];

// Perform the add deal to cart.
[apiInstance addDealToCartWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.DealCartsApi()
var body = ; // {{AddDealToCart}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addDealToCart(bodysap.cxSalesApplicationbaseSiteIdcartIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addDealToCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DealCartsApi();
            var body = new AddDealToCart(); // AddDealToCart | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Perform the add deal to cart.
                'String' result = apiInstance.addDealToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealCartsApi.addDealToCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiDealCartsApi();
$body = ; // AddDealToCart | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->addDealToCart($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DealCartsApi->addDealToCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DealCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DealCartsApi->new();
my $body = WWW::SwaggerClient::Object::AddDealToCart->new(); # AddDealToCart | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->addDealToCart(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DealCartsApi->addDealToCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DealCartsApi()
body =  # AddDealToCart | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Perform the add deal to cart.
    api_response = api_instance.add_deal_to_cart(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DealCartsApi->addDealToCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No content

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable entity: business rules validation errors

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


DealSearch

getAvailableDates

Gets for the available dates of a specific deal

Gets for the available dates for a specific deal, in the specified interval.


/{baseSiteId}/deals/{dealId}/availableDates

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/deals/{dealId}/availableDates?endingDate=&startingDate="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DealSearchApi;

import java.io.File;
import java.util.*;

public class DealSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String dealId = dealId_example; // String | The deal unique identifier
        String endingDate = endingDate_example; // String | The ending date
        String startingDate = startingDate_example; // String | The starting date
        try {
            DateList result = apiInstance.getAvailableDates(baseSiteId, dealId, endingDate, startingDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#getAvailableDates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DealSearchApi;

public class DealSearchApiExample {

    public static void main(String[] args) {
        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String dealId = dealId_example; // String | The deal unique identifier
        String endingDate = endingDate_example; // String | The ending date
        String startingDate = startingDate_example; // String | The starting date
        try {
            DateList result = apiInstance.getAvailableDates(baseSiteId, dealId, endingDate, startingDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#getAvailableDates");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *dealId = dealId_example; // The deal unique identifier
String *endingDate = endingDate_example; // The ending date
String *startingDate = startingDate_example; // The starting date

DealSearchApi *apiInstance = [[DealSearchApi alloc] init];

// Gets for the available dates of a specific deal
[apiInstance getAvailableDatesWith:baseSiteId
    dealId:dealId
    endingDate:endingDate
    startingDate:startingDate
              completionHandler: ^(DateList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.DealSearchApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var dealId = dealId_example; // {{String}} The deal unique identifier
var endingDate = endingDate_example; // {{String}} The ending date
var startingDate = startingDate_example; // {{String}} The starting date

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableDates(baseSiteId, dealId, endingDate, startingDate, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAvailableDatesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DealSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var dealId = dealId_example;  // String | The deal unique identifier
            var endingDate = endingDate_example;  // String | The ending date
            var startingDate = startingDate_example;  // String | The starting date

            try
            {
                // Gets for the available dates of a specific deal
                DateList result = apiInstance.getAvailableDates(baseSiteId, dealId, endingDate, startingDate);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealSearchApi.getAvailableDates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiDealSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$dealId = dealId_example; // String | The deal unique identifier
$endingDate = endingDate_example; // String | The ending date
$startingDate = startingDate_example; // String | The starting date

try {
    $result = $api_instance->getAvailableDates($baseSiteId, $dealId, $endingDate, $startingDate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DealSearchApi->getAvailableDates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DealSearchApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DealSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $dealId = dealId_example; # String | The deal unique identifier
my $endingDate = endingDate_example; # String | The ending date
my $startingDate = startingDate_example; # String | The starting date

eval { 
    my $result = $api_instance->getAvailableDates(baseSiteId => $baseSiteId, dealId => $dealId, endingDate => $endingDate, startingDate => $startingDate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DealSearchApi->getAvailableDates: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DealSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier
dealId = dealId_example # String | The deal unique identifier
endingDate = endingDate_example # String | The ending date
startingDate = startingDate_example # String | The starting date

try: 
    # Gets for the available dates of a specific deal
    api_response = api_instance.get_available_dates(baseSiteId, dealId, endingDate, startingDate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DealSearchApi->getAvailableDates: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
dealId*
String
The deal unique identifier
Required
Query parameters
Name Description
endingDate*
String
The ending date
Required
startingDate*
String
The starting date
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getDealCategories

Get a list of deal categories.

Lists all available deal categories


/{baseSiteId}/dealCategories

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/dealCategories"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DealSearchApi;

import java.io.File;
import java.util.*;

public class DealSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            DealCategoryList result = apiInstance.getDealCategories(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#getDealCategories");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DealSearchApi;

public class DealSearchApiExample {

    public static void main(String[] args) {
        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            DealCategoryList result = apiInstance.getDealCategories(baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#getDealCategories");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier

DealSearchApi *apiInstance = [[DealSearchApi alloc] init];

// Get a list of deal categories.
[apiInstance getDealCategoriesWith:baseSiteId
              completionHandler: ^(DealCategoryList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.DealSearchApi()
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.getDealCategories(baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDealCategoriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DealSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Get a list of deal categories.
                DealCategoryList result = apiInstance.getDealCategories(baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealSearchApi.getDealCategories: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiDealSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $result = $api_instance->getDealCategories($baseSiteId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DealSearchApi->getDealCategories: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DealSearchApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DealSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    my $result = $api_instance->getDealCategories(baseSiteId => $baseSiteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DealSearchApi->getDealCategories: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DealSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Get a list of deal categories.
    api_response = api_instance.get_deal_categories(baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DealSearchApi->getDealCategories: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Unprocessable Entity


searchDealDetails

Searches for the details of a specific deal

Search for the details for a specific deal including a stay in the given accommodation offering and the list of available transportation options, plus an optional set of additional products


/{baseSiteId}/deals/{dealId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/deals/{dealId}?departureDate="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DealSearchApi;

import java.io.File;
import java.util.*;

public class DealSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String dealId = dealId_example; // String | The deal unique identifier
        String departureDate = departureDate_example; // String | The departure date
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            DealDetailsResponse result = apiInstance.searchDealDetails(baseSiteId, dealId, departureDate, sap.cxSalesApplication, acceptLanguage, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#searchDealDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DealSearchApi;

public class DealSearchApiExample {

    public static void main(String[] args) {
        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String dealId = dealId_example; // String | The deal unique identifier
        String departureDate = departureDate_example; // String | The departure date
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            DealDetailsResponse result = apiInstance.searchDealDetails(baseSiteId, dealId, departureDate, sap.cxSalesApplication, acceptLanguage, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#searchDealDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *dealId = dealId_example; // The deal unique identifier
String *departureDate = departureDate_example; // The departure date
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
String *sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // Requested Currency for the client (optional)

DealSearchApi *apiInstance = [[DealSearchApi alloc] init];

// Searches for the details of a specific deal
[apiInstance searchDealDetailsWith:baseSiteId
    dealId:dealId
    departureDate:departureDate
    sap.cxSalesApplication:sap.cxSalesApplication
    acceptLanguage:acceptLanguage
    sap.cxAcceptCurrency:sap.cxAcceptCurrency
              completionHandler: ^(DealDetailsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.DealSearchApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var dealId = dealId_example; // {{String}} The deal unique identifier
var departureDate = departureDate_example; // {{String}} The departure date
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'sap.cxAcceptCurrency': sap.cxAcceptCurrency_example // {{String}} Requested Currency for the client
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchDealDetails(baseSiteId, dealId, departureDate, sap.cxSalesApplication, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchDealDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DealSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var dealId = dealId_example;  // String | The deal unique identifier
            var departureDate = departureDate_example;  // String | The departure date
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var sap.cxAcceptCurrency = sap.cxAcceptCurrency_example;  // String | Requested Currency for the client (optional) 

            try
            {
                // Searches for the details of a specific deal
                DealDetailsResponse result = apiInstance.searchDealDetails(baseSiteId, dealId, departureDate, sap.cxSalesApplication, acceptLanguage, sap.cxAcceptCurrency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealSearchApi.searchDealDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiDealSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$dealId = dealId_example; // String | The deal unique identifier
$departureDate = departureDate_example; // String | The departure date
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client

try {
    $result = $api_instance->searchDealDetails($baseSiteId, $dealId, $departureDate, $sap.cxSalesApplication, $acceptLanguage, $sap.cxAcceptCurrency);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DealSearchApi->searchDealDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DealSearchApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DealSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $dealId = dealId_example; # String | The deal unique identifier
my $departureDate = departureDate_example; # String | The departure date
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; # String | Requested Currency for the client

eval { 
    my $result = $api_instance->searchDealDetails(baseSiteId => $baseSiteId, dealId => $dealId, departureDate => $departureDate, sap.cxSalesApplication => $sap.cxSalesApplication, acceptLanguage => $acceptLanguage, sap.cxAcceptCurrency => $sap.cxAcceptCurrency);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DealSearchApi->searchDealDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DealSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier
dealId = dealId_example # String | The deal unique identifier
departureDate = departureDate_example # String | The departure date
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
sap.cxAcceptCurrency = sap.cxAcceptCurrency_example # String | Requested Currency for the client (optional)

try: 
    # Searches for the details of a specific deal
    api_response = api_instance.search_deal_details(baseSiteId, dealId, departureDate, sap.cxSalesApplication, acceptLanguage=acceptLanguage, sap.cxAcceptCurrency=sap.cxAcceptCurrency)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DealSearchApi->searchDealDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
dealId*
String
The deal unique identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-accept-currency
String
Requested Currency for the client
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
departureDate*
String
The departure date
Required

Responses

Status: 200 - Success

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


searchDeals

Searches for the list of deals for a given category

Search for the deals belonging to the category passed as argument. Details about the deals will be returned and the level will depend on the extent of the fields attribute


/{baseSiteId}/deals

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/deals?dealCategory=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DealSearchApi;

import java.io.File;
import java.util.*;

public class DealSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String dealCategory = dealCategory_example; // String | The deal category unique identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String 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 sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            DealSearchResponse result = apiInstance.searchDeals(baseSiteId, dealCategory, sap.cxSalesApplication, acceptLanguage, fields, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#searchDeals");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DealSearchApi;

public class DealSearchApiExample {

    public static void main(String[] args) {
        DealSearchApi apiInstance = new DealSearchApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String dealCategory = dealCategory_example; // String | The deal category unique identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String 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 sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            DealSearchResponse result = apiInstance.searchDeals(baseSiteId, dealCategory, sap.cxSalesApplication, acceptLanguage, fields, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DealSearchApi#searchDeals");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *dealCategory = dealCategory_example; // The deal category unique identifier
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (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 BASIC)
String *sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // Requested Currency for the client (optional)

DealSearchApi *apiInstance = [[DealSearchApi alloc] init];

// Searches for the list of deals for a given category
[apiInstance searchDealsWith:baseSiteId
    dealCategory:dealCategory
    sap.cxSalesApplication:sap.cxSalesApplication
    acceptLanguage:acceptLanguage
    fields:fields
    sap.cxAcceptCurrency:sap.cxAcceptCurrency
              completionHandler: ^(DealSearchResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.DealSearchApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var dealCategory = dealCategory_example; // {{String}} The deal category unique identifier
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'sap.cxAcceptCurrency': sap.cxAcceptCurrency_example // {{String}} Requested Currency for the client
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchDeals(baseSiteId, dealCategory, sap.cxSalesApplication, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchDealsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DealSearchApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var dealCategory = dealCategory_example;  // String | The deal category unique identifier
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (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 BASIC)
            var sap.cxAcceptCurrency = sap.cxAcceptCurrency_example;  // String | Requested Currency for the client (optional) 

            try
            {
                // Searches for the list of deals for a given category
                DealSearchResponse result = apiInstance.searchDeals(baseSiteId, dealCategory, sap.cxSalesApplication, acceptLanguage, fields, sap.cxAcceptCurrency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealSearchApi.searchDeals: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiDealSearchApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$dealCategory = dealCategory_example; // String | The deal category unique identifier
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client

try {
    $result = $api_instance->searchDeals($baseSiteId, $dealCategory, $sap.cxSalesApplication, $acceptLanguage, $fields, $sap.cxAcceptCurrency);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DealSearchApi->searchDeals: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DealSearchApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DealSearchApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $dealCategory = dealCategory_example; # String | The deal category unique identifier
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $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 $sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; # String | Requested Currency for the client

eval { 
    my $result = $api_instance->searchDeals(baseSiteId => $baseSiteId, dealCategory => $dealCategory, sap.cxSalesApplication => $sap.cxSalesApplication, acceptLanguage => $acceptLanguage, fields => $fields, sap.cxAcceptCurrency => $sap.cxAcceptCurrency);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DealSearchApi->searchDeals: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DealSearchApi()
baseSiteId = baseSiteId_example # String | Base site identifier
dealCategory = dealCategory_example # String | The deal category unique identifier
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (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 BASIC)
sap.cxAcceptCurrency = sap.cxAcceptCurrency_example # String | Requested Currency for the client (optional)

try: 
    # Searches for the list of deals for a given category
    api_response = api_instance.search_deals(baseSiteId, dealCategory, sap.cxSalesApplication, acceptLanguage=acceptLanguage, fields=fields, sap.cxAcceptCurrency=sap.cxAcceptCurrency)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DealSearchApi->searchDeals: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-accept-currency
String
Requested Currency for the client
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
dealCategory*
String
The deal category unique identifier
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 200 - Success

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


Export

getExportedProducts

Get a list of product exports.

Used for product export. Depending on the timestamp parameter, it can return all products or only products modified after the given time.


/{baseSiteId}/export/products

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        try {
            ProductList result = apiInstance.getExportedProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportApi#getExportedProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportApi;

public class ExportApiExample {

    public static void main(String[] args) {
        ExportApi apiInstance = new ExportApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
        Integer currentPage = 56; // Integer | The current result page requested.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        try {
            ProductList result = apiInstance.getExportedProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportApi#getExportedProducts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *catalog = catalog_example; // The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *timestamp = timestamp_example; // When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional)
String *version = version_example; // The catalog version. The catalog version must be provided along with the catalog. (optional)

ExportApi *apiInstance = [[ExportApi alloc] init];

// Get a list of product exports.
[apiInstance getExportedProductsWith:baseSiteId
    catalog:catalog
    currentPage:currentPage
    fields:fields
    pageSize:pageSize
    timestamp:timestamp
    version:version
              completionHandler: ^(ProductList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ExportApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'catalog': catalog_example, // {{String}} The catalog to retrieve products from. The catalog must be provided along with the version.
  'currentPage': 56, // {{Integer}} The current result page requested.
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'timestamp': timestamp_example, // {{String}} When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
  'version': version_example // {{String}} The catalog version. The catalog version must be provided along with the catalog.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getExportedProducts(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getExportedProductsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ExportApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var catalog = catalog_example;  // String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional) 
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var timestamp = timestamp_example;  // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional) 
            var version = version_example;  // String | The catalog version. The catalog version must be provided along with the catalog. (optional) 

            try
            {
                // Get a list of product exports.
                ProductList result = apiInstance.getExportedProducts(baseSiteId, catalog, currentPage, fields, pageSize, timestamp, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportApi.getExportedProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiExportApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
$currentPage = 56; // Integer | The current result page requested.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$pageSize = 56; // Integer | The number of results returned per page.
$timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
$version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.

try {
    $result = $api_instance->getExportedProducts($baseSiteId, $catalog, $currentPage, $fields, $pageSize, $timestamp, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExportApi->getExportedProducts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ExportApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $catalog = catalog_example; # String | The catalog to retrieve products from. The catalog must be provided along with the version.
my $currentPage = 56; # Integer | The current result page requested.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $pageSize = 56; # Integer | The number of results returned per page.
my $timestamp = timestamp_example; # String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
my $version = version_example; # String | The catalog version. The catalog version must be provided along with the catalog.

eval { 
    my $result = $api_instance->getExportedProducts(baseSiteId => $baseSiteId, catalog => $catalog, currentPage => $currentPage, fields => $fields, pageSize => $pageSize, timestamp => $timestamp, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExportApi->getExportedProducts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ExportApi()
baseSiteId = baseSiteId_example # String | Base site identifier
catalog = catalog_example # String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
timestamp = timestamp_example # String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional)
version = version_example # String | The catalog version. The catalog version must be provided along with the catalog. (optional)

try: 
    # Get a list of product exports.
    api_response = api_instance.get_exported_products(baseSiteId, catalog=catalog, currentPage=currentPage, fields=fields, pageSize=pageSize, timestamp=timestamp, version=version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportApi->getExportedProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
catalog
String
The catalog to retrieve products from. The catalog must be provided along with the version.
currentPage
Integer (int32)
The current result page requested.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
pageSize
Integer (int32)
The number of results returned per page.
timestamp
String
When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
version
String
The catalog version. The catalog version must be provided along with the catalog.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


FareBundles

getTransportBundleById

Get the bundle template

Returns the the information about the fare bundle template with the given id. The response will contain the structure of the bundle alongside with the products.


/{baseSiteId}/catalogs/{catalogId}/fareBundles/{bundleId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}/fareBundles/{bundleId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FareBundlesApi;

import java.io.File;
import java.util.*;

public class FareBundlesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FareBundlesApi apiInstance = new FareBundlesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String bundleId = bundleId_example; // String | Bundle template identifier
        String catalogId = catalogId_example; // String | Catalog identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            TravelBundleTemplate result = apiInstance.getTransportBundleById(baseSiteId, bundleId, catalogId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FareBundlesApi#getTransportBundleById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FareBundlesApi;

public class FareBundlesApiExample {

    public static void main(String[] args) {
        FareBundlesApi apiInstance = new FareBundlesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String bundleId = bundleId_example; // String | Bundle template identifier
        String catalogId = catalogId_example; // String | Catalog identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            TravelBundleTemplate result = apiInstance.getTransportBundleById(baseSiteId, bundleId, catalogId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FareBundlesApi#getTransportBundleById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *bundleId = bundleId_example; // Bundle template identifier
String *catalogId = catalogId_example; // Catalog identifier
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FareBundlesApi *apiInstance = [[FareBundlesApi alloc] init];

// Get the bundle template
[apiInstance getTransportBundleByIdWith:baseSiteId
    bundleId:bundleId
    catalogId:catalogId
    acceptLanguage:acceptLanguage
              completionHandler: ^(TravelBundleTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FareBundlesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var bundleId = bundleId_example; // {{String}} Bundle template identifier
var catalogId = catalogId_example; // {{String}} Catalog identifier
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTransportBundleById(baseSiteId, bundleId, catalogId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTransportBundleByIdExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FareBundlesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var bundleId = bundleId_example;  // String | Bundle template identifier
            var catalogId = catalogId_example;  // String | Catalog identifier
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get the bundle template
                TravelBundleTemplate result = apiInstance.getTransportBundleById(baseSiteId, bundleId, catalogId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FareBundlesApi.getTransportBundleById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFareBundlesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$bundleId = bundleId_example; // String | Bundle template identifier
$catalogId = catalogId_example; // String | Catalog identifier
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getTransportBundleById($baseSiteId, $bundleId, $catalogId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FareBundlesApi->getTransportBundleById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FareBundlesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FareBundlesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $bundleId = bundleId_example; # String | Bundle template identifier
my $catalogId = catalogId_example; # String | Catalog identifier
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getTransportBundleById(baseSiteId => $baseSiteId, bundleId => $bundleId, catalogId => $catalogId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FareBundlesApi->getTransportBundleById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FareBundlesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
bundleId = bundleId_example # String | Bundle template identifier
catalogId = catalogId_example # String | Catalog identifier
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get the bundle template
    api_response = api_instance.get_transport_bundle_by_id(baseSiteId, bundleId, catalogId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FareBundlesApi->getTransportBundleById: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
bundleId*
String
Bundle template identifier
Required
catalogId*
String
Catalog identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


Feeds

getOrderStatusFeed

Get a list of orders with status updates.

Returns the orders that have changed status. Returns only the elements from the current baseSite that have been updated after the provided timestamp.


/{baseSiteId}/feeds/orders/statusfeed

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"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];

// Get a list of orders with status updates.
[apiInstance getOrderStatusFeedWith:baseSiteId
    timestamp:timestamp
    fields:fields
              completionHandler: ^(OrderStatusUpdateElementList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FeedsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var timestamp = timestamp_example; // {{String}} Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderStatusFeed(baseSiteId, timestamp, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderStatusFeedExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FeedsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var timestamp = timestamp_example;  // String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of orders with status updates.
                OrderStatusUpdateElementList result = apiInstance.getOrderStatusFeed(baseSiteId, timestamp, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FeedsApi.getOrderStatusFeed: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFeedsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderStatusFeed($baseSiteId, $timestamp, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FeedsApi->getOrderStatusFeed: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FeedsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FeedsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $timestamp = timestamp_example; # String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderStatusFeed(baseSiteId => $baseSiteId, timestamp => $timestamp, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FeedsApi->getOrderStatusFeed: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FeedsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
timestamp = timestamp_example # String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of orders with status updates.
    api_response = api_instance.get_order_status_feed(baseSiteId, timestamp, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FeedsApi->getOrderStatusFeed: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
timestamp*
String
Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


FlightCarts

addAncillaryToCart

Add ancillary entry to cart

Perform the add ancilary entry to cart. A new entry is created as result of this operation.


/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaryEntries

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}/ancillaryEntries"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        AncillaryEntryRequest body = ; // AncillaryEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addAncillaryToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#addAncillaryToCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        AncillaryEntryRequest body = ; // AncillaryEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addAncillaryToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#addAncillaryToCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AncillaryEntryRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Add ancillary entry to cart
[apiInstance addAncillaryToCartWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
var body = ; // {{AncillaryEntryRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAncillaryToCart(bodysap.cxSalesApplicationbaseSiteIdcartIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addAncillaryToCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new AncillaryEntryRequest(); // AncillaryEntryRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add ancillary entry to cart
                'String' result = apiInstance.addAncillaryToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.addAncillaryToCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // AncillaryEntryRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->addAncillaryToCart($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->addAncillaryToCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::AncillaryEntryRequest->new(); # AncillaryEntryRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->addAncillaryToCart(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->addAncillaryToCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # AncillaryEntryRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add ancillary entry to cart
    api_response = api_instance.add_ancillary_to_cart(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->addAncillaryToCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


addBaggageToCart

Add baggage entry to cart

Perform the add baggage entry to cart. A new entry is created as result of this operation


/{baseSiteId}/users/{userId}/carts/{cartId}/baggageEntries

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}/baggageEntries"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        BaggageEntryRequest body = ; // BaggageEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            Object result = apiInstance.addBaggageToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#addBaggageToCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        BaggageEntryRequest body = ; // BaggageEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            Object result = apiInstance.addBaggageToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#addBaggageToCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
BaggageEntryRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Add baggage entry to cart
[apiInstance addBaggageToCartWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    userId:userId
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
var body = ; // {{BaggageEntryRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addBaggageToCart(bodysap.cxSalesApplicationbaseSiteIdcartIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addBaggageToCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new BaggageEntryRequest(); // BaggageEntryRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add baggage entry to cart
                Object result = apiInstance.addBaggageToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.addBaggageToCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // BaggageEntryRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->addBaggageToCart($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->addBaggageToCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::BaggageEntryRequest->new(); # BaggageEntryRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->addBaggageToCart(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->addBaggageToCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # BaggageEntryRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add baggage entry to cart
    api_response = api_instance.add_baggage_to_cart(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->addBaggageToCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable entity: business rules validation errors, e.g., travel restrictions

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


addSolutionToCart

Add a solution to cart

Adds a solution, consisting in a combination of origin-destination couples, for a specific passenger set.


/{baseSiteId}/users/{userId}/carts/{cartId}/solutions

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}/solutions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        AddSolutionRequest body = ; // AddSolutionRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.addSolutionToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#addSolutionToCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        AddSolutionRequest body = ; // AddSolutionRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.addSolutionToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#addSolutionToCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AddSolutionRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Add a solution to cart
[apiInstance addSolutionToCartWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    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.FlightCartsApi()
var body = ; // {{AddSolutionRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addSolutionToCart(bodysap.cxSalesApplicationbaseSiteIdcartIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addSolutionToCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new AddSolutionRequest(); // AddSolutionRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add a solution to cart
                apiInstance.addSolutionToCart(body, sap.cxSalesApplication, baseSiteId, cartId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.addSolutionToCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // AddSolutionRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->addSolutionToCart($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->addSolutionToCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::AddSolutionRequest->new(); # AddSolutionRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->addSolutionToCart(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->addSolutionToCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # AddSolutionRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add a solution to cart
    api_instance.add_solution_to_cart(body, sap.cxSalesApplication, baseSiteId, cartId, userId)
except ApiException as e:
    print("Exception when calling FlightCartsApi->addSolutionToCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


changeSolution

Changes the given solution

Changes the given solution, modifying origin, destination, cabin and departure date/time according with the provided request


/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}/change

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}/solutions/{solutionID}/change"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        ChangeSolutionRequest body = ; // ChangeSolutionRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.changeSolution(body, sap.cxSalesApplication, baseSiteId, cartId, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#changeSolution");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        ChangeSolutionRequest body = ; // ChangeSolutionRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.changeSolution(body, sap.cxSalesApplication, baseSiteId, cartId, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#changeSolution");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ChangeSolutionRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Changes the given solution
[apiInstance changeSolutionWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    solutionID:solutionID
    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.FlightCartsApi()
var body = ; // {{ChangeSolutionRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
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 solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the 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.changeSolution(bodysap.cxSalesApplicationbaseSiteIdcartIdsolutionIDuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class changeSolutionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new ChangeSolutionRequest(); // ChangeSolutionRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            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 solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Changes the given solution
                apiInstance.changeSolution(body, sap.cxSalesApplication, baseSiteId, cartId, solutionID, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.changeSolution: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // ChangeSolutionRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$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
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->changeSolution($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $solutionID, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->changeSolution: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::ChangeSolutionRequest->new(); # ChangeSolutionRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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 $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the 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->changeSolution(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, solutionID => $solutionID, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->changeSolution: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # ChangeSolutionRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
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
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Changes the given solution
    api_instance.change_solution(body, sap.cxSalesApplication, baseSiteId, cartId, solutionID, userId)
except ApiException as e:
    print("Exception when calling FlightCartsApi->changeSolution: %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
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getAncillaryEntry

Get the details of an ancillary entry.

Get details ancillary entry by entry number. Information about the associated products, flights, passengers will be returned alongside with prices


/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaryEntries/{entryId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaryEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAncillaryEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getAncillaryEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAncillaryEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getAncillaryEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier.
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Get the details of an ancillary entry.
[apiInstance getAncillaryEntryWith:baseSiteId
    cartId:cartId
    entryId:entryId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier.
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAncillaryEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAncillaryEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry identifier.
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get the details of an ancillary entry.
                'String' result = apiInstance.getAncillaryEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.getAncillaryEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getAncillaryEntry($baseSiteId, $cartId, $entryId, $sap.cxSalesApplication, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->getAncillaryEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier.
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getAncillaryEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->getAncillaryEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier.
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get the details of an ancillary entry.
    api_response = api_instance.get_ancillary_entry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->getAncillaryEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable entity: business rules validation errors, e.g., travel restrictions

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getAvailableAncillaries

Searches for all available ancillaries

Searches for all available ancillaries for a given cart id.


/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaries

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaries?flightCode="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        array[String] flightCode = ; // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s)
        try {
            AncillarySearchResponse result = apiInstance.getAvailableAncillaries(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage, flightCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getAvailableAncillaries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        array[String] flightCode = ; // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s)
        try {
            AncillarySearchResponse result = apiInstance.getAvailableAncillaries(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage, flightCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getAvailableAncillaries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
array[String] *flightCode = ; // Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s) (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Searches for all available ancillaries
[apiInstance getAvailableAncillariesWith:baseSiteId
    cartId:cartId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
    flightCode:flightCode
              completionHandler: ^(AncillarySearchResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'flightCode':  // {{array[String]}} Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableAncillaries(baseSiteId, cartId, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAvailableAncillariesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var flightCode = new array[String](); // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s) (optional) 

            try
            {
                // Searches for all available ancillaries
                AncillarySearchResponse result = apiInstance.getAvailableAncillaries(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage, flightCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.getAvailableAncillaries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$flightCode = ; // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s)

try {
    $result = $api_instance->getAvailableAncillaries($baseSiteId, $cartId, $sap.cxSalesApplication, $userId, $acceptLanguage, $flightCode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->getAvailableAncillaries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $flightCode = []; # array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s)

eval { 
    my $result = $api_instance->getAvailableAncillaries(baseSiteId => $baseSiteId, cartId => $cartId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId, acceptLanguage => $acceptLanguage, flightCode => $flightCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->getAvailableAncillaries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
flightCode =  # array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s) (optional)

try: 
    # Searches for all available ancillaries
    api_response = api_instance.get_available_ancillaries(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage, flightCode=flightCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->getAvailableAncillaries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
flightCode
array[String]
Optional parameter. If the parameter is provided the results will be filtered accordingly returning only ancillaries valid for the given flight(s)

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity)

Status: 500 - Server Error


getBaggageEntry

Get the details of a baggage entry.

Get baggage entry details by entry number. Information about the associated products, flights, passengers will be returned alongside with prices.


/{baseSiteId}/users/{userId}/carts/{cartId}/baggageEntries/{entryId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/baggageEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getBaggageEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getBaggageEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier.
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Get the details of a baggage entry.
[apiInstance getBaggageEntryWith:baseSiteId
    cartId:cartId
    entryId:entryId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier.
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBaggageEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry identifier.
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get the details of a baggage entry.
                'String' result = apiInstance.getBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.getBaggageEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getBaggageEntry($baseSiteId, $cartId, $entryId, $sap.cxSalesApplication, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->getBaggageEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier.
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getBaggageEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->getBaggageEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier.
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get the details of a baggage entry.
    api_response = api_instance.get_baggage_entry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->getBaggageEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


getBaggages

Searches for baggages

Searches for all the baggage products available for the given cart


/{baseSiteId}/users/{userId}/carts/{cartId}/baggages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/baggages?flightCode="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        array[String] flightCode = ; // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s)
        try {
            BaggageSearchResponse result = apiInstance.getBaggages(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage, flightCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getBaggages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        array[String] flightCode = ; // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s)
        try {
            BaggageSearchResponse result = apiInstance.getBaggages(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage, flightCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getBaggages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
array[String] *flightCode = ; // Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s) (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Searches for baggages
[apiInstance getBaggagesWith:baseSiteId
    cartId:cartId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
    acceptLanguage:acceptLanguage
    flightCode:flightCode
              completionHandler: ^(BaggageSearchResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example, // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'flightCode':  // {{array[String]}} Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBaggages(baseSiteId, cartId, sap.cxSalesApplication, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBaggagesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var flightCode = new array[String](); // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s) (optional) 

            try
            {
                // Searches for baggages
                BaggageSearchResponse result = apiInstance.getBaggages(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage, flightCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.getBaggages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$flightCode = ; // array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s)

try {
    $result = $api_instance->getBaggages($baseSiteId, $cartId, $sap.cxSalesApplication, $userId, $acceptLanguage, $flightCode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->getBaggages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $flightCode = []; # array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s)

eval { 
    my $result = $api_instance->getBaggages(baseSiteId => $baseSiteId, cartId => $cartId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId, acceptLanguage => $acceptLanguage, flightCode => $flightCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->getBaggages: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
flightCode =  # array[String] | Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s) (optional)

try: 
    # Searches for baggages
    api_response = api_instance.get_baggages(baseSiteId, cartId, sap.cxSalesApplication, userId, acceptLanguage=acceptLanguage, flightCode=flightCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->getBaggages: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-sales-application*
String
The sales application code
Required
Query parameters
Name Description
flightCode
array[String]
Optional parameter. If the parameter is provided the results will be filtered accordingly returning only baggages valid for the given flight(s)

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getSolutionPassenger

Returns a passenger for a given solution.

Returns the information about the given passenger for a given solution.


/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}/passengers/{passengerId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}/passengers/{passengerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        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 passengerId = passengerId_example; // String | Passenger identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassenger(baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getSolutionPassenger");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        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 passengerId = passengerId_example; // String | Passenger identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassenger(baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getSolutionPassenger");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *passengerId = passengerId_example; // Passenger identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Returns a passenger for a given solution.
[apiInstance getSolutionPassengerWith:baseSiteId
    cartId:cartId
    passengerId:passengerId
    solutionID:solutionID
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 passengerId = passengerId_example; // {{String}} Passenger identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSolutionPassenger(baseSiteId, cartId, passengerId, solutionID, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSolutionPassengerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 passengerId = passengerId_example;  // String | Passenger identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns a passenger for a given solution.
                'String' result = apiInstance.getSolutionPassenger(baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.getSolutionPassenger: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$passengerId = passengerId_example; // String | Passenger identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getSolutionPassenger($baseSiteId, $cartId, $passengerId, $solutionID, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->getSolutionPassenger: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $passengerId = passengerId_example; # String | Passenger identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getSolutionPassenger(baseSiteId => $baseSiteId, cartId => $cartId, passengerId => $passengerId, solutionID => $solutionID, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->getSolutionPassenger: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
passengerId = passengerId_example # String | Passenger identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns a passenger for a given solution.
    api_response = api_instance.get_solution_passenger(baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->getSolutionPassenger: %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
passengerId*
String
Passenger identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getSolutionPassengers

Returns all the passengers for a given solution.

Returns the information about all the passengers for a given solution.


/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}/passengers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}/passengers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassengers(baseSiteId, cartId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getSolutionPassengers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassengers(baseSiteId, cartId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#getSolutionPassengers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Returns all the passengers for a given solution.
[apiInstance getSolutionPassengersWith:baseSiteId
    cartId:cartId
    solutionID:solutionID
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSolutionPassengers(baseSiteId, cartId, solutionID, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSolutionPassengersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns all the passengers for a given solution.
                'String' result = apiInstance.getSolutionPassengers(baseSiteId, cartId, solutionID, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.getSolutionPassengers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getSolutionPassengers($baseSiteId, $cartId, $solutionID, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->getSolutionPassengers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getSolutionPassengers(baseSiteId => $baseSiteId, cartId => $cartId, solutionID => $solutionID, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->getSolutionPassengers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns all the passengers for a given solution.
    api_response = api_instance.get_solution_passengers(baseSiteId, cartId, solutionID, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->getSolutionPassengers: %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
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


removeAncillaryCartEntry

Deletes ancillary entry.

Performs the deletes ancillary entry.


/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaryEntries/{entryId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaryEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.removeAncillaryCartEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#removeAncillaryCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.removeAncillaryCartEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#removeAncillaryCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier.
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Deletes ancillary entry.
[apiInstance removeAncillaryCartEntryWith:baseSiteId
    cartId:cartId
    entryId:entryId
    sap.cxSalesApplication:sap.cxSalesApplication
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier.
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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. Returned data: ' + data);
  }
};
api.removeAncillaryCartEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeAncillaryCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry identifier.
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes ancillary entry.
                'String' result = apiInstance.removeAncillaryCartEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.removeAncillaryCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->removeAncillaryCartEntry($baseSiteId, $cartId, $entryId, $sap.cxSalesApplication, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->removeAncillaryCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier.
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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->removeAncillaryCartEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->removeAncillaryCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier.
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes ancillary entry.
    api_response = api_instance.remove_ancillary_cart_entry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->removeAncillaryCartEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


removeBaggageEntry

Deletes baggage entry

Deletes a baggage entry identified by entry number


/{baseSiteId}/users/{userId}/carts/{cartId}/baggageEntries/{entryId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/baggageEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#removeBaggageEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#removeBaggageEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier.
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Deletes baggage entry
[apiInstance removeBaggageEntryWith:baseSiteId
    cartId:cartId
    entryId:entryId
    sap.cxSalesApplication:sap.cxSalesApplication
    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.FlightCartsApi()
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier.
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application 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.removeBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeBaggageEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry identifier.
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes baggage entry
                apiInstance.removeBaggageEntry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.removeBaggageEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeBaggageEntry($baseSiteId, $cartId, $entryId, $sap.cxSalesApplication, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->removeBaggageEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier.
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application 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->removeBaggageEntry(baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, sap.cxSalesApplication => $sap.cxSalesApplication, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->removeBaggageEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier.
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes baggage entry
    api_instance.remove_baggage_entry(baseSiteId, cartId, entryId, sap.cxSalesApplication, userId)
except ApiException as e:
    print("Exception when calling FlightCartsApi->removeBaggageEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


removeSolution

Remove solution

Removes the specified booking solution from the cart


/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeSolution(baseSiteId, cartId, sap.cxSalesApplication, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#removeSolution");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        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 sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeSolution(baseSiteId, cartId, sap.cxSalesApplication, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#removeSolution");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Remove solution
[apiInstance removeSolutionWith:baseSiteId
    cartId:cartId
    sap.cxSalesApplication:sap.cxSalesApplication
    solutionID:solutionID
    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.FlightCartsApi()
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 sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the 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.removeSolution(baseSiteId, cartId, sap.cxSalesApplication, solutionID, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeSolutionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            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 sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Remove solution
                apiInstance.removeSolution(baseSiteId, cartId, sap.cxSalesApplication, solutionID, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.removeSolution: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$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
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeSolution($baseSiteId, $cartId, $sap.cxSalesApplication, $solutionID, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->removeSolution: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->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 $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the 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->removeSolution(baseSiteId => $baseSiteId, cartId => $cartId, sap.cxSalesApplication => $sap.cxSalesApplication, solutionID => $solutionID, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->removeSolution: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
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
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Remove solution
    api_instance.remove_solution(baseSiteId, cartId, sap.cxSalesApplication, solutionID, userId)
except ApiException as e:
    print("Exception when calling FlightCartsApi->removeSolution: %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
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Unauthorized

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


updateAncillaryEntry

Updates the specified fields of an ancillary entry in the cart.

Updates the specified fields of an ancillary entry in the cart. Only provided fields will be updated.


/{baseSiteId}/users/{userId}/carts/{cartId}/ancillaryEntries/{entryId}

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}/carts/{cartId}/ancillaryEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        AncillaryEntryRequest body = ; // AncillaryEntryRequest | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.updateAncillaryEntry(body, baseSiteId, cartId, entryId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#updateAncillaryEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        AncillaryEntryRequest body = ; // AncillaryEntryRequest | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.updateAncillaryEntry(body, baseSiteId, cartId, entryId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#updateAncillaryEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AncillaryEntryRequest *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, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Updates the specified fields of an ancillary entry in the cart.
[apiInstance updateAncillaryEntryWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    entryId:entryId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
var body = ; // {{AncillaryEntryRequest}} 
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateAncillaryEntry(bodybaseSiteIdcartIdentryIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateAncillaryEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new AncillaryEntryRequest(); // AncillaryEntryRequest | 
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry 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 specified fields of an ancillary entry in the cart.
                'String' result = apiInstance.updateAncillaryEntry(body, baseSiteId, cartId, entryId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.updateAncillaryEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // AncillaryEntryRequest | 
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->updateAncillaryEntry($body, $baseSiteId, $cartId, $entryId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->updateAncillaryEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::AncillaryEntryRequest->new(); # AncillaryEntryRequest | 
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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->updateAncillaryEntry(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->updateAncillaryEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # AncillaryEntryRequest | 
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the specified fields of an ancillary entry in the cart.
    api_response = api_instance.update_ancillary_entry(body, baseSiteId, cartId, entryId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->updateAncillaryEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity)

Status: 500 - Server Error


updateBaggageEntry

Updates the specified fields of a baggage entry in the cart.

Updates the specified fields of a baggage entry in the cart. Only provided and allowed fields will be updated.


/{baseSiteId}/users/{userId}/carts/{cartId}/baggageEntries/{entryId}

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}/carts/{cartId}/baggageEntries/{entryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        BaggageEntryRequest body = ; // BaggageEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.updateBaggageEntry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#updateBaggageEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        BaggageEntryRequest body = ; // BaggageEntryRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Integer entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.updateBaggageEntry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#updateBaggageEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
BaggageEntryRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Integer *entryId = 56; // The entry identifier. Each entry in a cart has an entry identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Updates the specified fields of a baggage entry in the cart.
[apiInstance updateBaggageEntryWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    cartId:cartId
    entryId:entryId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightCartsApi()
var body = ; // {{BaggageEntryRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
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 entryId = 56; // {{Integer}} The entry identifier. Each entry in a cart has an entry identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateBaggageEntry(bodysap.cxSalesApplicationbaseSiteIdcartIdentryIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateBaggageEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new BaggageEntryRequest(); // BaggageEntryRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            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 entryId = 56;  // Integer | The entry identifier. Each entry in a cart has an entry 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 specified fields of a baggage entry in the cart.
                'String' result = apiInstance.updateBaggageEntry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.updateBaggageEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // BaggageEntryRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$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
$entryId = 56; // Integer | The entry identifier. Each entry in a cart has an entry identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->updateBaggageEntry($body, $sap.cxSalesApplication, $baseSiteId, $cartId, $entryId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->updateBaggageEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::BaggageEntryRequest->new(); # BaggageEntryRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
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 $entryId = 56; # Integer | The entry identifier. Each entry in a cart has an entry identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->updateBaggageEntry(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, cartId => $cartId, entryId => $entryId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->updateBaggageEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # BaggageEntryRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
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
entryId = 56 # Integer | The entry identifier. Each entry in a cart has an entry identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the specified fields of a baggage entry in the cart.
    api_response = api_instance.update_baggage_entry(body, sap.cxSalesApplication, baseSiteId, cartId, entryId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightCartsApi->updateBaggageEntry: %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
entryId*
Integer (int32)
The entry identifier. Each entry in a cart has an entry identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable entity: business rules validation errors, e.g., travel restrictions

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


updateTraveller

Updates the information for a passenger in the cart, adding personal details

Updates the passengers information


/{baseSiteId}/users/{userId}/carts/{cartId}/solutions/{solutionID}/passengers/{passengerId}

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}/carts/{cartId}/solutions/{solutionID}/passengers/{passengerId}?saveInProfile="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightCartsApi;

import java.io.File;
import java.util.*;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightCartsApi apiInstance = new FlightCartsApi();
        PassengerDetails body = ; // PassengerDetails | 
        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 passengerId = passengerId_example; // String | Passenger identifier.
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        Boolean saveInProfile = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile.
        try {
            apiInstance.updateTraveller(body, baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage, saveInProfile);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#updateTraveller");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightCartsApi;

public class FlightCartsApiExample {

    public static void main(String[] args) {
        FlightCartsApi apiInstance = new FlightCartsApi();
        PassengerDetails body = ; // PassengerDetails | 
        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 passengerId = passengerId_example; // String | Passenger identifier.
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        Boolean saveInProfile = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile.
        try {
            apiInstance.updateTraveller(body, baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage, saveInProfile);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightCartsApi#updateTraveller");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
PassengerDetails *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, 'current' for the last modified cart
String *passengerId = passengerId_example; // Passenger identifier.
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
Boolean *saveInProfile = true; // Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile. (optional)

FlightCartsApi *apiInstance = [[FlightCartsApi alloc] init];

// Updates the information for a passenger in the cart, adding personal details
[apiInstance updateTravellerWith:body
    baseSiteId:baseSiteId
    cartId:cartId
    passengerId:passengerId
    solutionID:solutionID
    userId:userId
    acceptLanguage:acceptLanguage
    saveInProfile:saveInProfile
              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.FlightCartsApi()
var body = ; // {{PassengerDetails}} 
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 passengerId = passengerId_example; // {{String}} Passenger identifier.
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'saveInProfile': true // {{Boolean}} Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateTraveller(bodybaseSiteIdcartIdpassengerIdsolutionIDuserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateTravellerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightCartsApi();
            var body = new PassengerDetails(); // PassengerDetails | 
            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 passengerId = passengerId_example;  // String | Passenger identifier.
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var saveInProfile = true;  // Boolean | Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile. (optional) 

            try
            {
                // Updates the information for a passenger in the cart, adding personal details
                apiInstance.updateTraveller(body, baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage, saveInProfile);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightCartsApi.updateTraveller: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightCartsApi();
$body = ; // PassengerDetails | 
$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
$passengerId = passengerId_example; // String | Passenger identifier.
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$saveInProfile = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile.

try {
    $api_instance->updateTraveller($body, $baseSiteId, $cartId, $passengerId, $solutionID, $userId, $acceptLanguage, $saveInProfile);
} catch (Exception $e) {
    echo 'Exception when calling FlightCartsApi->updateTraveller: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightCartsApi->new();
my $body = WWW::SwaggerClient::Object::PassengerDetails->new(); # PassengerDetails | 
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 $passengerId = passengerId_example; # String | Passenger identifier.
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $saveInProfile = true; # Boolean | Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile.

eval { 
    $api_instance->updateTraveller(body => $body, baseSiteId => $baseSiteId, cartId => $cartId, passengerId => $passengerId, solutionID => $solutionID, userId => $userId, acceptLanguage => $acceptLanguage, saveInProfile => $saveInProfile);
};
if ($@) {
    warn "Exception when calling FlightCartsApi->updateTraveller: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightCartsApi()
body =  # PassengerDetails | 
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
passengerId = passengerId_example # String | Passenger identifier.
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
saveInProfile = true # Boolean | Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile. (optional)

try: 
    # Updates the information for a passenger in the cart, adding personal details
    api_instance.update_traveller(body, baseSiteId, cartId, passengerId, solutionID, userId, acceptLanguage=acceptLanguage, saveInProfile=saveInProfile)
except ApiException as e:
    print("Exception when calling FlightCartsApi->updateTraveller: %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
passengerId*
String
Passenger identifier.
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
Body parameters
Name Description
body *
Query parameters
Name Description
saveInProfile
Boolean
Optional parameter. If the parameter is provided and its value is true, passenger details are saved in the profile.

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


FlightOrders

addAdvancePassengerInformation

Add advance passenger information

Add advance passenger information to the specified traveller associated to the booking


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}/advancePassengerInformation

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}/advancePassengerInformation"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        AdvancePassengerInformation body = ; // AdvancePassengerInformation | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String passengerId = passengerId_example; // String | Traveller unique identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addAdvancePassengerInformation(body, baseSiteId, orderId, passengerId, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#addAdvancePassengerInformation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        AdvancePassengerInformation body = ; // AdvancePassengerInformation | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String passengerId = passengerId_example; // String | Traveller unique identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.addAdvancePassengerInformation(body, baseSiteId, orderId, passengerId, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#addAdvancePassengerInformation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
AdvancePassengerInformation *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
String *passengerId = passengerId_example; // Traveller unique identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Add advance passenger information
[apiInstance addAdvancePassengerInformationWith:body
    baseSiteId:baseSiteId
    orderId:orderId
    passengerId:passengerId
    solutionID:solutionID
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var body = ; // {{AdvancePassengerInformation}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var passengerId = passengerId_example; // {{String}} Traveller unique identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAdvancePassengerInformation(bodybaseSiteIdorderIdpassengerIdsolutionIDuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addAdvancePassengerInformationExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var body = new AdvancePassengerInformation(); // AdvancePassengerInformation | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var passengerId = passengerId_example;  // String | Traveller unique identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add advance passenger information
                'String' result = apiInstance.addAdvancePassengerInformation(body, baseSiteId, orderId, passengerId, solutionID, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.addAdvancePassengerInformation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$body = ; // AdvancePassengerInformation | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$passengerId = passengerId_example; // String | Traveller unique identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->addAdvancePassengerInformation($body, $baseSiteId, $orderId, $passengerId, $solutionID, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->addAdvancePassengerInformation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $body = WWW::SwaggerClient::Object::AdvancePassengerInformation->new(); # AdvancePassengerInformation | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $passengerId = passengerId_example; # String | Traveller unique identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->addAdvancePassengerInformation(body => $body, baseSiteId => $baseSiteId, orderId => $orderId, passengerId => $passengerId, solutionID => $solutionID, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->addAdvancePassengerInformation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
body =  # AdvancePassengerInformation | 
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
passengerId = passengerId_example # String | Traveller unique identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add advance passenger information
    api_response = api_instance.add_advance_passenger_information(body, baseSiteId, orderId, passengerId, solutionID, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->addAdvancePassengerInformation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
passengerId*
String
Traveller unique identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found)

Status: 422 - Unprocessable Entity

Status: 500 - Server Error


cancelSolution

Cancels the given solution

Cancels the given solution, for all the associated passengers.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/cancel

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/cancel"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.cancelSolution(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#cancelSolution");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.cancelSolution(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#cancelSolution");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Cancels the given solution
[apiInstance cancelSolutionWith:baseSiteId
    orderId:orderId
    sap.cxSalesApplication:sap.cxSalesApplication
    solutionID:solutionID
    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.FlightOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the 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.cancelSolution(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class cancelSolutionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Cancels the given solution
                apiInstance.cancelSolution(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.cancelSolution: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->cancelSolution($baseSiteId, $orderId, $sap.cxSalesApplication, $solutionID, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->cancelSolution: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the 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->cancelSolution(baseSiteId => $baseSiteId, orderId => $orderId, sap.cxSalesApplication => $sap.cxSalesApplication, solutionID => $solutionID, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->cancelSolution: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Cancels the given solution
    api_instance.cancel_solution(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->cancelSolution: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


checkinPassenger

Checks a passenger in

Performs the check in for the given passenger


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}/checkin

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}/checkin?boundIdentifier="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String boundIdentifier = boundIdentifier_example; // String | Specifies the bound the check in will be performed for.
        String orderId = orderId_example; // String | Order unique identifier
        String passengerId = passengerId_example; // String | Passenger unique identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.checkinPassenger(baseSiteId, boundIdentifier, orderId, passengerId, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#checkinPassenger");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String boundIdentifier = boundIdentifier_example; // String | Specifies the bound the check in will be performed for.
        String orderId = orderId_example; // String | Order unique identifier
        String passengerId = passengerId_example; // String | Passenger unique identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.checkinPassenger(baseSiteId, boundIdentifier, orderId, passengerId, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#checkinPassenger");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *boundIdentifier = boundIdentifier_example; // Specifies the bound the check in will be performed for.
String *orderId = orderId_example; // Order unique identifier
String *passengerId = passengerId_example; // Passenger unique identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Checks a passenger in
[apiInstance checkinPassengerWith:baseSiteId
    boundIdentifier:boundIdentifier
    orderId:orderId
    passengerId:passengerId
    solutionID:solutionID
    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.FlightOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var boundIdentifier = boundIdentifier_example; // {{String}} Specifies the bound the check in will be performed for.
var orderId = orderId_example; // {{String}} Order unique identifier
var passengerId = passengerId_example; // {{String}} Passenger unique identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the 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.checkinPassenger(baseSiteId, boundIdentifier, orderId, passengerId, solutionID, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkinPassengerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var boundIdentifier = boundIdentifier_example;  // String | Specifies the bound the check in will be performed for.
            var orderId = orderId_example;  // String | Order unique identifier
            var passengerId = passengerId_example;  // String | Passenger unique identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Checks a passenger in
                apiInstance.checkinPassenger(baseSiteId, boundIdentifier, orderId, passengerId, solutionID, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.checkinPassenger: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$boundIdentifier = boundIdentifier_example; // String | Specifies the bound the check in will be performed for.
$orderId = orderId_example; // String | Order unique identifier
$passengerId = passengerId_example; // String | Passenger unique identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->checkinPassenger($baseSiteId, $boundIdentifier, $orderId, $passengerId, $solutionID, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->checkinPassenger: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $boundIdentifier = boundIdentifier_example; # String | Specifies the bound the check in will be performed for.
my $orderId = orderId_example; # String | Order unique identifier
my $passengerId = passengerId_example; # String | Passenger unique identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the 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->checkinPassenger(baseSiteId => $baseSiteId, boundIdentifier => $boundIdentifier, orderId => $orderId, passengerId => $passengerId, solutionID => $solutionID, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->checkinPassenger: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
boundIdentifier = boundIdentifier_example # String | Specifies the bound the check in will be performed for.
orderId = orderId_example # String | Order unique identifier
passengerId = passengerId_example # String | Passenger unique identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Checks a passenger in
    api_instance.checkin_passenger(baseSiteId, boundIdentifier, orderId, passengerId, solutionID, userId)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->checkinPassenger: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
passengerId*
String
Passenger unique identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the 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
boundIdentifier*
String
Specifies the bound the check in will be performed for.
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


evaluateChangeSolution

Evaluates the request for a change

Evaluates the request for a change, passing new itinerary and/or date and/or time and returns pricing information when the change is allowed, an error status code otherwise.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/evaluateChange

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/{orderId}/solutions/{solutionID}/evaluateChange"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        EvaluateChangeSolutionRequest body = ; // EvaluateChangeSolutionRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateChangeSolutionResponse result = apiInstance.evaluateChangeSolution(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#evaluateChangeSolution");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        EvaluateChangeSolutionRequest body = ; // EvaluateChangeSolutionRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateChangeSolutionResponse result = apiInstance.evaluateChangeSolution(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#evaluateChangeSolution");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
EvaluateChangeSolutionRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Evaluates the request for a change
[apiInstance evaluateChangeSolutionWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    orderId:orderId
    solutionID:solutionID
    userId:userId
              completionHandler: ^(EvaluateChangeSolutionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var body = ; // {{EvaluateChangeSolutionRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.evaluateChangeSolution(bodysap.cxSalesApplicationbaseSiteIdorderIdsolutionIDuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class evaluateChangeSolutionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var body = new EvaluateChangeSolutionRequest(); // EvaluateChangeSolutionRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Evaluates the request for a change
                EvaluateChangeSolutionResponse result = apiInstance.evaluateChangeSolution(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.evaluateChangeSolution: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$body = ; // EvaluateChangeSolutionRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->evaluateChangeSolution($body, $sap.cxSalesApplication, $baseSiteId, $orderId, $solutionID, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->evaluateChangeSolution: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $body = WWW::SwaggerClient::Object::EvaluateChangeSolutionRequest->new(); # EvaluateChangeSolutionRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->evaluateChangeSolution(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, orderId => $orderId, solutionID => $solutionID, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->evaluateChangeSolution: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
body =  # EvaluateChangeSolutionRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Evaluates the request for a change
    api_response = api_instance.evaluate_change_solution(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->evaluateChangeSolution: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 200 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


evaluateRemovePassengers

Evaluates the removal of the requested passengers from a solution

Evaluates the Removal of the portion of the ticket relative to the requested passengers from the solution, returning information about applicable fees and refunds.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/evaluateRemovePassengers

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/{orderId}/solutions/{solutionID}/evaluateRemovePassengers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        PassengerIdList body = ; // PassengerIdList | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateRemovePassengersResponse result = apiInstance.evaluateRemovePassengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#evaluateRemovePassengers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        PassengerIdList body = ; // PassengerIdList | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateRemovePassengersResponse result = apiInstance.evaluateRemovePassengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#evaluateRemovePassengers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
PassengerIdList *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Evaluates the removal of the requested passengers from a solution
[apiInstance evaluateRemovePassengersWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    orderId:orderId
    solutionID:solutionID
    userId:userId
              completionHandler: ^(EvaluateRemovePassengersResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var body = ; // {{PassengerIdList}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.evaluateRemovePassengers(bodysap.cxSalesApplicationbaseSiteIdorderIdsolutionIDuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class evaluateRemovePassengersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var body = new PassengerIdList(); // PassengerIdList | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Evaluates the removal of the requested passengers from a solution
                EvaluateRemovePassengersResponse result = apiInstance.evaluateRemovePassengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.evaluateRemovePassengers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$body = ; // PassengerIdList | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->evaluateRemovePassengers($body, $sap.cxSalesApplication, $baseSiteId, $orderId, $solutionID, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->evaluateRemovePassengers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $body = WWW::SwaggerClient::Object::PassengerIdList->new(); # PassengerIdList | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->evaluateRemovePassengers(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, orderId => $orderId, solutionID => $solutionID, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->evaluateRemovePassengers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
body =  # PassengerIdList | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Evaluates the removal of the requested passengers from a solution
    api_response = api_instance.evaluate_remove_passengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->evaluateRemovePassengers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


evaluateSolutionCancel

Evaluates the request for a cancellation

Evaluates the request for a cancellation for the given solution, returning penalties and refunded amounts when possible, an error status otherwise


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/evaluateCancel

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/evaluateCancel"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateCancelSolutionResponse result = apiInstance.evaluateSolutionCancel(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#evaluateSolutionCancel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            EvaluateCancelSolutionResponse result = apiInstance.evaluateSolutionCancel(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#evaluateSolutionCancel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Evaluates the request for a cancellation
[apiInstance evaluateSolutionCancelWith:baseSiteId
    orderId:orderId
    sap.cxSalesApplication:sap.cxSalesApplication
    solutionID:solutionID
    userId:userId
              completionHandler: ^(EvaluateCancelSolutionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.evaluateSolutionCancel(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class evaluateSolutionCancelExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Evaluates the request for a cancellation
                EvaluateCancelSolutionResponse result = apiInstance.evaluateSolutionCancel(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.evaluateSolutionCancel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->evaluateSolutionCancel($baseSiteId, $orderId, $sap.cxSalesApplication, $solutionID, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->evaluateSolutionCancel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->evaluateSolutionCancel(baseSiteId => $baseSiteId, orderId => $orderId, sap.cxSalesApplication => $sap.cxSalesApplication, solutionID => $solutionID, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->evaluateSolutionCancel: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Evaluates the request for a cancellation
    api_response = api_instance.evaluate_solution_cancel(baseSiteId, orderId, sap.cxSalesApplication, solutionID, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->evaluateSolutionCancel: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getAdvancePassengerInformation

Get advance passenger information.

Get advance passenger information to the specified passenger associated to the booking.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}/advancePassengerInformation

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}/advancePassengerInformation"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String passengerId = passengerId_example; // String | Passenger unique identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAdvancePassengerInformation(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#getAdvancePassengerInformation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order unique identifier
        String passengerId = passengerId_example; // String | Passenger unique identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getAdvancePassengerInformation(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#getAdvancePassengerInformation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order unique identifier
String *passengerId = passengerId_example; // Passenger unique identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Get advance passenger information.
[apiInstance getAdvancePassengerInformationWith:baseSiteId
    orderId:orderId
    passengerId:passengerId
    solutionID:solutionID
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order unique identifier
var passengerId = passengerId_example; // {{String}} Passenger unique identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAdvancePassengerInformation(baseSiteId, orderId, passengerId, solutionID, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAdvancePassengerInformationExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order unique identifier
            var passengerId = passengerId_example;  // String | Passenger unique identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get advance passenger information.
                'String' result = apiInstance.getAdvancePassengerInformation(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.getAdvancePassengerInformation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order unique identifier
$passengerId = passengerId_example; // String | Passenger unique identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getAdvancePassengerInformation($baseSiteId, $orderId, $passengerId, $solutionID, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->getAdvancePassengerInformation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order unique identifier
my $passengerId = passengerId_example; # String | Passenger unique identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getAdvancePassengerInformation(baseSiteId => $baseSiteId, orderId => $orderId, passengerId => $passengerId, solutionID => $solutionID, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->getAdvancePassengerInformation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order unique identifier
passengerId = passengerId_example # String | Passenger unique identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get advance passenger information.
    api_response = api_instance.get_advance_passenger_information(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->getAdvancePassengerInformation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order unique identifier
Required
passengerId*
String
Passenger unique identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSolutionPassengerForOrder

Returns a passenger for a given solution.

Returns the information about the given passenger for a given solution.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers/{passengerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String passengerId = passengerId_example; // String | Passenger identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassengerForOrder(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#getSolutionPassengerForOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        String passengerId = passengerId_example; // String | Passenger identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassengerForOrder(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#getSolutionPassengerForOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
String *passengerId = passengerId_example; // Passenger identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Returns a passenger for a given solution.
[apiInstance getSolutionPassengerForOrderWith:baseSiteId
    orderId:orderId
    passengerId:passengerId
    solutionID:solutionID
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var passengerId = passengerId_example; // {{String}} Passenger identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSolutionPassengerForOrder(baseSiteId, orderId, passengerId, solutionID, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSolutionPassengerForOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var passengerId = passengerId_example;  // String | Passenger identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns a passenger for a given solution.
                'String' result = apiInstance.getSolutionPassengerForOrder(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.getSolutionPassengerForOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$passengerId = passengerId_example; // String | Passenger identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getSolutionPassengerForOrder($baseSiteId, $orderId, $passengerId, $solutionID, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->getSolutionPassengerForOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $passengerId = passengerId_example; # String | Passenger identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getSolutionPassengerForOrder(baseSiteId => $baseSiteId, orderId => $orderId, passengerId => $passengerId, solutionID => $solutionID, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->getSolutionPassengerForOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
passengerId = passengerId_example # String | Passenger identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns a passenger for a given solution.
    api_response = api_instance.get_solution_passenger_for_order(baseSiteId, orderId, passengerId, solutionID, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->getSolutionPassengerForOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
passengerId*
String
Passenger identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


getSolutionPassengersForOrder

Returns all the passengers for a given solution in the order.

Returns the information about all the passengers for a given solution in the order.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/passengers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassengersForOrder(baseSiteId, orderId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#getSolutionPassengersForOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSolutionPassengersForOrder(baseSiteId, orderId, solutionID, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#getSolutionPassengersForOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Returns all the passengers for a given solution in the order.
[apiInstance getSolutionPassengersForOrderWith:baseSiteId
    orderId:orderId
    solutionID:solutionID
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightOrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the cart
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSolutionPassengersForOrder(baseSiteId, orderId, solutionID, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSolutionPassengersForOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Returns all the passengers for a given solution in the order.
                'String' result = apiInstance.getSolutionPassengersForOrder(baseSiteId, orderId, solutionID, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.getSolutionPassengersForOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getSolutionPassengersForOrder($baseSiteId, $orderId, $solutionID, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->getSolutionPassengersForOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the cart
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getSolutionPassengersForOrder(baseSiteId => $baseSiteId, orderId => $orderId, solutionID => $solutionID, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->getSolutionPassengersForOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Returns all the passengers for a given solution in the order.
    api_response = api_instance.get_solution_passengers_for_order(baseSiteId, orderId, solutionID, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->getSolutionPassengersForOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


removePassengers

Remove the requested passengers from a solution

Remove the portion of the ticket relative to the requested passengers from the solution, processing applicable fees and refunds.


/{baseSiteId}/users/{userId}/orders/{orderId}/solutions/{solutionID}/removePassengers

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/{orderId}/solutions/{solutionID}/removePassengers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightOrdersApi;

import java.io.File;
import java.util.*;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightOrdersApi apiInstance = new FlightOrdersApi();
        PassengerIdList body = ; // PassengerIdList | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removePassengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#removePassengers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightOrdersApi;

public class FlightOrdersApiExample {

    public static void main(String[] args) {
        FlightOrdersApi apiInstance = new FlightOrdersApi();
        PassengerIdList body = ; // PassengerIdList | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String orderId = orderId_example; // String | Order identifier
        Integer solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removePassengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightOrdersApi#removePassengers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
PassengerIdList *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *orderId = orderId_example; // Order identifier
Integer *solutionID = 56; // Solution identifier - unique identifier for a booking solution in the cart
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightOrdersApi *apiInstance = [[FlightOrdersApi alloc] init];

// Remove the requested passengers from a solution
[apiInstance removePassengersWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    orderId:orderId
    solutionID:solutionID
    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.FlightOrdersApi()
var body = ; // {{PassengerIdList}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var orderId = orderId_example; // {{String}} Order identifier
var solutionID = 56; // {{Integer}} Solution identifier - unique identifier for a booking solution in the 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.removePassengers(bodysap.cxSalesApplicationbaseSiteIdorderIdsolutionIDuserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removePassengersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightOrdersApi();
            var body = new PassengerIdList(); // PassengerIdList | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var orderId = orderId_example;  // String | Order identifier
            var solutionID = 56;  // Integer | Solution identifier - unique identifier for a booking solution in the cart
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Remove the requested passengers from a solution
                apiInstance.removePassengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightOrdersApi.removePassengers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightOrdersApi();
$body = ; // PassengerIdList | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$orderId = orderId_example; // String | Order identifier
$solutionID = 56; // Integer | Solution identifier - unique identifier for a booking solution in the cart
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removePassengers($body, $sap.cxSalesApplication, $baseSiteId, $orderId, $solutionID, $userId);
} catch (Exception $e) {
    echo 'Exception when calling FlightOrdersApi->removePassengers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightOrdersApi->new();
my $body = WWW::SwaggerClient::Object::PassengerIdList->new(); # PassengerIdList | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $orderId = orderId_example; # String | Order identifier
my $solutionID = 56; # Integer | Solution identifier - unique identifier for a booking solution in the 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->removePassengers(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, orderId => $orderId, solutionID => $solutionID, userId => $userId);
};
if ($@) {
    warn "Exception when calling FlightOrdersApi->removePassengers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightOrdersApi()
body =  # PassengerIdList | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
orderId = orderId_example # String | Order identifier
solutionID = 56 # Integer | Solution identifier - unique identifier for a booking solution in the cart
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Remove the requested passengers from a solution
    api_instance.remove_passengers(body, sap.cxSalesApplication, baseSiteId, orderId, solutionID, userId)
except ApiException as e:
    print("Exception when calling FlightOrdersApi->removePassengers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
orderId*
String
Order identifier
Required
solutionID*
Integer (int32)
Solution identifier - unique identifier for a booking solution in the cart
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Header parameters
Name Description
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 422 - Unprocessable Entity

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


FlightSearch

flightSearch

get Fares

Retrieve fares for the specified parameters passed in the request


/{baseSiteId}/fares

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/fares"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightSearchApi;

import java.io.File;
import java.util.*;

public class FlightSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightSearchApi apiInstance = new FlightSearchApi();
        FlightSearchRequest body = ; // FlightSearchRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            FlightSearchResponse result = apiInstance.flightSearch(body, sap.cxSalesApplication, baseSiteId, acceptLanguage, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightSearchApi#flightSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightSearchApi;

public class FlightSearchApiExample {

    public static void main(String[] args) {
        FlightSearchApi apiInstance = new FlightSearchApi();
        FlightSearchRequest body = ; // FlightSearchRequest | 
        String sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        String sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client
        try {
            FlightSearchResponse result = apiInstance.flightSearch(body, sap.cxSalesApplication, baseSiteId, acceptLanguage, sap.cxAcceptCurrency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightSearchApi#flightSearch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
FlightSearchRequest *body = ; // 
String *sap.cxSalesApplication = sap.cxSalesApplication_example; // The sales application code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)
String *sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // Requested Currency for the client (optional)

FlightSearchApi *apiInstance = [[FlightSearchApi alloc] init];

// get Fares
[apiInstance flightSearchWith:body
    sap.cxSalesApplication:sap.cxSalesApplication
    baseSiteId:baseSiteId
    acceptLanguage:acceptLanguage
    sap.cxAcceptCurrency:sap.cxAcceptCurrency
              completionHandler: ^(FlightSearchResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightSearchApi()
var body = ; // {{FlightSearchRequest}} 
var sap.cxSalesApplication = sap.cxSalesApplication_example; // {{String}} The sales application code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
  'sap.cxAcceptCurrency': sap.cxAcceptCurrency_example // {{String}} Requested Currency for the client
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.flightSearch(bodysap.cxSalesApplicationbaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class flightSearchExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightSearchApi();
            var body = new FlightSearchRequest(); // FlightSearchRequest | 
            var sap.cxSalesApplication = sap.cxSalesApplication_example;  // String | The sales application code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 
            var sap.cxAcceptCurrency = sap.cxAcceptCurrency_example;  // String | Requested Currency for the client (optional) 

            try
            {
                // get Fares
                FlightSearchResponse result = apiInstance.flightSearch(body, sap.cxSalesApplication, baseSiteId, acceptLanguage, sap.cxAcceptCurrency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightSearchApi.flightSearch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightSearchApi();
$body = ; // FlightSearchRequest | 
$sap.cxSalesApplication = sap.cxSalesApplication_example; // String | The sales application code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
$sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; // String | Requested Currency for the client

try {
    $result = $api_instance->flightSearch($body, $sap.cxSalesApplication, $baseSiteId, $acceptLanguage, $sap.cxAcceptCurrency);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightSearchApi->flightSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightSearchApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightSearchApi->new();
my $body = WWW::SwaggerClient::Object::FlightSearchRequest->new(); # FlightSearchRequest | 
my $sap.cxSalesApplication = sap.cxSalesApplication_example; # String | The sales application code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred
my $sap.cxAcceptCurrency = sap.cxAcceptCurrency_example; # String | Requested Currency for the client

eval { 
    my $result = $api_instance->flightSearch(body => $body, sap.cxSalesApplication => $sap.cxSalesApplication, baseSiteId => $baseSiteId, acceptLanguage => $acceptLanguage, sap.cxAcceptCurrency => $sap.cxAcceptCurrency);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightSearchApi->flightSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightSearchApi()
body =  # FlightSearchRequest | 
sap.cxSalesApplication = sap.cxSalesApplication_example # String | The sales application code
baseSiteId = baseSiteId_example # String | Base site identifier
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)
sap.cxAcceptCurrency = sap.cxAcceptCurrency_example # String | Requested Currency for the client (optional)

try: 
    # get Fares
    api_response = api_instance.flight_search(body, sap.cxSalesApplication, baseSiteId, acceptLanguage=acceptLanguage, sap.cxAcceptCurrency=sap.cxAcceptCurrency)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightSearchApi->flightSearch: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred
sap.cx-accept-currency
String
Requested Currency for the client
sap.cx-sales-application*
String
The sales application code
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error: unexpected condition that prevented it from fulfilling the request


FlightUsers

getSavedPassengers

Get saved passengers

Retrieves all the saved passengers.


/{baseSiteId}/users/{userId}/savedPassengers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/savedPassengers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightUsersApi;

import java.io.File;
import java.util.*;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSavedPassengers(baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#getSavedPassengers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightUsersApi;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSavedPassengers(baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#getSavedPassengers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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 *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightUsersApi *apiInstance = [[FlightUsersApi alloc] init];

// Get saved passengers
[apiInstance getSavedPassengersWith:baseSiteId
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightUsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base 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 = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSavedPassengers(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 getSavedPassengersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightUsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get saved passengers
                'String' result = apiInstance.getSavedPassengers(baseSiteId, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightUsersApi.getSavedPassengers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getSavedPassengers($baseSiteId, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightUsersApi->getSavedPassengers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightUsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightUsersApi->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 $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getSavedPassengers(baseSiteId => $baseSiteId, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightUsersApi->getSavedPassengers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightUsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get saved passengers
    api_response = api_instance.get_saved_passengers(baseSiteId, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightUsersApi->getSavedPassengers: %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
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Server Error


getSavedSearchesForUser

Get saved Searches

Retrieves all the saved searches.


/{baseSiteId}/users/{userId}/savedSearches

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/savedSearches"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightUsersApi;

import java.io.File;
import java.util.*;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | The user id
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSavedSearchesForUser(baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#getSavedSearchesForUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightUsersApi;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | The user id
        String acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred
        try {
            'String' result = apiInstance.getSavedSearchesForUser(baseSiteId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#getSavedSearchesForUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// 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; // The user id
String *acceptLanguage = acceptLanguage_example; // Languages the client is able to understand, and which locale variant is preferred (optional)

FlightUsersApi *apiInstance = [[FlightUsersApi alloc] init];

// Get saved Searches
[apiInstance getSavedSearchesForUserWith:baseSiteId
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightUsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} The user id
var opts = { 
  'acceptLanguage': acceptLanguage_example // {{String}} Languages the client is able to understand, and which locale variant is preferred
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSavedSearchesForUser(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 getSavedSearchesForUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightUsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | The user id
            var acceptLanguage = acceptLanguage_example;  // String | Languages the client is able to understand, and which locale variant is preferred (optional) 

            try
            {
                // Get saved Searches
                'String' result = apiInstance.getSavedSearchesForUser(baseSiteId, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightUsersApi.getSavedSearchesForUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | The user id
$acceptLanguage = acceptLanguage_example; // String | Languages the client is able to understand, and which locale variant is preferred

try {
    $result = $api_instance->getSavedSearchesForUser($baseSiteId, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightUsersApi->getSavedSearchesForUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightUsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightUsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | The user id
my $acceptLanguage = acceptLanguage_example; # String | Languages the client is able to understand, and which locale variant is preferred

eval { 
    my $result = $api_instance->getSavedSearchesForUser(baseSiteId => $baseSiteId, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightUsersApi->getSavedSearchesForUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightUsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | The user id
acceptLanguage = acceptLanguage_example # String | Languages the client is able to understand, and which locale variant is preferred (optional)

try: 
    # Get saved Searches
    api_response = api_instance.get_saved_searches_for_user(baseSiteId, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightUsersApi->getSavedSearchesForUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
The user id
Required
Header parameters
Name Description
Accept-Language
String
Languages the client is able to understand, and which locale variant is preferred

Responses

Status: 200 - Success

Name Type Format Description

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


removeSavedPassenger

Delete a saved passenger

Deletes a passenger identified by id from the list of saved passenger for the given user.


/{baseSiteId}/users/{userId}/savedPassengers/{passengerId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/savedPassengers/{passengerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightUsersApi;

import java.io.File;
import java.util.*;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String passengerId = passengerId_example; // String | Passenger identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.removeSavedPassenger(baseSiteId, passengerId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#removeSavedPassenger");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightUsersApi;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String passengerId = passengerId_example; // String | Passenger identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            'String' result = apiInstance.removeSavedPassenger(baseSiteId, passengerId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#removeSavedPassenger");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *passengerId = passengerId_example; // Passenger identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

FlightUsersApi *apiInstance = [[FlightUsersApi alloc] init];

// Delete a saved passenger
[apiInstance removeSavedPassengerWith:baseSiteId
    passengerId:passengerId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightUsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var passengerId = passengerId_example; // {{String}} Passenger identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeSavedPassenger(baseSiteId, passengerId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeSavedPassengerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightUsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var passengerId = passengerId_example;  // String | Passenger identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Delete a saved passenger
                'String' result = apiInstance.removeSavedPassenger(baseSiteId, passengerId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightUsersApi.removeSavedPassenger: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$passengerId = passengerId_example; // String | Passenger identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->removeSavedPassenger($baseSiteId, $passengerId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightUsersApi->removeSavedPassenger: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightUsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightUsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $passengerId = passengerId_example; # String | Passenger identifier.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->removeSavedPassenger(baseSiteId => $baseSiteId, passengerId => $passengerId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightUsersApi->removeSavedPassenger: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightUsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
passengerId = passengerId_example # String | Passenger identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Delete a saved passenger
    api_response = api_instance.remove_saved_passenger(baseSiteId, passengerId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightUsersApi->removeSavedPassenger: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
passengerId*
String
Passenger identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not found

Status: 500 - Server Error


removeSavedSearch

Removes a saved search.

Removes the saved search identified by Id from the list of saved searches


/{baseSiteId}/users/{userId}/savedSearches/{savedSearchId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/savedSearches/{savedSearchId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlightUsersApi;

import java.io.File;
import java.util.*;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String savedSearchId = savedSearchId_example; // String | Saved Search Identifier
        String userId = userId_example; // String | The user id
        try {
            'String' result = apiInstance.removeSavedSearch(baseSiteId, savedSearchId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#removeSavedSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlightUsersApi;

public class FlightUsersApiExample {

    public static void main(String[] args) {
        FlightUsersApi apiInstance = new FlightUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String savedSearchId = savedSearchId_example; // String | Saved Search Identifier
        String userId = userId_example; // String | The user id
        try {
            'String' result = apiInstance.removeSavedSearch(baseSiteId, savedSearchId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlightUsersApi#removeSavedSearch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *savedSearchId = savedSearchId_example; // Saved Search Identifier
String *userId = userId_example; // The user id

FlightUsersApi *apiInstance = [[FlightUsersApi alloc] init];

// Removes a saved search.
[apiInstance removeSavedSearchWith:baseSiteId
    savedSearchId:savedSearchId
    userId:userId
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FlightUsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var savedSearchId = savedSearchId_example; // {{String}} Saved Search Identifier
var userId = userId_example; // {{String}} The user id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeSavedSearch(baseSiteId, savedSearchId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeSavedSearchExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FlightUsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var savedSearchId = savedSearchId_example;  // String | Saved Search Identifier
            var userId = userId_example;  // String | The user id

            try
            {
                // Removes a saved search.
                'String' result = apiInstance.removeSavedSearch(baseSiteId, savedSearchId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlightUsersApi.removeSavedSearch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFlightUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$savedSearchId = savedSearchId_example; // String | Saved Search Identifier
$userId = userId_example; // String | The user id

try {
    $result = $api_instance->removeSavedSearch($baseSiteId, $savedSearchId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlightUsersApi->removeSavedSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlightUsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FlightUsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $savedSearchId = savedSearchId_example; # String | Saved Search Identifier
my $userId = userId_example; # String | The user id

eval { 
    my $result = $api_instance->removeSavedSearch(baseSiteId => $baseSiteId, savedSearchId => $savedSearchId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlightUsersApi->removeSavedSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FlightUsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
savedSearchId = savedSearchId_example # String | Saved Search Identifier
userId = userId_example # String | The user id

try: 
    # Removes a saved search.
    api_response = api_instance.remove_saved_search(baseSiteId, savedSearchId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlightUsersApi->removeSavedSearch: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*