> For the complete documentation index, see [llms.txt](https://landofcoder.gitbook.io/magento-2-gift-card-extension/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://landofcoder.gitbook.io/magento-2-gift-card-extension/rest-api.md).

# Rest API

Rest api for quick Request For Quot

**Get List Gift Card By Quote Id**

Endpoint: /V1/carts/:quoteId/giftCards

`Method:` **GET**

`Params:`&#x20;

* quoteId

Response Data:

```json
{
  "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": {}
}
```

**Edit Gift Card by quoteId**

Endpoint: /V1/carts/:cartId/giftCards

`Method:` **PUT**

`Params:`&#x20;

* cartId
* body:

  ```json
  {
    "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": {}
    }
  }
  ```

Response Data:

```json
true
```

**Delete Gift Card By Quote id**

Endpoint: /V1/carts/:cartId/giftCards/:giftCardCode

`Method:` **DELETE**

`Params:`&#x20;

* giftCardCode
* cartId

Response Data:

**Guest Delete Gift Card**

Endpoint: /V1/carts/guest-carts/:cartId/giftCards/:giftCardCode

`Method:` **DELETE**

`Params:`&#x20;

* cartId
* giftCardCode

Response Data:

```json
true
```

**Customer Delete Gift Card**

Endpoint: /V1/carts/mine/giftCards/:giftCardCode

`Method:` **DELETE**

`Params:`&#x20;

* giftCardCode

Response Data:

```json
true
```

**Customer Create Gift Card**

Endpoint: /V1/carts/mine/giftCards

`Method:` **POST**

`Params:`&#x20;

```json
{
  "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": {}
  }
}
```

Response Data:

```json
true
```

**Guest create Gift Card**

Endpoint: /V1/carts/guest-carts/:cartId/giftCards

`Method:` **POST**

`Params:`&#x20;

* cartId
* body:

  ```json
  {
    "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": {}
    }
  }
  ```

Response Data:

```json
true
```

**Check Gift Card For Guest**

Endpoint: /V1/carts/guest-carts/:cartId/checkGiftCard/:giftCardCode

`Method:` **GET**

`Params:`&#x20;

* cartId
* giftCardCode

Response Data:

```
0
```

Endpoint: /V1/carts/mine/checkGiftCard/:giftCardCode

`Method:` **GET**

`Params:`&#x20;

* giftCardCode

Response Data:

```
0
```
