This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
require("@shopify/shopify-api/adapters/node"); | |
const { shopifyApi, ApiVersion, Session } = require("@shopify/shopify-api"); | |
const { restResources } = require("@shopify/shopify-api/rest/admin/2023-04"); | |
const app = express(); | |
const shopify = shopifyApi({ | |
apiSecretKey: "secret", // Note: this is the API Secret Key, NOT the API access token | |
apiVersion: ApiVersion.April24, | |
isCustomStoreApp: true, // this MUST be set to true (default is false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% | |
################################ | |
# How to access product information that is referenced by a metaobject | |
# | |
# | |
# metaobject_references_a_product -> The type of of the metaobject definition. Settings > Custom Data > Your metafield definition > Type | |
# metaobject-references-a-product-ng8tvn4m -> The handle of the specific metaobject you want to access. Content > Metaobjects > Handle | |
# product -> The name of the product reference field, defined in your metafield definition. Settings > Custom Data > Your metafield definition | |
# | |
# Gotcha: Make sure the product that you are referencing has been published to the online store! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --location --request POST 'https://shop.myshopify.com/admin/api/unstable/graphql.json' \ | |
--header 'X-Shopify-Access-Token: shpat_token123456' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{"query":"{\n # \"FROM sales SHOW total_sales BY month SINCE -1y UNTIL today\" passes a ShopifyQL query to the GraphQL query.\n shopifyqlQuery(query: \"FROM sales SHOW returned_item_quantity BY product_id SINCE -150d ORDER BY returned_item_quantity DESC\") {\n __typename\n ... on TableResponse {\n tableData {\n rowData\n columns {\n # Elements in the columns section describe which column properties you want to return.\n name\n dataType\n displayName\n }\n }\n }\n # parseErrors specifies that you want errors returned, if there were any, and which error properties you want to return.\n parseErrors {\n code\n message\n range {\n start {\n line\n character\n }\n end {\n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
//Shopify API Token | |
const SHOPIFY_ACCESS_TOKEN = '<123456789A>'; | |
//Shopify store API token was generated for | |
const URL = 'https://yourstore.myshopify.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
//Shopify API Token | |
const SHOPIFY_ACCESS_TOKEN = '<123456789A>'; | |
//Shopify store API token was generated for | |
const URL = 'https://yourstore.myshopify.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
//Shopify API Token | |
const SHOPIFY_ACCESS_TOKEN = '<123456789A>'; | |
//Shopify store API token was generated for | |
const URL = 'https://yourstore.myshopify.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require('request'); | |
//Shopify API Token | |
const shopifyToken = '<12345677890>'; | |
//The shopify store associated with the API token | |
const url = 'https:/yourstore.myshopify.com'; | |
//The Shopify API and version | |
const apiPrefix = '/admin/api/2020-10'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
//Shopify API Token | |
const SHOPIFY_ACCESS_TOKEN = '<123456789A>'; | |
//Shopify store API token was generated for | |
const URL = 'https://yourstore.myshopify.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require('request'); | |
//Shopify API Token | |
const shopifyToken = '<12345677890>'; | |
//The shopify store associated with the API token | |
const url = 'https:/yourstore.myshopify.com'; | |
//The Shopify API and version | |
const apiPrefix = '/admin/api/2020-10'; |
NewerOlder