subscriptionBillingCycleBulkResults
Retrieves the results of the asynchronous job for the subscription billing cycle bulk action based on the specified job ID. This query can be used to obtain the billing cycles that match the criteria defined in the subscriptionBillingCycleBulkSearch and subscriptionBillingCycleBulkCharge mutations.
SubscriptionBillingCycleConnection arguments
- Anchor to afterafter•
The elements that come after the specified cursor.
- Anchor to beforebefore•
The elements that come before the specified cursor.
- Anchor to firstfirst•
The first
n
elements from the paginated list.- Anchor to jobIdjob•
Id ID!required The ID of the billing cycle bulk operation job.
- Anchor to lastlast•
The last
n
elements from the paginated list.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Anchor to Possible returnsPossible returns
- Anchor to edgesedges•[Subscription
Billing non-nullCycle Edge!]! The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
- Anchor to nodesnodes•[Subscription
Billing non-nullCycle!]! A list of nodes that are contained in SubscriptionBillingCycleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
- Anchor to pageInfopage•
Info PageInfo! non-null An object that’s used to retrieve cursor information about the current page.
Get the list of the billing cycles targeted as part of the bulk action
query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {
subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {
pageInfo {
startCursor
endCursor
}
edges {
node {
cycleIndex
}
}
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) { subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) { pageInfo { startCursor endCursor } edges { node { cycleIndex } } } }",
"variables": {
"jobId": "gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b",
"first": 3
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {
subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {
pageInfo {
startCursor
endCursor
}
edges {
node {
cycleIndex
}
}
}
}`,
{
variables: {
"jobId": "gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b",
"first": 3
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {
subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {
pageInfo {
startCursor
endCursor
}
edges {
node {
cycleIndex
}
}
}
}`,
"variables": {
"jobId": "gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b",
"first": 3
},
},
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {
subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {
pageInfo {
startCursor
endCursor
}
edges {
node {
cycleIndex
}
}
}
}
QUERY
variables = {
"jobId": "gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b",
"first": 3
}
response = client.query(query: query, variables: variables)