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:

  1. The app requests access to a Shopify API resource.

  2. Shopify requests a username and password to authenticate the request.

  3. The app sends the username and password to Shopify.

  4. Shopify returns the requested data.

Input

Description

Examples

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

Scope

Access

read_all_orders

All orders rather than the default window of 60 days worth of orders permissions required

This OAuth scope is used in conjunction with read_orders and write_orders. You need to request permission for this access scope from your Partner Dashboard before adding it to your app.

read_assigned_fulfillment_orders,

write_assigned_fulfillment_orders

FulfillmentOrder resources assigned to a location managed by your fulfillment service

read_checkouts,

write_checkouts

Checkouts

read_content,

write_content

Article, Blog, Comment, Page, and Redirect

read_customers,

write_customers

Customer and Saved Search

read_customer_payment_methods

CustomerPaymentMethod permissions required

You need to request permission for this access scope from your Partner Dashboard before adding it to your app.

read_discounts,

write_discounts

GraphQL Admin API Discounts features

read_draft_orders,

write_draft_orders

Draft Order

read_files,

write_files

GraphQL Admin API GenericFile object and fileCreate, fileUpdate, and fileDelete mutations

read_fulfillments,

write_fulfillments

Fulfillment Service

read_gift_cards,

write_gift_cards

Gift Card shopify plus

read_inventory,

write_inventory

Inventory Level and Inventory Item

read_legal_policies

GraphQL Admin API Shop Policy

read_locales,

write_locales

GraphQL Admin API Shop Locale

read_locations

Location

read_marketing_events,

write_marketing_events

Marketing Event

read_merchant_approval_signals

MerchantApprovalSignals

read_merchant_managed_fulfillment_orders,

write_merchant_managed_fulfillment_orders

FulfillmentOrder resources assigned to merchant-managed locations

read_orders,

write_orders

Abandoned checkouts, Customer, Fulfillment, Order, and Transaction resources

read_payment_mandate,

write_payment_mandate

PaymentMandate

read_payment_terms,

write_payment_terms

GraphQL Admin API PaymentSchedule and PaymentTerms objects

read_price_rules,

write_price_rules

Price Rules

read_products,

write_products

Product, Product Variant, Product Image, Collect, Custom Collection, and Smart Collection

read_product_listings

Product Listing and Collection Listing

read_publications,

write_publications

Product publishing and Collection publishing

The read_publications and

write_publications scopes are currently available only to private apps installed on Shopify Plus stores. Contact Shopify Partner Support to enable these scopes for your app.

read_purchase_options,

write_purchase_options

SellingPlan

read_reports,

write_reports

Reports

read_resource_feedbacks,

write_resource_feedbacks

ResourceFeedback

read_script_tags,

write_script_tags

Script Tag

read_shipping,

write_shipping

Carrier Service, Country, and Province

read_shopify_payments_disputes

Shopify Payments Dispute resource

read_shopify_payments_payouts

Shopify Payments Payout, Balance, and Transaction resources

read_own_subscription_contracts,

write_own_subscription_contracts

SubscriptionContract permissions required

You need to request permission for these access scopes from your Partner Dashboard before adding them to your app.

read_themes,

write_themes

Asset and Theme

read_translations,

write_translations

GraphQL Admin API Translatable object

read_third_party_fulfillment_orders,

write_third_party_fulfillment_orders

FulfillmentOrder resources assigned to a location managed by any fulfillment service

read_users

User and StaffMembershopify plus

read_order_edits,

write_order_edits

GraphQL Admin API OrderStagedChange types and order editing features

write_payment_gateways

Payments Apps API paymentsAppConfigure

write_payment_sessions

Payments Apps API Payment, Capture, Refund and Void

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.

example.atlassian.net

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, Bearer, Token, None

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

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

Email

emailID

Mention the email id of the customer

John.Smith@example.com

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.