gift_card_code_logs

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a list of gift_card_code_logs
GET
View a list of gift_card_code_logs
POST
Create a new gift_card_code_logs
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:gift_card_code_logs": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/gift_card_code_log_detail">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: gift_card_code_log_detail

Description

This resource is a historical record for every event (Foxy transactions, external (POS) transactions you sync with Foxy using this API, admin actions to update the balance, etc.) for specific gift card codes. It contains link relationships to the gift card code used and the transaction (if applicable) it was used with.

Actions

GET
View a gift_card_code_log_detail
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
user_id User id that made the change, for store admin or API initiated balance adjustments. Integer Optional.
external_id External id associated with gift card. If you maintain gift card balances across multiple systems, you can use this field to track non-Foxy transactions. String Optional. 50 characters or less.
transaction_id The Foxy transaction ID associated with gift card usage. Integer Optional.
balance_adjustment Balance adjustment for the gift card. Decimal Optional.
source Source that made the change for the gift card. String Read only
date_created The date this resource was created.. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api.foxycart.test/gift_card_code_log_detail/16",
            "title": "Gift Card Code Transaction Relationship"
        },
        "fx:store": {
            "href": "https://api.foxycart.test/stores/40075",
            "title": "This Store"
        },
        "fx:transaction": {
            "href": "https://api.foxycart.test/transactions/3859534",
            "title": "This Transaction"
        },
        "fx:gift_card": {
            "href": "https://api.foxycart.test/gift_cards/4",
            "title": "This Gift Card"
        },
        "fx:gift_card_code": {
            "href": "https://api.foxycart.test/gift_card_codes/30",
            "title": "This Gift Card Code"
        }
    },
    "transaction_id": 3859534,
    "external_id": null,
    "balance_adjustment": -40.3,
    "user_id": null,
    "source": null,
    "date_created": "2021-11-15T19:30:33-0800",
    "date_modified": "2021-11-15T19:30:35-0800"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api.foxycart.test/gift_card_code_log_detail/16" rel="https://api.foxycart.com/rels/gift_card_code_log_detail">
  <link rel="self" href="https://api.foxycart.test/gift_card_code_log_detail/16" title="Gift Card Code Transaction Relationship"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api.foxycart.test/stores/40075" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/transaction" href="https://api.foxycart.test/transactions/3859534" title="This Transaction"/>
  <link rel="https://api.foxycart.com/rels/gift_card" href="https://api.foxycart.test/gift_cards/4" title="This Gift Card"/>
  <link rel="https://api.foxycart.com/rels/gift_card_code" href="https://api.foxycart.test/gift_card_codes/30" title="This Gift Card Code"/>
  <transaction_id>3859534</transaction_id>
  <external_id></external_id>
  <balance_adjustment>-40.3</balance_adjustment>
  <user_id></user_id>
  <source></source>
  <date_created>2021-11-15T19: 30: 33-0800</date_created>
  <date_modified>2021-11-15T19: 30: 35-0800</date_modified>
</resource>
{
    "class": [
        "gift_card_code_log_detail"
    ],
    "properties": {
        "transaction_id": 3859534,
        "external_id": null,
        "balance_adjustment": -40.3,
        "user_id": null,
        "source": null,
        "date_created": "2021-11-15T19:30:33-0800",
        "date_modified": "2021-11-15T19:30:35-0800"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api.foxycart.test/gift_card_code_log_detail/16"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api.foxycart.test/stores/40075"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/transaction"
            ],
            "href": "https://api.foxycart.test/transactions/3859534"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/gift_card"
            ],
            "href": "https://api.foxycart.test/gift_cards/4"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/gift_card_code"
            ],
            "href": "https://api.foxycart.test/gift_card_codes/30"
        }
    ],
    "actions": [
        {
            "name": "self",
            "title": "Update Gift Card Code History",
            "method": "PATCH",
            "href": "https://api.foxycart.test/gift_card_code_log_detail/16",
            "type": "application/x-www-form-urlencoded",
            "fields": [
                {
                    "name": "external_id",
                    "title": "External ID",
                    "type": "text",
                    "value": null
                },
                {
                    "name": "balance_adjustment",
                    "title": "Balance Adjustment",
                    "type": "text",
                    "value": -40.3
                },
                {
                    "name": "user_id",
                    "title": "User ID",
                    "type": "text",
                    "value": null
                }
            ]
        }
    ]
}

Zoomable Resources

The following related resources can be embedded within this resource by including a ?zoom=<child_resource> parameter. You can also filter by child resources by ?child_resource:property=<property_value>

gift_card