# subscriptionBillingCycleBulkResults - admin-graphql - QUERY Version: 2024-10 ## Description 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. ### Access Scopes ## Arguments * [after](/docs/api/admin-graphql/2024-10/scalars/String): String - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * [before](/docs/api/admin-graphql/2024-10/scalars/String): String - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * [first](/docs/api/admin-graphql/2024-10/scalars/Int): Int - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * [jobId](/docs/api/admin-graphql/2024-10/scalars/ID): ID! - The ID of the billing cycle bulk operation job. * [last](/docs/api/admin-graphql/2024-10/scalars/Int): Int - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * [reverse](/docs/api/admin-graphql/2024-10/scalars/Boolean): Boolean - Reverse the order of the underlying list. ## Returns * [edges](/docs/api/admin-graphql/2024-10/objects/SubscriptionBillingCycleEdge): SubscriptionBillingCycleEdge! The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. * [nodes](/docs/api/admin-graphql/2024-10/objects/SubscriptionBillingCycle): SubscriptionBillingCycle! 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. * [pageInfo](/docs/api/admin-graphql/2024-10/objects/PageInfo): PageInfo! An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. ## Examples ### Get the list of the billing cycles targeted as part of the bulk action Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) { subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) { pageInfo { startCursor endCursor } edges { node { cycleIndex } } } }\",\n \"variables\": {\n \"jobId\": \"gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b\",\n \"first\": 3\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {\n subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {\n pageInfo {\n startCursor\n endCursor\n }\n edges {\n node {\n cycleIndex\n }\n }\n }\n }`,\n \"variables\": {\n \"jobId\": \"gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b\",\n \"first\": 3\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {\n subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {\n pageInfo {\n startCursor\n endCursor\n }\n edges {\n node {\n cycleIndex\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"jobId\": \"gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b\",\n \"first\": 3\n}\n\nresponse = client.query(query: query, variables: variables)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {\n subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {\n pageInfo {\n startCursor\n endCursor\n }\n edges {\n node {\n cycleIndex\n }\n }\n }\n }`,\n {\n variables: {\n \"jobId\": \"gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b\",\n \"first\": 3\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "query SubscriptionBillingCycleBulkResults($jobId: ID!, $first: Int!, $after: String) {\n subscriptionBillingCycleBulkResults(first: $first, after: $after, jobId: $jobId) {\n pageInfo {\n startCursor\n endCursor\n }\n edges {\n node {\n cycleIndex\n }\n }\n }\n}" #### Graphql Input { "jobId": "gid://shopify/Job/0faf9493-b523-4c92-8e6e-59139254b03b", "first": 3 } #### Graphql Response { "data": { "subscriptionBillingCycleBulkResults": { "pageInfo": { "startCursor": "eyJsYXN0X2lkIjoyMzIzNzkyMjUsImxhc3RfdmFsdWUiOiIyMzIzNzkyMjUifQ==", "endCursor": "eyJsYXN0X2lkIjoyMzIzNzkyMjUsImxhc3RfdmFsdWUiOiIyMzIzNzkyMjUifQ==" }, "edges": [ { "node": { "cycleIndex": 1 } } ] } } }