{ "type":"object", "title": "payment_reminder", "description": "A payment reminder", "properties":{ "id":{ "description": "UUID assigned by SK", "identity":true, "readonly":true, "type":"string" }, "invoice_id":{ "description": "The invoice for the reminder. If set assumes all other fields are set to custom values, instead of filling them from the invoice. POSTing to invoices/:id/payment_reminders, automatically set this and all other fields.", "required": true, "type":"string" }, "address_field":{ "description": "Receiver address, shown in envelope window. Defaults to invoice.client.address_field if created from invoice.", "type":"string" }, "date":{ "description": "Date the payment_reminder is issued. Automatically set when created from invoice. Defaults to today.", "format":"date", "required": true, "type":"string" }, "due_days":{ "description": "Used to calculate the due date of the payment_reminder. Useless if date and due date are present. Taken from settings when created from invoice", "type":"integer" }, "due_date":{ "description": "Auto-calculated from date + due days if empty and the payment_reminder is opened.", "format":"date", "type":"string" }, "external_ref":{ "description": "Some external reference, whatever this may be.", "type":"string" }, "title":{ "description": "The headline of a document. Use SK placeholders to prevent exessive typing e.g. 'Your payment_reminder [number]'. Defaults to values from settings", "type":"string" }, "notes_before":{ "description": "Notes shown before the line items. Normaly contains salutation and other introductional information. SK placeholders can be used. Defaults to values from settings", "type":"string" }, "notes_after":{ "description": "Notes shown after the line items. Can contain information about payments, bank account or a thank-you message. SK placeholders can be used. Defaults to values from settings", "type":"string" }, "tag_list": { "description": "Space separated list of tags.", "type":"string" }, "precision":{ "description": "Decimal places for displayed(printed) money values. gross_total and net_total will always be displayed rounded to a precision of 2. When greater 2 use net_total_base(also in line_item) to show the net val with the set precision(3,4).", "type":"number", "enum": [2,3,4], "default":2 }, "language":{ "description": "Should be a valid language short-code: de-DE, fr, en-GB; like defined in your account language menu. When the document is emailed or printed, a localized version of a multi-language template(email, pdf) will be used if available. Defaults to the clients language, if empty and a client is assigned.", "type":"string", "maxLength": 10 }, "archived_pdf":{ "description": "Archived PDF version of the document. Is created when an document is printed and archived. A document can have multiple archived versions. This only returns the most recent one. ", "readonly":true, "type":"object", "properties":{"$ref":"./attachment.json#properties"} }, "client":{ "description": "The client for the document. New documents cannot create a client, use client_id field to set it.", "readonly":true, "type":"object", "properties":{"$ref":"./client.json#properties"} }, "client_id":{ "description": "The clients uuid. New payment_reminders take the clients address field, due days and cash discount if those fields are not set.", "type":"string" }, "team_id":{ "description": "A team uuid. If set, only the team and its parent teams can see the record. Defaults to team id from invoice", "type":"string" }, "line_items":{ "description": "Line items for the document. Defaults to invoice.gross_total and late fee values from settings", "type":"array", "properties":{"$ref":"./line_item.json#properties"} }, "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" }, "lock_version":{ "description": "Auto-incremented to prevent concurrent updateing. First save wins and increments version. ", "type":"integer" }, "gross_total":{ "description": "Gross total of all line items, 2 decimals places", "readonly":true, "type":"number" }, "net_total":{ "description": "Net total, 2 decimals places", "readonly":true, "type":"number" } }, "links":[ { "rel": "self", "href": "payment_reminders/{id}" }, { "rel": "instances", "href": "payment_reminders", "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 10, max is 100", "type":"number" }, "filter[q]":{ "title" : "Search", "description": "Search in title, number, addressfield", "type":"string" }, "filter[tags]":{ "title" : "Tags", "description": "Filter by a space delimited list of tags", "type":"string" }, "filter[from]":{ "title" : "From date", "description": "All objects with a date after the date", "type" : "date" }, "filter[to]":{ "title" : "To date", "description": "All objects with date before the date", "type" : "date" }, "sort_by":{ "title" : "Sort by", "description": "Sort the results by the given field => number", "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"], "type": "string" }, "sort":{ "title" : "Sort", "enum":["ASC","DESC"], "description": "Sort the results in ASC or DESC" } } }, { "rel": "destroy", "href": "payment_reminders/{id}", "method": "DELETE" }, { "rel": "update", "href": "payment_reminders/{id}", "method": "PUT" }, { "rel": "create", "href": "payment_reminders", "method": "POST" }, { "rel": "attachments", "href": "payment_reminders/{id}/attachments" }, { "rel": "emails", "href": "payment_reminders/{id}/emails" }, { "rel": "print", "href": "payment_reminders/{id}/print", "method": "POST", "properties" : { "template_id" : { "title" : "PDF template used for printing", "description": "UUID of a pdf template used to print the document. MUST be present", "required":true }, "base64" : { "title" : "Return the created pdf base64 encoded", "description": "If set the new pdf is returned inside the attachment JSON within 'base64' key. Leave empty to save traffic." } } } ] }