Customer interaction is an important element of online business management for merchants. To personalize marketing tactics, you need customer data. You can fetch a list of all customers or retrieve a single customer using the customer ID in Shopify.
Step By Step
Step 1: Install and set up osiset/laravel-shopify with your Shopify app.
Step 2: Place these code in controller:
use Illuminate\Support\Facades\Auth;
Step 3: Use the following code:
$shop=Auth::user();
$customers=$shop->api()->rest('GET','/admin/api/2021-07/customers.json');
$shop=Auth::user();
$customers=$shop->api()->rest('GET','/admin/api/2021-07/customers/{customers-id}.json');
This way you can easily Get customer data using Laravel. If you face any difficulty, leave a comment without hesitation.
Leave a Reply