E-commerce template
Order Confirmation
Post-purchase order confirmation matching the standard Shopify / WooCommerce shape — line items, addresses, shipping summary, and totals.
Pro, Business & Scale plansLanguage: en
slug: order-confirmationRendered with sample data
01
Quick start
Reference the template by its slug and pass your data. The same call works from any language; pick whichever fits your stack. Replace $KAMY_API_KEY with a key from the dashboard.
curl
curl https://kamy.dev/api/v1/render \
-H "Authorization: Bearer $KAMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateSlug": "order-confirmation",
"data": {
"orderNumber": "1042",
"orderDate": "2026-04-29",
"currency": "USD",
"store": {
"name": "Northwind Coffee",
"tagline": "Single-origin roasters · Brooklyn, NY",
"supportEmail": "[email protected]",
"supportPhone": "+1 (212) 555-0142",
"returnsUrl": "https://northwind.coffee/returns"
},
"customer": {
"firstName": "Maya",
"lastName": "Tran",
"email": "[email protected]"
},
"lineItems": [
{
"name": "Yirgacheffe Konga · whole bean",
"variant": "12 oz · Light roast",
"sku": "ETH-YRG-12L",
"quantity": 2,
"unitPrice": 22,
"lineTotal": 44
},
{
"name": "Cold-brew bottle",
"variant": "32 oz · 6-pack",
// …
}
}'node.js
import { Kamy } from "@kamydev/sdk";
const kamy = new Kamy({ apiKey: process.env.KAMY_API_KEY! });
const { url } = await kamy.render({
templateSlug: "order-confirmation",
data: {
"orderNumber": "1042",
"orderDate": "2026-04-29",
"currency": "USD",
"store": {
"name": "Northwind Coffee",
"tagline": "Single-origin roasters · Brooklyn, NY",
"supportEmail": "[email protected]",
"supportPhone": "+1 (212) 555-0142",
"returnsUrl": "https://northwind.coffee/returns"
},
"customer": {
"firstName": "Maya",
"lastName": "Tran",
"email": "[email protected]"
},
"lineItems": [
{
"name": "Yirgacheffe Konga · whole bean",
"variant": "12 oz · Light roast",
"sku": "ETH-YRG-12L",
"quantity": 2,
"unitPrice": 22,
"lineTotal": 44
},
{
"name": "Cold-brew bottle",
"variant": "32 oz · 6-pack",
// …
},
});
console.log(url); // signed URL, valid for 1 hourpython
import os, requests
resp = requests.post(
"https://kamy.dev/api/v1/render",
headers={"Authorization": f"Bearer {os.environ['KAMY_API_KEY']}"},
json={
"templateSlug": "order-confirmation",
"data": {
"orderNumber": "1042",
"orderDate": "2026-04-29",
"currency": "USD",
"store": {
"name": "Northwind Coffee",
"tagline": "Single-origin roasters · Brooklyn, NY",
"supportEmail": "[email protected]",
"supportPhone": "+1 (212) 555-0142",
"returnsUrl": "https://northwind.coffee/returns"
},
"customer": {
"firstName": "Maya",
"lastName": "Tran",
"email": "[email protected]"
},
"lineItems": [
{
"name": "Yirgacheffe Konga · whole bean",
"variant": "12 oz · Light roast",
"sku": "ETH-YRG-12L",
"quantity": 2,
"unitPrice": 22,
"lineTotal": 44
},
{
"name": "Cold-brew bottle",
"variant": "32 oz · 6-pack",
// …
},
},
)
resp.raise_for_status()
print(resp.json()["url"])02
Sample payload
The full sample data the live preview above renders from. Use it as a starting point for your own integration — every field is optional except those marked required in the schema below.
json
{
"orderNumber": "1042",
"orderDate": "2026-04-29",
"currency": "USD",
"store": {
"name": "Northwind Coffee",
"tagline": "Single-origin roasters · Brooklyn, NY",
"supportEmail": "[email protected]",
"supportPhone": "+1 (212) 555-0142",
"returnsUrl": "https://northwind.coffee/returns"
},
"customer": {
"firstName": "Maya",
"lastName": "Tran",
"email": "[email protected]"
},
"lineItems": [
{
"name": "Yirgacheffe Konga · whole bean",
"variant": "12 oz · Light roast",
"sku": "ETH-YRG-12L",
"quantity": 2,
"unitPrice": 22,
"lineTotal": 44
},
{
"name": "Cold-brew bottle",
"variant": "32 oz · 6-pack",
"sku": "CB-32-6",
"quantity": 1,
"unitPrice": 28,
"lineTotal": 28
}
],
"subtotal": 72,
"discountAmount": 7.2,
"discountCode": "FIRSTBREW",
"shippingAmount": 8,
"taxAmount": 5.62,
"taxRate": 8.5,
"total": 78.42,
"shippingAddress": {
"name": "Maya Tran",
"lines": "248 Bedford Avenue, Apt 4B\nBrooklyn, NY 11211\nUnited States"
},
"billingAddress": {
"name": "Maya Tran",
"lines": "248 Bedford Avenue, Apt 4B\nBrooklyn, NY 11211\nUnited States"
},
"shipping": {
"method": "USPS Priority",
"estimatedDelivery": "2026-05-02",
"trackingNumber": "9400 1112 0286 1234 5678 90"
}
}03
JSON Schema
The render endpoint validates your payload against this JSON Schema before queuing the render. Validation errors come back with HTTP 400 and a VALIDATION_FAILED code listing every offending path.
json
{
"type": "object",
"required": [
"orderNumber",
"orderDate",
"store",
"customer",
"lineItems",
"subtotal",
"total",
"currency"
],
"properties": {
"orderNumber": {
"type": "string",
"minLength": 1
},
"orderDate": {
"type": "string"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
},
"store": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"tagline": {
"type": "string"
},
"supportEmail": {
"type": "string",
"format": "email"
},
"supportPhone": {
"type": "string"
},
"returnsUrl": {
"type": "string",
"format": "uri"
}
}
},
"customer": {
"type": "object",
"required": [
"firstName"
],
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
}
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"name",
"quantity",
"unitPrice",
"lineTotal"
],
"properties": {
"name": {
"type": "string"
},
"variant": {
"type": "string"
},
"sku": {
"type": "string"
},
"quantity": {
"type": "number"
},
"unitPrice": {
"type": "number"
},
"lineTotal": {
"type": "number"
}
}
}
},
"subtotal": {
"type": "number"
},
"discountAmount": {
"type": "number"
},
"discountCode": {
"type": "string"
},
"shippingAmount": {
"type": "number"
},
"taxAmount": {
"type": "number"
},
"taxRate": {
"type": "number"
},
"total": {
"type": "number"
},
"shippingAddress": {
"type": "object",
"required": [
"name",
"lines"
],
"properties": {
"name": {
"type": "string"
},
"lines": {
"type": "string"
}
}
},
"billingAddress": {
"type": "object",
"required": [
"name",
"lines"
],
"properties": {
"name": {
"type": "string"
},
"lines": {
"type": "string"
}
}
},
"shipping": {
"type": "object",
"properties": {
"method": {
"type": "string"
},
"estimatedDelivery": {
"type": "string"
},
"trackingNumber": {
"type": "string"
}
}
}
}
}