Trying to get fulfillmentStatus and financialStatus from Orders object but get error

Let me start off by saying I’m new to the storefront API and graphql. I’m trying to create an order history table in a customer’s account profile on my dev site. I have a query that fetches customer data with an access token (as seen below). When I add fulfillmentStatus and financialStatus to the query in the orders object, it returns a couple of errors: "Field 'financialStatus' doesn't exist on type 'Order'" and "Field 'fulfillmentStatus' doesn't exist on type 'Order'". The documentation says that the Order object has those two fields. What am I doing wrong? Any help would be greatly appreciated.

const customerQuery = gql`
    query customerQuery($token: String!) {
        customer(customerAccessToken: $token) {
            firstName
            lastName
            phone
            phone
            displayName
            defaultAddress {
                address1
                address2
                city
                province
                country
            }
            orders(first: 100) {
                edges {
                    node {
                        id
                        name
                        customerUrl
                        orderNumber
                        processedAt
                        subtotalPrice
                        fulfillmentStatus
                        financialStatus
                    }
                }
            }
        }
    }
`;
1 Like

Hello, I am having the same problem!
Did you find a solution ?

Thanks !

1 Like

Hey @benjibutton

I just tried this using version 2020-07 and didn’t have any issues. Can you get me the x-request-id response header so I can take a look at our logs?

1 Like

Hey @Kevin_A

The x-request-id is below. Feel free to let me know if there is anything I am doing wrong.

8f0a3773-bb85-46c2-8632-92091ae2e7ba

Hey @benjibutton

Looks like you are not specifying an API version so it is serving you 2019-10, and in 2019-10 it doesn’t look like these fields existed. You can find more information on specifying a newer API version here.

I’m trying the same thing with 2023-04 API, and getting the same error message.

x-request-id:

693d7c66-5671-411f-9b96-a9cbf9863e28

{“errors”:[{“message”:“Field ‘fulfillmentStatus’ doesn’t exist on type ‘Order’”,“locations”:[{“line”:7,“column”:1}],“path”:[“query getCustomerOrders”,“customer”,“orders”,“edges”,“node”,“fulfillmentStatus”],“extensions”:{“code”:“undefinedField”,“typeName”:“Order”,“fieldName”:“fulfillmentStatus”}},{“message”:“Field ‘financialStatus’ doesn’t exist on type ‘Order’”,“locations”:[{“line”:8,“column”:1}],“path”:[“query getCustomerOrders”,“customer”,“orders”,“edges”,“node”,“financialStatus”],“extensions”:{“code”:“undefinedField”,“typeName”:“Order”,“fieldName”:“financialStatus”}}]}

Ahh.. i’m using the Admin API not storefront… that explains them being missing..

Excuse me,bro. what’s the difference between them. Since I have met the same issue today..

Finally, they are actually two different bulks of apis…I got it. thx bro.