Skip to main content

SDKs & libraries

The Retail Digitals Image API is a plain REST + JSON service — you don't need an SDK. But if you'd like a batteries-included client, drop one of the wrappers below into your project.

Official reference clients

We ship reference implementations (not full SDKs) in three languages. They handle:

  • Access-token exchange, caching, and automatic refresh
  • Bearer header injection on every request
  • Retries with exponential backoff on 429, 5xx
  • Typed responses (where the language allows)

Status: Reference implementations are copy-paste ready and battle-tested by our own internal tools. They are not published to package registries — copy them into your project and adapt.

Roadmap: Published npm / Packagist / PyPI packages targeted for late Q3 2026 alongside the Go and Ruby reference clients.

JavaScript / TypeScript

Full source: Authentication → Client wrapper

# no install — this is a single file you drop into your project
curl -o rd-image-client.ts https://images.retaildigitals.com/developers/downloads/rd-image-client.ts
import { RDImageClient } from './rd-image-client';

const client = new RDImageClient({
clientId: process.env.RD_CLIENT_ID!,
apiKey: process.env.RD_API_KEY!,
});

const product = await client.getProduct('017000161563');
console.log(product.product_meta.brand);

PHP (Laravel-friendly)

Full source: Authentication → PHP client

curl -o RDImageClient.php https://images.retaildigitals.com/developers/downloads/RDImageClient.php
$client = new RDImageClient(
clientId: env('RD_CLIENT_ID'),
apiKey: env('RD_API_KEY'),
);

$product = $client->getProduct('017000161563');
echo $product['product_meta']['brand'];

Python

Full source: Authentication → Python client

curl -o rd_image_client.py https://images.retaildigitals.com/developers/downloads/rd_image_client.py
from rd_image_client import RDImageClient

client = RDImageClient(
client_id=os.environ['RD_CLIENT_ID'],
api_key=os.environ['RD_API_KEY'],
)

product = client.get_product('017000161563')
print(product['product_meta']['brand'])

Community libraries

The wrappers below are maintained by the community — we don't test them ourselves but list them as a courtesy. If yours belongs here, PR against github.com/retaildigitals/dev-portal.

LanguagePackageAuthorNotes
Community submissions welcomeSlot open

OpenAPI spec — generate your own

The full OpenAPI 3.0 spec drives our reference docs. You can point any OpenAPI-aware code generator at it to build a client for any language:

# Go
openapi-generator-cli generate -i openapi.yaml -g go -o rd-image-go

# Rust
openapi-generator-cli generate -i openapi.yaml -g rust -o rd-image-rust

# C# / .NET
openapi-generator-cli generate -i openapi.yaml -g csharp-netcore -o rd-image-csharp

# Java
openapi-generator-cli generate -i openapi.yaml -g java -o rd-image-java

Note: generated clients cover request/response shapes but do not handle token exchange + refresh automatically. Wrap the generated client with a token-management layer — see the reference implementations above for the pattern.

Which client should I use?

Use the reference implementations if:

  • You're on JS, PHP, or Python
  • You want the fastest path to working code
  • You want proven retry, refresh, and error handling behavior

Generate from OpenAPI if:

  • You're on Go, Rust, C#, Java, or another typed language
  • You care more about type safety than convenience
  • You already have a token-management layer in your stack

Write your own if:

  • You need custom behavior (custom retry, custom caching, request signing)
  • You're on an unusual runtime (embedded, edge, WASM)
  • The curl + JSON dance is trivially small (fewer than ~5 endpoints called)

What we don't ship (yet)

  • Mobile SDKs (iOS / Android). If you need offline-first image caching on device, the API works fine from mobile — but there's no wrapping SDK yet.
  • CLI tool for interactive exploration. curl + httpie do the job.
  • WebHooks / event stream. Product data changes trigger no callbacks — poll /usage or products/{barcode} diffs.