All URIs are relative to https://secure.ultracart.com/rest/v2
| Method | HTTP request | Description |
|---|---|---|
| deleteAllGatedCodes | DELETE /item/items/{merchant_item_oid}/gated_codes | Delete all gated access codes for an item |
| deleteDigitalItem | DELETE /item/digital_library/{digital_item_oid} | Delete a digital item, which is a file within the digital library, not an actual merchant item |
| deleteGatedCode | DELETE /item/items/{merchant_item_oid}/gated_codes/{merchant_item_gated_code_oid} | Delete a gated access code by OID |
| deleteItem | DELETE /item/items/{merchant_item_oid} | Delete an item |
| deleteReview | DELETE /item/items/{merchant_item_oid}/reviews/{review_oid} | Delete a review |
| generateGatedCodes | POST /item/items/{merchant_item_oid}/gated_codes/generate | Generate a batch of gated access codes |
| getDigitalItem | GET /item/digital_library/{digital_item_oid} | Retrieve a digital item from the digital library, which are digital files that may be attached to normal items |
| getDigitalItems | GET /item/digital_library | Retrieve digital items from the digital library which are digital files that may be attached to normal items |
| getDigitalItemsByExternalId | GET /item/digital_library/by_external/{external_id} | Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id |
| getGatedCodes | GET /item/items/{merchant_item_oid}/gated_codes | Get gated access codes for an item |
| getInventorySnapshot | GET /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response. |
| getItem | GET /item/items/{merchant_item_oid} | Retrieve an item |
| getItemByMerchantItemId | GET /item/items/merchant_item_id/{merchant_item_id} | Retrieve an item by item id |
| getItems | GET /item/items | Retrieve items |
| getPricingTiers | GET /item/pricing_tiers | Retrieve pricing tiers |
| getReview | GET /item/items/{merchant_item_oid}/reviews/{review_oid} | Get a review |
| getReviews | GET /item/items/{merchant_item_oid}/reviews | Get reviews for an item |
| getUnassociatedDigitalItems | GET /item/digital_library/unassociated | Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items |
| insertDigitalItem | POST /item/digital_library | Create a file within the digital library |
| insertGatedCode | POST /item/items/{merchant_item_oid}/gated_codes | Add a single gated access code to an item |
| insertItem | POST /item/items | Create an item |
| insertReview | POST /item/items/{merchant_item_oid}/reviews | Insert a review |
| insertUpdateItemContentAttribute | POST /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute |
| replaceGatedCodes | PUT /item/items/{merchant_item_oid}/gated_codes | Replace the full list of gated access codes for an item |
| updateDigitalItem | PUT /item/digital_library/{digital_item_oid} | Updates a file within the digital library |
| updateItem | PUT /item/items/{merchant_item_oid} | Update an item |
| updateItems | PUT /item/items/batch | Update multiple items |
| updateReview | PUT /item/items/{merchant_item_oid}/reviews/{review_oid} | Update a review |
| uploadTemporaryMultimedia | POST /item/temp_multimedia | Upload an image to the temporary multimedia. |
BaseResponse deleteAllGatedCodes(merchant_item_oid)
Delete all gated access codes for an item
Removes every gated access code currently configured for the item.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid.
apiInstance.deleteAllGatedCodes(merchant_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
deleteDigitalItem(digital_item_oid)
Delete a digital item, which is a file within the digital library, not an actual merchant item
Delete a digital item on the UltraCart account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let digital_item_oid = 56; // Number | The digital item oid to delete.
apiInstance.deleteDigitalItem(digital_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| digital_item_oid | Number | The digital item oid to delete. |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
BaseResponse deleteGatedCode(merchant_item_oid, merchant_item_gated_code_oid)
Delete a gated access code by OID
Delete a specific gated access code by its OID.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid.
let merchant_item_gated_code_oid = 56; // Number | The gated code oid.
apiInstance.deleteGatedCode(merchant_item_oid, merchant_item_gated_code_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid. | |
| merchant_item_gated_code_oid | Number | The gated code oid. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
deleteItem(merchant_item_oid)
Delete an item
Delete an item on the UltraCart account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid to delete.
apiInstance.deleteItem(merchant_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid to delete. |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
deleteReview(review_oid, merchant_item_oid)
Delete a review
Delete an item review.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let review_oid = 56; // Number | The review oid to delete.
let merchant_item_oid = 56; // Number | The item oid the review is associated with.
apiInstance.deleteReview(review_oid, merchant_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| review_oid | Number | The review oid to delete. | |
| merchant_item_oid | Number | The item oid the review is associated with. |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemGatedCodesResponse generateGatedCodes(merchant_item_oid, generate_request)
Generate a batch of gated access codes
Returns randomly generated codes using a profanity-safe charset (vowel-free, 0/1 removed). Codes are NOT persisted; submit them via PUT or POST to commit.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid.
let generate_request = new UltraCartRestApiV2.ItemGenerateGatedCodesRequest(); // ItemGenerateGatedCodesRequest | Generate request.
apiInstance.generateGatedCodes(merchant_item_oid, generate_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid. | |
| generate_request | ItemGenerateGatedCodesRequest | Generate request. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
ItemDigitalItemResponse getDigitalItem(digital_item_oid)
Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let digital_item_oid = 56; // Number | The digital item oid to retrieve.
apiInstance.getDigitalItem(digital_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| digital_item_oid | Number | The digital item oid to retrieve. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemDigitalItemsResponse getDigitalItems(opts)
Retrieve digital items from the digital library which are digital files that may be attached to normal items
Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let opts = {
'_limit': 100, // Number | The maximum number of records to return on this one API call. (Default 100, Max 2000)
'_offset': 0, // Number | Pagination of the record set. Offset is a zero based index.
'_since': "_since_example", // String | Fetch items that have been created/modified since this date/time.
'_sort': "_sort_example", // String | The sort order of the items. 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
'_placeholders': true // Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
};
apiInstance.getDigitalItems(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| _limit | Number | The maximum number of records to return on this one API call. (Default 100, Max 2000) | [optional] [default to 100] |
| _offset | Number | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
| _since | String | Fetch items that have been created/modified since this date/time. | [optional] |
| _sort | String | The sort order of the items. 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] |
| _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: Not defined
- Accept: application/json
ItemDigitalItemsResponse getDigitalItemsByExternalId(external_id)
Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id
Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let external_id = "external_id_example"; // String | The external id to match against.
apiInstance.getDigitalItemsByExternalId(external_id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| external_id | String | The external id to match against. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemGatedCodesResponse getGatedCodes(merchant_item_oid)
Get gated access codes for an item
Retrieve all unredeemed gated access codes configured for an item.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid.
apiInstance.getGatedCodes(merchant_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemInventorySnapshotResponse getInventorySnapshot()
Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
apiInstance.getInventorySnapshot((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});This endpoint does not need any parameter.
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemResponse getItem(merchant_item_oid, opts)
Retrieve an item
Retrieves a single item using the specified item oid.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid to retrieve.
let 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.
};
apiInstance.getItem(merchant_item_oid, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid to retrieve. | |
| _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: Not defined
- Accept: application/json
ItemResponse getItemByMerchantItemId(merchant_item_id, opts)
Retrieve an item by item id
Retrieves a single item using the specified item id.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_id = "merchant_item_id_example"; // String | The item id to retrieve.
let 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.
};
apiInstance.getItemByMerchantItemId(merchant_item_id, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_id | String | The item id to retrieve. | |
| _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: Not defined
- Accept: application/json
ItemsResponse getItems(opts)
Retrieve items
Retrieves a group of items from the account. If no parameters are specified, all items 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 ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let opts = {
'parent_category_id': 56, // Number | The parent category object id to retrieve items for. Unspecified means all items on the account. 0 = root
'parent_category_path': "parent_category_path_example", // String | The parent category path to retrieve items for. Unspecified means all items on the account. / = root
'_limit': 100, // Number | The maximum number of records to return on this one API call. (Default 100, Max 2000)
'_offset': 0, // Number | Pagination of the record set. Offset is a zero based index.
'_since': "_since_example", // String | Fetch items that have been created/modified since this date/time.
'_sort': "_sort_example", // String | The sort order of the items. 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
'_placeholders': true // Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
};
apiInstance.getItems(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| parent_category_id | Number | The parent category object id to retrieve items for. Unspecified means all items on the account. 0 = root | [optional] |
| parent_category_path | String | The parent category path to retrieve items for. Unspecified means all items on the account. / = root | [optional] |
| _limit | Number | The maximum number of records to return on this one API call. (Default 100, Max 2000) | [optional] [default to 100] |
| _offset | Number | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
| _since | String | Fetch items that have been created/modified since this date/time. | [optional] |
| _sort | String | The sort order of the items. 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] |
| _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: Not defined
- Accept: application/json
PricingTiersResponse getPricingTiers(opts)
Retrieve pricing tiers
Retrieves the pricing tiers
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let opts = {
'_expand': "_expand_example" // String | The object expansion to perform on the result. See documentation for examples
};
apiInstance.getPricingTiers(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| _expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemReviewResponse getReview(review_oid, merchant_item_oid)
Get a review
Retrieve an item review.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let review_oid = 56; // Number | The review oid to retrieve.
let merchant_item_oid = 56; // Number | The item oid the review is associated with.
apiInstance.getReview(review_oid, merchant_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| review_oid | Number | The review oid to retrieve. | |
| merchant_item_oid | Number | The item oid the review is associated with. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemReviewsResponse getReviews(merchant_item_oid)
Get reviews for an item
Retrieve item reviews.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid the review is associated with.
apiInstance.getReviews(merchant_item_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid the review is associated with. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
ItemDigitalItemsResponse getUnassociatedDigitalItems(opts)
Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items
Retrieves a group of digital items (file information) from the account that are not yet associated with any actual items. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let opts = {
'_limit': 100, // Number | The maximum number of records to return on this one API call. (Default 100, Max 2000)
'_offset': 0, // Number | Pagination of the record set. Offset is a zero based index.
'_since': "_since_example", // String | Fetch items that have been created/modified since this date/time.
'_sort': "_sort_example", // String | The sort order of the items. 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
'_placeholders': true // Boolean | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
};
apiInstance.getUnassociatedDigitalItems(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| _limit | Number | The maximum number of records to return on this one API call. (Default 100, Max 2000) | [optional] [default to 100] |
| _offset | Number | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
| _since | String | Fetch items that have been created/modified since this date/time. | [optional] |
| _sort | String | The sort order of the items. 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] |
| _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: Not defined
- Accept: application/json
ItemDigitalItemResponse insertDigitalItem(digital_item)
Create a file within the digital library
Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let digital_item = new UltraCartRestApiV2.ItemDigitalItem(); // ItemDigitalItem | Digital item to create
apiInstance.insertDigitalItem(digital_item, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| digital_item | ItemDigitalItem | Digital item to create |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
ItemGatedCodeResponse insertGatedCode(merchant_item_oid, gated_code)
Add a single gated access code to an item
Insert a single gated access code; the server assigns the OID and created_dts.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid.
let gated_code = new UltraCartRestApiV2.ItemGatedCode(); // ItemGatedCode | Gated code to insert.
apiInstance.insertGatedCode(merchant_item_oid, gated_code, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid. | |
| gated_code | ItemGatedCode | Gated code to insert. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
ItemResponse insertItem(item, opts)
Create an item
Create a new item on the UltraCart account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let item = new UltraCartRestApiV2.Item(); // Item | Item to create
let 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.
};
apiInstance.insertItem(item, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| item | Item | Item to create | |
| _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
ItemReviewResponse insertReview(merchant_item_oid, review)
Insert a review
Insert a item review.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid the review is associated with.
let review = new UltraCartRestApiV2.ItemReview(); // ItemReview | Review to insert
apiInstance.insertReview(merchant_item_oid, review, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid the review is associated with. | |
| review | ItemReview | Review to insert |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
insertUpdateItemContentAttribute(merchant_item_oid, item_attribute)
Upsert an item content attribute
Update an item content attribute, creating it new if it does not yet exist.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid to modify.
let item_attribute = new UltraCartRestApiV2.ItemContentAttribute(); // ItemContentAttribute | Item content attribute to upsert
apiInstance.insertUpdateItemContentAttribute(merchant_item_oid, item_attribute, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid to modify. | |
| item_attribute | ItemContentAttribute | Item content attribute to upsert |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
ItemGatedCodesResponse replaceGatedCodes(merchant_item_oid, gated_codes_request)
Replace the full list of gated access codes for an item
Existing codes not present in the request body are deleted. New codes are inserted. Unchanged codes preserve their OID and created_dts.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid.
let gated_codes_request = new UltraCartRestApiV2.ItemGatedCodesRequest(); // ItemGatedCodesRequest | Codes to replace the existing list with.
apiInstance.replaceGatedCodes(merchant_item_oid, gated_codes_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid. | |
| gated_codes_request | ItemGatedCodesRequest | Codes to replace the existing list with. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
ItemDigitalItemResponse updateDigitalItem(digital_item_oid, digital_item)
Updates a file within the digital library
Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let digital_item_oid = 56; // Number | The digital item oid to update.
let digital_item = new UltraCartRestApiV2.ItemDigitalItem(); // ItemDigitalItem | Digital item to update
apiInstance.updateDigitalItem(digital_item_oid, digital_item, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| digital_item_oid | Number | The digital item oid to update. | |
| digital_item | ItemDigitalItem | Digital item to update |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
ItemResponse updateItem(merchant_item_oid, item, opts)
Update an item
Update a new item on the UltraCart account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let merchant_item_oid = 56; // Number | The item oid to update.
let item = new UltraCartRestApiV2.Item(); // Item | Item to update
let 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.
};
apiInstance.updateItem(merchant_item_oid, item, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| merchant_item_oid | Number | The item oid to update. | |
| item | Item | Item to update | |
| _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
ItemsResponse updateItems(items_request, opts)
Update multiple items
Update multiple item on the UltraCart account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let items_request = new UltraCartRestApiV2.ItemsRequest(); // ItemsRequest | Items to update (synchronous maximum 20 / asynchronous maximum 100)
let 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
};
apiInstance.updateItems(items_request, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| items_request | ItemsRequest | Items to update (synchronous maximum 20 / 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
ItemReviewResponse updateReview(review_oid, merchant_item_oid, review)
Update a review
Update an item review.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let review_oid = 56; // Number | The review oid to update.
let merchant_item_oid = 56; // Number | The item oid the review is associated with.
let review = new UltraCartRestApiV2.ItemReview(); // ItemReview | Review to update
apiInstance.updateReview(review_oid, merchant_item_oid, review, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| review_oid | Number | The review oid to update. | |
| merchant_item_oid | Number | The item oid the review is associated with. | |
| review | ItemReview | Review to update |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
TempMultimediaResponse uploadTemporaryMultimedia(file)
Upload an image to the temporary multimedia.
Uploads an image and returns back meta information about the image as well as the identifier needed for the item update.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.ItemApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let file = "/path/to/file"; // File | File to upload
apiInstance.uploadTemporaryMultimedia(file, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| file | File | File to upload |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: multipart/form-data
- Accept: application/json