This app demonstrates the core concepts of a Fulfillment Service App that processes order fulfillments for a store using the Fulfillment Admin APIs.
- Creating Fulfillment Locations - See example location create api request wrapper.
- Accepting Fulfillment Requests - See example fulfillment request reciver
- Rejecting Fulfillment Requests - See example fulfillment request reciver
- Accepting Cancellation Requests - See example fulfillment request reciver
- Rejecting Cancellation Requests - See example fulfillment request reciver
- Creating Fulfillments - See example create fulfillment api wrapper
- App Oauth Setup Install Flow - See store auth setup flow handler
This app uses Django, you can follow Django install guides to ensure you have Python in your local environment.
The first step is to create an App in your 29 Next Partner Account. You'll need your app Client ID and Client Secret later on in the setup process.
pip install -r requirements.txt
To access your localhost for app development, you can use Ngrok or LocalTunnel to create and open a public tunnel to your local machine.
Variable | Description |
---|---|
APP_DOMAIN | Your domain when running the app (ie your public tunnel url). |
CLIENT_ID | Your App Client ID found in your partner account. |
CLIENT_SECRET | Your App Client Secret found in your partner account. |
To run this Django project, you'll need to set environment variables with your local app domain, app client id and client secret (from your 29 Next app).
You can set these directly in your terminal or create an .env
file inside the app
directory.
To run the Django app on your local, use the following command.
Django port needs to match the public tunnel port.
cd app/
python manage.py runserver 0.0.0.0:3333
You should now be able to access the app locally. You'll need to create a super user to login with, use the following command:
python manage.py createsuperuser
The full Django admin is available at /admin/
You can now connect your app to your development store which will initiate the Oauth setup flow and configure Admin API access. 🎉