{ "$schema": "http://json-schema.org/draft-04/schema#", "type":"object", "title": "export_template", "description":"An export_template in SK", "required": ["name", "text", "kind"], "properties":{ "id":{ "description":"Unique identifier - UUID", "identity":true, "readOnly":true, "type":"string", "maxLength": 22, "minLength":22 }, "company_id":{ "description":"Company", "readOnly":true, "type":"string", "maxLength": 22, "minLength":22 }, "name":{ "description": "A meaningful name.", "type":"string", "maxLength": 50 }, "text":{ "description": "Text with placeholders, replaced when the template is used.", "type":"string", "format":"string" }, "kind":{ "description": "Kind of object the template can be used for.", "enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "contact", "payment", "comment", "email", "history", "product","recurring"], "type":"string" }, "filename":{ "description": "Name of the created export file. Date placeholders can be used: %y-%m-%d_%H-%M_clients.csv", "type":"string", "maxLength": 255 }, "created_at":{ "description": "Date the object was created in SK. Never changes afterwards", "format":"date-time", "readOnly":true, "type":"string" }, "updated_at":{ "description": "Date the object was edited in SK.", "format":"date-time", "readOnly":true, "type":"string" }, "team_id":{ "description": "A team uuid. If set only the team and its parent teams can see the record.", "type":"string", "maxLength": 22, "minLength":22 } }, "links":[ { "rel": "self", "href": "export_templates/{id}" }, { "rel": "instances", "href": "export_templates", "properties" : { "page":{ "title" : "Page", "description": "In paginated results set the page to look for", "type":"number" }, "per_page":{ "title" : "Per page", "description": "Results per page. Default is 50, max is 200", "type":"number" }, "sort_by":{ "title" : "Sort by", "description": "Sort the results by the given field => number", "enum":["created_at", "updated_at"], "type": "string" }, "sort":{ "title" : "Sort", "enum":["ASC","DESC"], "description": "Sort the results in ASC or DESC", "type": "string" } } }, { "rel": "destroy", "href": "export_templates/{id}", "method": "DELETE" }, { "rel": "update", "href": "export_templates/{id}", "method": "PUT" }, { "rel": "create", "href": "export_templates", "method": "POST" } ] }