checkout_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 checkout_templates
- POST
- Create a new checkout_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:checkout_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/checkout_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: checkout_template
Description
The Checkout Template contains the Twig content used to display the checkout 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 checkout 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 checkout_template
- PATCH
- Update a checkout_template (send only the properties you want to modify)
- PUT
- Replace a checkout_template (send the entire representation)
- DELETE
- Delete a checkout_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 checkout template. | String | Required. 100 characters or less. Defaults to Checkout Template . |
content | The content of your checkout 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 checkout 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/checkout_templates/18", "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/checkout_templates/18/template_sets", "title": "Template Sets using this template" }, "fx:cache": { "href": "https://api-sandbox.foxycart.com/checkout_templates/18/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": "Checkout 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/checkout_templates/18" rel="https://api.foxycart.com/rels/checkout_template"> <link rel="self" href="https://api-sandbox.foxycart.com/checkout_templates/18" 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/checkout_templates/18/template_sets" title="Template Sets using this template"/> <link rel="https://api.foxycart.com/rels/cache" href="https://api-sandbox.foxycart.com/checkout_templates/18/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>Checkout 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": [ "checkout_template" ], "properties": { "description": "Checkout 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/checkout_templates/18" }, { "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/checkout_templates/18/template_sets" }, { "rel": [ "https://api.foxycart.com/rels/cache" ], "href": "https://api-sandbox.foxycart.com/checkout_templates/18/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.