GAINS Version Requirements & Availability

Which endpoints need a newer GAINS X, how to check your version, and what to do when GAINS is in maintenance or unavailable.

GAINS Connect works with your GAINS environment on every call, so what it can do depends on the GAINS version you run and on whether GAINS is available at that moment. This page explains which endpoints need a minimum GAINS X version, how to check yours, and what the 426, 503 and related responses mean when GAINS cannot serve a request.

Check your GAINS version

Call GET /ping. It needs no credentials, and Services.GAINSX reports the GAINS X version installed and whether GAINS Connect can reach it:

{
  "Services": {
    "GAINSX": {
      "Version": "10.0-ER2610",
      "Status": "success"
    }
  }
}
Services.GAINSX.StatusVersion
successThe installed GAINS X version, such as 10.0-ER2610.
failedunknown: GAINS Connect could not reach GAINS. See GAINS cannot be reached.
not-configuredunknown: this environment is not connected to GAINS.

The full response is described in Check your connection.

Version requirements

Some endpoints need a minimum GAINS X version, because they rely on something GAINS added in that release. The endpoint's API Reference page states it at the end of its description, under GainsX Version Requirement: for example, GET /replenishment/production-orders needs 10.0-ER2610. A Min line gives the oldest supported version; a Max line, when present, gives the newest.

Some webhook features also need a later version. Saving a webhook configuration that uses one is refused with a message naming the version it needs.

When your version is too old (426)

An endpoint whose requirement your GAINS X does not meet answers 426 without doing anything:

{
  "StatusMessage": "Endpoint requires GAINSX 10.0-ER2610 or higher",
  "GainsXCurrentVersion": "10.0-ER2609",
  "GainsXMinimumVersion": "10.0-ER2610"
}

Retrying does not help. Ask your GAINS representative about upgrading GAINS X.

Daily maintenance window

GAINS runs daily processing during which its planning data cannot be read. For as long as it lasts, every endpoint except loads, GET /ping and the lead time prediction endpoints answers 503:

{
  "Reason": "The API is unavailable due to daily maintenance window activities. Please retry after maintenance is complete."
}

Retry every few minutes until the window ends. Your GAINS representative can tell you when it usually runs, so that you can schedule reads outside it.

Loads not enabled (503)

When your environment is not set up to accept loads, every load and delete endpoint answers 503:

{
  "Reason": "This feature is not configured for your environment. Please contact your GAINS representative."
}

Config.InboundEndpoints in the GET /ping response is false in this case. Do not retry; ask your GAINS representative to enable loads.

Service not available (403)

A service that is not part of your subscription answers 403 with a Reason saying it is not available on this environment. Contact your GAINS representative if you have signed up for the service.

GAINS cannot be reached

When GAINS cannot be reached, GAINS Connect answers 503:

{
  "Reason": "The GAINS service is currently unavailable. Please try again later or contact support if the issue continues."
}

When GAINS is reached but does not answer in time, it answers 504, after a noticeable delay:

{
  "Reason": "The GAINS service did not respond in time. Please try again later or contact support if the issue continues."
}

Retry either one after a delay. Services.GAINSX.Status in GET /ping shows failed for as long as GAINS cannot be reached.

What to do

StatusCauseRetry?
426GAINS X is older than the endpoint requires.No. Upgrade GAINS X.
400 naming a GAINS X versionA webhook setting needs a newer GAINS X.No. Upgrade GAINS X, or save without it.
503 daily maintenanceGAINS is running its daily processing.Yes, every few minutes until it ends.
503 feature not configuredLoads are not enabled for your environment.No. Contact your GAINS representative.
503 GAINS internal errorGAINS is failing temporarily.Yes, after a delay.
503 other GAINS messagesThe connection to GAINS is misconfigured.No. Contact your GAINS representative.
503 GAINS unavailableGAINS cannot be reached.Yes, after a delay.
504GAINS did not answer in time.Yes, after a delay.
403 service not availableThe service is not part of your environment.No. Contact your GAINS representative.
424A custom route is not ready yet; see Custom Schema.Yes, later.

Before you retry a load, see Retry safely for which Idempotency-Key to send. For statuses not listed here, see Errors Handling & Exceptions.

Related


Did this page help you?