Formatting error of shell command

Hi I’m trying use a Grocy shell command to consume products but I’m getting errors with the formatting. I’ve copied the code from The Grocy REST API (I’ve removed the URL and API keys below):

curl -X 'POST' \
  'https:/NABUCASAURL/api/stock/products/2/consume' \
  -H 'accept: application/json' \
  -H 'GROCY-API-KEY: API' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 1,
  "transaction_type": "consume",
  "spoiled": false
}'

I’m not sure how to properly format so I tried the one below (by following this guide):

shell_command:
  grocy_consume_item: "curl -X 'POST' \ 'https://NABUCASAURL/api/stock/products/2/consume' \ -H 'accept: application/json' \ -H 'GROCY-API-KEY: API' \ -H 'Content-Type: application/json' \ -d '{ "amount": 1, "transaction_type": "consume", "spoiled": false }'"

The following error appears in the sections after the code above: “incomplete explicit mapping pair, a key node is missed

Any suggestions?