---
updatedAt: 2026-08-18T16:39:15.000Z
agentTools:
  projectIndex: https://gainsystems.readme.io/llms.txt
---

# Retrieve inventory service levels

Returns each SKU-location's policy with its costs and the service levels GAINS evaluated. Only SKU-locations with evaluated service levels are returned. See [Inventory Policies](https://gainsystems.readme.io/docs/outbound-inventory).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "GAINSConnect Public API",
    "description": "Integration API for GAINS Connect. Covers the inbound submit and delete endpoints, the outbound reads, webhook configuration and custom schema data. Authentication and error handling are described in the guides.",
    "version": "2026.10.1-f73b2696"
  },
  "servers": [
    {
      "url": "https://{env}.gainsystems.com",
      "description": "Your GAINS Connect installation. Substitute the environment you were given; an on-premise installation uses its own host instead.",
      "variables": {
        "env": {
          "description": "The environment subdomain of your GAINS installation",
          "default": "your-environment"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Outbound - Inventory Optimization",
      "description": "Inventory policies, service levels, bills of material and supercessions as last calculated"
    }
  ],
  "paths": {
    "/api/v1/inventory/service-level": {
      "get": {
        "tags": [
          "Outbound - Inventory Optimization"
        ],
        "summary": "Retrieve inventory service levels",
        "description": "Returns each SKU-location's policy with its costs and the service levels GAINS evaluated. Only SKU-locations with evaluated service levels are returned. See [Inventory Policies](https://gainsystems.readme.io/docs/outbound-inventory).",
        "parameters": [
          {
            "name": "ItemCode",
            "in": "query",
            "description": "Return only service levels for these items. Up to 10 values, comma-separated with no spaces; each must match exactly.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "LocationCode",
            "in": "query",
            "description": "Return only service levels for these locations. Up to 10 values, comma-separated with no spaces; each must match exactly.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ItemLocationFilterType",
            "in": "query",
            "description": "include (default) returns only records matching the ItemCode and LocationCode filters. exclude returns only records matching neither. Case-insensitive; any other value is rejected with 400.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StockIndicator",
            "in": "query",
            "description": "Return only records with these stock indicators: S (stocked), N (non-stock), C (cross-dock hub). Up to 10 values, comma-separated with no spaces; each must match exactly.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "InventoryClass",
            "in": "query",
            "description": "Return only service levels in these inventory classes (e.g., 'A', 'B'). Up to 10 values, comma-separated with no spaces; each must match exactly.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Department",
            "in": "query",
            "description": "Return only service levels for these departments. Up to 10 values, comma-separated with no spaces; each must match exactly.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Group",
            "in": "query",
            "description": "Return only service levels for these groups. Up to 10 values, comma-separated with no spaces; each must match exactly.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque cursor identifying the page to return. Omit for the first page, then pass the NextCursor value from the previous response",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Size",
            "in": "query",
            "description": "Maximum number of records to return in one page, from 1 to 1000. Default 100. On endpoints that group records under an item (for example, policies and forecasts), the limit applies to item/location records, so a page can return fewer top-level items than Size",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "name": "ExtendedDataFilters",
            "in": "query",
            "description": "Filters on extended-data attributes. Send each as its own query parameter named by the attribute's ApiLabel, for example ?Region=EMEA. Only attributes configured with IsAvailableAsQueryParam can be used (see GET /api/v1/extended-data); each takes a single exact value, and a standard attribute that is not text is ignored. Unrecognised query parameters are ignored.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request succeeded",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceLevelPageableWebModel"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, unknown field, or failed validation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorWebModel"
                }
              }
            }
          },
          "401": {
            "description": "Credentials missing or not valid: a wrong user name or password, an invalid or expired token, or Basic credentials on an endpoint that accepts only a Bearer token",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorWebModel"
                }
              }
            }
          },
          "403": {
            "description": "Your credentials do not have the permission this endpoint requires, or the GAINS X connection is not enabled for your environment",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorWebModel"
                }
              }
            }
          },
          "426": {
            "description": "The connected GAINS X version does not support this endpoint. The body states the current version and the version required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "StatusMessage": {
                      "type": "string",
                      "description": "Why the request was refused"
                    },
                    "GainsXCurrentVersion": {
                      "type": "string",
                      "description": "The GAINS X version currently connected, or \"unknown\""
                    },
                    "GainsXMinimumVersion": {
                      "type": "string",
                      "description": "The oldest GAINS X version this endpoint supports"
                    },
                    "GainsXMaximumVersion": {
                      "type": "string",
                      "description": "The newest GAINS X version this endpoint supports; absent when there is no upper limit"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorWebModel"
                }
              }
            }
          },
          "503": {
            "description": "GAINS is temporarily unavailable: GAINS X could not be reached or returned an error, a scheduled GAINS process is running, or your credentials could not be checked. Retry later",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorWebModel"
                }
              }
            }
          },
          "504": {
            "description": "GAINS X did not respond in time. Retry later",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorWebModel"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiErrorWebModel": {
        "properties": {
          "Reason": {
            "type": "string",
            "description": "Human-readable explanation of why the request failed"
          }
        },
        "required": [
          "Reason"
        ]
      },
      "CursorWebModel": {
        "description": "Cursor and record counts for this page; pass Paging.NextCursor back as the Cursor query parameter to request the next page",
        "properties": {
          "NextCursor": {
            "type": "string",
            "description": "Pass this value as the Cursor parameter to get the next page. Null when this is the last page"
          },
          "CurrentDataCount": {
            "type": "integer",
            "format": "int32",
            "description": "Number of records in this page, counted the same way as Size (item/location records on grouped payloads, orders on order endpoints)"
          }
        }
      },
      "InventoryPolicyServiceLevelWebModel": {
        "description": "The inventory policy calculated for this item and location",
        "properties": {
          "Weight": {
            "type": "number",
            "format": "double",
            "description": "Unit weight of the item"
          },
          "Cubage": {
            "type": "number",
            "format": "double",
            "description": "Unit volume of the item"
          },
          "CurrentModel": {
            "type": "integer",
            "format": "int32",
            "description": "The inventory model currently in effect"
          },
          "FixedModel": {
            "type": "integer",
            "format": "int32",
            "description": "The inventory model pinned by the planner, overriding the calculated one"
          },
          "AdjustedOrq": {
            "type": "integer",
            "format": "int32",
            "description": "Adjusted order quantity"
          },
          "MinimumOrq": {
            "type": "integer",
            "format": "int32",
            "description": "Minimum order quantity"
          },
          "IncrementalOrq": {
            "type": "integer",
            "format": "int32",
            "description": "Incremental order quantity"
          },
          "CalcOrq": {
            "type": "integer",
            "format": "int32",
            "description": "The order quantity calculated by GAINS"
          },
          "Rsq": {
            "type": "integer",
            "format": "int32",
            "description": "Represents the reserve stock quantity value set by business rules or via interface"
          },
          "RsqOverride": {
            "type": "integer",
            "format": "int32",
            "description": "Represents the user-modified RSQ value"
          },
          "CalcSs": {
            "type": "integer",
            "format": "int32",
            "description": "Calculated safety stock value (non-adjusted)"
          },
          "AdjustedSs": {
            "type": "integer",
            "format": "int32",
            "description": "Adjusted safety stock"
          },
          "SsOverride": {
            "type": "integer",
            "format": "int32",
            "description": "Safety stock override"
          },
          "ServiceLevel": {
            "type": "number",
            "format": "double",
            "description": "Service level"
          },
          "ServiceLevelMinimum": {
            "type": "number",
            "format": "float",
            "description": "Minimum service level"
          },
          "CarryCost": {
            "type": "number",
            "format": "double",
            "description": "Cost of carrying inventory"
          },
          "ReceiveCost": {
            "type": "number",
            "format": "double",
            "description": "Cost of receiving inventory"
          },
          "StandardCost": {
            "type": "number",
            "format": "double",
            "description": "Standard cost of the item"
          },
          "FobCost": {
            "type": "number",
            "format": "double",
            "description": "FOB cost of the item"
          },
          "Price": {
            "type": "number",
            "format": "double",
            "description": "Price of the item"
          },
          "AnnualDemand": {
            "type": "integer",
            "format": "int64",
            "description": "Annual demand for the item"
          },
          "InventoryClass": {
            "type": "string",
            "description": "The inventory class (e.g., 'A', 'B')"
          },
          "StockIndicator": {
            "type": "string",
            "description": "Stock indicator"
          },
          "LeadTime": {
            "type": "number",
            "format": "float",
            "description": "Lead time for this item and location, in weeks"
          },
          "LeadTimeVariability": {
            "type": "number",
            "format": "double",
            "description": "Lead-time variability override, in days"
          },
          "AvgLTTotalDemand": {
            "type": "integer",
            "format": "int32",
            "description": "Average total demand over lead time - total demand would include independent demand, dependent demand and BOM demand"
          },
          "ReceiveExpFactor": {
            "type": "number",
            "format": "double",
            "description": "Use with receiving costs to calculate receiving expedite costs"
          },
          "AvgOrderSize": {
            "type": "integer",
            "format": "int32",
            "description": "Average order size"
          },
          "LostSalePrb": {
            "type": "number",
            "format": "float",
            "description": "Lost sale probability"
          },
          "LostSalePrbOverride": {
            "type": "number",
            "format": "float",
            "description": "Lost sale probability override"
          },
          "ForecastError": {
            "type": "number",
            "format": "double",
            "description": "Smoothed MAD Forecast Error"
          },
          "ServiceLevels": {
            "type": "array",
            "description": "The service levels evaluated for this item and location",
            "items": {
              "$ref": "#/components/schemas/ServiceLevelWebModel"
            }
          }
        },
        "required": [
          "SsOverride"
        ]
      },
      "ItemServiceLevelWebModel": {
        "description": "The page of item service levels returned by this request",
        "properties": {
          "ItemCode": {
            "type": "string",
            "description": "The item number/code as defined by the client"
          },
          "ItemDescription": {
            "type": "string",
            "description": "The item description"
          },
          "Locations": {
            "type": "array",
            "description": "The locations this item is stocked at",
            "items": {
              "$ref": "#/components/schemas/LocationServiceLevelWebModel"
            }
          },
          "ExtendedData": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "description": "Customer-defined extended data attributes for this record, keyed by the API label configured for the payload (see GET /api/v1/extended-data)"
            },
            "description": "Customer-defined extended data attributes for this record, keyed by the API label configured for the payload (see GET /api/v1/extended-data)"
          }
        },
        "required": [
          "ItemCode",
          "Locations"
        ]
      },
      "LocationServiceLevelWebModel": {
        "description": "The locations this item is stocked at",
        "properties": {
          "LocationCode": {
            "type": "string",
            "description": "The location code as defined by the client"
          },
          "LocationName": {
            "type": "string",
            "description": "The location name and description"
          },
          "InventoryPolicy": {
            "$ref": "#/components/schemas/InventoryPolicyServiceLevelWebModel"
          },
          "ExtendedData": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "description": "Customer-defined extended data attributes for this record, keyed by the API label configured for the payload (see GET /api/v1/extended-data)"
            },
            "description": "Customer-defined extended data attributes for this record, keyed by the API label configured for the payload (see GET /api/v1/extended-data)"
          }
        },
        "required": [
          "InventoryPolicy",
          "LocationCode"
        ]
      },
      "ServiceLevelPageableWebModel": {
        "properties": {
          "DataType": {
            "type": "string",
            "description": "States the type of records in this payload"
          },
          "Data": {
            "type": "array",
            "description": "The page of item service levels returned by this request",
            "items": {
              "$ref": "#/components/schemas/ItemServiceLevelWebModel"
            }
          },
          "Paging": {
            "$ref": "#/components/schemas/CursorWebModel"
          }
        },
        "required": [
          "Data",
          "DataType",
          "Paging"
        ]
      },
      "ServiceLevelWebModel": {
        "description": "The service levels evaluated for this item and location",
        "properties": {
          "ServiceLevel": {
            "type": "number",
            "format": "double",
            "description": "The specified service level percentage for this row."
          },
          "AdjustedOrq": {
            "type": "integer",
            "format": "int32",
            "description": "The adjusted order quantity for this service level."
          },
          "AdjustedSs": {
            "type": "integer",
            "format": "int32",
            "description": "The adjusted safety stock for this service level."
          },
          "CarryCost": {
            "type": "number",
            "format": "double",
            "description": "The cost of carrying inventory for this service level."
          },
          "ReceiveCost": {
            "type": "number",
            "format": "double",
            "description": "The cost of receiving inventory for this service level."
          },
          "ExpediteCost": {
            "type": "number",
            "format": "double",
            "description": "The cost of expediting inventory for this service level."
          },
          "DisserviceCost": {
            "type": "number",
            "format": "double",
            "description": "The cost of not meeting the service level."
          }
        },
        "required": [
          "ServiceLevel"
        ]
      }
    }
  }
}
```