{
	"info": {
		"_postman_id": "ff4d6446-6b0f-49af-8e63-368b91dd083a",
		"name": "Layerre API Collection",
		"description": "This Postman collection provides ready-to-use requests for interacting with the Layerre API.\n\nThe API enables automated image generation from design templates through simple, scalable HTTP endpoints. You can create, customise, and render images on demand.\n\nAt this time, only Canva templates are supported.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "42134266"
	},
	"item": [
		{
			"name": "templates",
			"item": [
				{
					"name": "Create template",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"canva_url\": \"{{canva_url}}\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.layerre.com/v1/template",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get template",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "https://api.layerre.com/v1/template/{{template_id}}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{{template_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update template",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Updated Template Name\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.layerre.com/v1/template/{{template_id}}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{{template_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete template",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "https://api.layerre.com/v1/template/{{template_id}}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{{template_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "List templates",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "https://api.layerre.com/v1/templates",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"templates"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "layers",
			"item": [
				{
					"name": "Create layer",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Sample Text Layer\",\n    \"x\": 100, \n    \"y\": 100,\n    \"properties\": {\n        \"text\": \"Hello World\"\n    }\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.layerre.com/v1/template/{{template_id}}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{{template_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get layer",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "https://api.layerre.com/v1/template/{template_id}/layer/{layer_id}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{template_id}",
								"layer",
								"{layer_id}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update layer",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Updated Layer Name\",\n    \"text\": \"Updated text content\",\n    \"x\": 150, \n    \"y\": 150\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.layerre.com/v1/template/383d3fe8-caa3-4228-895a-33e37d880cd4/layer/99b331a9-ef7b-405e-841e-171fa041b4e8",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"383d3fe8-caa3-4228-895a-33e37d880cd4",
								"layer",
								"99b331a9-ef7b-405e-841e-171fa041b4e8"
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete layer",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{API_TOKEN}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "https://api.layerre.com/v1/template/{{template_id}}/layer/{{layer_id}}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{{template_id}}",
								"layer",
								"{{layer_id}}"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "variants",
			"item": [
				{
					"name": "Create variant",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"width\": 400,\n    \"overrides\": [{\n        \"layer_id\": {{layer_id}},\n        \"properties\": {\n            \"x\": 1\n        }\n   }]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.layerre.com/v1/template/{{template_id}}/variant",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{{template_id}}",
								"variant"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get variant",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "https://api.layerre.com/v1/template/{template_id}/variants/{variant_id}",
							"protocol": "https",
							"host": [
								"api",
								"layerre",
								"com"
							],
							"path": [
								"v1",
								"template",
								"{template_id}",
								"variants",
								"{variant_id}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete variant",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "http://localhost:8000/template/{template_id}/variant/{variant_id}",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "8000",
							"path": [
								"template",
								"{template_id}",
								"variant",
								"{variant_id}"
							]
						}
					},
					"response": []
				},
				{
					"name": "List template variants",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "http://localhost:8000/template/{template_id}/variants",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "8000",
							"path": [
								"template",
								"{template_id}",
								"variants"
							]
						}
					},
					"response": []
				}
			]
		}
	]
}
