receipt_templates

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 receipt_templates
POST
Create a new receipt_template
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:receipt_templates": [...]
  },
  "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/receipt_template">
  ...
  </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: receipt_template

Description

The Receipt Template contains the Twig content used to display the receipt page for your store. To use the default responsive theme, leave the content property empty. If you want to set your own template content, configure a content_url and then POST to the cache link relationship to cache your store's receipt template. This will run your content through our caching system which will rewrite all the JavaScript, CSS, and HTML to cache images securely on our servers.

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 receipt_template
PATCH
Update a receipt_template (send only the properties you want to modify)
PUT
Replace a receipt_template (send the entire representation)
DELETE
Delete a receipt_template
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
description The description of your receipt template. String Required. 100 characters or less. Defaults to Receipt Template.
content The content of your receipt template. Leave blank to use the default responsive template. This shouldn't be set directly unless all of your image references are already over https. If they are not, set the content_url to point to your template content online and then POST to the cache link relationship. String Optional
content_url The URL of your receipt template hosted on your own server online and publicly available for our server to cache. URL Optional. 300 characters or less.
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-sandbox.foxycart.com/receipt_templates/20",
            "title": "This Template"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/8",
            "title": "This Store"
        },
        "fx:template_sets": {
            "href": "https://api-sandbox.foxycart.com/receipt_templates/20/template_sets",
            "title": "Template Sets using this template"
        },
        "fx:cache": {
            "href": "https://api-sandbox.foxycart.com/receipt_templates/20/cache",
            "title": "POST here to cache your template using the content_url"
        },
        "fx:encode": {
            "href": "https://api-sandbox.foxycart.com/encode",
            "title": "POST here to encode a body of html for use with our HMAC cart encryption."
        }
    },
    "description": "Receipt Template",
    "content": "",
    "content_url": "",
    "date_created": "2012-08-10T11:58:54-0700",
    "date_modified": "2012-08-10T11:58:54-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/receipt_templates/20" rel="https://api.foxycart.com/rels/receipt_template">
  <link rel="self" href="https://api-sandbox.foxycart.com/receipt_templates/20" title="This Template"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/8" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/template_sets" href="https://api-sandbox.foxycart.com/receipt_templates/20/template_sets" title="Template Sets using this template"/>
  <link rel="https://api.foxycart.com/rels/cache" href="https://api-sandbox.foxycart.com/receipt_templates/20/cache" title="POST here to cache your template using the content_url"/>
  <link rel="https://api.foxycart.com/rels/encode" href="https://api-sandbox.foxycart.com/encode" title="POST here to encode a body of html for use with our HMAC cart encryption."/>
  <description>Receipt Template</description>
  <content></content>
  <content_url></content_url>
  <date_created>2012-08-10T11:58:54-0700</date_created>
  <date_modified>2012-08-10T11:58:54-0700</date_modified>
</resource>
{
    "class": [
        "receipt_template"
    ],
    "properties": {
        "description": "Receipt Template",
        "content": "",
        "content_url": "",
        "date_created": "2012-08-10T11:58:54-0700",
        "date_modified": "2012-08-10T11:58:54-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/receipt_templates/20"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/template_sets"
            ],
            "href": "https://api-sandbox.foxycart.com/receipt_templates/20/template_sets"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/cache"
            ],
            "href": "https://api-sandbox.foxycart.com/receipt_templates/20/cache"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/encode"
            ],
            "href": "https://api-sandbox.foxycart.com/encode"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.