csharp
java
javascript
php
python
ruby
typescript

coupon

/coupon




using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class Introduction
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void IntroductionCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class Introduction {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Retrieve auto apply rules and conditions

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/auto_apply

Retrieve auto apply rules and conditions

SDK Function Name: getAutoApply

Responses
Status Code Reason Response Model
200
Successful response CouponAutoApplyConditions
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GetAutoApply
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GetAutoApplyCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GetAutoApply {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Update auto apply rules and conditions

Permissions:
  • coupon_write

Produces: application/json
post
/coupon/auto_apply

Update auto apply rules and conditions

SDK Function Name: updateAutoApply

Parameters
Parameter Description Location Data Type Required
conditions Conditions body CouponAutoApplyConditions required
Responses
Status Code Reason Response Model
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class UpdateAutoApply
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void UpdateAutoApplyCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class UpdateAutoApply {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Retrieve coupons

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/coupons

Retrieves coupons for this account. If no parameters are specified, all coupons will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

SDK Function Name: getCoupons

Parameters
Parameter Description Location Data Type Required
merchant_code Merchant code query string optional
description Description query string optional
coupon_type Coupon type query string optional
start_date_begin Start date begin query string optional
start_date_end Start date end query string optional
expiration_date_begin Expiration date begin query string optional
expiration_date_end Expiration date end query string optional
affiliate_oid Affiliate oid query integer (int32) optional
exclude_expired Exclude expired query boolean optional
${parameter.name} ${parameter.in} string optional
_limit The maximum number of records to return on this one API call. (Max 200)
Default: 100
query integer optional
_offset Pagination of the record set. Offset is a zero based index.
Default: 0
query integer optional
_sort The sort order of the coupons. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
Allowed Values
  • coupon_type
  • merchant_code
  • description
  • start_dts
  • expiration_dts
  • quickbooks_code
query string optional
_expand The object expansion to perform on the result. See documentation for examples query string optional
Responses
Status Code Reason Response Model
200
Successful response CouponsResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GetCoupons
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GetCouponsCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GetCoupons {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Insert a coupon

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
post
/coupon/coupons

Insert a coupon on the UltraCart account.

SDK Function Name: insertCoupon

Parameters
Parameter Description Location Data Type Required
coupon Coupon to insert body Coupon required
_expand The object expansion to perform on the result. See documentation for examples query string optional
Responses
Status Code Reason Response Model
200
Successful response CouponResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class InsertCoupon
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void InsertCouponCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class InsertCoupon {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Insert multiple coupons

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
post
/coupon/coupons/batch

Insert multiple coupon on the UltraCart account.

SDK Function Name: insertCoupons

Parameters
Parameter Description Location Data Type Required
coupons_request Coupons to insert (maximum 50) body CouponsRequest required
_expand The object expansion to perform on the result. See documentation for examples query string optional
_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. query boolean optional
Responses
Status Code Reason Response Model
200
Successful response CouponsResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class InsertCoupons
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void InsertCouponsCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class InsertCoupons {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Update multiple coupons

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
put
/coupon/coupons/batch

Update multiple coupon on the UltraCart account.

SDK Function Name: updateCoupons

Parameters
Parameter Description Location Data Type Required
coupons_request Coupons to update (synchronous maximum 50 / asynchronous maximum 100) body CouponsRequest required
_expand The object expansion to perform on the result. See documentation for examples query string optional
_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. query boolean optional
_async True if the operation should be run async. No result returned query boolean optional
Responses
Status Code Reason Response Model
200
Successful response CouponsResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class UpdateCoupons
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void UpdateCouponsCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class UpdateCoupons {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Deletes multiple coupons

Permissions:
  • coupon_write

Produces: application/json
delete
/coupon/coupons/by_code

Delete coupons on the UltraCart account.

SDK Function Name: deleteCouponsByCode

Parameters
Parameter Description Location Data Type Required
coupon_delete_request Coupon oids to delete body CouponDeletesRequest required
Responses
Status Code Reason Response Model
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class DeleteCouponsByCode
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void DeleteCouponsByCodeCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class DeleteCouponsByCode {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Deletes multiple coupons

Permissions:
  • coupon_write

Produces: application/json
delete
/coupon/coupons/by_oid

Delete coupons on the UltraCart account.

SDK Function Name: deleteCouponsByOid

Parameters
Parameter Description Location Data Type Required
coupon_delete_request Coupon oids to delete body CouponDeletesRequest required
Responses
Status Code Reason Response Model
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class DeleteCouponsByOid
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void DeleteCouponsByOidCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class DeleteCouponsByOid {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Retrieve a coupon by merchant code

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/coupons/merchant_code/{merchant_code}

Retrieves a single coupon using the specified merchant code.

SDK Function Name: getCouponByMerchantCode

Parameters
Parameter Description Location Data Type Required
merchant_code The coupon merchant code to retrieve. path string required
_expand The object expansion to perform on the result. See documentation for examples query string optional
Responses
Status Code Reason Response Model
200
Successful response CouponResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GetCouponByMerchantCode
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GetCouponByMerchantCodeCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GetCouponByMerchantCode {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Determines if a coupon merchant code already exists

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/coupons/merchant_code/{merchant_code}/exists

Determines if a coupon merchant code already exists.

SDK Function Name: doesCouponCodeExist

Parameters
Parameter Description Location Data Type Required
merchant_code The coupon merchant code to examine. path string required
Responses
Status Code Reason Response Model
200
Successful response CouponExistsResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class DoesCouponCodeExist
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void DoesCouponCodeExistCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class DoesCouponCodeExist {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Generates one time codes by merchant code

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
post
/coupon/coupons/merchant_code/{merchant_code}/generate_codes

Generate one time codes by merchant code

SDK Function Name: generateOneTimeCodesByMerchantCode

Parameters
Parameter Description Location Data Type Required
merchant_code The merchant code to generate one time codes. path string required
coupon_codes_request Coupon code generation parameters body CouponCodesRequest required
Responses
Status Code Reason Response Model
200
Successful response CouponCodesResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GenerateOneTimeCodesByMerchantCode
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GenerateOneTimeCodesByMerchantCodeCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GenerateOneTimeCodesByMerchantCode {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Retrieve coupons by query

Permissions:
  • coupon_read

Produces: application/json
post
/coupon/coupons/query

Retrieves coupons from the account. If no parameters are specified, all coupons will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

SDK Function Name: getCouponsByQuery

Parameters
Parameter Description Location Data Type Required
coupon_query Coupon query body CouponQuery required
_limit The maximum number of records to return on this one API call. (Max 200)
Default: 100
query integer optional
_offset Pagination of the record set. Offset is a zero based index.
Default: 0
query integer optional
_sort The sort order of the coupons. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
Allowed Values
  • coupon_type
  • merchant_code
  • description
  • start_dts
  • expiration_dts
  • quickbooks_code
query string optional
_expand The object expansion to perform on the result. See documentation for examples query string optional
Responses
Status Code Reason Response Model
200
Successful response CouponsResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GetCouponsByQuery
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GetCouponsByQueryCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GetCouponsByQuery {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Delete a coupon

Permissions:
  • coupon_write

Produces: application/json
delete
/coupon/coupons/{coupon_oid}

Delete a coupon on the UltraCart account.

SDK Function Name: deleteCoupon

Parameters
Parameter Description Location Data Type Required
coupon_oid The coupon_oid to delete. path integer (int32) required
Responses
Status Code Reason Response Model
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class DeleteCoupon
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void DeleteCouponCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class DeleteCoupon {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Retrieve a coupon

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/coupons/{coupon_oid}

Retrieves a single coupon using the specified coupon profile oid.

SDK Function Name: getCoupon

Parameters
Parameter Description Location Data Type Required
coupon_oid The coupon oid to retrieve. path integer (int32) required
_expand The object expansion to perform on the result. See documentation for examples query string optional
Responses
Status Code Reason Response Model
200
Successful response CouponResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GetCoupon
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GetCouponCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GetCoupon {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);
        CouponResponse response = couponApi.getCouponByMerchantCode("10OFF", "");
        Coupon coupon = response.getCoupon();
        System.out.println(coupon);

    }

    public static void superShort(String[] args) throws ApiException {
        CouponApi couponApi = new CouponApi("109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00");
        System.out.println(couponApi.getCouponByMerchantCode("10OFF", "").getCoupon());
    }

}

<?php
require_once '../vendor/autoload.php';
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$coupon_api = ultracart\v2\api\CouponApi::usingApiKey($simple_key);
$api_response = $coupon_api->getCouponByMerchantCode('10OFF');
echo '<html lang="en"><body><pre>';
var_dump($api_response);
// var_dump($api_response->getCoupon());
echo '</pre></body></html>';
?>


Update a coupon

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
put
/coupon/coupons/{coupon_oid}

Update a coupon on the UltraCart account.

SDK Function Name: updateCoupon

Parameters
Parameter Description Location Data Type Required
coupon Coupon to update body Coupon required
coupon_oid The coupon_oid to update. path integer (int32) required
_expand The object expansion to perform on the result. See documentation for examples query string optional
Responses
Status Code Reason Response Model
200
Successful response CouponResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class UpdateCoupon
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void UpdateCouponCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class UpdateCoupon {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Generates one time codes for a coupon

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
post
/coupon/coupons/{coupon_oid}/generate_codes

Generate one time codes for a coupon

SDK Function Name: generateCouponCodes

Parameters
Parameter Description Location Data Type Required
coupon_oid The coupon oid to generate codes. path integer (int32) required
coupon_codes_request Coupon code generation parameters body CouponCodesRequest required
Responses
Status Code Reason Response Model
200
Successful response CouponCodesResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GenerateCouponCodes
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GenerateCouponCodesCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GenerateCouponCodes {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Upload one-time codes for a coupon

Permissions:
  • coupon_write

Consumes: application/json
Produces: application/json
post
/coupon/coupons/{coupon_oid}/upload_codes

Upload one-time codes for a coupon

SDK Function Name: uploadCouponCodes

Parameters
Parameter Description Location Data Type Required
coupon_oid The coupon oid to associate with the provided one-time codes. path integer (int32) required
upload_coupon_codes_request One-time coupon codes body UploadCouponCodesRequest required
Responses
Status Code Reason Response Model
200
Successful response UploadCouponCodesResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class UploadCouponCodes
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void UploadCouponCodesCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class UploadCouponCodes {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Retrieve values needed for a coupon editor

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/editor_values

Retrieve values needed for a coupon editor

SDK Function Name: getEditorValues

Responses
Status Code Reason Response Model
200
Successful response CouponEditorValues
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class GetEditorValues
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void GetEditorValuesCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class GetEditorValues {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Searches for items to display within a coupon editor and assign to coupons

Permissions:
  • coupon_read

Produces: application/json
get
/coupon/searchItems

Searches for items to display within a coupon editor and assign to coupons

SDK Function Name: searchItems

Parameters
Parameter Description Location Data Type Required
s query string optional
m query integer (int32) optional
Responses
Status Code Reason Response Model
200
Successful response CouponItemSearchResultsResponse
400
Bad Request 400
401
Unauthorized 401
410
Authorized Application Disabled 410
429
Too Many Requests 429
500
Server Side 500



using System;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Model;
using NUnit.Framework;

namespace SdkSample.coupon
{
    public class SearchItems
    {

        [Test]
        public void ExecuteTest()
        {
            //TODO-PT
        }

        public static void SearchItemsCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new CouponApi(simpleKey);
        }


    }
}



package coupon;

import com.ultracart.admin.v2.CouponApi;
import com.ultracart.admin.v2.models.Coupon;
import com.ultracart.admin.v2.models.CouponResponse;
import com.ultracart.admin.v2.util.ApiException;

public class SearchItems {

    public static void main(String[] args) throws ApiException {

        // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
        final String apiKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
        CouponApi couponApi = new CouponApi(apiKey);

        // TODO-PT

    }

}

Coupon

Attributes
Name Data Type Description
affiliate_oid integer (int32) Associates an order with an affiliate when this value is set.
allow_multiple_one_time_codes boolean True if multiple one time codes for this coupon can be used on a cart at the same time.
amount_off_items CouponAmountOffItems Amount off items
amount_off_shipping CouponAmountOffShipping Amount off shipping
amount_off_shipping_with_items_purchase CouponAmountOffShippingWithItemsPurchase Amount off shipping with items purchase
amount_off_subtotal CouponAmountOffSubtotal Amount off subtotal
amount_off_subtotal_and_free_shipping CouponAmountOffSubtotalFreeShippingWithPurchase Amount off subtotal and free shipping with purchase
amount_off_subtotal_and_shipping CouponAmountOffSubtotalAndShipping Amount off subtotal and shipping
amount_off_subtotal_with_block_purchase CouponAmountOffSubtotalWithBlockPurchase Amount off subtotal with block purchase
amount_off_subtotal_with_items_purchase CouponAmountOffSubtotalWithItemsPurchase Amount off subtotal with items purchase
amount_off_subtotal_with_purchase CouponAmountOffSubtotalWithPurchase Amount off subtotal with purchase
amount_shipping_with_subtotal CouponAmountShippingWithSubtotal Amount shipping with subtotal
automatically_apply_coupon_codes CouponAutomaticallyApplyCouponCodes Additional coupon codes to automatically apply
buy_one_get_one CouponBuyOneGetOneLimit Buy one get one free
calculated_description (read only) string Calculated description displayed to the customer if no description is specified.
can_be_used_with_other_coupons boolean True if this coupon can be used with other coupons in a single order.
coupon_oid integer (int32) Coupon oid.
coupon_type string(65) Coupon type.
description string(50) Description of the coupon up to 50 characters.
discount_item_with_item_purchase CouponDiscountItemWithItemPurchase Discount item with item purchase
discount_items CouponDiscountItems Discount items
expiration_dts string (dateTime) Date/time when coupon expires
free_item_and_shipping_with_subtotal CouponFreeItemAndShippingWithSubtotal Free items and shipping with subtotal
free_item_with_item_purchase CouponFreeItemWithItemPurchase Free item with item purchase
free_item_with_item_purchase_and_free_shipping CouponFreeItemWithItemPurchaseAndFreeShipping Free item with item purchase and free shipping
free_item_with_subtotal CouponFreeItemWithSubtotal Free items with subtotal
free_items_with_item_purchase CouponFreeItemsWithItemPurchase Free items with item purchase
free_items_with_mixmatch_purchase CouponFreeItemsWithMixMatchPurchase Free items with Mix and Match purchase
free_shipping CouponFreeShipping Free shipping
free_shipping_specific_items CouponFreeShippingSpecificItems Free shipping specific items
free_shipping_with_items_purchase CouponFreeShippingWithItemsPurchase Free shipping with items purchase
free_shipping_with_subtotal CouponFreeShippingWithSubtotal Free shipping with subtotal
hide_from_customer boolean Hide coupon from customer during checkout. Often used when coupons are automatic discounting mechanisms.
merchant_code string(20) Merchant code of coupon up to 20 characters.
merchant_notes string(250) Internal notes about this coupon. These are not visible to customer.
more_loyalty_cashback CouponMoreLoyaltyCashback More loyalty cashback
more_loyalty_points CouponMoreLoyaltyPoints More loyalty points
multiple_amounts_off_items CouponMultipleAmountsOffItems Multiple amounts off items
no_discount CouponNoDiscount No discount
percent_more_loyalty_cashback CouponPercentMoreLoyaltyCashback Percent more loyalty cashback
percent_more_loyalty_points CouponPercentMoreLoyaltyPoints Percent more loyalty points
percent_off_item_with_items_quantity_purchase CouponPercentOffItemWithItemsQuantityPurchase Percent off item with items quantity purchase
percent_off_items CouponPercentOffItems Percent off items
percent_off_items_and_free_shipping CouponPercentOffItemsAndFreeShipping Percent off items and free shipping
percent_off_items_with_items_purchase CouponPercentOffItemsWithItemsPurchase Percent off items with items purchase
percent_off_msrp_items CouponPercentOffMsrpItems Percent off MSRP items
percent_off_retail_price_items CouponPercentOffRetailPriceItems Percent off retail price items
percent_off_shipping CouponPercentOffShipping Percent off shipping
percent_off_subtotal CouponPercentOffSubtotal Percent off subtotal
percent_off_subtotal_and_free_shipping CouponPercentOffSubtotalAndFreeShipping Percent off subtotal and free shipping
percent_off_subtotal_limit CouponPercentOffSubtotalLimit Percent off subtotal with limit
percent_off_subtotal_with_items_purchase CouponPercentOffSubtotalWithItemsPurchase Percent off subtotal with items purchase
percent_off_subtotal_with_subtotal CouponPercentOffSubtotalWithSubtotal Percent off subtotal with subtotal
quickbooks_code string(20) Quickbooks accounting code.
restrict_by_postal_codes array of string Optional list of postal codes which restrict a coupon to within these postal codes.
restrict_by_screen_branding_theme_codes array of CouponRestriction Optional list of legacy screen branding theme codes to limit coupon use to only those themes.
restrict_by_storefronts array of CouponRestriction Optional list of storefronts to limit coupon use to only those storefronts.
skip_on_rebill boolean Skip this coupon when it is on a rebill of an auto order.
start_dts string (dateTime) Date/time when coupon is valid
super_coupon boolean If true, this coupon can be used with ANY other coupon regardless of the other coupons configuration
tiered_amount_off_items CouponTieredAmountOffItems Tiered amount off items
tiered_amount_off_subtotal CouponTieredAmountOffSubtotal Tiered amount off subtotal
tiered_percent_off_items CouponTieredPercentOffItems Tiered percent off items
tiered_percent_off_shipping CouponTieredPercentOffShipping Tiered percent off shipping
tiered_percent_off_subtotal CouponTieredPercentOffSubtotal Tiered percent off subtotal
tiered_percent_off_subtotal_based_on_msrp CouponTieredPercentOffSubtotalBasedOnMSRP Tiered percent off subtotal based on MSRP
usable_by string(50) Who may use this coupon.
Allowed Values
  • Anyone
  • UniqueCode
  • OncePerCustomer
  • OncePerNewCustomer
  • OncePerNewCustomerForItem

CouponAmountOffItems

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of shipping discount
item_tags array of string An optional list of item tags which will receive a discount.
items array of string A list of items which are eligible for the discount amount.
limit integer (int32) The limit of items which are eligible for the discount amount.

CouponAmountOffShipping

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of subtotal discount
shipping_methods array of string One or more shipping methods that may be used with this coupon

CouponAmountOffShippingWithItemsPurchase

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of shipping discount
items array of string A list of items of which at least one must be purchased for coupon to be valid.
shipping_methods array of string One or more shipping methods that may receive this discount

CouponAmountOffSubtotal

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of subtotal discount

CouponAmountOffSubtotalAndShipping

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of subtotal discount

CouponAmountOffSubtotalFreeShippingWithPurchase

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of subtotal discount
purchase_amount number The purchase amount to qualify for subtotal discount and free shipping
shipping_methods array of string One or more shipping methods that may be free

CouponAmountOffSubtotalWithBlockPurchase

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of subtotal discount
required_purchase_item string Required item that must be purchased for coupon to be valid
required_purchase_quantity integer (int32) Discount amount is multiplied by the number of blocks. A block is this many quantity of the required item.

CouponAmountOffSubtotalWithItemsPurchase

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of shipping discount
items array of string A list of items of which a quantity of one or many must be purchased for coupon to be valid.
required_purchase_quantity integer (int32) The quantity of items that must be purchased for the discount to be applied.

CouponAmountOffSubtotalWithPurchase

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_amount number The amount of subtotal discount
purchase_amount number The purchase amount to qualify for subtotal discount and free shipping

CouponAmountShippingWithSubtotal

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
purchase_amount number The purchase amount to qualify for subtotal discount and free shipping
shipping_amount number The amount of the shipping cost (this is not a discount, this is the actual cost of shipping)
shipping_methods array of string One or more shipping methods that may be used with this coupon

CouponAutoApplyCondition

Attributes
Name Data Type Description
coupon_code string
minimum_subtotal number The minimum subtotal that must be purchased to receive this coupon. Item and subtotal are exclusive. Only one can be populated.
required_item_id string The item that must be purchased to receive this coupon. Item and subtotal are exclusive. Only one can be populated.

CouponAutoApplyConditions

Attributes
Name Data Type Description
error Error Error object if unsuccessful
metadata ResponseMetadata Meta-data about the response such as payload or paging information
required_items array of CouponAutoApplyCondition
subtotal_levels array of CouponAutoApplyCondition
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponAutomaticallyApplyCouponCodes

Attributes
Name Data Type Description
coupon_codes array of string The coupon codes to automatically apply if this coupon is applied

CouponBuyOneGetOneLimit

Attributes
Name Data Type Description
item_tags array of string An optional list of item tags which will receive a discount.
items array of string An optional list of items of which one must be purchased to receive free quantity of the same item.
limit integer (int32) The limit of free items that may be received when purchasing multiple items

CouponCodesRequest

Attributes
Name Data Type Description
error Error Error object if unsuccessful
expiration_dts string Expiration Date
expiration_seconds integer (int32) Expiration seconds
metadata ResponseMetadata Meta-data about the response such as payload or paging information
quantity integer (int32) Quantity
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponCodesResponse

Attributes
Name Data Type Description
coupon_codes array of string Coupon codes
error Error Error object if unsuccessful
expiration_dts string (dateTime) Expiration date
metadata ResponseMetadata Meta-data about the response such as payload or paging information
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponDeletesRequest

Attributes
Name Data Type Description
coupon_codes array of string Coupon codes
coupon_oids array of integer (int32) Coupon oids

CouponDiscountItems

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_price number The price (unit cost) of the discounted item
items array of string A list of items that are eligible for this discount_price.
limit integer (int32) The (optional) maximum quantity of discounted items.

CouponDiscountItemWithItemPurchase

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_item string The item that will be sold at the discount_price when required_purchase_item is purchased.
discount_item_tags array of string An optional list of item tags which will receive a discount of one of the required purchased items is purchased.
discount_price number The price (unit cost) of the discounted item
limit integer (int32) The (optional) maximum quantity of discounted items.
required_purchase_item string The item that must be purchased for the discount to be applied to the discount item.
required_purchase_items_tags array of string An optional list of item tags which are required to be purchased.

CouponEditorValues

Attributes
Name Data Type Description
affiliates (read only) array of SimpleValue affiliates
coupon_types (read only) array of string coupon_types
coupon_types_for_display (read only) array of CouponType coupon_types_for_display
currency_codes (read only) array of string currency_codes
deprecated_themes (read only) array of SimpleValue deprecated_themes
item_tags (read only) array of string Item tags
mix_and_match_names (read only) array of string mix_and_match_names
shipping_methods (read only) array of string shipping_methods
storefronts (read only) array of SimpleValue storefronts
usable_by (read only) array of SimpleValue usable_by
valid_with_other_coupons (read only) array of string valid_with_other_coupons

CouponExistsResponse

Attributes
Name Data Type Description
coupon_code string Coupon Code
error Error Error object if unsuccessful
exists boolean Exists
metadata ResponseMetadata Meta-data about the response such as payload or paging information
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponFreeItemAndShippingWithSubtotal

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
items array of string A list of items that are eligible for this discount_price.
limit integer (int32) The limit of free items that may be received when purchasing multiple items
shipping_methods array of string One or more shipping methods that may be free
subtotal_amount number The amount of subtotal required to receive the discount percent

CouponFreeItemsWithItemPurchase

Attributes
Name Data Type Description
free_item string The item id of the free item that will be received when the required mix and match group quantity is purchased.
free_quantity integer (int32) The quantity of free item that will be received.
limit integer (int32) The limit of free items that may be received when purchasing multiple items
required_purchase_item string Required item that must be purchased for coupon to be valid
required_purchase_quantity integer (int32) Required quantity of mix and match group items that must be purchased for coupon to be valid

CouponFreeItemsWithMixMatchPurchase

Attributes
Name Data Type Description
free_item string The item id of the free item that will be received when the required mix and match group quantity is purchased.
free_quantity integer (int32) The quantity of free item that will be received.
limit integer (int32) The limit of free items that may be received when purchasing multiple mix and match group items
required_purchase_mix_and_match_group string Required mix and match group that must be purchased for coupon to be valid
required_purchase_quantity integer (int32) Required quantity of mix and match group items that must be purchased for coupon to be valid

CouponFreeItemWithItemPurchase

Attributes
Name Data Type Description
item_tags array of string An optional list of item tags which will receive a discount of one of the required purchased items is purchased.
items array of string A list of free items which will receive a discount if one of the required purchase items is purchased.
limit integer (int32) The (optional) maximum quantity of discounted items.
match_required_purchase_item_to_free_item boolean If true then the free item is matched 1:1 with the free item in the list.
required_purchase_items array of string Required items (at least one from the list) that must be purchased for coupon to be valid
required_purchase_items_tags array of string An optional list of item tags which are required to be purchased.

CouponFreeItemWithItemPurchaseAndFreeShipping

Attributes
Name Data Type Description
items array of string A list of free items which will receive a discount if one of the required purchase items is purchased.
limit integer (int32) The (optional) maximum quantity of discounted items. Free shipping will apply to all units of the free item ids though.
match_required_purchase_item_to_free_item boolean If true then the free item is matched 1:1 with the free item in the list.
required_purchase_items array of string Required items (at least one from the list) that must be purchased for coupon to be valid

CouponFreeItemWithSubtotal

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
items array of string A list of items that are eligible for this discount_price.
limit integer (int32) The limit of free items that may be received when purchasing multiple items
subtotal_amount number The amount of subtotal required to receive the discount percent

CouponFreeShipping

Attributes
Name Data Type Description
shipping_methods array of string One or more shipping methods that may be used with this coupon

CouponFreeShippingSpecificItems

Attributes
Name Data Type Description
items array of string A list of items of which at least one must be purchased for coupon to be valid.

CouponFreeShippingWithItemsPurchase

Attributes
Name Data Type Description
items array of string A list of items of which at least one must be purchased for coupon to be valid.
shipping_methods array of string One or more shipping methods that may receive this discount

CouponFreeShippingWithSubtotal

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
purchase_amount number The purchase amount to qualify for subtotal discount and free shipping
shipping_methods array of string One or more shipping methods that may be used with this coupon

CouponItemSearchResult

Attributes
Name Data Type Description
cost (read only) string The cost of this item.
description (read only) string A human readable description of this item.
manufacturer_name (read only) string The manufacturer of this item.
manufacturer_sku (read only) string The manufacturer sku of this item.
merchant_item_id (read only) string The merchant item identifier, which is unique for this merchant, but not across all of UltraCart.
merchant_item_oid (read only) integer (int32) The unique internal identifier used by UltraCart to manage this item.
score (read only) string The search score of this item. Larger scores mean more accurate matches against the search term.
thumbnail_url (read only) string A url for displaying a thumbnail of this item

CouponItemSearchResultsResponse

Attributes
Name Data Type Description
error Error Error object if unsuccessful
metadata ResponseMetadata Meta-data about the response such as payload or paging information
search_results array of CouponItemSearchResult search_results
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponMoreLoyaltyCashback

Attributes
Name Data Type Description
loyalty_cashback number The additional loyalty cashback

CouponMoreLoyaltyPoints

Attributes
Name Data Type Description
loyalty_points number The additional loyalty points

CouponMultipleAmountsOffItems

Attributes
Name Data Type Description
discounts array of CouponTierItemDiscount A list of item discounts.
limit integer (int32) The (optional) maximum quantity of items that may receive a discount.

CouponNoDiscount

Attributes
Name Data Type Description
ignore_this_property (read only) boolean This property does nothing but is included in this object to ensure the object is generated by our sdk builders.

CouponPercentMoreLoyaltyCashback

Attributes
Name Data Type Description
percent_more_loyalty_cashback number The percentage of additional loyalty cashback

CouponPercentMoreLoyaltyPoints

Attributes
Name Data Type Description
percent_more_loyalty_points number The percentage of additional loyalty points

CouponPercentOffItems

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
excluded_item_tags array of string A list of item tags which cannot be discounted.
excluded_items array of string A list of items which cannot be discounted.
item_tags array of string An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.
items array of string An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.
limit integer (int32) The (optional) maximum quantity of discounted items.

CouponPercentOffItemsAndFreeShipping

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
excluded_item_tags array of string A list of item tags which cannot be discounted.
excluded_items array of string A list of items which cannot be discounted.
item_tags array of string An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.
items array of string An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.

CouponPercentOffItemsWithItemsPurchase

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
item_tags array of string An optional list of item tags which will receive a discount of one of the required purchased items is purchased.
items array of string A list of items which will receive a discount if one of the required purchase items is purchased.
limit integer (int32) The (optional) maximum quantity of discounted items.
required_purchase_items array of string Required items (at least one from the list) that must be purchased for coupon to be valid
required_purchase_items_tags array of string An optional list of item tags which are required to be purchased.

CouponPercentOffItemWithItemsQuantityPurchase

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
item_tags array of string An optional list of item tags which will receive a discount if one of the required purchased items is purchased.
items array of string A list of items which will receive a discount if one of the required purchase items is purchased.
limit integer (int32) The (optional) maximum quantity of discounted items.
required_purchase_items array of string Required items (at least one from the list) that must be purchased for coupon to be valid
required_purchase_items_tags array of string Required item tags (at least one from the list) that must be purchase for coupon to be valid.
required_purchase_quantity integer (int32) The quantity of items that must be purchased for the discount to be applied.

CouponPercentOffMsrpItems

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
excluded_items array of string A list of items which cannot be discounted.
items array of string An list of items which will receive a discount.
limit integer (int32) The (optional) maximum quantity of discounted items.
minimum_cumulative_msrp number The (optional) minimum cumulative msrp of qualifying items.
minimum_subtotal number The (optional) minimum subtotal of qualifying items.

CouponPercentOffRetailPriceItems

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
excluded_items array of string A list of items which cannot be discounted.
items array of string An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.
limit integer (int32) The (optional) maximum quantity of discounted items.

CouponPercentOffShipping

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
shipping_methods array of string One or more shipping methods that may be used with this coupon

CouponPercentOffSubtotal

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount

CouponPercentOffSubtotalAndFreeShipping

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
shipping_methods array of string One or more shipping methods that may be free

CouponPercentOffSubtotalLimit

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_percent number The percentage of subtotal discount
limit number The maximum amount of subtotal used to determine discount.

CouponPercentOffSubtotalWithItemsPurchase

Attributes
Name Data Type Description
discount_percent number The percentage of subtotal discount
items array of string A list of items of which at least one must be purchased for coupon to be valid.

CouponPercentOffSubtotalWithSubtotal

Attributes
Name Data Type Description
currency_code string(3) The ISO-4217 three letter currency code the customer is viewing prices in
discount_percent number The percentage of subtotal discount
subtotal_amount number The amount of subtotal required to receive the discount percent

CouponQuery

Attributes
Name Data Type Description
affiliate_oid integer (int32) Affiliate oid
coupon_type string The type of coupon.
description string Description of this coupon
exclude_expired boolean Exclude expired coupons if true
expiration_dts_begin string (dateTime) Expiration date begin
expiration_dts_end string (dateTime) Expiration date begin
merchant_code string Merchant code is a unique character string for this coupon.
merchant_code_or_description string Merchant code description used for searching
start_dts_begin string (dateTime) Start date begin
start_dts_end string (dateTime) Start date end

CouponResponse

Attributes
Name Data Type Description
coupon Coupon Coupon
error Error Error object if unsuccessful
items_invalid_for_coupons array of string Items invalid for coupons. These will display as warnings within the UI.
metadata ResponseMetadata Meta-data about the response such as payload or paging information
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponRestriction

Attributes
Name Data Type Description
invalidForThis boolean
name string
validForThis boolean
validOnlyForThis boolean

CouponsRequest

Attributes
Name Data Type Description
coupons array of Coupon coupons

CouponsResponse

Attributes
Name Data Type Description
coupons array of Coupon
error Error Error object if unsuccessful
metadata ResponseMetadata Meta-data about the response such as payload or paging information
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

CouponTierAmount

Attributes
Name Data Type Description
discount_amount number The amount of subtotal discount
quickbooks_code string(20) Quickbooks accounting code.
subtotal_amount number The amount of subtotal required to receive the discount amount

CouponTieredAmountOffItems

Attributes
Name Data Type Description
item_tags array of string An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.
items array of string The items being discounted by this coupon.
limit number The maximum number of discounted items.
tiers array of CouponTierQuantityAmount A list of discount tiers.

CouponTieredAmountOffSubtotal

Attributes
Name Data Type Description
items array of string An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.
tiers array of CouponTierAmount A list of discount tiers.

CouponTieredPercentOffItems

Attributes
Name Data Type Description
item_tags array of string An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.
items array of string A list of items of which at least one must be purchased for coupon to be valid.
limit number The (optional) maximum quantity of discounted items.
tiers array of CouponTierQuantityPercent A list of discount tiers.

CouponTieredPercentOffShipping

Attributes
Name Data Type Description
quickbooks_code string(20) Quickbooks accounting code.
shipping_methods array of string One or more shipping methods that may receive this discount
tiers array of CouponTierPercent A list of discount tiers.

CouponTieredPercentOffSubtotal

Attributes
Name Data Type Description
items array of string An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.
tiers array of CouponTierPercent A list of discount tiers.

CouponTieredPercentOffSubtotalBasedOnMSRP

Attributes
Name Data Type Description
items array of string An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.
tiers array of CouponTierPercent A list of discount tiers.

CouponTierItemDiscount

Attributes
Name Data Type Description
discount_amount number The amount of subtotal discount
items array of string A list of items which will receive this discount.

CouponTierPercent

Attributes
Name Data Type Description
discount_percent number The percent of subtotal discount
quickbooks_code string(20) Quickbooks accounting code.
subtotal_amount number The amount of subtotal required to receive the discount percent

CouponTierQuantityAmount

Attributes
Name Data Type Description
discount_amount number The amount of discount per item.
item_quantity integer (int32) The quantity of item purchased (in units)
quickbooks_code string(20) Quickbooks accounting code.

CouponTierQuantityPercent

Attributes
Name Data Type Description
discount_percent number The percent of discount per item.
item_quantity integer (int32) The quantity of item purchased (in units)
quickbooks_code string(20) Quickbooks accounting code.

CouponType

Attributes
Name Data Type Description
localized string A friendly display of the coupon type suitable for human reading
name string The name of the coupon type

Error

Attributes
Name Data Type Description
developer_message string A technical message meant to be read by a developer
error_code string HTTP status code
more_info string Additional information often a link to additional documentation
object_id string Object id that the error is associated with
user_message string An end-user friendly message suitable for display to the customer

ErrorResponse

Attributes
Name Data Type Description
error Error Error object if unsuccessful
metadata ResponseMetadata Meta-data about the response such as payload or paging information
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

ResponseMetadata

Attributes
Name Data Type Description
payload_name string Payload name
result_set ResultSet Result set

ResultSet

Attributes
Name Data Type Description
count integer (int32) Number of results in this set
limit integer (int32) Maximum number of results that can be returned in a set
more boolean True if there are more results to query
next_offset integer (int32) The next offset that you should query to retrieve more results
offset integer (int32) Offset of this result set (zero based)
total_records integer (int32) The total number of records in the result set. May be null if the number is not known and the client should continue iterating as long as more is true.

SimpleValue

Attributes
Name Data Type Description
display string A friendly display of this value suitable for human reading
value string The actual value

UploadCouponCodesRequest

Attributes
Name Data Type Description
coupon_codes array of string Coupon codes
error Error Error object if unsuccessful
metadata ResponseMetadata Meta-data about the response such as payload or paging information
success boolean Indicates if API call was successful
warning Warning Warning object if a non-fatal issue or side-effect occurs

UploadCouponCodesResponse

Attributes
Name Data Type Description
duplicate_codes array of string Duplicate codes
error Error Error object if unsuccessful
metadata ResponseMetadata Meta-data about the response such as payload or paging information
rejected_codes array of string Rejected codes
success boolean Indicates if API call was successful
uploaded_codes array of string Uploaded codes
warning Warning Warning object if a non-fatal issue or side-effect occurs

Warning

Attributes
Name Data Type Description
more_info string Additional information often a link to additional documentation
warning_message string A technical message meant to be read by a developer

400
Status Code 400: bad request input such as invalid json

Headers
Name Data Type Description
UC-REST-ERROR string Contains human readable error message
Response
Name Data Type
body ErrorResponse

401
Status Code 401: invalid credentials supplied

Headers
Name Data Type Description
UC-REST-ERROR string Contains human readable error message
Response
Name Data Type
body ErrorResponse

410
Status Code 410: Your authorized application has been disabled by UltraCart

Headers
Name Data Type Description
UC-REST-ERROR string Contains human readable error message
Response
Name Data Type
body ErrorResponse

429
Status Code 429: you have exceeded the allowed API call rate limit for your application.

Headers
Name Data Type Description
UC-REST-ERROR string Contains human readable error message
Response
Name Data Type
body ErrorResponse

500
Status Code 500: any server side error. the body will contain a generic server error message

Headers
Name Data Type Description
UC-REST-ERROR string Contains human readable error message
Response
Name Data Type
body ErrorResponse