Gift Cards

💳 Gift Cards

Overview

Gift Cards are a great way to increase sales and attract new customers. Gift Cards can be purchased by customers and sent to friends and family as a gift. Gift Cards can be redeemed by customers at checkout.

End-point: Create Gift Card

Creates a Gift Card.

Method: POST

{{baseUrl}}/gift-cards

Headers

Content-TypeValue
Acceptapplication/json

Body

{
  "gift_card": {
    "balance": "<integer>",
    "code": "<string>",
    "ends_at": "<dateTime>",
    "metadata": {},
    "order_id": "<string>",
    "region_id": "<string>",
    "tax_rate": "<number>",
    "value": "<integer>"
  }
}

End-point: Get Gift Card by Code

Retrieves a Gift Card by its associated unique code.

Method: GET

{{baseUrl}}/gift-cards/:code

Headers

Content-TypeValue
Acceptapplication/json

Response: 200

{
  "gift_card": {
    "balance": "<integer>",
    "code": "<string>",
    "created_at": "<dateTime>",
    "deleted_at": "<dateTime>",
    "ends_at": "<dateTime>",
    "id": "<string>",
    "is_disabled": false,
    "metadata": {},
    "order_id": "<string>",
    "region_id": "<string>",
    "tax_rate": "<number>",
    "updated_at": "<dateTime>",
    "value": "<integer>",
    "region": {
      "automatic_taxes": true,
      "created_at": "<dateTime>",
      "currency_code": "<string>",
      "deleted_at": "<dateTime>",
      "gift_cards_taxable": true,
      "id": "<string>",
      "metadata": {},
      "name": "<string>",
      "tax_code": "<string>",
      "tax_provider_id": "<string>",
      "tax_rate": "<number>",
      "updated_at": "<dateTime>",
      "currency": {
        "code": "<string>",
        "name": "<string>",
        "symbol": "<string>",
        "symbol_native": "<string>",
        "includes_tax": false
      },
      "tax_rates": [
        {
          "code": "<string>",
          "created_at": "<dateTime>",
          "id": "<string>",
          "metadata": {},
          "name": "<string>",
          "rate": "<number>",
          "region_id": "<string>",
          "updated_at": "<dateTime>",
          "region": {
            "value": "<Circular reference to #/components/schemas/Region detected>"
          },
          "products": [
            {
              "collection_id": "<string>",
              "created_at": "<dateTime>",
              "deleted_at": "<dateTime>",
              "description": "<string>",
              "discountable": true,
              "external_id": "<string>",
              "handle": "<string>",
              "height": "<number>",
              "hs_code": "<string>",
              "id": "<string>",
              "is_giftcard": false,
              "length": "<number>",
              "material": "<string>",
              "metadata": {},
              "mid_code": "<string>",
              "origin_country": "<string>",
              "profile_id": "<string>",
              "status": "draft",
              "subtitle": "<string>",
              "type_id": "<string>",
              "thumbnail": "<uri>",
              "title": "<string>",
              "updated_at": "<dateTime>",
              "weight": "<number>",
              "width": "<number>",
              "images": [
                {
                  "created_at": "<dateTime>",
                  "deleted_at": "<dateTime>",
                  "id": "<string>",
                  "metadata": {},
                  "updated_at": "<dateTime>",
                  "url": "<uri>"
                }
              ],
              "options": [
                {
                  "created_at": "<dateTime>",
                  "deleted_at": "<dateTime>",
                  "id": "<string>",
                  "metadata": {},
                  "product_id": "<string>",
                  "title": "<string>",
                  "updated_at": "<dateTime>",
                  "values": [
                    {
                      "created_at": "<dateTime>",
                      "deleted_at": "<dateTime>",
                      "id": "<string>",
                      "metadata": {},
                      "option_id": "<string>",
                      "updated_at": "<dateTime>",
                      "value": "<string>",
                      "variant_id": "<string>",
                      "option": {
                        "value": "<Circular reference to #/components/schemas/ProductOption detected>"
                      },
                      "variant": {
                        "allow_backorder": false,
                        "barcode": "<string>",
                        "created_at": "<dateTime>",
                        "deleted_at": "<dateTime>",
                        "ean": "<string>",
                        "height": "<number>",
                        "hs_code": "<string>",
                        "id": "<string>",
                        "inventory_quantity": "<integer>",
                        "length": "<number>",
                        "manage_inventory": true,
                        "material": "<string>",
                        "metadata": {},
                        "mid_code": "<string>",
                        "origin_country": "<string>",
                        "product_id": "<string>",
                        "sku": "<string>",
                        "title": "<string>",
                        "upc": "<string>",
                        "updated_at": "<dateTime>",
                        "weight": "<number>",
                        "width": "<number>",
                        "product": {
                          "value": "<Circular reference to #/components/schemas/Product detected>"
                        },
                        "prices": [
                          {
                            "amount": "<integer>",
                            "created_at": "<dateTime>",
                            "currency_code": "<string>",
                            "deleted_at": "<dateTime>",
                            "id": "<string>",
                            "max_quantity": "<integer>",
                            "min_quantity": "<integer>",
                            "price_list_id": "<string>",
                            "region_id": "<string>",
                            "updated_at": "<dateTime>",
                            "variant_id": "<string>",
                            "currency": {
                              "code": "<string>",
                              "name": "<string>",
                              "symbol": "<string>",
                              "symbol_native": "<string>",
                              "includes_tax": false
                            },
                            "price_list": {
                              "created_at": "<dateTime>",
                              "deleted_at": "<dateTime>",
                              "description": "<string>",
                              "ends_at": "<dateTime>",
                              "id": "<string>",
                              "name": "<string>",
                              "starts_at": "<dateTime>",
                              "status": "draft",
                              "type": "sale",
                              "updated_at": "<dateTime>",
                              "customer_groups": [
                                {
                                  "value": "<Error: Too many levels of nesting to fake this schema>"
                                }
                              ],
                              "prices": [
                                {
                                  "value": "<Error: Too many levels of nesting to fake this schema>"
                                }
                              ],
                              "includes_tax": false
                            },
                            "variant": {
                              "value": "<Circular reference to #/components/schemas/ProductVariant detected>"
                            },
                            "region": {
                              "value": "<Circular reference to #/components/schemas/Region detected>"
                            }
                          }
                        ],
                        "variant_rank": 0,
                        "options": [
                          {
                            "value": "<Circular reference to #/components/schemas/ProductOptionValue detected>"
                          }
                        ],
                        "inventory_items": [
                          {
                            "created_at": "<dateTime>",
                            "deleted_at": "<dateTime>",
                            "id": "<string>",
                            "inventory_item_id": "<string>",
                            "required_quantity": 1,
                            "updated_at": "<dateTime>",
                            "variant_id": "<string>",
                            "variant": {
                              "value": "<Circular reference to #/components/schemas/ProductVariant detected>"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "product": {
                    "value": "<Circular reference to #/components/schemas/Product detected>"
                  }
                }
              ],
              "variants": [
                {
                  "allow_backorder": false,
                  "barcode": "<string>",
                  "created_at": "<dateTime>",
                  "deleted_at": "<dateTime>",
                  "ean": "<string>",
                  "height": "<number>",
                  "hs_code": "<string>",
                  "id": "<string>",
                  "inventory_quantity": "<integer>",
                  "length": "<number>",
                  "manage_inventory": true,
                  "material": "<string>",
                  "metadata": {},
                  "mid_code": "<string>",
                  "origin_country": "<string>",
                  "product_id": "<string>",
                  "sku": "<string>",
                  "title": "<string>",
                  "upc": "<string>",
                  "updated_at": "<dateTime>",
                  "weight": "<number>",
                  "width": "<number>",
                  "product": {
                    "value": "<Circular reference to #/components/schemas/Product detected>"
                  },
                  "prices": [
                    {
                      "amount": "<integer>",
                      "created_at": "<dateTime>",
                      "currency_code": "<string>",
                      "deleted_at": "<dateTime>",
                      "id": "<string>",
                      "max_quantity": "<integer>",
                      "min_quantity": "<integer>",
                      "price_list_id": "<string>",
                      "region_id": "<string>",
                      "updated_at": "<dateTime>",
                      "variant_id": "<string>",
                      "currency": {
                        "code": "<string>",
                        "name": "<string>",
                        "symbol": "<string>",
                        "symbol_native": "<string>",
                        "includes_tax": false
                      },
                      "price_list": {
                        "created_at": "<dateTime>",
                        "deleted_at": "<dateTime>",
                        "description": "<string>",
                        "ends_at": "<dateTime>",
                        "id": "<string>",
                        "name": "<string>",
                        "starts_at": "<dateTime>",
                        "status": "draft",
                        "type": "sale",
                        "updated_at": "<dateTime>",
                        "customer_groups": [
                          {
                            "value": "<Error: Too many levels of nesting to fake this schema>"
                          }
                        ],
                        "prices": [
                          {
                            "value": "<Error: Too many levels of nesting to fake this schema>"
                          }
                        ],
                        "includes_tax": false
                      },
                      "variant": {
                        "value": "<Circular reference to #/components/schemas/ProductVariant detected>"
                      },
                      "region": {
                        "value": "<Circular reference to #/components/schemas/Region detected>"
                      }
                    }
                  ],
                  "variant_rank": 0,
                  "options": [
                    {
                      "value": "<Circular reference to #/components/schemas/ProductOptionValue detected>"
                    }
                  ],
                  "inventory_items": [
                    {
                      "created_at": "<dateTime>",
                      "deleted_at": "<dateTime>",
                      "id": "<string>",
                      "inventory_item_id": "<string>",
                      "required_quantity": 1,
                      "updated_at": "<dateTime>",
                      "variant_id": "<string>",
                      "variant": {
                        "value": "<Circular reference to #/components/schemas/ProductVariant detected>"
                      }
                    }
                  ]
                }
              ],
              "categories": [
                {
                  "category_children": [
                    {
                      "value": "<Circular reference to #/components/schemas/ProductCategory detected>"
                    }
                  ],
                  "created_at": "<dateTime>",
                  "deleted_at": "<dateTime>",
                  "handle": "<string>",
                  "id": "<string>",
                  "is_active": false,
                  "is_internal": false,
                  "mpath": "<string>",
                  "name": "<string>",
                  "parent_category_id": null,
                  "updated_at": "<dateTime>",
                  "parent_category": {
                    "value": "<Circular reference to #/components/schemas/ProductCategory detected>"
                  },
                  "products": [
                    {
                      "value": "<Circular reference to #/components/schemas/Product detected>"
                    }
                  ]
                }
              ],
              "profile": {
                "created_at": "<dateTime>",
                "deleted_at": "<dateTime>",
                "id": "<string>",
                "metadata": {},
                "name": "<string>",
                "type": "custom",
                "updated_at": "<dateTime>",
                "products": [
                  {
                    "value": "<Circular reference to #/components/schemas/Product detected>"
                  }
                ],
                "shipping_options": [
                  {
                    "admin_only": false,
                    "amount": "<integer>",
                    "created_at": "<dateTime>",
                    "data": {},
                    "deleted_at": "<dateTime>",
                    "id": "<string>",
                    "is_return": false,
                    "metadata": {},
                    "name": "<string>",
                    "price_type": "calculated",
                    "profile_id": "<string>",
                    "provider_id": "<string>",
                    "region_id": "<string>",
                    "updated_at": "<dateTime>",
                    "region": {
                      "value": "<Circular reference to #/components/schemas/Region detected>"
                    },
                    "profile": {
                      "value": "<Circular reference to #/components/schemas/ShippingProfile detected>"
                    },
                    "provider": {
                      "id": "<string>",
                      "is_installed": true
                    },
                    "requirements": [
                      {
                        "amount": "<integer>",
                        "deleted_at": "<dateTime>",
                        "id": "<string>",
                        "shipping_option_id": "<string>",
                        "type": "min_subtotal",
                        "shipping_option": {
                          "value": "<Circular reference to #/components/schemas/ShippingOption detected>"
                        }
                      }
                    ],
                    "includes_tax": false
                  }
                ]
              },
              "collection": {
                "created_at": "<dateTime>",
                "deleted_at": "<dateTime>",
                "handle": "<string>",
                "id": "<string>",
                "metadata": {},
                "title": "<string>",
                "updated_at": "<dateTime>",
                "products": [
                  {
                    "value": "<Circular reference to #/components/schemas/Product detected>"
                  }
                ]
              },
              "type": {
                "created_at": "<dateTime>",
                "deleted_at": "<dateTime>",
                "id": "<string>",
                "metadata": {},
                "updated_at": "<dateTime>",
                "value": "<string>"
              },
              "tags": [
                {
                  "created_at": "<dateTime>",
                  "deleted_at": "<dateTime>",
                  "id": "<string>",
                  "metadata": {},
                  "updated_at": "<dateTime>",
                  "value": "<string>"
                }
              ],
              "sales_channels": [
                {
                  "created_at": "<dateTime>",
                  "deleted_at": "<dateTime>",
                  "description": "<string>",
                  "id": "<string>",
                  "is_disabled": false,
                  "name": "<string>",
                  "updated_at": "<dateTime>",
                  "locations": [
                    {
                      "created_at": "<dateTime>",
                      "deleted_at": "<dateTime>",
                      "id": "<string>",
                      "location_id": "<string>",
                      "sales_channel_id": "<string>",
                      "updated_at": "<dateTime>",
                      "sales_channel": {
                        "value": "<Circular reference to #/components/schemas/SalesChannel detected>"
                      }
                    }
                  ]
                }
              ]
            }
          ],
          "product_types": [
            {
              "created_at": "<dateTime>",
              "deleted_at": "<dateTime>",
              "id": "<string>",
              "metadata": {},
              "updated_at": "<dateTime>",
              "value": "<string>"
            }
          ],
          "shipping_options": [
            {
              "admin_only": false,
              "amount": "<integer>",
              "created_at": "<dateTime>",
              "data": {},
              "deleted_at": "<dateTime>",
              "id": "<string>",
              "is_return": false,
              "metadata": {},
              "name": "<string>",
              "price_type": "calculated",
              "profile_id": "<string>",
              "provider_id": "<string>",
              "region_id": "<string>",
              "updated_at": "<dateTime>",
              "region": {
                "value": "<Circular reference to #/components/schemas/Region detected>"
              },
              "profile": {
                "value": "<Circular reference to #/components/schemas/ShippingProfile detected>"
              },
              "provider": {
                "id": "<string>",
                "is_installed": true
              },
              "requirements": [
                {
                  "amount": "<integer>",
                  "deleted_at": "<dateTime>",
                  "id": "<string>",
                  "shipping_option_id": "<string>",
                  "type": "max_subtotal",
                  "shipping_option": {
                    "value": "<Circular reference to #/components/schemas/ShippingOption detected>"
                  }
                }
              ],
              "includes_tax": false
            }
          ],
          "product_count": "<integer>",
          "product_type_count": "<integer>",
          "shipping_option_count": "<integer>"
        }
      ],
      "countries": [
        {
          "value": "<Circular reference to #/components/schemas/Country detected>"
        }
      ],
      "tax_provider": {
        "id": "<string>",
        "is_installed": true
      },
      "payment_providers": [
        {
          "id": "<string>",
          "is_installed": true
        }
      ],
      "fulfillment_providers": [
        {
          "id": "<string>",
          "is_installed": true
        }
      ],
      "includes_tax": false
    },
    "order": {
      "value": "<Circular reference to #/components/schemas/Order detected>"
    }
  }
}