0

I want to use gift card rest API link attached, which is default API available for add giftcard to cart.

POST ​ /V1​/carts​/mine​/giftCards

Payload

{
  "giftCardAccountData": {
    "gift_cards": [
      "string"
    ],
    "gift_cards_amount": 0,
    "base_gift_cards_amount": 0,
    "gift_cards_amount_used": 0,
    "base_gift_cards_amount_used": 0,
    "extension_attributes": {}
  }
}

Here I think 'string' is Gift Card Code. I am using gift code from table "magento_giftcardaccount_pool".

Tried with status 0 and 1 but always postman shows error

"message": "The gift card code couldn't be added. Verify your information and try again."

How can we test the API ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.