Adding line items to a customers checkout

CodeKiwi
New Member
1 0 0

I am able to add line items to a checkout (not created using the Storefront API) using the REST API, however when I try to use GraphQL and build the GID using the values from the checkout/created webhook I get the error "unable to access Checkout". Is this function only available in the REST API?

{
"data": {
"checkoutDiscountCodeApplyV2": null
},
"errors": [
{
"message": "Unable to access Checkout.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"checkoutDiscountCodeApplyV2"
]
}
]
}

0 Likes