custom_field

Collection: custom_fields

For a transaction, a custom field is a historical record of the custom field added to a transaction during checkout. When created during the original transaction, they are also duplicated as transaction attributes. Custom fields can be added, removed and modified after a transaction is complete.

Custom fields also exist on carts and multiship shipments.

Warning: in the future, custom fields may be removed, so it is advised to use attributes for reporting purposes.

Required Scopes

Full store_full_access
Read transactions_read
Write transactions_write

Actions

GET View a custom field
PATCH Update a custom field (send only the properties you want to modify)
PUT Replace a custom field (send the entire representation)
DELETE Delete a custom field
HEAD Get just the header response
OPTIONS Get a response explaining which HTTP methods are supported

Properties (5)

name String · Required · max 100

The name of the custom field.

value String · Required · max 700

The value of this custom field.

is_hidden Boolean

Whether or not this custom field is visible on the receipt and email receipt. This correlates to custom fields with a "h:" prefix when added to the cart.

date_created String (nullable) · Read-only

The date this resource was created.

date_modified String (nullable) · Read-only

The date this resource was last modified.

Link Relations (3)

self This Custom Field
fx:store GET PATCH PUT DELETE This Store
fx:transaction GET PATCH PUT POST This Transaction
https://api.foxycart.com/custom_fields/{id}

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "https://api.foxycart.com/custom_fields/123",
      "title": "This Custom Field"
    },
    "fx:store": {
      "href": "https://api.foxycart.com/stores/456",
      "title": "This Store"
    },
    "fx:transaction": {
      "href": "https://api.foxycart.com/transactions/456",
      "title": "This Transaction"
    }
  },
  "name": "Marketing_Opt_In",
  "value": "1",
  "is_hidden": false,
  "date_created": null,
  "date_modified": null
}