Skip to content

Instantly share code, notes, and snippets.

@anniethiessen
Created June 11, 2021 20:25
Show Gist options
  • Select an option

  • Save anniethiessen/80b6c82f157edfa29595dffb9e9cb41a to your computer and use it in GitHub Desktop.

Select an option

Save anniethiessen/80b6c82f157edfa29595dffb9e9cb41a to your computer and use it in GitHub Desktop.
var shopifyUrl = `https://${env.shopifyShopUrl}/admin/api/${env.shopifyApiVersion}`;
var shopifyCreds = btoa(`${env.shopifyApiKey}:${env.shopifyApiSecretKey}`);
var shopifyHeaders = {
"Content-Type" : "application/json",
"Authorization" : `Basic ${shopifyCreds}`
};
let shopifyResponse = await fetch(`${shopifyUrl}/orders/${orderId}.json`, {headers: shopifyHeaders});
// let response = await shopifyResponse.json();
let response = await shopifyResponse.text();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment