Shopify is an popular eCommerce platform for online store and has many customers around the world. They provide API to access online store data to integrate with any third party website like WordPress and any shipping website.
Shopify api can be access via create an app in shopify account. App can be Public or private.
Public app can be installed and use in multiple online store while private app can be accessible only single store. Otherwise both app provide same API access of data.
Private App use for Shopify API access:
Let we explain you how to create an private app in store and use for access API.
Login in your Shopify store admin panel. Click on Apps tab in left side menu. After that Create private app button to create new private app for your store. fill the required info and submit it.
After that click on app title to see api credentials. All given credential use for shopiy api connectivity and access store database.
Use given Example Url for make api calls. By default its shows order.json, which will show store order data. Just change it with customers.json to get customer information and many more method provided in api documentation.
You May Also Like:
How to Install Magento Security Patch via Putty
Code to Use Paypal Payment Gateway on Website
How to Authenticate with D&B Direct API Web Service
How to Implement UPS API and Create Shipping Label
How to Get User Data From Slideshare.net API
Shopify API Connection Code Example in PHP:
Use the below PHP curl code to get connected with API and access customers data.
$url = "https://230******************dc20:b0817***************008@tr*********s.myshopify.com/admin/customers.json";
$shopcurl = curl_init();
curl_setopt($shopcurl, CURLOPT_URL, $url);
curl_setopt($shopcurl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($shopcurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($shopcurl, CURLOPT_VERBOSE, 0);
curl_setopt($shopcurl, CURLOPT_HEADER, 1);
curl_setopt($shopcurl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($shopcurl, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec ($shopcurl);
Here we discuss the shopify api connectivity and getting customer data. In this way you can play with other api objects like Orders, Products etc. Store data can be Update and Delete also using api calls.
Using this way you can easily integrate own shopify store with any other third party software. If facing any issue to access Shopify API in PHP, let me know.