sk_api_schema 0.10.5 → 0.10.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.rdoc +1 -1
- data/json/v1.0/account.json +2 -2
- data/json/v1.0/contact.json +2 -2
- data/json/v1.0/line_item.json +3 -3
- data/json/v1.0/product.json +2 -2
- data/json/v1.0/sub.json +3 -3
- data/json/v2.0/account.json +172 -0
- data/json/v2.0/account_billing.json +131 -0
- data/json/v2.0/account_entry.json +212 -0
- data/json/v2.0/address.json +85 -0
- data/json/v2.0/attachment.json +133 -0
- data/json/v2.0/auth_permission.json +75 -0
- data/json/v2.0/client.json +318 -0
- data/json/v2.0/comment.json +122 -0
- data/json/v2.0/company.json +141 -0
- data/json/v2.0/contact.json +418 -0
- data/json/v2.0/credit_note.json +380 -0
- data/json/v2.0/divider_item.json +47 -0
- data/json/v2.0/document.json +240 -0
- data/json/v2.0/email.json +191 -0
- data/json/v2.0/email_template.json +132 -0
- data/json/v2.0/estimate.json +408 -0
- data/json/v2.0/export.json +142 -0
- data/json/v2.0/export_template.json +100 -0
- data/json/v2.0/invoice.json +407 -0
- data/json/v2.0/language.json +82 -0
- data/json/v2.0/line_item.json +121 -0
- data/json/v2.0/order.json +373 -0
- data/json/v2.0/payment.json +148 -0
- data/json/v2.0/payment_reminder.json +301 -0
- data/json/v2.0/pdf_template.json +99 -0
- data/json/v2.0/product.json +144 -0
- data/json/v2.0/recurring.json +340 -0
- data/json/v2.0/sub.json +60 -0
- data/json/v2.0/sub_total_item.json +57 -0
- data/json/v2.0/tag.json +76 -0
- data/json/v2.0/task.json +229 -0
- data/json/v2.0/text_template.json +95 -0
- data/json/v2.0/user.json +103 -0
- data/lib/sk_api_schema/version.rb +1 -1
- metadata +35 -2
@@ -0,0 +1,148 @@
|
|
1
|
+
{ "type":"object",
|
2
|
+
"title": "payment",
|
3
|
+
"name": "payment",
|
4
|
+
"description":"An payment must always be related to an document, so you must use the nested URL e.g. POST invoices/ID/payments. In this case the related_object_id/type are automatically set.",
|
5
|
+
"properties":{
|
6
|
+
"id":{
|
7
|
+
"description":"Unique identifier - UUID",
|
8
|
+
"identity":true,
|
9
|
+
"readonly":true,
|
10
|
+
"type":"string",
|
11
|
+
"maxLength": 22,
|
12
|
+
"minLength":22
|
13
|
+
},
|
14
|
+
"amount":{
|
15
|
+
"description": "The payment amount",
|
16
|
+
"required":true,
|
17
|
+
"type":"number"
|
18
|
+
},
|
19
|
+
"cash_discount":{
|
20
|
+
"description": "The cash discount amount. If a client withdraws a cash discount say 2% of 100€, he pays 98€ used in amount and 2€ in cash_discount. Handled separate for correction of sales,vat accounts in bookkeeping.",
|
21
|
+
"type":"number"
|
22
|
+
},
|
23
|
+
"is_partial":{
|
24
|
+
"description": "If set the related document is NOT closed.",
|
25
|
+
"type":"boolean",
|
26
|
+
"default": false
|
27
|
+
},
|
28
|
+
"external_ref":{
|
29
|
+
"description": "Reference number f.ex. issued by the bank.",
|
30
|
+
"type":"string",
|
31
|
+
"maxLength": 255
|
32
|
+
},
|
33
|
+
"date":{
|
34
|
+
"description": "Date the payment was made. YYYY-MM-DD",
|
35
|
+
"required":true,
|
36
|
+
"format":"date",
|
37
|
+
"type":"string"
|
38
|
+
},
|
39
|
+
"currency":{
|
40
|
+
"description": "Currency code as defined by the ISO 4217 standard (3-letter UPCASE: EUR, USD)",
|
41
|
+
"type":"string",
|
42
|
+
"maxLength": 3,
|
43
|
+
"minLength": 3
|
44
|
+
},
|
45
|
+
"exchange_rate":{
|
46
|
+
"description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
|
47
|
+
"readonly":true,
|
48
|
+
"type":"number"
|
49
|
+
},
|
50
|
+
"amount_exchanged":{
|
51
|
+
"description": "The exchanged amount.",
|
52
|
+
"readonly":true,
|
53
|
+
"type":"number"
|
54
|
+
},
|
55
|
+
"payment_method":{
|
56
|
+
"description": "How the payment was made.",
|
57
|
+
"enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
|
58
|
+
"type":"string"
|
59
|
+
},
|
60
|
+
"late_fee":{
|
61
|
+
"description": "Add a late fee if an invoice has payment reminders. We create a second payment for the last reminder and close all others. Set to 0, if you want to waive the fee(has not been paid). In this case all reminders are closed and we also correct the sales+debtor account with the open fees. This is a pure setter-method used in creation!",
|
62
|
+
"type":"number"
|
63
|
+
},
|
64
|
+
"related_object_type":{
|
65
|
+
"description": "Object type of the payments parent. Is the camel-cased base class name: Document for invoice, credit_note. Is auto-set when using the nested URL POST invoices/ID/payments",
|
66
|
+
"required":true,
|
67
|
+
"type":"string"
|
68
|
+
},
|
69
|
+
"related_object_id":{
|
70
|
+
"description": "uuid of the payments parent object. Is auto-set when using the nested URL POST invoices/ID/payments",
|
71
|
+
"required":true,
|
72
|
+
"type":"string",
|
73
|
+
"maxLength": 22,
|
74
|
+
"minLength":22
|
75
|
+
},
|
76
|
+
"team_id":{
|
77
|
+
"description": "A team uuid taken from the related object(e.g.invoice). If set only the team and its parent teams can see the record.",
|
78
|
+
"readonly" :true,
|
79
|
+
"type":"string",
|
80
|
+
"maxLength": 22,
|
81
|
+
"minLength":22
|
82
|
+
},
|
83
|
+
"created_at":{
|
84
|
+
"description": "Date the object was created in SK. Never changes afterwards",
|
85
|
+
"format":"date-time",
|
86
|
+
"readonly":true,
|
87
|
+
"type":"string"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"links":[
|
91
|
+
{ "rel": "self",
|
92
|
+
"href": "payments/{id}"
|
93
|
+
},
|
94
|
+
{ "rel": "instances",
|
95
|
+
"href": "payments",
|
96
|
+
"properties" : {
|
97
|
+
"page":{
|
98
|
+
"title" : "Page",
|
99
|
+
"description": "In paginated results set the page to look for",
|
100
|
+
"type":"number"
|
101
|
+
},
|
102
|
+
"per_page":{
|
103
|
+
"title" : "Per page",
|
104
|
+
"description": "Results per page. Default is 50, max is 200",
|
105
|
+
"type":"number"
|
106
|
+
},
|
107
|
+
"filter[q]":{
|
108
|
+
"title" : "Search",
|
109
|
+
"description": "Search in title, number, address field",
|
110
|
+
"type":"string"
|
111
|
+
},
|
112
|
+
"filter[from]":{
|
113
|
+
"title" : "From date",
|
114
|
+
"description": "All objects with a date after the date. YYYY-MM-DD",
|
115
|
+
"format" : "date",
|
116
|
+
"type" : "string"
|
117
|
+
|
118
|
+
},
|
119
|
+
"filter[to]":{
|
120
|
+
"title" : "To date",
|
121
|
+
"description": "All objects with date before the date. YYYY-MM-DD",
|
122
|
+
"format" : "date",
|
123
|
+
"type" : "string"
|
124
|
+
},
|
125
|
+
"sort_by":{
|
126
|
+
"title" : "Sort by",
|
127
|
+
"description": "Sort the results by the given field => number",
|
128
|
+
"enum":["amount","created_at", "updated_at"],
|
129
|
+
"type": "string"
|
130
|
+
},
|
131
|
+
"sort":{
|
132
|
+
"title" : "Sort",
|
133
|
+
"enum":["ASC","DESC"],
|
134
|
+
"description": "Sort the results in ASC or DESC",
|
135
|
+
"type": "string"
|
136
|
+
}
|
137
|
+
}
|
138
|
+
},
|
139
|
+
{ "rel": "destroy",
|
140
|
+
"href": "payments/{id}",
|
141
|
+
"method": "DELETE"
|
142
|
+
},
|
143
|
+
{ "rel": "create",
|
144
|
+
"href": "payments",
|
145
|
+
"method": "POST"
|
146
|
+
}
|
147
|
+
]
|
148
|
+
}
|
@@ -0,0 +1,301 @@
|
|
1
|
+
{ "type":"object",
|
2
|
+
"title": "payment_reminder",
|
3
|
+
"name": "payment_reminder",
|
4
|
+
"description": "A payment reminder belongs to an invoice and inherits it's line items from the invoice total(first item) and late fee settings(second item).",
|
5
|
+
"properties":{
|
6
|
+
"id":{
|
7
|
+
"description":"Unique identifier - UUID",
|
8
|
+
"identity":true,
|
9
|
+
"readonly":true,
|
10
|
+
"type":"string",
|
11
|
+
"maxLength": 22,
|
12
|
+
"minLength":22
|
13
|
+
},
|
14
|
+
"invoice_id":{
|
15
|
+
"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.",
|
16
|
+
"required": true,
|
17
|
+
"type":"string",
|
18
|
+
"maxLength": 22,
|
19
|
+
"minLength":22
|
20
|
+
},
|
21
|
+
"address_field":{
|
22
|
+
"description": "Receiver address, shown in envelope window. Defaults to invoice.client.address_field if created from invoice.",
|
23
|
+
"type":"string"
|
24
|
+
},
|
25
|
+
"date":{
|
26
|
+
"description": "Date the payment_reminder is issued. Automatically set when created from invoice. Defaults to today. YYYY-MM-DD",
|
27
|
+
"format":"date",
|
28
|
+
"required": true,
|
29
|
+
"type":"string"
|
30
|
+
},
|
31
|
+
"due_days":{
|
32
|
+
"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",
|
33
|
+
"type":"integer"
|
34
|
+
},
|
35
|
+
"due_date":{
|
36
|
+
"description": "Auto-calculated from date + due days if empty and the payment_reminder is opened. YYYY-MM-DD",
|
37
|
+
"format":"date",
|
38
|
+
"type":"string"
|
39
|
+
},
|
40
|
+
"status":{
|
41
|
+
"description": "Defaults to open for new reminders, unless otherwise stated. Beware that the overdue-status is virtual as it depends on the real status=open and the document due_date.",
|
42
|
+
"default":"open",
|
43
|
+
"enum":["draft","open","closed","overdue"],
|
44
|
+
"type":"string"
|
45
|
+
},
|
46
|
+
"external_ref":{
|
47
|
+
"description": "Some external reference, whatever this may be.",
|
48
|
+
"type":"string",
|
49
|
+
"maxLength": 255
|
50
|
+
},
|
51
|
+
"title":{
|
52
|
+
"description": "The headline of a document. Use SK placeholders to prevent excessive typing e.g. 'Your payment_reminder [number]'. Defaults to values from settings",
|
53
|
+
"type":"string",
|
54
|
+
"maxLength": 255
|
55
|
+
},
|
56
|
+
"notes_before":{
|
57
|
+
"description": "Notes shown before the line items. Normally contains salutation and other introductional information. SK placeholders can be used. Defaults to values from settings",
|
58
|
+
"type":"string",
|
59
|
+
"format":"text"
|
60
|
+
},
|
61
|
+
"notes_after":{
|
62
|
+
"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",
|
63
|
+
"type":"string",
|
64
|
+
"format":"text"
|
65
|
+
},
|
66
|
+
"tag_list":{
|
67
|
+
"description": "Space separated list of tags. Are split and saved as Tag objects on create, update.",
|
68
|
+
"type":"string"
|
69
|
+
},
|
70
|
+
"language":{
|
71
|
+
"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.",
|
72
|
+
"type":"string",
|
73
|
+
"maxLength": 10
|
74
|
+
},
|
75
|
+
"currency":{
|
76
|
+
"description": "Currency code as defined by the ISO 4217 standard (3-letter UPCASE: EUR, USD)",
|
77
|
+
"type":"string",
|
78
|
+
"maxLength": 3,
|
79
|
+
"minLength": 3
|
80
|
+
},
|
81
|
+
"exchange_rate":{
|
82
|
+
"description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
|
83
|
+
"readonly":true,
|
84
|
+
"type":"number"
|
85
|
+
},
|
86
|
+
"gross_total_exchanged":{
|
87
|
+
"description": "Exchanged gross total, in your company currency.",
|
88
|
+
"readonly":true,
|
89
|
+
"type":"number"
|
90
|
+
},
|
91
|
+
"archived_pdf":{
|
92
|
+
"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. ",
|
93
|
+
"readonly":true,
|
94
|
+
"type":"object",
|
95
|
+
"properties":{"$ref":"./attachment.json#properties"}
|
96
|
+
},
|
97
|
+
"client":{
|
98
|
+
"description": "DEPRECATED: use contact",
|
99
|
+
"readonly":true,
|
100
|
+
"type":"object",
|
101
|
+
"properties":{"$ref":"./client.json#properties"}
|
102
|
+
},
|
103
|
+
"client_id":{
|
104
|
+
"description": "DEPRECATED: use contact_id",
|
105
|
+
"type":"string",
|
106
|
+
"maxLength": 22,
|
107
|
+
"minLength":22
|
108
|
+
},
|
109
|
+
"contact":{
|
110
|
+
"description": "The contact for the document. Is assigned through the related invoice.",
|
111
|
+
"readonly":true,
|
112
|
+
"type":"object",
|
113
|
+
"properties":{"$ref":"./contact.json#properties"}
|
114
|
+
},
|
115
|
+
"contact_id":{
|
116
|
+
"description": "The contact uuid. Is assigned through the related invoice.",
|
117
|
+
"readonly":true,
|
118
|
+
"type":"string",
|
119
|
+
"maxLength": 22,
|
120
|
+
"minLength":22
|
121
|
+
},
|
122
|
+
"team_id":{
|
123
|
+
"description": "A team uuid taken from the contact. If set only the team and its parent teams can see the record.",
|
124
|
+
"readonly" :true,
|
125
|
+
"type":"string",
|
126
|
+
"maxLength": 22,
|
127
|
+
"minLength":22
|
128
|
+
},
|
129
|
+
"line_items":{
|
130
|
+
"description": "DEPRECATED use items",
|
131
|
+
"type":"array",
|
132
|
+
"properties":{"$ref":"./line_item.json#properties"}
|
133
|
+
},
|
134
|
+
"items":{
|
135
|
+
"description": "Items for the document. GOTCHAs: you should NOT create items manually since we create them. The first item contains the invoice total and the optional second one the late_fee.",
|
136
|
+
"type":"array",
|
137
|
+
"default": "any",
|
138
|
+
"minItems": 1,
|
139
|
+
"items": { "$ref": "./line_item.json#properties"}
|
140
|
+
},
|
141
|
+
"created_at":{
|
142
|
+
"description": "Date the object was created in SK. Never changes afterwards.",
|
143
|
+
"format":"date-time",
|
144
|
+
"readonly":true,
|
145
|
+
"type":"string"
|
146
|
+
},
|
147
|
+
"updated_at":{
|
148
|
+
"description": "Date the object was edited in SK.",
|
149
|
+
"format":"date-time",
|
150
|
+
"readonly":true,
|
151
|
+
"type":"string"
|
152
|
+
},
|
153
|
+
"lock_version":{
|
154
|
+
"description": "Auto-incremented to prevent concurrent updates. First save wins and increments version. ",
|
155
|
+
"type":"integer"
|
156
|
+
},
|
157
|
+
"gross_total":{
|
158
|
+
"description": "DEPRECATED use net_total bcs there are no taxes applied",
|
159
|
+
"readonly":true,
|
160
|
+
"type":"number"
|
161
|
+
},
|
162
|
+
"net_total":{
|
163
|
+
"description": "Net total, 2 decimals places",
|
164
|
+
"readonly":true,
|
165
|
+
"type":"number"
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"links":[
|
169
|
+
{ "rel": "self",
|
170
|
+
"href": "payment_reminders/{id}"
|
171
|
+
},
|
172
|
+
{ "rel": "instances",
|
173
|
+
"href": "payment_reminders",
|
174
|
+
"properties" : {
|
175
|
+
"page":{
|
176
|
+
"title" : "Page",
|
177
|
+
"description": "In paginated results set the page to look for",
|
178
|
+
"type":"number"
|
179
|
+
},
|
180
|
+
"per_page":{
|
181
|
+
"title" : "Per page",
|
182
|
+
"description": "Results per page. Default is 50, max is 200",
|
183
|
+
"type":"number"
|
184
|
+
},
|
185
|
+
"filter[q]":{
|
186
|
+
"title" : "Search",
|
187
|
+
"description": "Search in title, number, address field",
|
188
|
+
"type":"string"
|
189
|
+
},
|
190
|
+
"filter[tags]":{
|
191
|
+
"title" : "Tags",
|
192
|
+
"description": "Filter by a space delimited list of tags",
|
193
|
+
"type":"string"
|
194
|
+
},
|
195
|
+
"filter[from]":{
|
196
|
+
"title" : "From date",
|
197
|
+
"description": "All objects with a date after the date. YYYY-MM-DD",
|
198
|
+
"format" : "date",
|
199
|
+
"type" : "string"
|
200
|
+
},
|
201
|
+
"filter[to]":{
|
202
|
+
"title" : "To date",
|
203
|
+
"description": "All objects with date before the date. YYYY-MM-DD",
|
204
|
+
"format" : "date",
|
205
|
+
"type" : "string"
|
206
|
+
},
|
207
|
+
"filter[languages]":{
|
208
|
+
"title" : "Languages",
|
209
|
+
"description": "A list of language codes, comma separated",
|
210
|
+
"type" : "string"
|
211
|
+
},
|
212
|
+
"filter[client_ids]":{
|
213
|
+
"title" : "Clients",
|
214
|
+
"description": "DEPRECATED use contact_ids",
|
215
|
+
"type" : "string"
|
216
|
+
},
|
217
|
+
"filter[contact_ids]":{
|
218
|
+
"title" : "Contacts",
|
219
|
+
"description": "Find objects belonging to a single or a list of contacts, use ids comma separated.",
|
220
|
+
"type" : "string"
|
221
|
+
},
|
222
|
+
"filter[ids]":{
|
223
|
+
"title" : "Documents",
|
224
|
+
"description": "A single or a list of document uuids, comma separated",
|
225
|
+
"type" : "string"
|
226
|
+
},
|
227
|
+
"filter[status]":{
|
228
|
+
"title" : "Status",
|
229
|
+
"description": "A single or a list of status, comma separated: open,closed,overdue,draft",
|
230
|
+
"type" : "string"
|
231
|
+
},
|
232
|
+
"sort_by":{
|
233
|
+
"title" : "Sort by",
|
234
|
+
"description": "Sort the results by the given field => number",
|
235
|
+
"enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
|
236
|
+
"type": "string"
|
237
|
+
},
|
238
|
+
"sort":{
|
239
|
+
"title" : "Sort",
|
240
|
+
"enum":["ASC","DESC"],
|
241
|
+
"description": "Sort the results in ASC or DESC",
|
242
|
+
"type": "string"
|
243
|
+
}
|
244
|
+
}
|
245
|
+
},
|
246
|
+
{ "rel": "destroy",
|
247
|
+
"href": "payment_reminders/{id}",
|
248
|
+
"method": "DELETE"
|
249
|
+
},
|
250
|
+
{ "rel": "update",
|
251
|
+
"href": "payment_reminders/{id}",
|
252
|
+
"method": "PUT"
|
253
|
+
},
|
254
|
+
{ "rel": "create",
|
255
|
+
"href": "payment_reminders",
|
256
|
+
"method": "POST"
|
257
|
+
},
|
258
|
+
{ "rel": "attachments",
|
259
|
+
"href": "payment_reminders/{id}/attachments"
|
260
|
+
},
|
261
|
+
{ "rel": "emails",
|
262
|
+
"href": "payment_reminders/{id}/emails"
|
263
|
+
},
|
264
|
+
{ "rel": "emails create",
|
265
|
+
"href": "payment_reminders/{id}/emails",
|
266
|
+
"method": "POST",
|
267
|
+
"properties" : {
|
268
|
+
"template_id":{
|
269
|
+
"title" : "Template",
|
270
|
+
"description": "UUID of an email template to use. If present template fields like subject, body, attachments are used for the current email.",
|
271
|
+
"type":"string",
|
272
|
+
"maxLength": 22,
|
273
|
+
"minLength":22
|
274
|
+
},
|
275
|
+
"send":{
|
276
|
+
"title" : "Send email",
|
277
|
+
"description": "Schedule email for sending. Omit this parameter or set value to 0 or false(String or Integer) to keep email as draft."
|
278
|
+
},
|
279
|
+
"archived_pdf":{
|
280
|
+
"title" : "Attach archived pdf",
|
281
|
+
"description": "Adds the archived pdf from the related resource(if it has one)."
|
282
|
+
}
|
283
|
+
}
|
284
|
+
},
|
285
|
+
{ "rel": "print",
|
286
|
+
"href": "payment_reminders/{id}/print",
|
287
|
+
"method": "POST",
|
288
|
+
"properties" : {
|
289
|
+
"template_id" : {
|
290
|
+
"title" : "PDF template used for printing",
|
291
|
+
"description": "UUID of a pdf template used to print the document. MUST be present",
|
292
|
+
"required":true
|
293
|
+
},
|
294
|
+
"base64" : {
|
295
|
+
"title" : "Return the created pdf base64 encoded",
|
296
|
+
"description": "If set the new pdf is returned inside the attachment JSON within 'base64' key. Leave empty to save traffic."
|
297
|
+
}
|
298
|
+
}
|
299
|
+
}
|
300
|
+
]
|
301
|
+
}
|
@@ -0,0 +1,99 @@
|
|
1
|
+
{ "type":"object",
|
2
|
+
"title": "pdf_template",
|
3
|
+
"name": "pdf_template",
|
4
|
+
"description":"An PDF template. For now this is a read-only resource ONLY returning your own templates. It fits the most important use-case: A user can select a print template.",
|
5
|
+
"properties":{
|
6
|
+
"id":{
|
7
|
+
"description":"Unique identifier - UUID",
|
8
|
+
"identity":true,
|
9
|
+
"readonly":true,
|
10
|
+
"type":"string",
|
11
|
+
"maxLength": 22,
|
12
|
+
"minLength":22
|
13
|
+
},
|
14
|
+
"name":{
|
15
|
+
"description": "Name of the template as shown to the user.",
|
16
|
+
"required":true,
|
17
|
+
"type":"string",
|
18
|
+
"maxLength": 50
|
19
|
+
},
|
20
|
+
"description":{
|
21
|
+
"description": "Additional information about the template.",
|
22
|
+
"type":"string",
|
23
|
+
"format":"text"
|
24
|
+
},
|
25
|
+
"kind":{
|
26
|
+
"description": "Kind of object the template can be used for.",
|
27
|
+
"required":true,
|
28
|
+
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order"],
|
29
|
+
"type":"string"
|
30
|
+
},
|
31
|
+
"language":{
|
32
|
+
"description": "Should be a valid language short-code: de-DE, fr, en-GB; like defined in your account language menu. A multi-language template should belong to a parent. From then on just choose the parent-template and the localized child version is used for printing if the related object(order, invoice,..) has the appropriate language.",
|
33
|
+
"type":"string",
|
34
|
+
"maxLength": 10
|
35
|
+
},
|
36
|
+
"created_at":{
|
37
|
+
"description": "Date the object was created in SK. Never changes afterwards",
|
38
|
+
"format":"date-time",
|
39
|
+
"readonly":true,
|
40
|
+
"type":"string"
|
41
|
+
},
|
42
|
+
"updated_at":{
|
43
|
+
"description": "Date the object was edited in SK.",
|
44
|
+
"format":"date-time",
|
45
|
+
"readonly":true,
|
46
|
+
"type":"string"
|
47
|
+
},
|
48
|
+
"team_id":{
|
49
|
+
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
50
|
+
"type":"string",
|
51
|
+
"maxLength": 22,
|
52
|
+
"minLength":22
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"links":[
|
56
|
+
{ "rel": "self",
|
57
|
+
"href": "pdf_templates/{id}"
|
58
|
+
},
|
59
|
+
{ "rel": "instances",
|
60
|
+
"href": "pdf_templates",
|
61
|
+
"properties" : {
|
62
|
+
"page":{
|
63
|
+
"title" : "Page",
|
64
|
+
"description": "In paginated results set the page to look for",
|
65
|
+
"type":"number"
|
66
|
+
},
|
67
|
+
"per_page":{
|
68
|
+
"title" : "Per page",
|
69
|
+
"description": "Results per page. Default is 50, max is 200",
|
70
|
+
"type":"number"
|
71
|
+
},
|
72
|
+
"sort_by":{
|
73
|
+
"title" : "Sort by",
|
74
|
+
"description": "Sort the results by the given field",
|
75
|
+
"default":"name",
|
76
|
+
"enum":["created_at", "updated_at", "name", "kind"],
|
77
|
+
"type": "string"
|
78
|
+
},
|
79
|
+
"sort":{
|
80
|
+
"title" : "Sort",
|
81
|
+
"description": "Sort the results in ASC or DESC",
|
82
|
+
"type":"string",
|
83
|
+
"enum":["ASC","DESC"]
|
84
|
+
},
|
85
|
+
"filter[q]":{
|
86
|
+
"title" : "Search wildcard",
|
87
|
+
"description": "Searches in name, description",
|
88
|
+
"type":"string"
|
89
|
+
},
|
90
|
+
"filter[kind]":{
|
91
|
+
"title" : "Search by kind",
|
92
|
+
"description": "Kind of object this template can be used for: invoice, order",
|
93
|
+
"type":"string",
|
94
|
+
"enum":["invoice","estimate", "credit_note", "payment_reminder", "order"]
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
]
|
99
|
+
}
|