Orders.json filtering to include fulfillment_status=null

We have a process which gets a list of new orders based on a fulfillment_status of unshipped or partial

We have been using this logic for many years however we now have a customer where some orders do not download becasue they have a fulfillment_status of null. The orders look to be complete, but it seems that when the payment is mixed (gift card, credit card) they show up with this null status. Why would they be null? How can I query for fulfillment status INCLUDING null?

endpoint = orders.json?fulfillment_status=unshipped,partial

“current_quantity”: 1,
“fulfillable_quantity”: 1,
“fulfillment_service”: “manual”,
“fulfillment_status”: null,

I don’t know if this will be of any help to you, but i remember there being an issue with the API that if the order is ON_HOLD the fulfillment_status would return null,

1 Like

I would probably look at moving over to GraphQL as the REST API is deprecated.
You’ll then be able to use the fulfillment orders to get a better idea of what is going on

Looks like the GraphQL API also has this issue. Noticing on tiktok orders that have this 1 hour window to cancel. Shopify order comes with fulfilment_status null instead of ON_HOLD as should be ( https://help.shopify.com/en/manual/fulfillment/fulfilling-orders/holding-fulfillments)

Hey @Team_SureDone,

Can you share the GraphQL query you’re using? In GraphQL, the displayFulfillmentStatus field should return ON_HOLD for orders with fulfillment holds. Curious what you’re seeing instead.

Hi Kyle. First of all thanks for your quick response.

I was able know to find the reason. I was doing the query like this:

query GetOnHoldOrders($first: Int!, $after: String) {
    orders(first: $first, after: $after, query: "fulfillment_status:on_hold", sortKey: CREATED_AT, reverse: true) {
        edges {
            cursor
            node {
                id
                name
                createdAt
                updatedAt
                displayFinancialStatus
                displayFulfillmentStatus
                totalPriceSet {
                    shopMoney {
                        amount
                        currencyCode
                    }
                }
                customer {
                    id
                    email
                    firstName
                    lastName
                }
                channelInformation {
                    channelDefinition {
                        handle
                        channelName
                    }
                }
                tags
                note
                lineItems(first: 10) {
                    edges {
                        node {
                            name
                            quantity
                            sku
                        }
                    }
                }
                shippingAddress {
                    city
                    provinceCode
                    country
                }
            }
        }
        pageInfo {
            hasNextPage
            endCursor
        }
    }
}


And the return was empty.

Then I changed the query to this:

query GetRecentOrders($first: Int!) {
    orders(first: $first, sortKey: CREATED_AT, reverse: true) {
        edges {
            cursor
            node {
                id
                name
                createdAt
                updatedAt
                displayFinancialStatus
                displayFulfillmentStatus
                email
                sourceName
                totalPriceSet {
                    shopMoney {
                        amount
                        currencyCode
                    }
                }
                channelInformation {
                    channelDefinition {
                        handle
                        channelName
                    }
                }
                tags
                note
                lineItems(first: 10) {
                    edges {
                        node {
                            name
                            quantity
                            sku
                        }
                    }
                }
                shippingAddress {
                    city
                    provinceCode
                    country
                }
            }
        }
        pageInfo {
            hasNextPage
            endCursor
        }
    }
}

And I actually had Orders whose status was ON_HOLD.

Now I’m realizing the error may be because I was asking for customer data on the first query without having the necessary scopes.

Now I was able to make it work!

Now my question is about the REST API. I’m still getting fulfillment_status: null for the same order at same time but using the orders.json.

Do you think it could be something else or is just a bug as pointing above?

Thanks!
Mati

Hey @Team_SureDone,

Good to hear GraphQL is working now.

On the REST question, the Order resource’s fulfillment_status only supports four values (fulfilled, partial, null, restocked) - on_hold isn’t one of them.

If you need to stay in REST, the FulfillmentOrder resource does have on_hold as a status value. But since REST is a legacy API, GraphQL is the better path forward. You’ll get richer data and it’s where new features land.

1 Like