Retrieve raw Shopify GraphQL response for a subscription contract
Fetches the complete, unprocessed JSON response directly from Shopify’s GraphQL API for the specified subscription contract. This endpoint returns the full subscription data structure as provided by Shopify, including all nested objects and relationships.
Use Cases:
- Debugging subscription issues
- Accessing all available subscription data
- Understanding the complete data structure
- Building custom integrations
Response Structure: The response includes complete details about:
- Customer information (email, name, ID)
- Line items (products, quantities, pricing)
- Billing and delivery policies
- Payment method details
- Discounts and pricing policies
- Order history and billing attempts
- Custom attributes and notes
Note: This is a direct Shopify response with GraphQL type information (__typename fields)
Authentication: Requires valid X-API-Key header
curl --request GET \
--url https://subscription-admin.appstle.com/api/external/v2/contract-raw-response \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/contract-raw-response"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://subscription-admin.appstle.com/api/external/v2/contract-raw-response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/contract-raw-response';
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/contract-raw-response",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://subscription-admin.appstle.com/api/external/v2/contract-raw-response"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://subscription-admin.appstle.com/api/external/v2/contract-raw-response")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"subscriptionContract": {
"__typename": "SubscriptionContract",
"billingPolicy": {
"__typename": "SubscriptionBillingPolicy",
"anchors": [],
"interval": "MONTH",
"intervalCount": 1,
"maxCycles": null,
"minCycles": null
},
"createdAt": "2025-06-19T12:19:21Z",
"customAttributes": [],
"customer": {
"__typename": "Customer",
"displayName": "John Doe",
"email": "customer@example.com",
"firstName": "John",
"id": "gid://shopify/Customer/8718823227555",
"lastName": "Doe"
},
"customerPaymentMethod": {
"__typename": "CustomerPaymentMethod",
"id": "gid://shopify/CustomerPaymentMethod/e14bcaa08f882975bfe6c708642eb223",
"instrument": {
"__typename": "CustomerCreditCard",
"brand": "bogus",
"expiryMonth": 12,
"expiryYear": 2025,
"lastDigits": "1",
"maskedNumber": "•••• •••• •••• 1"
}
},
"deliveryPolicy": {
"__typename": "SubscriptionDeliveryPolicy",
"anchors": [],
"interval": "MONTH",
"intervalCount": 1
},
"deliveryPrice": {
"__typename": "MoneyV2",
"amount": "0.0",
"currencyCode": "USD"
},
"discounts": {
"__typename": "SubscriptionManualDiscountConnection",
"edges": []
},
"id": "gid://shopify/SubscriptionContract/26833420451",
"lastPaymentStatus": null,
"lines": {
"__typename": "SubscriptionLineConnection",
"edges": [
{
"__typename": "SubscriptionLineEdge",
"node": {
"__typename": "SubscriptionLine",
"currentPrice": {
"__typename": "MoneyV2",
"amount": "9.0",
"currencyCode": "USD"
},
"customAttributes": [],
"id": "gid://shopify/SubscriptionLine/35d6970f-66bd-4ce0-a7a5-f1498096fec8",
"pricingPolicy": {
"__typename": "SubscriptionPricingPolicy",
"basePrice": {
"__typename": "MoneyV2",
"amount": "10.0",
"currencyCode": "USD"
},
"cycleDiscounts": [
{
"__typename": "SubscriptionCyclePriceAdjustment",
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"__typename": "SellingPlanPricingPolicyPercentageValue",
"percentage": 10
},
"afterCycle": 0,
"computedPrice": {
"__typename": "MoneyV2",
"amount": "9.0",
"currencyCode": "USD"
}
}
]
},
"productId": "gid://shopify/Product/8794161545379",
"quantity": 1,
"sellingPlanId": "gid://shopify/SellingPlan/2598666403",
"sellingPlanName": "Monthly Subscription",
"title": "Gift Card",
"variantId": "gid://shopify/ProductVariant/45954331672739",
"variantTitle": "$10"
}
}
]
},
"nextBillingDate": "2025-07-19T12:00:00Z",
"note": null,
"originOrder": {
"__typename": "Order",
"id": "gid://shopify/Order/6152668807331",
"name": "#1002"
},
"status": "ACTIVE",
"updatedAt": "2025-06-19T12:19:25Z"
}
}Headers
API Key for authentication
Query Parameters
API Key (Deprecated - Use X-API-Key header instead)
The unique identifier of the subscription contract. Use the numeric ID without the 'gid://shopify/SubscriptionContract/' prefix. For example, use '26833420451' instead of 'gid://shopify/SubscriptionContract/26833420451'.
x >= 1Response
Successfully retrieved raw contract data
Show child attributes
Show child attributes
curl --request GET \
--url https://subscription-admin.appstle.com/api/external/v2/contract-raw-response \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/contract-raw-response"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://subscription-admin.appstle.com/api/external/v2/contract-raw-response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/contract-raw-response';
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/contract-raw-response",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://subscription-admin.appstle.com/api/external/v2/contract-raw-response"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://subscription-admin.appstle.com/api/external/v2/contract-raw-response")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"subscriptionContract": {
"__typename": "SubscriptionContract",
"billingPolicy": {
"__typename": "SubscriptionBillingPolicy",
"anchors": [],
"interval": "MONTH",
"intervalCount": 1,
"maxCycles": null,
"minCycles": null
},
"createdAt": "2025-06-19T12:19:21Z",
"customAttributes": [],
"customer": {
"__typename": "Customer",
"displayName": "John Doe",
"email": "customer@example.com",
"firstName": "John",
"id": "gid://shopify/Customer/8718823227555",
"lastName": "Doe"
},
"customerPaymentMethod": {
"__typename": "CustomerPaymentMethod",
"id": "gid://shopify/CustomerPaymentMethod/e14bcaa08f882975bfe6c708642eb223",
"instrument": {
"__typename": "CustomerCreditCard",
"brand": "bogus",
"expiryMonth": 12,
"expiryYear": 2025,
"lastDigits": "1",
"maskedNumber": "•••• •••• •••• 1"
}
},
"deliveryPolicy": {
"__typename": "SubscriptionDeliveryPolicy",
"anchors": [],
"interval": "MONTH",
"intervalCount": 1
},
"deliveryPrice": {
"__typename": "MoneyV2",
"amount": "0.0",
"currencyCode": "USD"
},
"discounts": {
"__typename": "SubscriptionManualDiscountConnection",
"edges": []
},
"id": "gid://shopify/SubscriptionContract/26833420451",
"lastPaymentStatus": null,
"lines": {
"__typename": "SubscriptionLineConnection",
"edges": [
{
"__typename": "SubscriptionLineEdge",
"node": {
"__typename": "SubscriptionLine",
"currentPrice": {
"__typename": "MoneyV2",
"amount": "9.0",
"currencyCode": "USD"
},
"customAttributes": [],
"id": "gid://shopify/SubscriptionLine/35d6970f-66bd-4ce0-a7a5-f1498096fec8",
"pricingPolicy": {
"__typename": "SubscriptionPricingPolicy",
"basePrice": {
"__typename": "MoneyV2",
"amount": "10.0",
"currencyCode": "USD"
},
"cycleDiscounts": [
{
"__typename": "SubscriptionCyclePriceAdjustment",
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"__typename": "SellingPlanPricingPolicyPercentageValue",
"percentage": 10
},
"afterCycle": 0,
"computedPrice": {
"__typename": "MoneyV2",
"amount": "9.0",
"currencyCode": "USD"
}
}
]
},
"productId": "gid://shopify/Product/8794161545379",
"quantity": 1,
"sellingPlanId": "gid://shopify/SellingPlan/2598666403",
"sellingPlanName": "Monthly Subscription",
"title": "Gift Card",
"variantId": "gid://shopify/ProductVariant/45954331672739",
"variantTitle": "$10"
}
}
]
},
"nextBillingDate": "2025-07-19T12:00:00Z",
"note": null,
"originOrder": {
"__typename": "Order",
"id": "gid://shopify/Order/6152668807331",
"name": "#1002"
},
"status": "ACTIVE",
"updatedAt": "2025-06-19T12:19:25Z"
}
}