Registry / ecommerce / ultra_cart_rest_api_v2

ultra_cart_rest_api_v2

JSON →
library4.1.100jsnpmunverified

UltraCartRestApiV2 is the official JavaScript/TypeScript client for UltraCart REST API Version 2. Current stable version is 4.1.100, released via npm and automatically generated by OpenAPI Generator. It supports both Node.js and browser environments (via bundlers). The SDK covers all UltraCart API endpoints for order management, customer profiles, items, and more, with optional expansion parameters to control payload size. Key differentiator: full coverage of UltraCart's REST API with ready-to-use API clients (OrderApi, CustomerApi, etc.) and examples for every call.

npm install ultra_cart_rest_api_v2
INSTALL
IMPORT
SIG · ULTRA_CART_REST_AP
U
ultra_cart_rest_api_v2
ecommercejavascriptv4.1.100
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OrderApi
import { OrderApi } from 'ultra_cart_rest_api_v2';
const OrderApi = require('ultra_cart_rest_api_v2').OrderApi;
This is a named export. The SDK may be ESM or CommonJS depending on the package configuration; the import statement works in both if using a bundler.
CustomerApi
import { CustomerApi } from 'ultra_cart_rest_api_v2';
import CustomerApi from 'ultra_cart_rest_api_v2';
CustomerApi is a named export, not a default export.
ApiClient
import { ApiClient } from 'ultra_cart_rest_api_v2';
import { ApiClient } from 'ultra_cart_rest_api_v2/src/ApiClient';
ApiClient is re-exported from the top-level module; do not reference internal paths.

Demonstrates how to import and use the OrderApi to fetch a single order with specified expansion fields.

import { OrderApi, ApiClient } from 'ultra_cart_rest_api_v2'; const apiClient = ApiClient.instance; const orderApi = new OrderApi(apiClient); const orderId = 'DEMO-0009104390'; const expansion = 'item,summary,billing,shipping,shipping.tracking_number_details'; try { const apiResponse = await new Promise((resolve, reject) => { orderApi.getOrder(orderId, { _expand: expansion }, (error, data, response) => { if (error) reject(error); else resolve(data); }); }); console.log(JSON.stringify(apiResponse.order, null, 2)); } catch (error) { console.error('Error:', error); }
Debug
Known issues
gotchaAPI calls use callbacks, not Promises natively. Must wrap in Promise for async/await.
fix
Wrap in new Promise as shown in quickstart example.
affects: all
gotchaExpansion parameter must be passed as { _expand: 'value' } not { expand: 'value' }.
fix
Use { _expand: 'item,summary,...' } in the options object.
affects: >=2.0.0
deprecatedApiClient.instance may be deprecated in future versions; prefer creating a new instance with configuration.
fix
Use new ApiClient() and set basePath, apiKey, etc.
affects: >=4.0.0
gotchaThe SDK may require disabling AMD in Webpack due to 'Module not found: Error: Cannot resolve module'.
fix
Add module: { rules: [ { parser: { amd: false } } ] } to Webpack config.
affects: all
Errors
Common errors & fixes
Module not found: Error: Cannot resolve module 'superagent'
Missing superagent dependency when using not from npm (e.g., CDN or direct file include).
fix
Install via npm: npm install superagent --save
TypeError: orderApi.getOrder is not a function
Importing or instantiating OrderApi incorrectly, e.g., using default import or calling as static method.
fix
Use import { OrderApi } from 'ultra_cart_rest_api_v2' and create instance: const orderApi = new OrderApi(ApiClient.instance);
Upgrade
Version history
4.1.100latest on npm
Audit
Dependencies
superagentrequiredHTTP client used for API calls (included as dependency)
querystringrequiredUsed for query string serialization
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
ultra_cart_rest_api_v2 — npm install ultra_cart_rest_api_v2 · libregistry