MiddleX API reference (1.0.0)

Download OpenAPI specification:Download

MiddleX API support: support@futureshop.com.au

Future Shop, powered by MiddleX. This is the reference for the integration API that your systems call.

The MiddleX ZKONG API pushes product data to ZKONG electronic shelf labels and reports, for every product, what was applied and what was refused.

Authentication

Every endpoint requires an OAuth2 client-credentials Bearer token, except GET /health and POST /get-token themselves.

  1. Call POST /get-token with your Auth0 client_id and client_secret to obtain an access token.
  2. Send it as Authorization: Bearer <token> on every other request.

Tokens are verified (RS256, against Auth0's published signing keys, with issuer, audience and expiry all checked) against the audience configured for the environment you are calling. Your MiddleX contact supplies your client credentials and the audience for each environment.

Merchant-mapping prerequisite (onboarding, not a request field)

A client's Auth0 M2M client_id must be mapped, out of band, to a merchant (and optionally a store) before it can call POST /products or POST /products/extended. There is no request field for this: tenant scoping is resolved exclusively from the authenticated token's client-to-merchant mapping, looked up inside the service's authentication layer, specifically to prevent merchant/agency spoofing via the request body.

The mapping must resolve to exactly one merchant. A client_id that cannot be attributed to a single tenant is refused; the service does not pick one of the candidates. A mapping problem therefore fails in one of four ways:

  • The service's authentication layer rejects every authenticated route (not just /products*) with 403 {"error":"access_denied","message":"Client credentials not authorized"} if the client_id has no mapping at all.

  • 403 {"error":"access_denied","message":"Client credentials not authorized: mapping is incomplete"} if the client_id is mapped but the mapping did not resolve to a merchant that exists and has not been deleted, or, where the mapping designates a store, did not resolve to a store that merchant owns and that has not been deleted. Five conditions produce this. It names a merchant that does not exist; the mapping row changed while the request was being authorised; it names a store its own merchant does not own, which is refused rather than served as a merchant-wide mapping, because merchant-wide is broader than the store-scoped mapping the client was provisioned with; the merchant it names has been deleted; or the store it names has been deleted, refused on the same terms, whether or not the request names a storeId. A provisioning state on our side, not something the caller can correct.

  • 403 {"error":"access_denied","message":"Client credentials not authorized: mapping is ambiguous"} if the mapping does not establish exactly one tenant. Two conditions produce this. Either the client_id is mapped more than once and the mappings disagree on which tenant to serve; or it is mapped so many times that the service cannot establish that the mappings agree, and so does not assume they do. The request is refused rather than served against a guess. Ask support to correct the mapping.

    Duplicate mappings that all name the same merchant and the same store are served normally, up to a limit. A client_id mapped many times beyond it is refused as ambiguous even though the mappings agree. A client provisioned that many times is a provisioning defect to fix, not a supported configuration. Ask support to remove the duplicates.

  • If a token reaches a /products* route with no merchant mapping (for example a user token), the service rejects with 403 {"error":"Forbidden","code":"MERCHANT_MAPPING_REQUIRED",...}.

All three access_denied shapes are retried in vain: they are provisioning states, not transient failures. Contact support to configure the mapping before integrating.

Data-loss-relevant: an omitted field is CLEARED, not preserved

Every push on this API is sent to ZKONG with emptyNeedDelete=1. Under that setting ZKONG clears every field the request does not carry a value for: a field sent as an explicit empty string ("") and a field omitted from the request are both cleared from the label. An omitted field does NOT mean "no change". Send every field you want ZKONG to keep, with its value, on every request; a partial payload is accepted, and each field it leaves out is wiped.

"Leaves out" means absent from the item as MiddleX sends it, which is not always the same as absent from your request. Some fields are defaulted or derived before the push, as each field's own description below says: for example attrCategory/attrName take a default, price can fall back to originalPrice, and memberPrice can be synthesised when the merchant's member-price substitution is on. A field MiddleX fills in is sent, with the value MiddleX gave it, and is not cleared.

The priceOmissions response schema below describes the same behaviour.

custFeature1-custFeature50 differ by endpoint:

  • POST /products/extended: an explicit "" on a custFeature field is passed through to ZKONG rather than stripped, so it clears that field; an omitted one is cleared too. Do not send "" for a field, or leave it out, unless you intend to delete its current value.
  • POST /products (core): every custFeature field is discarded before the push, whatever the request carried, so none is sent to ZKONG. Under the rule above, a field the request does not carry is cleared, so a core push should be expected to clear custom features set earlier through the extended endpoint.

Non-blocking truncation warnings

Any string field over its documented maxLength is clamped (not rejected) before being sent to ZKONG, and reported back as a severity: "warning" entry, not a severity: "error" entry, in the per-product data[].validation/processingErrors payload. The clamped value is still synced.

Rate limiting is environment-gated

POST /products and POST /products/extended are rate-limited only where rate limiting is enabled for the environment you are calling. Where it is not enabled, no rate limiting is applied at all, so do not assume 429 is always a reachable response.

Health

Unauthenticated health/status probe.

Unauthenticated health check

Returns a static, unauthenticated liveness signal for the ZKONG API: overall status, the current server timestamp, the API version, and the converter's field-support counts (23 core, 50 extended, 73 total). It deliberately exposes no uptime or internal metrics. Use it for load-balancer and uptime probes; it never requires a token.

Responses

Response samples

Content type
application/json
{
  • "status": "healthy",
  • "timestamp": "2026-07-03T00:00:00.000Z",
  • "api": {
    },
  • "converter": {
    }
}

Auth

Auth0 machine-to-machine token exchange.

Exchange Auth0 client credentials for an access token

Thin proxy to Auth0's own client-credentials /oauth/token endpoint. On success the entire Auth0 response body is forwarded verbatim: this API does not set or normalise token_type/expires_in/access_token itself, so treat the response schema below as indicative of what Auth0 typically returns for this grant type, not as a contract this API enforces.

Request Body schema: application/json
required
client_id
required
string

The Auth0 M2M application's client id.

client_secret
required
string

The Auth0 M2M application's client secret.

audience
string

Optional. Defaults to the audience configured for the environment if omitted.

Responses

Request samples

Content type
application/json
{
  • "client_id": "exampleClientId0123456789abcdef",
  • "client_secret": "example-client-secret-do-not-use"
}

Response samples

Content type
application/json
{
  • "access_token": "eyJ...example.not.a.real.token",
  • "token_type": "Bearer",
  • "expires_in": 86400,
  • "scope": ""
}

Status

Authenticated API/environment status.

Authenticated API and environment status

Returns authenticated API and environment status: the API version, the enabled feature flags, a fixed endpoint map, and a sanitised system-health block (overall status plus the connectivity of each backing service the API depends on). Use it as an authenticated readiness/diagnostics check; unlike GET /health it requires a Bearer token, and it deliberately omits uptime and environment name.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "api": {
    },
  • "features": {
    },
  • "endpoints": {
    },
  • "system": {
    }
}

Products

Push product data to ZKONG electronic shelf labels.

Push products using the 23 core ZKONG fields

Batch cap: 5000 products per request. A larger batch is refused with a message that begins products array cannot exceed 5000 items per request. Every accepted product is validated for the 3 required fields (barCode/attrCategory/attrName, the latter two defaulted to "default" if absent) before being queued for push.

Authorizations:
BearerAuth
Request Body schema: application/json
required
required
Array of objects (ProductInput) [ 1 .. 5000 ] items

The products to push (1-5000 per request).

storeId
string

Mutually exclusive with store (400 if both are given). Must match the authenticated token's store scope if the token is store-scoped.

object
Deprecated

Legacy. Mutually exclusive with storeId (400 if both are given). Accepted and type-checked, but has no effect.

object

Accepted but intentionally ignored for tenant scoping. Merchant (and agency) context always comes from the authenticated M2M token's client-to-merchant mapping, to prevent cross-tenant spoofing via the request body.

Responses

Request samples

Content type
application/json
{
  • "products": [
    ],
  • "storeId": "example-store-001"
}

Response samples

Content type
application/json
{
  • "requestId": "req-1751500800000",
  • "processed": 1,
  • "errors": 0,
  • "timestamp": "2026-07-03T00:00:00.000Z",
  • "data": [
    ],
  • "pushResult": {
    }
}

Push products using the 23 core + up to 50 extended (custFeature1-50) ZKONG fields

Batch cap: 1000 products per request (stricter than /products because of the larger custFeature1-custFeature50 payload per item). Response includes fieldSupport reporting the field counts this deployment actually enforces.

Authorizations:
BearerAuth
Request Body schema: application/json
required
required
Array of objects (ProductInput) [ 1 .. 1000 ] items

The products to push (1-1000 per request; stricter cap than /products due to the larger per-item payload).

storeId
string

Mutually exclusive with store (400 if both are given).

object
Deprecated

Legacy; see CoreProductsRequest.store.

object

Accepted but ignored for tenant scoping; see CoreProductsRequest.merchant.

object

Optional semantic field-mapping hint. Unrecognized client values fall back to generic mapping without error.

Responses

Request samples

Content type
application/json
{
  • "products": [
    ],
  • "clientConfig": {
    },
  • "storeId": "example-store-001"
}

Response samples

Content type
application/json
{
  • "requestId": "req-1751500800000",
  • "processed": 1,
  • "errors": 0,
  • "fieldSupport": {
    },
  • "timestamp": "2026-07-03T00:00:00.000Z",
  • "data": [
    ],
  • "pushResult": {
    }
}

Configuration

Client-specific field-mapping configuration.

List the field-mapping configurations available to the calling client

Lists the configurations THIS caller may use: the generic default, which every client may use, plus the caller's own specialised configuration if its merchant resolves to one. Another client's specialised configuration is never listed. Each entry carries its display name, field-support counts and feature list, and defaultClient (generic) names the configuration applied when none is selected. The map is fixed in the service, not read from a datastore. Use it to discover the valid clientConfig.client values before pushing extended products.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "availableConfigurations": {
    },
  • "defaultClient": "generic"
}

Get one client's field-mapping configuration

Returns a configuration the CALLING client is entitled to: generic, which every client may read, or the caller's own specialised configuration. Any other key is refused with 403, including a key that does not exist, so the response cannot be used to discover another client's configuration key. The keys are the fixed keys of the service's configuration map. A specialised configuration can report different field totals from generic, which is 23 core + 50 extended = 73.

Authorizations:
BearerAuth
path Parameters
clientId
required
string

Responses

Response samples

Content type
application/json
{
  • "client": "generic",
  • "configuration": {
    }
}