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.
| Language | Package | Registry | Guide |
|---|---|---|---|
| JavaScript (Node.js) | ultra_cart_rest_api_v2 | npm | JavaScript SDK |
| TypeScript | ultracart_rest_api_v2_typescript | npm | TypeScript SDK |
| Python | ultracart-rest-sdk | PyPI | Python SDK |
| PHP | ultracart/rest_api_v2_sdk_php | Packagist | PHP SDK |
| Java | com.ultracart:rest-sdk | Maven Central | Java SDK |
| C# | com.ultracart.admin.v2 | NuGet | C# SDK |
| Ruby | ultracart_api | RubyGems | Ruby 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
| Language | Repository |
|---|---|
| JavaScript | rest_api_v2_sdk_javascript |
| TypeScript | rest_api_v2_sdk_typescript |
| Python | rest_api_v2_sdk_python |
| PHP | rest_api_v2_sdk_php |
| Java | rest_api_v2_sdk_java |
| C# | rest_api_v2_sdk_csharp |
| Ruby | rest_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, andAutoOrdermodel instances the JavaScript SDK produces. Built for bulk reads, where the REST API would be slow.
Related
- 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.