Shopify
Shopify is an e-commerce company, that offers subscription-based software which allows anyone to set up an online store and sell their products. This component allows you to manage the products and customers connected to your Shopify account.
Shopify allows you (merchants) to build and customize an online store and sell in multiple places, including web, mobile, in-person person, brick-and-mortar locations, and pop-up shops, and across multiple channels from social media to online marketplaces.
Authorization
Basic Auth
To authenticate with Shopify by using a private app, you need to generate the credentials from the Shopify admin and provide these credentials in your request to Shopify. It is a default selection of authentication forms that are most commonly used for Shopify. To authenticate the Basic Auth you need to follow the below steps:
The app requests access to a Shopify API resource.
Shopify requests a username and password to authenticate the request.
The app sends the username and password to Shopify.
Shopify returns the requested data.
Input | Description | Examples |
---|---|---|
Client Id | This is unique for each partner, and is provided by Shopify | xxxx |
Client Secret | This is unique for each partner, and is provided by Shopify | xxxx |
For more information visit Shopify Basic Auth
OAuth2.0
The Shopify component authenticates requests through an OAuth 2.0 credential. Information on how to generate an OAuth 2.0 app with Shopify can be found in their documentation
Now, you will have to configure OAuth 2.0 settings in Sapper. Create a new Shopify connection of type OAuth 2.0.
Enter the API Key and API Secret that you got from the Shopify developer dashboard.
For Scopes choose from the list found on the Shopify documentation
When you create your Shopify App you must be sure to enter Sapper's OAuth callback URL -Sapper - as a Callback URL.
Scope and access for authorizing Shopify are shown below:
Scope | Access |
---|---|
| All orders rather than the default window of 60 days worth of orders permissions required This OAuth scope is used in conjunction with |
| FulfillmentOrder resources assigned to a location managed by your fulfillment service |
| |
| |
| Customer and Saved Search |
| CustomerPaymentMethod permissions required You need to request permission for this access scope from your Partner Dashboard before adding it to your app. |
| GraphQL Admin API Discounts features |
| |
| GraphQL Admin API GenericFile object and fileCreate, fileUpdate, and fileDelete mutations |
| |
| Gift Card shopify plus |
| |
| GraphQL Admin API Shop Policy |
| GraphQL Admin API Shop Locale |
| |
| |
| |
| FulfillmentOrder resources assigned to merchant-managed locations |
| Abandoned checkouts, Customer, Fulfillment, Order, and Transaction resources |
| |
| GraphQL Admin API PaymentSchedule and PaymentTerms objects |
| |
| Product, Product Variant, Product Image, Collect, Custom Collection, and Smart Collection |
| |
| Product publishing and Collection publishing The
|
| |
| |
| |
| |
| Carrier Service, Country, and Province |
| Shopify Payments Dispute resource |
| Shopify Payments Payout, Balance, and Transaction resources |
| SubscriptionContract permissions required You need to request permission for these access scopes from your Partner Dashboard before adding them to your app. |
| |
| GraphQL Admin API Translatable object |
| FulfillmentOrder resources assigned to a location managed by any fulfillment service |
| User and StaffMembershopify plus |
| GraphQL Admin API OrderStagedChange types and order editing features |
| Payments Apps API paymentsAppConfigure |
|
Shopify Connections
Shopify Basic Connection
Input | Key | Description | Example |
Select Application | application | Select Shopify application | Shopify |
Connection type | connection type | Select the type of connection. | Rest |
Rest Connection Type | Rest Connection Type | Select the Basic connection type | Basic |
Connection Name | name | Provide a name for the connection. | Shopify |
Connection Description | description | Provide a description for the connection. | NA |
Host Name | host | Provide a string value for the URL of user's Shopify account. | |
Username | username | Provide a valid username for the given Shopify account user want to connect. | exampleUser |
Password | password | Provide a password to authenticate all requests with. Cloud users need to generate an API token for this value. | exampleSecurePassword |
Header Field | header | Provide the path of the endpoint for authentication. | Authorization |
Header Prefix | header prefix | Select the header prefix - | Basic |
Shopify OAuth2.0 Connection
Input | Key | Description | Example |
Select Application | application | Select Shopify application | Shopify |
Connection Type | connection type | Select the type of connection. | REST |
REST Connection Type | rest connection type | Select the type of REST connection. | OAuth2.0 |
Connection Name | name | Provide a name for the connection. | Shopify connection |
Connection Description | description | Provide a description for the connection. |
|
Host Name | host | Provide a string value for the URL of user's Shopify account. |
|
Grant Type | grant type | Provide the grant type - authorization code, password, client credentials. | authorization code, password, client credentials. |
Actions
Get Customers
Get Customers | key: getCustomers
Create Customers
Create Customers | key: createCustomers
Input | Key | Description | Example |
---|---|---|---|
First Name | firstName | Provide the first name of the customer | John |
Last Name | lastName | Provide the last name of the customer | Smith |
emailID | Mention the email id of the customer | ||
Phone | Phone | Provide the customer phone number | 18005555555 |
Addresses | Addresses | Provide the communication addresses of the customer | 132, My Street, Kingston, New York 12401. |
You can add multiple addresses based on your requirements.