New Shopify API integration - Custom appF.A.Q

The Shopify API has updated while the private app is removed and custom app is released. If your store is a newly-opened one or you failed to sync orders into PFC using the previous private app, pls setup the new API following the steps on this page.

On this page

1. Allow custom app development

2. Create a custom app

3. Configure custom app access

4. Install custom app

5. Define shipping and delivery

6. Setup Shopify API in PFC

7. Acquire product in PFC

8. Acquire order in PFC

9. Confirm order in PFC

10. FAQs about Shopify API integration


*Important notice*

1. Please note [State] (or Province) and [Phone number] are the required columns in PFC system for order confirmation. Please update your Shopify settings and make it compulsory to enter [State](or Province) and [Phone number] during Shopify checkout for the sake of avoiding unnessary manual update of order info. If State is not commonly used in your country, simply enter the same name as your city.

2. When orders are synced with API, the Shopify order ID would be filled into the [Ref No] column in PFC system. Pease update your Shopify order ID prefix in advance to distinguish the orders if you have multiple Shopify accounts to be added into PFC system as duplicate Ref Nos are not allowed. If you didn't do that, the Shopify order ID will start with #1001 by default under all accounts, but you will only be able to sync one under one order ID using API sync feature. The other orders with the same order IDs can only be created manually.


1. Allow custom app development

1. Login Shopify admin, and click [setting] on the bottom-left;

2. Click into [Apps and sales channels], then click [Develop apps] on the top-right;

3. If it's your first time to use develop app, pls click [Allow custom app development] to enable this feature;

4. On the confirmation page, click [Allow custom app development].


2. Create a custom app

1. After custom app is enabled, click [Create an app] on the top-right;

2. In the pop-up window, enter PFC for the App name column ( or any other customized name which is easy for you to remember), select the App developer (it's the login account by default), and then click [Create app].


3. Configure custom app access

1. After the app is created, click into the [Configuration] tab;

2. In the Admin API integration section, click [Configure] on the right;

3. Select all the access displayed below, and click [Save].

write_assigned_fulfillment_orders, read_assigned_fulfillment_orders,

write_draft_orders, read_draft_orders

write_fulfillments, read_fulfillments,

write_locations, read_locations,

write_merchant_managed_fulfillment_orders, read_merchant_managed_fulfillment_orders,

write_orders, read_orders,

write_product_listings, read_product_listings,

write_products, read_products,

write_shipping, read_shipping,

write_locales, read_locales,

write_third_party_fulfillment_orders, read_third_party_fulfillment_orders,


4. Install custom app

1. After the access is saved, cllick into the API credentials tab;

2. Click [Install app] on the bottom-left;

3. In the pop-up window, read the terms and then click [Install];

4. The API access token will be displayed in hidden code on the page, click [Reveal token once];

5. Copy and save this token into your textbook or any other safe place.

Reminder: You can see the Admin API access token on this page only one time, because the token provides API access to sensitive store data. After revealing the access token, write down or record the token somewhere secure so that you can refer to it again. Treat the token like a password. Share the access token only with developers that you trust.


5. Define shipping and delivery

1. From your Shopify admin, click [Settings] at bottom-left;

2. Click [Shipping and delivery];

3. Define your shipping and delivery options by clicking [Manage rates] (you can setup general shipping rates and custom shipping rates as needed).

Please rememer the rate name for each country, this will be used for shipping matching at the next step.


6. Setup Shopify API in PFC

1. Login PFC system;

2. Go to [Order Manage] > [Order Manage] > [Store-API], or;

3. Go to [Fulfillment] > [Order Manage] > [Store-API];

4. In the default [API Key] tab, Click [Generate] if this is your first time to setup API integration in our system;

5. Click  [Save] in the pop-up window (one API key would be displayed to the right of your customer ID);

6. Switch to the [Shopify] tab, and click [Add];

7. In the pop-up window, enter your shop name (please enter your initial shop/store name when you first registered with Shopify);

8. Copy and paste your Admin API access token generated in step 1 to the [API key] and [Password] columns;

9. Select [Enabled] from the two drop-down menus;

10. In the [Transport] section, define your shipping matching rule by clicking [Add];

10.1 Copy your Shopify rate name to the first [Channel] column;

10.2 Select the designated PFC shipping method at the second [PFC Channel] column;

10.3 Repeat above two steps until you have added rules for all your destination countries;

11. Define default declared value and weight when necessary;

12. Select your warehouse if you are using warehouse fulfillment service to ship your Shopify orders;

13. Click [Save] after completed.


7. Acquire product in PFC

If you are using warehouse fulfillment to ship orders, please create orders first before acquiring orders. There are two ways to do this. One is to acquire following the steps before using API, while the other is to use Excel template to upload in bulk, pls refer warehouse fulfillment user guide for more details.

1. At PFC system, click into [Order Manage] > [Order Manage] > [Store-API], or;

2. Go to [Fulfillment] > [Order Manage] > [Store-API];

3. To the right of your Shopify store, click [Acquire Oder];

4. In the pop-up window, select your time frame (3 days at max for the duration per time);

5. Click [Acquire Product].


8. Acquire order in PFC

1. At PFC system, click into [Order Manage] > [Order Manage] > [Store-API], or;

2. Go to [Fulfillment] > [Order Manage] > [Store-API];

3. To the right of your Shopify store, click [Acquire Oder];

4. In the pop-up window, select your time frame;

5. Select [Paid] for Financial status;

6. Select Fulfillment status when necessary;

7. Select Country when necessary;

8. Click [Acquire Order].


9. Confirm order in PFC

1. At PFC system, click into [Dropshipping] >[Dropshipping service]>[Dropshipping order list], or;

2. Go to [Fulfillment] > [Order Manage] > [Fulfillment Order List];

3. Under [Draft] status, check the desired orders;

4. Click [Submit].


10. FAQs about Shopify API integration

Q1. What do I do when I get a Chinese error note saying "未将对象引用设置到对象的实例" or "Not Found"during order acquisitions?

A1. Please make sure you have entered the right shop name. The shop name submitted must be exactly the same with the initial shop/store name when you first registered with Shopify. If you do not remember it, please find it out follow the steps:

1. Go to your Shopify admin;

2. On the URL column of your browser, select all the characters before .myshopify.com which is your initial shop name, then copy and paste them into PFC API page.

Q2. What do I do when I get an error note saying "[API] This action requires merchant approval for read_orders scope." during order acquisitions?

A2. Please make sure you have approved all the essenstial access in Shopify which include the followings:


write_assigned_fulfillment_orders, read_assigned_fulfillment_orders,

write_draft_orders, read_draft_orders

write_fulfillments, read_fulfillments,

write_locations, read_locations,

write_merchant_managed_fulfillment_orders, read_merchant_managed_fulfillment_orders,

write_orders, read_orders,

write_product_listings, read_product_listings,

write_products, read_products,

write_shipping, read_shipping,

write_locales, read_locales,

write_third_party_fulfillment_orders, read_third_party_fulfillment_orders,

Q3. What do I do when I get an error note saying "Cannot find the product" during order acquisitions?

A3. If you are using warehouse fulfillment to manage your orders in PFC system, please do remember to add the same SKU for your Shopify products as you have created in PFC system. If you don't do that, the SKU column would be empty when a buyer places an order with you in Shopify, and system cannot acquire this order as it cannot find the Shopify SKU to match with same PFC SKU. If orders are already placed before adding SKUs to the related Shopify products, please create this order manaully or upload in bulk with Excel file in PFC system.

Q4. What do I do when I get an error note saying "Cannot find the channel code" during order acquisitions?

A4. Please check the followings:

1. Please make sure the shipping method you selected in the shipping matching rule is still active. Some shipping methods may expire due to special reasons, you can contact your account manager to recommend a new shipping method for you.

2. If the shipping method is active but you still get this error note, this means the specific country in your order is not supported by this shipping method. In this case, you may need to create order manually or upload in bulk with Excel file in PFC system. It's recommended to upate your shipping rates in Shopify timely so as to avoid repetive errors.

Q5. What do I do when the shipping method matched for orders are not the same with my shipping matching rules after order acquisitions?

A5. Please make sure the rate name you entered in Shopify is exactly the same as you have defined in PFC system for the specific countries. If system fails to match rate names, the shipping method CNAPOST would be used by default for the related orders.

2022-06-09 1759

Get Instant Quote