Version: 2024-10
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 { paymentTermsTemplates { id name paymentTermsType dueInDays description translatedName } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n paymentTermsTemplates {\n id\n name\n paymentTermsType\n dueInDays\n description\n translatedName\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 {\n paymentTermsTemplates {\n id\n name\n paymentTermsType\n dueInDays\n description\n translatedName\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n query {\n paymentTermsTemplates {\n id\n name\n paymentTermsType\n dueInDays\n description\n translatedName\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n paymentTermsTemplates {\n id\n name\n paymentTermsType\n dueInDays\n description\n translatedName\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n paymentTermsTemplates {\n id\n name\n paymentTermsType\n dueInDays\n description\n translatedName\n }\n}"
input: null
response: { "data": { "paymentTermsTemplates": [ { "id": "gid://shopify/PaymentTermsTemplate/1", "name": "Due on receipt", "paymentTermsType": "RECEIPT", "dueInDays": null, "description": "Due on receipt", "translatedName": "Due on receipt" }, { "id": "gid://shopify/PaymentTermsTemplate/9", "name": "Due on fulfillment", "paymentTermsType": "FULFILLMENT", "dueInDays": null, "description": "Due on fulfillment", "translatedName": "Due on fulfillment" }, { "id": "gid://shopify/PaymentTermsTemplate/2", "name": "Net 7", "paymentTermsType": "NET", "dueInDays": 7, "description": "Within 7 days", "translatedName": "Net 7" }, { "id": "gid://shopify/PaymentTermsTemplate/3", "name": "Net 15", "paymentTermsType": "NET", "dueInDays": 15, "description": "Within 15 days", "translatedName": "Net 15" }, { "id": "gid://shopify/PaymentTermsTemplate/4", "name": "Net 30", "paymentTermsType": "NET", "dueInDays": 30, "description": "Within 30 days", "translatedName": "Net 30" }, { "id": "gid://shopify/PaymentTermsTemplate/8", "name": "Net 45", "paymentTermsType": "NET", "dueInDays": 45, "description": "Within 45 days", "translatedName": "Net 45" }, { "id": "gid://shopify/PaymentTermsTemplate/5", "name": "Net 60", "paymentTermsType": "NET", "dueInDays": 60, "description": "Within 60 days", "translatedName": "Net 60" }, { "id": "gid://shopify/PaymentTermsTemplate/6", "name": "Net 90", "paymentTermsType": "NET", "dueInDays": 90, "description": "Within 90 days", "translatedName": "Net 90" }, { "id": "gid://shopify/PaymentTermsTemplate/7", "name": "Fixed", "paymentTermsType": "FIXED", "dueInDays": null, "description": "Fixed date", "translatedName": "Fixed" } ] } }