Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save somewherewarm-snippets/ed9dd7c6a17dd1424c5773cd99f9807e to your computer and use it in GitHub Desktop.
Save somewherewarm-snippets/ed9dd7c6a17dd1424c5773cd99f9807e to your computer and use it in GitHub Desktop.
curl -X PUT https://somewherewarm.test/support/wp-json/wc/v3/orders/68 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"gift_cards": [
{
"id": 43,
"code": "XXXX-XXXX-XXXX-XXXX",
"amount": 50 // Remaining order total becomes $50
},
{
"id": 96,
"code": "KKKK-KKKK-KKKK-KKKK",
"amount": 60 // Exceeds available order total, cannot be applied
}
]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment