Coupon Webservices

CouponCodes

getMultiCodeCouponCodes

Retrieves the generated coupon codes for a multi-code coupon given its media code.

The media code is the code attribute of the Media


/couponcodes/{couponId}/{mediaCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponcodes/{couponId}/{mediaCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponCodesApi;

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

public class CouponCodesApiExample {

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

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

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

        CouponCodesApi apiInstance = new CouponCodesApi();
        String couponId = couponId_example; // String | the id of the multicode coupon
        String mediaCode = mediaCode_example; // String | the code of the generated codes media
        try {
            byte[] result = apiInstance.getMultiCodeCouponCodes(couponId, mediaCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponCodesApi#getMultiCodeCouponCodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponCodesApi;

public class CouponCodesApiExample {

    public static void main(String[] args) {
        CouponCodesApi apiInstance = new CouponCodesApi();
        String couponId = couponId_example; // String | the id of the multicode coupon
        String mediaCode = mediaCode_example; // String | the code of the generated codes media
        try {
            byte[] result = apiInstance.getMultiCodeCouponCodes(couponId, mediaCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponCodesApi#getMultiCodeCouponCodes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponId = couponId_example; // the id of the multicode coupon
String *mediaCode = mediaCode_example; // the code of the generated codes media

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

// Retrieves the generated coupon codes for a multi-code coupon given its media code.
[apiInstance getMultiCodeCouponCodesWith:couponId
    mediaCode:mediaCode
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponCodesApi()
var couponId = couponId_example; // {{String}} the id of the multicode coupon
var mediaCode = mediaCode_example; // {{String}} the code of the generated codes media

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

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

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

            var apiInstance = new CouponCodesApi();
            var couponId = couponId_example;  // String | the id of the multicode coupon
            var mediaCode = mediaCode_example;  // String | the code of the generated codes media

            try
            {
                // Retrieves the generated coupon codes for a multi-code coupon given its media code.
                byte[] result = apiInstance.getMultiCodeCouponCodes(couponId, mediaCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponCodesApi.getMultiCodeCouponCodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponCodesApi();
$couponId = couponId_example; // String | the id of the multicode coupon
$mediaCode = mediaCode_example; // String | the code of the generated codes media

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

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

my $api_instance = WWW::SwaggerClient::CouponCodesApi->new();
my $couponId = couponId_example; # String | the id of the multicode coupon
my $mediaCode = mediaCode_example; # String | the code of the generated codes media

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

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

# create an instance of the API class
api_instance = swagger_client.CouponCodesApi()
couponId = couponId_example # String | the id of the multicode coupon
mediaCode = mediaCode_example # String | the code of the generated codes media

try: 
    # Retrieves the generated coupon codes for a multi-code coupon given its media code.
    api_response = api_instance.get_multi_code_coupon_codes(couponId, mediaCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponCodesApi->getMultiCodeCouponCodes: %s\n" % e)

Parameters

Path parameters
Name Description
couponId*
String
the id of the multicode coupon
Required
mediaCode*
String
the code of the generated codes media
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


CouponServices

createCouponRedemption

create coupon redemption according to input body

This endpoint create coupon redemption according to input body


/couponservices/v2/couponredemption/create

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/couponredemption/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        CouponRedemption body = ; // CouponRedemption | 
        try {
            couponRedemption result = apiInstance.createCouponRedemption(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#createCouponRedemption");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        CouponRedemption body = ; // CouponRedemption | 
        try {
            couponRedemption result = apiInstance.createCouponRedemption(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#createCouponRedemption");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
CouponRedemption *body = ; // 

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

// create coupon redemption according to input body
[apiInstance createCouponRedemptionWith:body
              completionHandler: ^(couponRedemption output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{CouponRedemption}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new CouponRedemption(); // CouponRedemption | 

            try
            {
                // create coupon redemption according to input body
                couponRedemption result = apiInstance.createCouponRedemption(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.createCouponRedemption: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // CouponRedemption | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::CouponRedemption->new(); # CouponRedemption | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # CouponRedemption | 

try: 
    # create coupon redemption according to input body
    api_response = api_instance.create_coupon_redemption(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->createCouponRedemption: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createMultiCodeCoupon

Creates a multi-code coupon

This endpoint creates a new multi-code coupon given in POST body


/couponservices/v2/multicodecoupon/create

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        MultiCodeCoupon body = ; // MultiCodeCoupon | 
        try {
            multiCodeCoupon result = apiInstance.createMultiCodeCoupon(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#createMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        MultiCodeCoupon body = ; // MultiCodeCoupon | 
        try {
            multiCodeCoupon result = apiInstance.createMultiCodeCoupon(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#createMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
MultiCodeCoupon *body = ; // 

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

// Creates a multi-code coupon
[apiInstance createMultiCodeCouponWith:body
              completionHandler: ^(multiCodeCoupon output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{MultiCodeCoupon}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new MultiCodeCoupon(); // MultiCodeCoupon | 

            try
            {
                // Creates a multi-code coupon
                multiCodeCoupon result = apiInstance.createMultiCodeCoupon(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.createMultiCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // MultiCodeCoupon | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::MultiCodeCoupon->new(); # MultiCodeCoupon | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # MultiCodeCoupon | 

try: 
    # Creates a multi-code coupon
    api_response = api_instance.create_multi_code_coupon(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->createMultiCodeCoupon: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


createSingleCodeCoupon

Creates single-code coupon entity

This endpoint creates a new single-code coupon object with the parameters provided in POST body


/couponservices/v2/singlecodecoupon/create

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecoupon/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        SingleCodeCoupon body = ; // SingleCodeCoupon | 
        try {
            singleCodeCoupon result = apiInstance.createSingleCodeCoupon(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#createSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        SingleCodeCoupon body = ; // SingleCodeCoupon | 
        try {
            singleCodeCoupon result = apiInstance.createSingleCodeCoupon(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#createSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SingleCodeCoupon *body = ; // 

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

// Creates single-code coupon entity
[apiInstance createSingleCodeCouponWith:body
              completionHandler: ^(singleCodeCoupon output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{SingleCodeCoupon}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new SingleCodeCoupon(); // SingleCodeCoupon | 

            try
            {
                // Creates single-code coupon entity
                singleCodeCoupon result = apiInstance.createSingleCodeCoupon(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.createSingleCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // SingleCodeCoupon | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::SingleCodeCoupon->new(); # SingleCodeCoupon | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # SingleCodeCoupon | 

try: 
    # Creates single-code coupon entity
    api_response = api_instance.create_single_code_coupon(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->createSingleCodeCoupon: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


generateMultiCodeCouponCodes

Generate multi-code coupon codes

This endpoint generates a batch of the multi-code coupon codes for a provided couponId and batch size


/couponservices/v2/multicodecoupon/generate/{couponId}/{batchsize}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/generate/{couponId}/{batchsize}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        Integer batchsize = 56; // Integer | Batch size for generated coupons
        String couponId = couponId_example; // String | The couponId of related multi-code coupon
        try {
            HttpHeaders result = apiInstance.generateMultiCodeCouponCodes(batchsize, couponId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#generateMultiCodeCouponCodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        Integer batchsize = 56; // Integer | Batch size for generated coupons
        String couponId = couponId_example; // String | The couponId of related multi-code coupon
        try {
            HttpHeaders result = apiInstance.generateMultiCodeCouponCodes(batchsize, couponId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#generateMultiCodeCouponCodes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Integer *batchsize = 56; // Batch size for generated coupons
String *couponId = couponId_example; // The couponId of related multi-code coupon

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

// Generate multi-code coupon codes
[apiInstance generateMultiCodeCouponCodesWith:batchsize
    couponId:couponId
              completionHandler: ^(HttpHeaders output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var batchsize = 56; // {{Integer}} Batch size for generated coupons
var couponId = couponId_example; // {{String}} The couponId of related multi-code coupon

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

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

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

            var apiInstance = new CouponServicesApi();
            var batchsize = 56;  // Integer | Batch size for generated coupons
            var couponId = couponId_example;  // String | The couponId of related multi-code coupon

            try
            {
                // Generate multi-code coupon codes
                HttpHeaders result = apiInstance.generateMultiCodeCouponCodes(batchsize, couponId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.generateMultiCodeCouponCodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$batchsize = 56; // Integer | Batch size for generated coupons
$couponId = couponId_example; // String | The couponId of related multi-code coupon

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $batchsize = 56; # Integer | Batch size for generated coupons
my $couponId = couponId_example; # String | The couponId of related multi-code coupon

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
batchsize = 56 # Integer | Batch size for generated coupons
couponId = couponId_example # String | The couponId of related multi-code coupon

try: 
    # Generate multi-code coupon codes
    api_response = api_instance.generate_multi_code_coupon_codes(batchsize, couponId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->generateMultiCodeCouponCodes: %s\n" % e)

Parameters

Path parameters
Name Description
batchsize*
Integer (int32)
Batch size for generated coupons
Required
couponId*
String
The couponId of related multi-code coupon
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getGenerationConfiguration

Gets a code generation configuration

This endpoint retrieves a single code generation configuration for a given couponId


/couponservices/v2/codegenerationconfiguration/get/{codeGenerationConfigurationName}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/codegenerationconfiguration/get/{codeGenerationConfigurationName}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String codeGenerationConfigurationName = codeGenerationConfigurationName_example; // String | The codeGenerationConfigurationName of the requested codeGenerationConfiguration
        String fields = fields_example; // String | Fields to retrieve
        try {
            codeGenerationConfiguration result = apiInstance.getGenerationConfiguration(codeGenerationConfigurationName, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getGenerationConfiguration");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String codeGenerationConfigurationName = codeGenerationConfigurationName_example; // String | The codeGenerationConfigurationName of the requested codeGenerationConfiguration
        String fields = fields_example; // String | Fields to retrieve
        try {
            codeGenerationConfiguration result = apiInstance.getGenerationConfiguration(codeGenerationConfigurationName, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getGenerationConfiguration");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *codeGenerationConfigurationName = codeGenerationConfigurationName_example; // The codeGenerationConfigurationName of the requested codeGenerationConfiguration
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Gets a code generation configuration
[apiInstance getGenerationConfigurationWith:codeGenerationConfigurationName
    fields:fields
              completionHandler: ^(codeGenerationConfiguration output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var codeGenerationConfigurationName = codeGenerationConfigurationName_example; // {{String}} The codeGenerationConfigurationName of the requested codeGenerationConfiguration
var opts = { 
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGenerationConfiguration(codeGenerationConfigurationName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var codeGenerationConfigurationName = codeGenerationConfigurationName_example;  // String | The codeGenerationConfigurationName of the requested codeGenerationConfiguration
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Gets a code generation configuration
                codeGenerationConfiguration result = apiInstance.getGenerationConfiguration(codeGenerationConfigurationName, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getGenerationConfiguration: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$codeGenerationConfigurationName = codeGenerationConfigurationName_example; // String | The codeGenerationConfigurationName of the requested codeGenerationConfiguration
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $codeGenerationConfigurationName = codeGenerationConfigurationName_example; # String | The codeGenerationConfigurationName of the requested codeGenerationConfiguration
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
codeGenerationConfigurationName = codeGenerationConfigurationName_example # String | The codeGenerationConfigurationName of the requested codeGenerationConfiguration
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Gets a code generation configuration
    api_response = api_instance.get_generation_configuration(codeGenerationConfigurationName, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getGenerationConfiguration: %s\n" % e)

Parameters

Path parameters
Name Description
codeGenerationConfigurationName*
String
The codeGenerationConfigurationName of the requested codeGenerationConfiguration
Required
Query parameters
Name Description
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getGenerationConfigurations

Gets list of code generation configurations

This endpoint retrieves all the code generation configurations that are registered in the system


/couponservices/v2/codegenerationconfiguration/list

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/codegenerationconfiguration/list?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String currentPage = currentPage_example; // String | Current page number
        String fields = fields_example; // String | Fields to retrieve
        String pageSize = pageSize_example; // String | Number of items on a page
        String sort = sort_example; // String | Type of sorting to be applied to the retrieved set
        try {
            codeGenerationConfigurationsSearchPage result = apiInstance.getGenerationConfigurations(currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getGenerationConfigurations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String currentPage = currentPage_example; // String | Current page number
        String fields = fields_example; // String | Fields to retrieve
        String pageSize = pageSize_example; // String | Number of items on a page
        String sort = sort_example; // String | Type of sorting to be applied to the retrieved set
        try {
            codeGenerationConfigurationsSearchPage result = apiInstance.getGenerationConfigurations(currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getGenerationConfigurations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *currentPage = currentPage_example; // Current page number (optional) (default to 0)
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)
String *pageSize = pageSize_example; // Number of items on a page (optional) (default to 100)
String *sort = sort_example; // Type of sorting to be applied to the retrieved set (optional) (default to name:asc)

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

// Gets list of code generation configurations
[apiInstance getGenerationConfigurationsWith:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(codeGenerationConfigurationsSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var opts = { 
  'currentPage': currentPage_example, // {{String}} Current page number
  'fields': fields_example, // {{String}} Fields to retrieve
  'pageSize': pageSize_example, // {{String}} Number of items on a page
  'sort': sort_example // {{String}} Type of sorting to be applied to the retrieved set
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGenerationConfigurations(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var currentPage = currentPage_example;  // String | Current page number (optional)  (default to 0)
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)
            var pageSize = pageSize_example;  // String | Number of items on a page (optional)  (default to 100)
            var sort = sort_example;  // String | Type of sorting to be applied to the retrieved set (optional)  (default to name:asc)

            try
            {
                // Gets list of code generation configurations
                codeGenerationConfigurationsSearchPage result = apiInstance.getGenerationConfigurations(currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getGenerationConfigurations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$currentPage = currentPage_example; // String | Current page number
$fields = fields_example; // String | Fields to retrieve
$pageSize = pageSize_example; // String | Number of items on a page
$sort = sort_example; // String | Type of sorting to be applied to the retrieved set

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $currentPage = currentPage_example; # String | Current page number
my $fields = fields_example; # String | Fields to retrieve
my $pageSize = pageSize_example; # String | Number of items on a page
my $sort = sort_example; # String | Type of sorting to be applied to the retrieved set

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
currentPage = currentPage_example # String | Current page number (optional) (default to 0)
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)
pageSize = pageSize_example # String | Number of items on a page (optional) (default to 100)
sort = sort_example # String | Type of sorting to be applied to the retrieved set (optional) (default to name:asc)

try: 
    # Gets list of code generation configurations
    api_response = api_instance.get_generation_configurations(currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getGenerationConfigurations: %s\n" % e)

Parameters

Query parameters
Name Description
currentPage
String
Current page number
fields
String
Fields to retrieve
pageSize
String
Number of items on a page
sort
String
Type of sorting to be applied to the retrieved set

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getMultiCodeCoupon

Retrieves a multi-code coupon

This endpoint retrieves a multi-code coupon for a given couponId


/couponservices/v2/multicodecoupon/get/{couponId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/get/{couponId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the requested coupon
        String fields = fields_example; // String | Fields to retrieve
        try {
            multiCodeCoupon result = apiInstance.getMultiCodeCoupon(couponId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the requested coupon
        String fields = fields_example; // String | Fields to retrieve
        try {
            multiCodeCoupon result = apiInstance.getMultiCodeCoupon(couponId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponId = couponId_example; // The couponId of the requested coupon
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Retrieves a multi-code coupon
[apiInstance getMultiCodeCouponWith:couponId
    fields:fields
              completionHandler: ^(multiCodeCoupon output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var couponId = couponId_example; // {{String}} The couponId of the requested coupon
var opts = { 
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMultiCodeCoupon(couponId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var couponId = couponId_example;  // String | The couponId of the requested coupon
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Retrieves a multi-code coupon
                multiCodeCoupon result = apiInstance.getMultiCodeCoupon(couponId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getMultiCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$couponId = couponId_example; // String | The couponId of the requested coupon
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $couponId = couponId_example; # String | The couponId of the requested coupon
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
couponId = couponId_example # String | The couponId of the requested coupon
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Retrieves a multi-code coupon
    api_response = api_instance.get_multi_code_coupon(couponId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getMultiCodeCoupon: %s\n" % e)

Parameters

Path parameters
Name Description
couponId*
String
The couponId of the requested coupon
Required
Query parameters
Name Description
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getMultiCodeCoupons

Returns list of multi-code coupons

This endpoint retrieves all multi-code coupons that are registered in the system


/couponservices/v2/multicodecoupon/list

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/list?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String currentPage = currentPage_example; // String | Current page number
        String fields = fields_example; // String | Fields to retrieve
        String pageSize = pageSize_example; // String | Number of items on a page
        String sort = sort_example; // String | Type of sorting to be applied to the retrieved set
        try {
            multiCodeCouponsSearchPage result = apiInstance.getMultiCodeCoupons(currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getMultiCodeCoupons");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String currentPage = currentPage_example; // String | Current page number
        String fields = fields_example; // String | Fields to retrieve
        String pageSize = pageSize_example; // String | Number of items on a page
        String sort = sort_example; // String | Type of sorting to be applied to the retrieved set
        try {
            multiCodeCouponsSearchPage result = apiInstance.getMultiCodeCoupons(currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getMultiCodeCoupons");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *currentPage = currentPage_example; // Current page number (optional) (default to 0)
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)
String *pageSize = pageSize_example; // Number of items on a page (optional) (default to 100)
String *sort = sort_example; // Type of sorting to be applied to the retrieved set (optional) (default to name:asc)

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

// Returns list of multi-code coupons
[apiInstance getMultiCodeCouponsWith:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(multiCodeCouponsSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var opts = { 
  'currentPage': currentPage_example, // {{String}} Current page number
  'fields': fields_example, // {{String}} Fields to retrieve
  'pageSize': pageSize_example, // {{String}} Number of items on a page
  'sort': sort_example // {{String}} Type of sorting to be applied to the retrieved set
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMultiCodeCoupons(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var currentPage = currentPage_example;  // String | Current page number (optional)  (default to 0)
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)
            var pageSize = pageSize_example;  // String | Number of items on a page (optional)  (default to 100)
            var sort = sort_example;  // String | Type of sorting to be applied to the retrieved set (optional)  (default to name:asc)

            try
            {
                // Returns list of multi-code coupons
                multiCodeCouponsSearchPage result = apiInstance.getMultiCodeCoupons(currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getMultiCodeCoupons: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$currentPage = currentPage_example; // String | Current page number
$fields = fields_example; // String | Fields to retrieve
$pageSize = pageSize_example; // String | Number of items on a page
$sort = sort_example; // String | Type of sorting to be applied to the retrieved set

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $currentPage = currentPage_example; # String | Current page number
my $fields = fields_example; # String | Fields to retrieve
my $pageSize = pageSize_example; # String | Number of items on a page
my $sort = sort_example; # String | Type of sorting to be applied to the retrieved set

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
currentPage = currentPage_example # String | Current page number (optional) (default to 0)
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)
pageSize = pageSize_example # String | Number of items on a page (optional) (default to 100)
sort = sort_example # String | Type of sorting to be applied to the retrieved set (optional) (default to name:asc)

try: 
    # Returns list of multi-code coupons
    api_response = api_instance.get_multi_code_coupons(currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getMultiCodeCoupons: %s\n" % e)

Parameters

Query parameters
Name Description
currentPage
String
Current page number
fields
String
Fields to retrieve
pageSize
String
Number of items on a page
sort
String
Type of sorting to be applied to the retrieved set

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSingleCodeCoupon

Gets a single-code coupon

This endpoint retrieves a single-code coupon for a given couponId


/couponservices/v2/singlecodecoupon/get/{couponId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecoupon/get/{couponId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the requested coupon
        String fields = fields_example; // String | Fields to retrieve
        try {
            singleCodeCoupon result = apiInstance.getSingleCodeCoupon(couponId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the requested coupon
        String fields = fields_example; // String | Fields to retrieve
        try {
            singleCodeCoupon result = apiInstance.getSingleCodeCoupon(couponId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponId = couponId_example; // The couponId of the requested coupon
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Gets a single-code coupon
[apiInstance getSingleCodeCouponWith:couponId
    fields:fields
              completionHandler: ^(singleCodeCoupon output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var couponId = couponId_example; // {{String}} The couponId of the requested coupon
var opts = { 
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSingleCodeCoupon(couponId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var couponId = couponId_example;  // String | The couponId of the requested coupon
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Gets a single-code coupon
                singleCodeCoupon result = apiInstance.getSingleCodeCoupon(couponId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getSingleCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$couponId = couponId_example; // String | The couponId of the requested coupon
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $couponId = couponId_example; # String | The couponId of the requested coupon
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
couponId = couponId_example # String | The couponId of the requested coupon
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Gets a single-code coupon
    api_response = api_instance.get_single_code_coupon(couponId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getSingleCodeCoupon: %s\n" % e)

Parameters

Path parameters
Name Description
couponId*
String
The couponId of the requested coupon
Required
Query parameters
Name Description
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSingleCodeCouponRedemption

Gets redemption status for a single-code coupon

This endpoint provides redemption status for a single-code coupon with given couponId


/couponservices/v2/singlecodecouponredemption/get/{couponId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecouponredemption/get/{couponId}?customerId=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the requested coupon
        String customerId = customerId_example; // String | The user id
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponRedemption result = apiInstance.getSingleCodeCouponRedemption(couponId, customerId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getSingleCodeCouponRedemption");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the requested coupon
        String customerId = customerId_example; // String | The user id
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponRedemption result = apiInstance.getSingleCodeCouponRedemption(couponId, customerId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getSingleCodeCouponRedemption");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponId = couponId_example; // The couponId of the requested coupon
String *customerId = customerId_example; // The user id
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Gets redemption status for a single-code coupon
[apiInstance getSingleCodeCouponRedemptionWith:couponId
    customerId:customerId
    fields:fields
              completionHandler: ^(couponRedemption output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var couponId = couponId_example; // {{String}} The couponId of the requested coupon
var customerId = customerId_example; // {{String}} The user id
var opts = { 
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSingleCodeCouponRedemption(couponId, customerId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var couponId = couponId_example;  // String | The couponId of the requested coupon
            var customerId = customerId_example;  // String | The user id
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Gets redemption status for a single-code coupon
                couponRedemption result = apiInstance.getSingleCodeCouponRedemption(couponId, customerId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getSingleCodeCouponRedemption: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$couponId = couponId_example; // String | The couponId of the requested coupon
$customerId = customerId_example; // String | The user id
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $couponId = couponId_example; # String | The couponId of the requested coupon
my $customerId = customerId_example; # String | The user id
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
couponId = couponId_example # String | The couponId of the requested coupon
customerId = customerId_example # String | The user id
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Gets redemption status for a single-code coupon
    api_response = api_instance.get_single_code_coupon_redemption(couponId, customerId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getSingleCodeCouponRedemption: %s\n" % e)

Parameters

Path parameters
Name Description
couponId*
String
The couponId of the requested coupon
Required
Query parameters
Name Description
customerId*
String
The user id
Required
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getSingleCodeCoupons

Returns list of single-code coupons

This endpoint retrieves all of the single-code coupons that are registered in the system


/couponservices/v2/singlecodecoupon/list

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecoupon/list?currentPage=&fields=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String currentPage = currentPage_example; // String | Current page number
        String fields = fields_example; // String | Fields to retrieve
        String pageSize = pageSize_example; // String | Number of items on a page
        String sort = sort_example; // String | Type of sorting to be applied to the retrieved set
        try {
            singleCodeCouponsSearchPage result = apiInstance.getSingleCodeCoupons(currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getSingleCodeCoupons");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String currentPage = currentPage_example; // String | Current page number
        String fields = fields_example; // String | Fields to retrieve
        String pageSize = pageSize_example; // String | Number of items on a page
        String sort = sort_example; // String | Type of sorting to be applied to the retrieved set
        try {
            singleCodeCouponsSearchPage result = apiInstance.getSingleCodeCoupons(currentPage, fields, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#getSingleCodeCoupons");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *currentPage = currentPage_example; // Current page number (optional) (default to 0)
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)
String *pageSize = pageSize_example; // Number of items on a page (optional) (default to 100)
String *sort = sort_example; // Type of sorting to be applied to the retrieved set (optional) (default to name:asc)

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

// Returns list of single-code coupons
[apiInstance getSingleCodeCouponsWith:currentPage
    fields:fields
    pageSize:pageSize
    sort:sort
              completionHandler: ^(singleCodeCouponsSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var opts = { 
  'currentPage': currentPage_example, // {{String}} Current page number
  'fields': fields_example, // {{String}} Fields to retrieve
  'pageSize': pageSize_example, // {{String}} Number of items on a page
  'sort': sort_example // {{String}} Type of sorting to be applied to the retrieved set
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSingleCodeCoupons(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var currentPage = currentPage_example;  // String | Current page number (optional)  (default to 0)
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)
            var pageSize = pageSize_example;  // String | Number of items on a page (optional)  (default to 100)
            var sort = sort_example;  // String | Type of sorting to be applied to the retrieved set (optional)  (default to name:asc)

            try
            {
                // Returns list of single-code coupons
                singleCodeCouponsSearchPage result = apiInstance.getSingleCodeCoupons(currentPage, fields, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.getSingleCodeCoupons: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$currentPage = currentPage_example; // String | Current page number
$fields = fields_example; // String | Fields to retrieve
$pageSize = pageSize_example; // String | Number of items on a page
$sort = sort_example; // String | Type of sorting to be applied to the retrieved set

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $currentPage = currentPage_example; # String | Current page number
my $fields = fields_example; # String | Fields to retrieve
my $pageSize = pageSize_example; # String | Number of items on a page
my $sort = sort_example; # String | Type of sorting to be applied to the retrieved set

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
currentPage = currentPage_example # String | Current page number (optional) (default to 0)
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)
pageSize = pageSize_example # String | Number of items on a page (optional) (default to 100)
sort = sort_example # String | Type of sorting to be applied to the retrieved set (optional) (default to name:asc)

try: 
    # Returns list of single-code coupons
    api_response = api_instance.get_single_code_coupons(currentPage=currentPage, fields=fields, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->getSingleCodeCoupons: %s\n" % e)

Parameters

Query parameters
Name Description
currentPage
String
Current page number
fields
String
Fields to retrieve
pageSize
String
Number of items on a page
sort
String
Type of sorting to be applied to the retrieved set

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateMultiCodeCoupon

Updates a multi-code coupon

This endpoint updates multi-code coupon data as provided in PUT body


/couponservices/v2/multicodecoupon/update

Usage and SDK Samples

curl -X PUT\
\
\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        MultiCodeCoupon body = ; // MultiCodeCoupon | 
        try {
            apiInstance.updateMultiCodeCoupon(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        MultiCodeCoupon body = ; // MultiCodeCoupon | 
        try {
            apiInstance.updateMultiCodeCoupon(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
MultiCodeCoupon *body = ; // 

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

// Updates a multi-code coupon
[apiInstance updateMultiCodeCouponWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{MultiCodeCoupon}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new MultiCodeCoupon(); // MultiCodeCoupon | 

            try
            {
                // Updates a multi-code coupon
                apiInstance.updateMultiCodeCoupon(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.updateMultiCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // MultiCodeCoupon | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::MultiCodeCoupon->new(); # MultiCodeCoupon | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # MultiCodeCoupon | 

try: 
    # Updates a multi-code coupon
    api_instance.update_multi_code_coupon(body)
except ApiException as e:
    print("Exception when calling CouponServicesApi->updateMultiCodeCoupon: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateMultiCodeCouponStatus

Updates status of multi-code coupon

This endpoint updates status of a multi-code coupon as provided in POST body


/couponservices/v2/multicodecoupon/update/status

Usage and SDK Samples

curl -X PUT\
\
\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/update/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        CouponStatus body = ; // CouponStatus | 
        try {
            apiInstance.updateMultiCodeCouponStatus(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateMultiCodeCouponStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        CouponStatus body = ; // CouponStatus | 
        try {
            apiInstance.updateMultiCodeCouponStatus(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateMultiCodeCouponStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
CouponStatus *body = ; // 

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

// Updates status of multi-code coupon
[apiInstance updateMultiCodeCouponStatusWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{CouponStatus}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new CouponStatus(); // CouponStatus | 

            try
            {
                // Updates status of multi-code coupon
                apiInstance.updateMultiCodeCouponStatus(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.updateMultiCodeCouponStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // CouponStatus | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::CouponStatus->new(); # CouponStatus | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # CouponStatus | 

try: 
    # Updates status of multi-code coupon
    api_instance.update_multi_code_coupon_status(body)
except ApiException as e:
    print("Exception when calling CouponServicesApi->updateMultiCodeCouponStatus: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateSingleCodeCoupon

Updates a single-code coupon

This endpoint updates single-code coupon data as provided in PUT body


/couponservices/v2/singlecodecoupon/update

Usage and SDK Samples

curl -X PUT\
\
\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecoupon/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        SingleCodeCoupon body = ; // SingleCodeCoupon | 
        try {
            apiInstance.updateSingleCodeCoupon(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        SingleCodeCoupon body = ; // SingleCodeCoupon | 
        try {
            apiInstance.updateSingleCodeCoupon(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SingleCodeCoupon *body = ; // 

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

// Updates a single-code coupon
[apiInstance updateSingleCodeCouponWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{SingleCodeCoupon}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new SingleCodeCoupon(); // SingleCodeCoupon | 

            try
            {
                // Updates a single-code coupon
                apiInstance.updateSingleCodeCoupon(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.updateSingleCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // SingleCodeCoupon | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::SingleCodeCoupon->new(); # SingleCodeCoupon | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # SingleCodeCoupon | 

try: 
    # Updates a single-code coupon
    api_instance.update_single_code_coupon(body)
except ApiException as e:
    print("Exception when calling CouponServicesApi->updateSingleCodeCoupon: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


updateSingleCodeCouponStatus

Updates status of single-code coupon

This endpoint updates status of a single-code coupon as provided in POST body


/couponservices/v2/singlecodecoupon/update/status

Usage and SDK Samples

curl -X PUT\
\
\
-H "Content-Type: application/xml,application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecoupon/update/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        CouponStatus body = ; // CouponStatus | 
        try {
            apiInstance.updateSingleCodeCouponStatus(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateSingleCodeCouponStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        CouponStatus body = ; // CouponStatus | 
        try {
            apiInstance.updateSingleCodeCouponStatus(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#updateSingleCodeCouponStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
CouponStatus *body = ; // 

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

// Updates status of single-code coupon
[apiInstance updateSingleCodeCouponStatusWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var body = ; // {{CouponStatus}} 

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

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

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

            var apiInstance = new CouponServicesApi();
            var body = new CouponStatus(); // CouponStatus | 

            try
            {
                // Updates status of single-code coupon
                apiInstance.updateSingleCodeCouponStatus(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.updateSingleCodeCouponStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$body = ; // CouponStatus | 

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $body = WWW::SwaggerClient::Object::CouponStatus->new(); # CouponStatus | 

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
body =  # CouponStatus | 

try: 
    # Updates status of single-code coupon
    api_instance.update_single_code_coupon_status(body)
except ApiException as e:
    print("Exception when calling CouponServicesApi->updateSingleCodeCouponStatus: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


validateCoupon

Validates a coupon code

This endpoint validates a coupon with a given coupon code


/couponservices/v2/coupon/validate/{couponCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/coupon/validate/{couponCode}?customerId=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponCode = couponCode_example; // String | The couponCode of the coupon to validate
        String customerId = customerId_example; // String | The customerId
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponValidationResponse result = apiInstance.validateCoupon(couponCode, customerId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#validateCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponCode = couponCode_example; // String | The couponCode of the coupon to validate
        String customerId = customerId_example; // String | The customerId
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponValidationResponse result = apiInstance.validateCoupon(couponCode, customerId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#validateCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponCode = couponCode_example; // The couponCode of the coupon to validate
String *customerId = customerId_example; // The customerId (optional)
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Validates a coupon code
[apiInstance validateCouponWith:couponCode
    customerId:customerId
    fields:fields
              completionHandler: ^(couponValidationResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var couponCode = couponCode_example; // {{String}} The couponCode of the coupon to validate
var opts = { 
  'customerId': customerId_example, // {{String}} The customerId
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.validateCoupon(couponCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var couponCode = couponCode_example;  // String | The couponCode of the coupon to validate
            var customerId = customerId_example;  // String | The customerId (optional) 
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Validates a coupon code
                couponValidationResponse result = apiInstance.validateCoupon(couponCode, customerId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.validateCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$couponCode = couponCode_example; // String | The couponCode of the coupon to validate
$customerId = customerId_example; // String | The customerId
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $couponCode = couponCode_example; # String | The couponCode of the coupon to validate
my $customerId = customerId_example; # String | The customerId
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
couponCode = couponCode_example # String | The couponCode of the coupon to validate
customerId = customerId_example # String | The customerId (optional)
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Validates a coupon code
    api_response = api_instance.validate_coupon(couponCode, customerId=customerId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->validateCoupon: %s\n" % e)

Parameters

Path parameters
Name Description
couponCode*
String
The couponCode of the coupon to validate
Required
Query parameters
Name Description
customerId
String
The customerId
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


validateMultiCodeCoupon

Validates a multi-code coupon with given coupon code

This endpoint validates a multi-code coupon with given coupon code


/couponservices/v2/multicodecoupon/validate/{couponCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/multicodecoupon/validate/{couponCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponCode = couponCode_example; // String | The code of the coupon to validate
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponValidationResponse result = apiInstance.validateMultiCodeCoupon(couponCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#validateMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponCode = couponCode_example; // String | The code of the coupon to validate
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponValidationResponse result = apiInstance.validateMultiCodeCoupon(couponCode, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#validateMultiCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponCode = couponCode_example; // The code of the coupon to validate
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Validates a multi-code coupon with given coupon code
[apiInstance validateMultiCodeCouponWith:couponCode
    fields:fields
              completionHandler: ^(couponValidationResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var couponCode = couponCode_example; // {{String}} The code of the coupon to validate
var opts = { 
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.validateMultiCodeCoupon(couponCode, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var couponCode = couponCode_example;  // String | The code of the coupon to validate
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Validates a multi-code coupon with given coupon code
                couponValidationResponse result = apiInstance.validateMultiCodeCoupon(couponCode, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.validateMultiCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$couponCode = couponCode_example; // String | The code of the coupon to validate
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $couponCode = couponCode_example; # String | The code of the coupon to validate
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
couponCode = couponCode_example # String | The code of the coupon to validate
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Validates a multi-code coupon with given coupon code
    api_response = api_instance.validate_multi_code_coupon(couponCode, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->validateMultiCodeCoupon: %s\n" % e)

Parameters

Path parameters
Name Description
couponCode*
String
The code of the coupon to validate
Required
Query parameters
Name Description
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


validateSingleCodeCoupon

Validates a single-code coupon

This endpoint validates a single-code coupon with a given couponId


/couponservices/v2/singlecodecoupon/validate/{couponId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: application/json"\
"http://localhost:9001/couponwebservices/couponservices/v2/singlecodecoupon/validate/{couponId}?customerId=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CouponServicesApi;

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

public class CouponServicesApiExample {

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

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

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

        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the coupon to validate
        String customerId = customerId_example; // String | The customerId
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponValidationResponse result = apiInstance.validateSingleCodeCoupon(couponId, customerId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#validateSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CouponServicesApi;

public class CouponServicesApiExample {

    public static void main(String[] args) {
        CouponServicesApi apiInstance = new CouponServicesApi();
        String couponId = couponId_example; // String | The couponId of the coupon to validate
        String customerId = customerId_example; // String | The customerId
        String fields = fields_example; // String | Fields to retrieve
        try {
            couponValidationResponse result = apiInstance.validateSingleCodeCoupon(couponId, customerId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CouponServicesApi#validateSingleCodeCoupon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *couponId = couponId_example; // The couponId of the coupon to validate
String *customerId = customerId_example; // The customerId (optional)
String *fields = fields_example; // Fields to retrieve (optional) (default to DEFAULT)

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

// Validates a single-code coupon
[apiInstance validateSingleCodeCouponWith:couponId
    customerId:customerId
    fields:fields
              completionHandler: ^(couponValidationResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CouponWebservices = require('coupon_webservices');
var defaultClient = CouponWebservices.ApiClient.instance;

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

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

var api = new CouponWebservices.CouponServicesApi()
var couponId = couponId_example; // {{String}} The couponId of the coupon to validate
var opts = { 
  'customerId': customerId_example, // {{String}} The customerId
  'fields': fields_example // {{String}} Fields to retrieve
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.validateSingleCodeCoupon(couponId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            var apiInstance = new CouponServicesApi();
            var couponId = couponId_example;  // String | The couponId of the coupon to validate
            var customerId = customerId_example;  // String | The customerId (optional) 
            var fields = fields_example;  // String | Fields to retrieve (optional)  (default to DEFAULT)

            try
            {
                // Validates a single-code coupon
                couponValidationResponse result = apiInstance.validateSingleCodeCoupon(couponId, customerId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CouponServicesApi.validateSingleCodeCoupon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiCouponServicesApi();
$couponId = couponId_example; // String | The couponId of the coupon to validate
$customerId = customerId_example; // String | The customerId
$fields = fields_example; // String | Fields to retrieve

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

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

my $api_instance = WWW::SwaggerClient::CouponServicesApi->new();
my $couponId = couponId_example; # String | The couponId of the coupon to validate
my $customerId = customerId_example; # String | The customerId
my $fields = fields_example; # String | Fields to retrieve

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

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

# create an instance of the API class
api_instance = swagger_client.CouponServicesApi()
couponId = couponId_example # String | The couponId of the coupon to validate
customerId = customerId_example # String | The customerId (optional)
fields = fields_example # String | Fields to retrieve (optional) (default to DEFAULT)

try: 
    # Validates a single-code coupon
    api_response = api_instance.validate_single_code_coupon(couponId, customerId=customerId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CouponServicesApi->validateSingleCodeCoupon: %s\n" % e)

Parameters

Path parameters
Name Description
couponId*
String
The couponId of the coupon to validate
Required
Query parameters
Name Description
customerId
String
The customerId
fields
String
Fields to retrieve

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found