All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
deleteCoupon | DELETE /coupon/coupons/{coupon_oid} | Delete a coupon |
deleteCouponsByCode | DELETE /coupon/coupons/by_code | Deletes multiple coupons |
deleteCouponsByOid | DELETE /coupon/coupons/by_oid | Deletes multiple coupons |
doesCouponCodeExist | GET /coupon/coupons/merchant_code/{merchant_code}/exists | Determines if a coupon merchant code already exists |
generateCouponCodes | POST /coupon/coupons/{coupon_oid}/generate_codes | Generates one time codes for a coupon |
generateOneTimeCodesByMerchantCode | POST /coupon/coupons/merchant_code/{merchant_code}/generate_codes | Generates one time codes by merchant code |
getAutoApply | GET /coupon/auto_apply | Retrieve auto apply rules and conditions |
getCoupon | GET /coupon/coupons/{coupon_oid} | Retrieve a coupon |
getCouponByMerchantCode | GET /coupon/coupons/merchant_code/{merchant_code} | Retrieve a coupon by merchant code |
getCoupons | GET /coupon/coupons | Retrieve coupons |
getCouponsByQuery | POST /coupon/coupons/query | Retrieve coupons by query |
getEditorValues | GET /coupon/editor_values | Retrieve values needed for a coupon editor |
insertCoupon | POST /coupon/coupons | Insert a coupon |
insertCoupons | POST /coupon/coupons/batch | Insert multiple coupons |
searchItems | GET /coupon/searchItems | Searches for items to display within a coupon editor and assign to coupons |
updateAutoApply | POST /coupon/auto_apply | Update auto apply rules and conditions |
updateCoupon | PUT /coupon/coupons/{coupon_oid} | Update a coupon |
updateCoupons | PUT /coupon/coupons/batch | Update multiple coupons |
uploadCouponCodes | POST /coupon/coupons/{coupon_oid}/upload_codes | Upload one-time codes for a coupon |
deleteCoupon(coupon_oid)
Delete a coupon
Delete a coupon on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_oid = 56; // Number | The coupon_oid to delete.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteCoupon(coupon_oid, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_oid | Number | The coupon_oid to delete. |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
deleteCouponsByCode(coupon_delete_request)
Deletes multiple coupons
Delete coupons on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_delete_request = new UltraCartRestApiV2.CouponDeletesRequest(); // CouponDeletesRequest | Coupon oids to delete
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteCouponsByCode(coupon_delete_request, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_delete_request | CouponDeletesRequest | Coupon oids to delete |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
deleteCouponsByOid(coupon_delete_request)
Deletes multiple coupons
Delete coupons on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_delete_request = new UltraCartRestApiV2.CouponDeletesRequest(); // CouponDeletesRequest | Coupon oids to delete
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteCouponsByOid(coupon_delete_request, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_delete_request | CouponDeletesRequest | Coupon oids to delete |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponExistsResponse doesCouponCodeExist(merchant_code)
Determines if a coupon merchant code already exists
Determines if a coupon merchant code already exists.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var merchant_code = "merchant_code_example"; // String | The coupon merchant code to examine.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.doesCouponCodeExist(merchant_code, callback);
Name | Type | Description | Notes |
---|---|---|---|
merchant_code | String | The coupon merchant code to examine. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponCodesResponse generateCouponCodes(coupon_oid, coupon_codes_request)
Generates one time codes for a coupon
Generate one time codes for a coupon
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_oid = 56; // Number | The coupon oid to generate codes.
var coupon_codes_request = new UltraCartRestApiV2.CouponCodesRequest(); // CouponCodesRequest | Coupon code generation parameters
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.generateCouponCodes(coupon_oid, coupon_codes_request, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_oid | Number | The coupon oid to generate codes. | |
coupon_codes_request | CouponCodesRequest | Coupon code generation parameters |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
CouponCodesResponse generateOneTimeCodesByMerchantCode(merchant_code, coupon_codes_request)
Generates one time codes by merchant code
Generate one time codes by merchant code
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var merchant_code = "merchant_code_example"; // String | The merchant code to generate one time codes.
var coupon_codes_request = new UltraCartRestApiV2.CouponCodesRequest(); // CouponCodesRequest | Coupon code generation parameters
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.generateOneTimeCodesByMerchantCode(merchant_code, coupon_codes_request, callback);
Name | Type | Description | Notes |
---|---|---|---|
merchant_code | String | The merchant code to generate one time codes. | |
coupon_codes_request | CouponCodesRequest | Coupon code generation parameters |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
CouponAutoApplyConditions getAutoApply()
Retrieve auto apply rules and conditions
Retrieve auto apply rules and conditions
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAutoApply(callback);
This endpoint does not need any parameter.
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponResponse getCoupon(coupon_oid, opts)
Retrieve a coupon
Retrieves a single coupon using the specified coupon profile oid.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_oid = 56; // Number | The coupon oid to retrieve.
var opts = {
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getCoupon(coupon_oid, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_oid | Number | The coupon oid to retrieve. | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponResponse getCouponByMerchantCode(merchant_code, opts)
Retrieve a coupon by merchant code
Retrieves a single coupon using the specified merchant code.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var merchant_code = "merchant_code_example"; // String | The coupon merchant code to retrieve.
var opts = {
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getCouponByMerchantCode(merchant_code, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
merchant_code | String | The coupon merchant code to retrieve. | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponsResponse getCoupons(opts)
Retrieve 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.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var opts = {
'merchant_code': "merchant_code_example", // String | Merchant code
'description': "description_example", // String | Description
'coupon_type': "coupon_type_example", // String | Coupon type
'start_date_begin': "start_date_begin_example", // String | Start date begin
'start_date_end': "start_date_end_example", // String | Start date end
'expiration_date_begin': "expiration_date_begin_example", // String | Expiration date begin
'expiration_date_end': "expiration_date_end_example", // String | Expiration date end
'affiliate_oid': 56, // Number | Affiliate oid
'exclude_expired': true, // Boolean | Exclude expired
'_limit': 100, // Number | The maximum number of records to return on this one API call. (Max 200)
'_offset': 0, // Number | Pagination of the record set. Offset is a zero based index.
'_sort': "_sort_example", // String | The sort order of the coupons. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getCoupons(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
merchant_code | String | Merchant code | [optional] |
description | String | Description | [optional] |
coupon_type | String | Coupon type | [optional] |
start_date_begin | String | Start date begin | [optional] |
start_date_end | String | Start date end | [optional] |
expiration_date_begin | String | Expiration date begin | [optional] |
expiration_date_end | String | Expiration date end | [optional] |
affiliate_oid | Number | Affiliate oid | [optional] |
exclude_expired | Boolean | Exclude expired | [optional] |
_limit | Number | The maximum number of records to return on this one API call. (Max 200) | [optional] [default to 100] |
_offset | Number | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
_sort | String | The sort order of the coupons. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. | [optional] |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponsResponse getCouponsByQuery(coupon_query, opts)
Retrieve coupons by 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.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_query = new UltraCartRestApiV2.CouponQuery(); // CouponQuery | Coupon query
var opts = {
'_limit': 100, // Number | The maximum number of records to return on this one API call. (Max 200)
'_offset': 0, // Number | Pagination of the record set. Offset is a zero based index.
'_sort': "_sort_example", // String | The sort order of the coupons. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getCouponsByQuery(coupon_query, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_query | CouponQuery | Coupon query | |
_limit | Number | The maximum number of records to return on this one API call. (Max 200) | [optional] [default to 100] |
_offset | Number | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
_sort | String | The sort order of the coupons. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. | [optional] |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponEditorValues getEditorValues()
Retrieve values needed for a coupon editor
Retrieve values needed for a coupon editor
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getEditorValues(callback);
This endpoint does not need any parameter.
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponResponse insertCoupon(coupon, opts)
Insert a coupon
Insert a coupon on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon = new UltraCartRestApiV2.Coupon(); // Coupon | Coupon to insert
var opts = {
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.insertCoupon(coupon, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon | Coupon | Coupon to insert | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
CouponsResponse insertCoupons(coupons_request, opts)
Insert multiple coupons
Insert multiple coupon on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupons_request = new UltraCartRestApiV2.CouponsRequest(); // CouponsRequest | Coupons to insert (maximum 50)
var opts = {
'_expand': "_expand_example", // String | The object expansion to perform on the result. See documentation for examples
'_placeholders': true // Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.insertCoupons(coupons_request, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupons_request | CouponsRequest | Coupons to insert (maximum 50) | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
_placeholders | Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
CouponItemSearchResultsResponse searchItems(opts)
Searches for items to display within a coupon editor and assign to coupons
Searches for items to display within a coupon editor and assign to coupons
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var opts = {
's': "s_example", // String |
'm': 56 // Number |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.searchItems(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
s | String | [optional] | |
m | Number | [optional] |
CouponItemSearchResultsResponse
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
updateAutoApply(conditions)
Update auto apply rules and conditions
Update auto apply rules and conditions
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var conditions = new UltraCartRestApiV2.CouponAutoApplyConditions(); // CouponAutoApplyConditions | Conditions
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateAutoApply(conditions, callback);
Name | Type | Description | Notes |
---|---|---|---|
conditions | CouponAutoApplyConditions | Conditions |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CouponResponse updateCoupon(coupon, coupon_oid, opts)
Update a coupon
Update a coupon on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon = new UltraCartRestApiV2.Coupon(); // Coupon | Coupon to update
var coupon_oid = 56; // Number | The coupon_oid to update.
var opts = {
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.updateCoupon(coupon, coupon_oid, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon | Coupon | Coupon to update | |
coupon_oid | Number | The coupon_oid to update. | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
CouponsResponse updateCoupons(coupons_request, opts)
Update multiple coupons
Update multiple coupon on the UltraCart account.
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupons_request = new UltraCartRestApiV2.CouponsRequest(); // CouponsRequest | Coupons to update (synchronous maximum 50 / asynchronous maximum 100)
var opts = {
'_expand': "_expand_example", // String | The object expansion to perform on the result. See documentation for examples
'_placeholders': true, // Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
'_async': true // Boolean | True if the operation should be run async. No result returned
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.updateCoupons(coupons_request, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupons_request | CouponsRequest | Coupons to update (synchronous maximum 50 / asynchronous maximum 100) | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
_placeholders | Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
_async | Boolean | True if the operation should be run async. No result returned | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
UploadCouponCodesResponse uploadCouponCodes(coupon_oid, upload_coupon_codes_request)
Upload one-time codes for a coupon
Upload one-time codes for a coupon
var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.CouponApi();
var coupon_oid = 56; // Number | The coupon oid to associate with the provided one-time codes.
var upload_coupon_codes_request = new UltraCartRestApiV2.UploadCouponCodesRequest(); // UploadCouponCodesRequest | One-time coupon codes
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.uploadCouponCodes(coupon_oid, upload_coupon_codes_request, callback);
Name | Type | Description | Notes |
---|---|---|---|
coupon_oid | Number | The coupon oid to associate with the provided one-time codes. | |
upload_coupon_codes_request | UploadCouponCodesRequest | One-time coupon codes |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json