Get additional information on line items on abandoned checkouts

Topic summary

A developer is trying to retrieve line item data (including custom properties) from abandoned checkouts created by unregistered customers, using only the checkout ID from the URL.

Methods Attempted:

  1. REST Admin API (GET /checkouts/{token}): Returns an error requiring merchant approval for read_checkouts scope, which would necessitate converting to a Sales channel app—an undesired change.

  2. GraphQL Storefront API: Returns “Expected String to be a ID” error when querying the checkout node.

  3. GraphQL Admin API (querying as Order): Returns “Access denied for order field” despite having read_orders access issued for the GraphiQL App. Requires read_orders, read_marketplace_orders, or read_buyer_membership_orders scope.

  4. REST Admin API (GET /orders/{order-id}): Attempted with fields parameter for line items, name, and total price.

Core Question:

Is it even possible to retrieve line item data from an unregistered user’s abandoned checkout? If so, how can this be accomplished without converting the app to a Sales channel or altering the store’s sales flow?

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

An unregistered customer adds an order to the cart and moves to checkout, after which he leaves this page. We want to get information from this checkout (LineItems with custom properties), knowing only the checkout id stored in the link, for example https://myshop.com/checkouts/c/c19cdd0166046125965b33b3913f576a (where c19cdd0166046125965b33b3913f576a is checkout id).
Currently, we have tried several methods:

  1. Request from https://shopify.dev/docs/api/admin-rest/2024-04/resources/checkout#get-checkouts-token
curl -X GET -H “X-Shopify-Access-Token: app_access_token” -H “Content-Type: application/json” https://myshop.myshopify.com/admin/api/2024-04/checkouts/c19cdd0166046125965b33b3913f576a.json

For this request, we receive an error [API] This action requires merchant approval for read_checkouts scope. Based on the documentation, we need to convert the application to a Sales channel app, but we do not want to change the sales flow for our store.

  1. Query via GraphQL Storefront API in Shopify GraphiQL App:
{
   node(id: “gid://shopify/Checkout/c19cdd0166046125965b33b3913f576a”) {
     ... on Checkout {
       id
       lineItems {
         nodes {
           customAttributes {
             key
             value
           }
           title
           unitPrice {
             amount
             currencyCode
           }
           variant {
             sku
             title
           }
         }
       }
     }
   }
}

In response, We received

{
   “data”: {
     “node”: null
   }
}

Which means (I think, not sure) that no data was found for this node.

  1. Request via GraphQL AdminAPI Shopify GraphiQL App for request
query MyQuery {
   order(id: “gid://shopify/Order/c19cdd0166046125965b33b3913f576a”) {
     lineItems(first: 10) {
       nodes {
         customAttributes {
           key
           value
         }
       }
     }
   }
}

We get the error Access denied for order field. Required access: read_orders access scope, read_marketplace_orders access scope or read_buyer_membership_orders access scope. At the same time, we issued read_orders access for the Shopify GraphiQL App.
4. Request from https://shopify.dev/docs/api/admin-rest/2024-04/resources/order#get-orders-order-id?fields=id,line-items,name,total-price

curl -X GET “https://myshop.myshopify.com/admin/api/2024-04/orders/c19cdd0166046125965b33b3913f576a.json?fields=line_items%2Cname%2Ctotal_price” -H “X-Shopify-Access-Token: private_token”

We get the error

{“errors”:{“id”:“expected String to be a id”}}

So, Is it even possible to get data about LineItems from the abandoned checkout of an unregistered user? And if so, how can this be done?