---
title: Fetch Subscription Product Relationships
slug: fetch-subscription-product-relationships
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "35AovbR4XlYIhjEXJLkgY",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.nue.io/subscriptions/product-relationships",
    "servers": [
      {
        "url": "https://api.nue.io/subscriptions/product-relationships",
        "description": "**Production Environment** - Live production server for all customer-facing operations. Use this for production integrations with real customer data and transactions."
      },
      {
        "url": "https://api.sandbox.nue.io/subscriptions/product-relationships",
        "description": "**Sandbox Environment** - Safe testing environment with sample data for development and integration testing. No rate limits apply. Data is reset weekly. Perfect for prototyping and QA testing."
      }
    ],
    "name": "Fetch Subscription Product Relationships",
    "description": "<p>Retrieves available upgrade, downgrade, and swap (UDS) paths for customer subscriptions. This endpoint returns the product relationships configured for each subscription, including full product details and pricing information for target products. Use this to build self-service experiences where customers can modify their subscriptions.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "required",
          "name": "subscriptionNames",
          "type": "string",
          "example": "[\"SUB-000115\", \"SUB-000116\"]",
          "description": "<p>A JSON-encoded array of subscription names to fetch product relationships for.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully retrieved product relationships for subscriptions",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"status\":\"SUCCESS\",\"data\":{\"SUB-000115\":{\"currencyIsoCode\":\"USD\",\"subscriptionName\":\"SUB-000115\",\"subscriptionId\":\"a0udi00000484tlAAA\",\"productSku\":\"ORDER FORMS UDS\",\"subscriptionUomName\":\"User/Year\",\"options\":{\"upgrade\":[{\"id\":\"a0odi000000y2QVAAY\",\"relationshipType\":\"Upgrade\",\"sameUomOnly\":false,\"startDate\":\"2025-01-16\",\"productRelationshipPriceTags\":[{\"id\":\"a0xdi000001ABC\",\"name\":\"Upgrade Discount\",\"priceTagType\":\"Discount\",\"publishStatus\":\"Published\"}],\"fromProduct\":{\"id\":\"01tdi000008IMqIAAW\",\"name\":\"Order Forms uds\",\"sku\":\"ORDER FORMS UDS\",\"priceBookEntries\":[{\"id\":\"01udi00000341kWAAQ\",\"listPrice\":100,\"billingTiming\":\"In Advance\",\"uom\":{\"name\":\"User/Year\",\"quantityDimension\":\"User\",\"termDimension\":\"Year\"}}]},\"toProducts\":[{\"id\":\"01tdi000008IMqXAAW\",\"name\":\"Nue Recurring Test\",\"sku\":\"NUE RECURRING TEST\",\"priceBookEntries\":[{\"id\":\"01udi00000341kXAAQ\",\"listPrice\":120,\"billingTiming\":\"In Advance\",\"uom\":{\"name\":\"User/Year\",\"quantityDimension\":\"User\",\"termDimension\":\"Year\"}}]}]}],\"swap\":[{\"id\":\"a0odi000000y2QRAAY\",\"relationshipType\":\"Swap\",\"sameUomOnly\":false,\"samePriceSwap\":false,\"startDate\":\"2025-07-30\",\"fromProduct\":{\"id\":\"01tdi000008IMqIAAW\",\"name\":\"Order Forms uds\",\"sku\":\"ORDER FORMS UDS\",\"priceBookEntries\":[{\"id\":\"01udi00000341kWAAQ\",\"listPrice\":100,\"billingTiming\":\"In Advance\",\"uom\":{\"name\":\"User/Year\"}}]},\"toProducts\":[]}]}}}}",
            "description": "",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<SUCCESS | PARTIAL_SUCCESS>",
                "description": "Indicates the overall status of the request",
                "enum": [
                  "SUCCESS",
                  "PARTIAL_SUCCESS"
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "map",
                "description": "Object keyed by subscription name containing relationship options",
                "example": "",
                "customType": "map<string, object>",
                "schema": []
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>Array of warnings when some subscriptions fail (present with PARTIAL_SUCCESS status)</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Warning code (e.g., SUBSCRIPTION_NOT_FOUND, SUBSCRIPTION_EVALUATION_FAILED)</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable warning message</p>"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad request - invalid or missing parameters</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<FAILURE>",
                "description": "",
                "enum": [
                  "FAILURE"
                ]
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "gbsFteznwyWi6kIhO0FrH",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.nue.io/subscriptions/product-relationships?subscriptionNames=[%22SUB-000115%22%2C%20%22SUB-000116%22]' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "hKM8YJbsp36VVTEv22skc",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/subscriptions/product-relationships?subscriptionNames=[\\\"SUB-000115\\\", \\\"SUB-000116\\\"]\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "52bd01nba4kFS35tKrkl_",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/subscriptions/product-relationships?subscriptionNames=[\\\"SUB-000115\\\", \\\"SUB-000116\\\"]\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "NPJD-I8nKs2Pspkgxq48n",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/subscriptions/product-relationships?subscriptionNames=[\\\"SUB-000115\\\", \\\"SUB-000116\\\"]\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "gbsFteznwyWi6kIhO0FrH"
    },
    "results": {
      "languages": [
        {
          "id": "HvFDh5F_XRazYr7iw6B4R",
          "language": "200",
          "code": "// Successfully retrieved product relationships for subscriptions\n{\n  \"status\": \"\",\n  \"data\": \"\",\n  \"warnings\": [\n    {\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "aOnglO3SfMFmtovpXmrSz",
          "language": "400",
          "code": "// Bad request - invalid or missing parameters\n{\n  \"status\": \"\",\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "HvFDh5F_XRazYr7iw6B4R"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}