Skip to main content
Reference

SDKs & Samples

Seven official SDKs wrap the UltraCart REST API. Each one is generated from the same OpenAPI specification that produces the API reference, so the method names, model properties, and expansion fields on this site match the ones in your editor.

The current SDK version is 4.1.129. Every language ships that version, and they are released together.

Available SDKs

Each guide covers installation, authentication, and a first working call.

LanguagePackageRegistryGuide
JavaScript (Node.js)ultra_cart_rest_api_v2npmJavaScript SDK
TypeScriptultracart_rest_api_v2_typescriptnpmTypeScript SDK
Pythonultracart-rest-sdkPyPIPython SDK
PHPultracart/rest_api_v2_sdk_phpPackagistPHP SDK
Javacom.ultracart:rest-sdkMaven CentralJava SDK
C#com.ultracart.admin.v2NuGetC# SDK
Rubyultracart_apiRubyGemsRuby SDK

The Python package installs as ultracart-rest-sdk but imports as ultracart. The Ruby gem installs as ultracart_api and exposes the UltracartClient module.

Source repositories

LanguageRepository
JavaScriptrest_api_v2_sdk_javascript
TypeScriptrest_api_v2_sdk_typescript
Pythonrest_api_v2_sdk_python
PHPrest_api_v2_sdk_php
Javarest_api_v2_sdk_java
C#rest_api_v2_sdk_csharp
Rubyrest_api_v2_sdk_ruby
JavaScript (BigQuery)rest_api_v2_sdk_javascript_bigquery

The organization also hosts Go, Haskell, and Clojure clients. All three were last updated in 2016, none has a published package, and none tracks the current API. Treat them as unmaintained.

The API version header

Every request carries an X-UltraCart-Api-Version header, currently 2017-03-01. See Versioning for what the header controls.

Four SDKs set it for you inside their convenience constructor: Java, C#, PHP, and Ruby. The JavaScript, TypeScript, and Python SDKs require it as part of client setup, and a request without it fails. Each language guide above shows the correct setup for that SDK.

Code samples

Every operation in the REST API has a hand-written sample in the UltraCart/sdk_samples repository, covering C#, Java, JavaScript, PHP, Python, Ruby, TypeScript, and cURL.

Those files are the same ones rendered in the per-language tabs on each API reference page, so a sample in the repository and a sample on this site are never two different versions of the same code. API Samples indexes the repository by API category.

Extensions

Beyond the REST API wrappers, one companion package reads the same objects from a different source:

  • BigQuery Data Warehouse SDK for Node.js. Runs SQL against your UltraCart data warehouse and returns the same Order, Customer, and AutoOrder model instances the JavaScript SDK produces. Built for bulk reads, where the REST API would be slow.
  • Quickstart for the shortest path to a first authenticated call.
  • Essentials for authentication, pagination, expansion, errors, and rate limits, which apply to every SDK.
  • Creating a Simple Key for the credential each guide expects.
  • StoreFront Development if you are building a Velocity theme rather than programming against the REST API. The SDKs do not apply there.
Was this page helpful?