I’m investigating how we should proceed with moving away from the Fulfillment API, and I have some questions on the general approach we’re taking.
We sell our own software through our Shopify store, and as of today, we’re using the Fulfillment API to both give our customers a unique download link after completing purchase of their order.
The workflow goes like this:
- Our store has an “order payment” webhook configured that sends order details over to our backend REST API.
- our API parses the order payload’s line items and finds products that are designated as “software”.
- we create a license key for each software item, and make a call to the Shopify Fulfillment API (specifically the POST /admin/api/2021-01/orders/{order_id}/fulfillments.json endpoint) with a payload like this:
{
"fulfillment": {
"location_id": 66666666666,
"tracking_company": "Other",
"tracking_urls": [
"https://our-rest-backend.service.com?shop_redeem_guid=xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxx"
],
"line_items": [
{
"id": 12797146104021
}
],
"notify_customer": true
}
}
By POSTing this to the Fulfillment API, we are able to also trigger an email to the customer with the “download link” as a tracking number. We also are able to embed the license key for their software in the URL as a guid (as you can see in tracking number field).
As I read more about the FulfillmentOrder API, it doesn’t seem to be meant for what we’re trying to do as it injects quite a bit more back and forth work. As such, I’m curious if you have a suggestion for a different approach given the relative simplicity of what we’re trying to do. I also read through some of the other FAQ posts and it seemed like maybe what we’re doing right now might not break after March 31st, but I could be misreading…
thanks,
Brandon