Skip to content

Shopify/fulfillment-order-sample-app

Repository files navigation

Shopify Reference - Fulfillment App

License: MIT

This is an reference app to show how the Shopify GQL Admin API fulfillmentOrder object can be used. When using this code keep in mind: This is a sample application. It is not production-ready, many edge cases are not covered.

It leverages the Shopify API Library on the backend to create an embedded app, and Polaris and App Bridge React on the frontend.

This is the based on the Node app generated with the Shopify CLI.

Requirements

Installation

  • Visit your Partner Account dashboard.
  • Go to the Apps page and click Create App.
  • Select Public App, and choose a name for your app.
  • In the App URL field enter any url for now (e.g: https://localhost:3000/), as this will be automatically updated in the next step.
  • Do the same for Allowed redirection URL(s), except add /auth/callback to the path like so: https://localhost:3000/auth/callback.
  • Click Create App to confirm.

Connect to the app with Shopify CLI

In the terminal where you cloned the repo run

shopify login
# optionally pass `--shop=YOUR_SHOP` flag to specify your test store

Run the shopify app connect command to associate the local code to the newly created app:

shopify app connect

You will be prompted to answer the following questions:

  • To which app does this project belong? (Select the app you just created in your partner account dashboard).
  • Which development store would you like to use? (This will only appear if you did not use the --shop flag above).

Update API Scopes

Update the .env file and update to the following

SHOPIFY_API_KEY={api key}                                     # Your API key
SHOPIFY_API_SECRET={api secret key}                           # Your API secret key
SCOPES=write_merchant_managed_fulfillment_orders,write_orders # Your app's required scopes, comma-separated
HOST={your app's host}                                        # Your app's host, without the protocol prefix

Starting the application

To start the server, run the shopify app serve command and answer the prompts:

shopify app serve
  • Do you want to convert <your-store>.myshopify.com to a development store? (Choose yes)
  • Do you want to update your application url? (Choose "yes")

Developer resources

License

This repository is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published