sk_api_schema 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +37 -19
- data/README.rdoc +17 -15
- data/json/v1.0/attachment.json +3 -2
- data/json/v1.0/auth_permission.json +2 -1
- data/json/v1.0/client.json +1 -1
- data/json/v1.0/comment.json +3 -2
- data/json/v1.0/contact.json +357 -0
- data/json/v1.0/credit_note.json +18 -5
- data/json/v1.0/document.json +16 -5
- data/json/v1.0/email.json +3 -2
- data/json/v1.0/email_template.json +7 -5
- data/json/v1.0/estimate.json +24 -6
- data/json/v1.0/export.json +4 -3
- data/json/v1.0/export_template.json +3 -2
- data/json/v1.0/invoice.json +26 -8
- data/json/v1.0/language.json +2 -1
- data/json/v1.0/order.json +24 -6
- data/json/v1.0/payment.json +4 -3
- data/json/v1.0/payment_reminder.json +25 -6
- data/json/v1.0/pdf_template.json +6 -4
- data/json/v1.0/product.json +2 -1
- data/json/v1.0/recurring.json +24 -6
- data/json/v1.0/tag.json +2 -1
- data/json/v1.0/text_template.json +3 -2
- data/lib/sk_api_schema/version.rb +1 -1
- data/spec/sk_api_schema_spec.rb +3 -1
- metadata +5 -4
data/json/v1.0/credit_note.json
CHANGED
@@ -97,13 +97,25 @@
|
|
97
97
|
"properties":{"$ref":"./attachment.json#properties"}
|
98
98
|
},
|
99
99
|
"client":{
|
100
|
-
"description": "
|
100
|
+
"description": "DEPRECATED: use contact",
|
101
101
|
"readonly":true,
|
102
102
|
"type":"object",
|
103
103
|
"properties":{"$ref":"./client.json#properties"}
|
104
104
|
},
|
105
105
|
"client_id":{
|
106
|
-
"description": "
|
106
|
+
"description": "DEPRECATED: use contact_id",
|
107
|
+
"type":"string",
|
108
|
+
"maxLength": 22,
|
109
|
+
"minLength":22
|
110
|
+
},
|
111
|
+
"contact":{
|
112
|
+
"description": "The contact for the document. Use contact_id field to set a contact.",
|
113
|
+
"readonly":true,
|
114
|
+
"type":"object",
|
115
|
+
"properties":{"$ref":"./contact.json#properties"}
|
116
|
+
},
|
117
|
+
"contact_id":{
|
118
|
+
"description": "The contact uuid. When assigning a contact its language, currency, address_field (due days, cash discount) values are used for the document if those doc-fields are not set.",
|
107
119
|
"type":"string",
|
108
120
|
"maxLength": 22,
|
109
121
|
"minLength":22
|
@@ -243,13 +255,14 @@
|
|
243
255
|
"sort_by":{
|
244
256
|
"title" : "Sort by",
|
245
257
|
"description": "Sort the results by the given field => number",
|
246
|
-
"enum":["title", "number", "created_at", "updated_at", "
|
258
|
+
"enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
|
247
259
|
"type": "string"
|
248
260
|
},
|
249
261
|
"sort":{
|
250
262
|
"title" : "Sort",
|
251
263
|
"enum":["ASC","DESC"],
|
252
|
-
"description": "Sort the results in ASC or DESC"
|
264
|
+
"description": "Sort the results in ASC or DESC",
|
265
|
+
"type": "string"
|
253
266
|
}
|
254
267
|
}
|
255
268
|
},
|
@@ -267,7 +280,7 @@
|
|
267
280
|
"properties" : {
|
268
281
|
"source" : {
|
269
282
|
"title" : "Source document id",
|
270
|
-
"description": "Copies the source
|
283
|
+
"description": "Copies the source(excl. number,date) and returns a new draft document. Fields passed with the object(e.g. notes, title, address_field) are not overwritten."
|
271
284
|
},
|
272
285
|
"cancel" : {
|
273
286
|
"title" : "Cancel an credit note",
|
data/json/v1.0/document.json
CHANGED
@@ -54,9 +54,14 @@
|
|
54
54
|
"type":"string"
|
55
55
|
},
|
56
56
|
"client_id":{
|
57
|
-
"description": "
|
57
|
+
"description": "DEPRECATED: use contact_id",
|
58
|
+
"type":"string",
|
59
|
+
"maxLength": 22,
|
60
|
+
"minLength":22
|
61
|
+
},
|
62
|
+
"contact_id":{
|
63
|
+
"description": "The contact uuid. When assigning a contact its language, currency, address_field (due days, cash discount) values are used for the document if those doc-fields are not set.",
|
58
64
|
"type":"string",
|
59
|
-
"required":true,
|
60
65
|
"maxLength": 22,
|
61
66
|
"minLength":22
|
62
67
|
},
|
@@ -196,7 +201,12 @@
|
|
196
201
|
},
|
197
202
|
"filter[client_ids]":{
|
198
203
|
"title" : "Clients",
|
199
|
-
"description": "
|
204
|
+
"description": "DEPRECATED use contact_ids",
|
205
|
+
"type" : "string"
|
206
|
+
},
|
207
|
+
"filter[contact_ids]":{
|
208
|
+
"title" : "Contacts",
|
209
|
+
"description": "A single or a list of contact uuids, comma separated",
|
200
210
|
"type" : "string"
|
201
211
|
},
|
202
212
|
"filter[ids]":{
|
@@ -212,13 +222,14 @@
|
|
212
222
|
"sort_by":{
|
213
223
|
"title" : "Sort by",
|
214
224
|
"description": "Sort the results by the given field => number",
|
215
|
-
"enum":["title", "number", "created_at", "updated_at", "
|
225
|
+
"enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
|
216
226
|
"type": "string"
|
217
227
|
},
|
218
228
|
"sort":{
|
219
229
|
"title" : "Sort",
|
220
230
|
"enum":["ASC","DESC"],
|
221
|
-
"description": "Sort the results in ASC or DESC"
|
231
|
+
"description": "Sort the results in ASC or DESC",
|
232
|
+
"type": "string"
|
222
233
|
}
|
223
234
|
}
|
224
235
|
}
|
data/json/v1.0/email.json
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
"properties":{"$ref":"./attachment.json#properties"}
|
52
52
|
},
|
53
53
|
"related_object_type":{
|
54
|
-
"description": "Object type of the emails parent. Is the camelcased base class name: Document for invoice, credit_note
|
54
|
+
"description": "Object type of the emails parent. Is the camelcased base class name: Document for invoice, credit_note, contact,..",
|
55
55
|
"required":true,
|
56
56
|
"type":"string"
|
57
57
|
},
|
@@ -147,7 +147,8 @@
|
|
147
147
|
"sort":{
|
148
148
|
"title" : "Sort",
|
149
149
|
"enum":["ASC","DESC"],
|
150
|
-
"description": "Sort the results in ASC or DESC"
|
150
|
+
"description": "Sort the results in ASC or DESC",
|
151
|
+
"type": "string"
|
151
152
|
}
|
152
153
|
}
|
153
154
|
},
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"kind":{
|
33
33
|
"description": "Kind of object the template can be used for.",
|
34
34
|
"required":true,
|
35
|
-
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "
|
35
|
+
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "contact"],
|
36
36
|
"type":"string"
|
37
37
|
},
|
38
38
|
"language":{
|
@@ -78,23 +78,25 @@
|
|
78
78
|
},
|
79
79
|
"sort_by":{
|
80
80
|
"title" : "Sort by",
|
81
|
-
"description": "Sort the results by the given field
|
81
|
+
"description": "Sort the results by the given field",
|
82
82
|
"enum":["created_at", "updated_at"],
|
83
83
|
"type": "string"
|
84
84
|
},
|
85
85
|
"sort":{
|
86
86
|
"title" : "Sort",
|
87
87
|
"enum":["ASC","DESC"],
|
88
|
-
"description": "Sort the results in ASC or DESC"
|
88
|
+
"description": "Sort the results in ASC or DESC",
|
89
|
+
"type":"string"
|
89
90
|
},
|
90
91
|
"filter[q]":{
|
91
92
|
"title" : "Search wildcard",
|
92
|
-
"description": "Searches in name,
|
93
|
+
"description": "Searches in name, body, subject",
|
93
94
|
"type":"string"
|
94
95
|
},
|
95
96
|
"filter[kind]":{
|
96
97
|
"title" : "Search by kind",
|
97
|
-
"description": "Kind of object this template can be used for
|
98
|
+
"description": "Kind of object this template can be used for",
|
99
|
+
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "contact"],
|
98
100
|
"type":"string"
|
99
101
|
}
|
100
102
|
}
|
data/json/v1.0/estimate.json
CHANGED
@@ -92,13 +92,25 @@
|
|
92
92
|
"properties":{"$ref":"./attachment.json#properties"}
|
93
93
|
},
|
94
94
|
"client":{
|
95
|
-
"description": "
|
95
|
+
"description": "DEPRECATED: use contact",
|
96
96
|
"readonly":true,
|
97
97
|
"type":"object",
|
98
98
|
"properties":{"$ref":"./client.json#properties"}
|
99
99
|
},
|
100
100
|
"client_id":{
|
101
|
-
"description": "
|
101
|
+
"description": "DEPRECATED: use contact_id",
|
102
|
+
"type":"string",
|
103
|
+
"maxLength": 22,
|
104
|
+
"minLength":22
|
105
|
+
},
|
106
|
+
"contact":{
|
107
|
+
"description": "The contact for the document. Use contact_id field to set a contact.",
|
108
|
+
"readonly":true,
|
109
|
+
"type":"object",
|
110
|
+
"properties":{"$ref":"./contact.json#properties"}
|
111
|
+
},
|
112
|
+
"contact_id":{
|
113
|
+
"description": "The contact uuid. When assigning a contact its language, currency, address_field (due days, cash discount) values are used for the document if those doc-fields are not set.",
|
102
114
|
"type":"string",
|
103
115
|
"maxLength": 22,
|
104
116
|
"minLength":22
|
@@ -214,7 +226,12 @@
|
|
214
226
|
},
|
215
227
|
"filter[client_ids]":{
|
216
228
|
"title" : "Clients",
|
217
|
-
"description": "
|
229
|
+
"description": "DEPRECATED use contact_ids",
|
230
|
+
"type" : "string"
|
231
|
+
},
|
232
|
+
"filter[contact_ids]":{
|
233
|
+
"title" : "Contacts",
|
234
|
+
"description": "A single or a list of contact uuids, comma separated",
|
218
235
|
"type" : "string"
|
219
236
|
},
|
220
237
|
"filter[ids]":{
|
@@ -230,13 +247,14 @@
|
|
230
247
|
"sort_by":{
|
231
248
|
"title" : "Sort by",
|
232
249
|
"description": "Sort the results by the given field => number",
|
233
|
-
"enum":["title", "number", "created_at", "updated_at", "
|
250
|
+
"enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
|
234
251
|
"type": "string"
|
235
252
|
},
|
236
253
|
"sort":{
|
237
254
|
"title" : "Sort",
|
238
255
|
"enum":["ASC","DESC"],
|
239
|
-
"description": "Sort the results in ASC or DESC"
|
256
|
+
"description": "Sort the results in ASC or DESC",
|
257
|
+
"type": "string"
|
240
258
|
}
|
241
259
|
}
|
242
260
|
},
|
@@ -254,7 +272,7 @@
|
|
254
272
|
"properties" : {
|
255
273
|
"source" : {
|
256
274
|
"title" : "Source document id",
|
257
|
-
"description": "Copies the source
|
275
|
+
"description": "Copies the source(excl. number,date) and returns a new draft document. Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
|
258
276
|
"type" : "string"
|
259
277
|
}
|
260
278
|
}
|
data/json/v1.0/export.json
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
"minLength":22
|
13
13
|
},
|
14
14
|
"collection_type":{
|
15
|
-
"description": "The type of data to export. Lower-case singular name of the export data's class(invoice,
|
15
|
+
"description": "The type of data to export. Lower-case singular name of the export data's class(invoice,contact..), see available classes in json schema. Not required for text-exports, getting the type from the export_template.",
|
16
16
|
"type":"string",
|
17
17
|
"maxLength": 20
|
18
18
|
},
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"type":"string"
|
48
48
|
},
|
49
49
|
"log":{
|
50
|
-
"description": "Errors and warnings, can contain html markup f.ex. links to
|
50
|
+
"description": "Errors and warnings, can contain html markup f.ex. links to contacts with invalid back accounts when doing dtaus export",
|
51
51
|
"readonly":true,
|
52
52
|
"type":"string",
|
53
53
|
"format": "text"
|
@@ -121,7 +121,8 @@
|
|
121
121
|
"sort":{
|
122
122
|
"title" : "Sort",
|
123
123
|
"enum":["ASC","DESC"],
|
124
|
-
"description": "Sort the results in ASC or DESC"
|
124
|
+
"description": "Sort the results in ASC or DESC",
|
125
|
+
"type": "string"
|
125
126
|
}
|
126
127
|
}
|
127
128
|
},
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"kind":{
|
27
27
|
"description": "Kind of object the template can be used for.",
|
28
28
|
"required":true,
|
29
|
-
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "
|
29
|
+
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "contact", "payment", "comment", "email", "history", "product","recurring"],
|
30
30
|
"type":"string"
|
31
31
|
},
|
32
32
|
"filename":{
|
@@ -79,7 +79,8 @@
|
|
79
79
|
"sort":{
|
80
80
|
"title" : "Sort",
|
81
81
|
"enum":["ASC","DESC"],
|
82
|
-
"description": "Sort the results in ASC or DESC"
|
82
|
+
"description": "Sort the results in ASC or DESC",
|
83
|
+
"type": "string"
|
83
84
|
}
|
84
85
|
}
|
85
86
|
},
|
data/json/v1.0/invoice.json
CHANGED
@@ -97,16 +97,28 @@
|
|
97
97
|
"properties":{"$ref":"./attachment.json#properties"}
|
98
98
|
},
|
99
99
|
"client":{
|
100
|
-
"description": "
|
100
|
+
"description": "DEPRECATED: use contact",
|
101
101
|
"readonly":true,
|
102
102
|
"type":"object",
|
103
103
|
"properties":{"$ref":"./client.json#properties"}
|
104
104
|
},
|
105
105
|
"client_id":{
|
106
|
-
"description": "
|
106
|
+
"description": "DEPRECATED: use contact_id",
|
107
107
|
"type":"string",
|
108
108
|
"maxLength": 22,
|
109
|
-
"minLength":
|
109
|
+
"minLength":22
|
110
|
+
},
|
111
|
+
"contact":{
|
112
|
+
"description": "The contact for the document. Use contact_id field to set a contact.",
|
113
|
+
"readonly":true,
|
114
|
+
"type":"object",
|
115
|
+
"properties":{"$ref":"./contact.json#properties"}
|
116
|
+
},
|
117
|
+
"contact_id":{
|
118
|
+
"description": "The contact uuid. When assigning a contact its language, currency, address_field (due days, cash discount) values are used for the document if those doc-fields are not set.",
|
119
|
+
"type":"string",
|
120
|
+
"maxLength": 22,
|
121
|
+
"minLength":22
|
110
122
|
},
|
111
123
|
"team_id":{
|
112
124
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
@@ -226,7 +238,12 @@
|
|
226
238
|
},
|
227
239
|
"filter[client_ids]":{
|
228
240
|
"title" : "Clients",
|
229
|
-
"description": "
|
241
|
+
"description": "DEPRECATED use contact_ids",
|
242
|
+
"type" : "string"
|
243
|
+
},
|
244
|
+
"filter[contact_ids]":{
|
245
|
+
"title" : "Contacts",
|
246
|
+
"description": "A single or a list of contact uuids, comma separated",
|
230
247
|
"type" : "string"
|
231
248
|
},
|
232
249
|
"filter[ids]":{
|
@@ -242,13 +259,14 @@
|
|
242
259
|
"sort_by":{
|
243
260
|
"title" : "Sort by",
|
244
261
|
"description": "Sort the results by the given field => number",
|
245
|
-
"enum":["title", "number", "created_at", "updated_at", "
|
262
|
+
"enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
|
246
263
|
"type": "string"
|
247
264
|
},
|
248
265
|
"sort":{
|
249
266
|
"title" : "Sort",
|
250
267
|
"enum":["ASC","DESC"],
|
251
|
-
"description": "Sort the results in ASC or DESC"
|
268
|
+
"description": "Sort the results in ASC or DESC",
|
269
|
+
"type": "string"
|
252
270
|
}
|
253
271
|
}
|
254
272
|
},
|
@@ -266,12 +284,12 @@
|
|
266
284
|
"properties" : {
|
267
285
|
"source" : {
|
268
286
|
"title" : "Source document id",
|
269
|
-
"description": "Copies the source
|
287
|
+
"description": "Copies the source(excl. number,date) and returns a new draft document. Fields passed with the object(e.g. notes, title, address_field) are not overwritten. If the source is an Estimate or Order only line_items, contact & tags are copied.",
|
270
288
|
"type" : "string"
|
271
289
|
},
|
272
290
|
"cancel" : {
|
273
291
|
"title" : "Cancel an invoice",
|
274
|
-
"description": "Cancelling a document copies the source and negates
|
292
|
+
"description": "Cancelling a document copies the source and negates all line item values. A source id must be set.",
|
275
293
|
"dependencies": ["source"],
|
276
294
|
"type":"boolean"
|
277
295
|
}
|
data/json/v1.0/language.json
CHANGED
data/json/v1.0/order.json
CHANGED
@@ -97,13 +97,25 @@
|
|
97
97
|
"properties":{"$ref":"./attachment.json#properties"}
|
98
98
|
},
|
99
99
|
"client":{
|
100
|
-
"description": "
|
100
|
+
"description": "DEPRECATED: use contact",
|
101
101
|
"readonly":true,
|
102
102
|
"type":"object",
|
103
103
|
"properties":{"$ref":"./client.json#properties"}
|
104
104
|
},
|
105
105
|
"client_id":{
|
106
|
-
"description": "
|
106
|
+
"description": "DEPRECATED: use contact_id",
|
107
|
+
"type":"string",
|
108
|
+
"maxLength": 22,
|
109
|
+
"minLength":22
|
110
|
+
},
|
111
|
+
"contact":{
|
112
|
+
"description": "The contact for the document. Use contact_id field to set a contact.",
|
113
|
+
"readonly":true,
|
114
|
+
"type":"object",
|
115
|
+
"properties":{"$ref":"./contact.json#properties"}
|
116
|
+
},
|
117
|
+
"contact_id":{
|
118
|
+
"description": "The contact uuid. When assigning a contact its language, currency, address_field (due days, cash discount) values are used for the document if those doc-fields are not set.",
|
107
119
|
"type":"string",
|
108
120
|
"maxLength": 22,
|
109
121
|
"minLength":22
|
@@ -219,7 +231,12 @@
|
|
219
231
|
},
|
220
232
|
"filter[client_ids]":{
|
221
233
|
"title" : "Clients",
|
222
|
-
"description": "
|
234
|
+
"description": "DEPRECATED use contact_ids",
|
235
|
+
"type" : "string"
|
236
|
+
},
|
237
|
+
"filter[contact_ids]":{
|
238
|
+
"title" : "Contacts",
|
239
|
+
"description": "A single or a list of contact uuids, comma separated",
|
223
240
|
"type" : "string"
|
224
241
|
},
|
225
242
|
"filter[ids]":{
|
@@ -235,13 +252,14 @@
|
|
235
252
|
"sort_by":{
|
236
253
|
"title" : "Sort by",
|
237
254
|
"description": "Sort the results by the given field => number",
|
238
|
-
"enum":["title", "number", "created_at", "updated_at", "
|
255
|
+
"enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
|
239
256
|
"type": "string"
|
240
257
|
},
|
241
258
|
"sort":{
|
242
259
|
"title" : "Sort",
|
243
260
|
"enum":["ASC","DESC"],
|
244
|
-
"description": "Sort the results in ASC or DESC"
|
261
|
+
"description": "Sort the results in ASC or DESC",
|
262
|
+
"type": "string"
|
245
263
|
}
|
246
264
|
}
|
247
265
|
},
|
@@ -259,7 +277,7 @@
|
|
259
277
|
"properties" : {
|
260
278
|
"source" : {
|
261
279
|
"title" : "Source document id",
|
262
|
-
"description": "Copies the source
|
280
|
+
"description": "Copies the source(excl. number,date) and returns a new draft document. Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
|
263
281
|
"type" : "string"
|
264
282
|
}
|
265
283
|
}
|
data/json/v1.0/payment.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{ "type":"object",
|
2
2
|
"title": "payment",
|
3
3
|
"name": "payment",
|
4
|
-
"description":"An payment in SK must always be related to an
|
4
|
+
"description":"An payment in SK must always be related to an document.",
|
5
5
|
"properties":{
|
6
6
|
"id":{
|
7
7
|
"description":"Unique identifier - UUID",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"type":"string"
|
50
50
|
},
|
51
51
|
"related_object_type":{
|
52
|
-
"description": "Object type of the payments parent. Is the camel-cased base class name: Document for invoice, credit_note
|
52
|
+
"description": "Object type of the payments parent. Is the camel-cased base class name: Document for invoice, credit_note",
|
53
53
|
"required":true,
|
54
54
|
"type":"string"
|
55
55
|
},
|
@@ -117,7 +117,8 @@
|
|
117
117
|
"sort":{
|
118
118
|
"title" : "Sort",
|
119
119
|
"enum":["ASC","DESC"],
|
120
|
-
"description": "Sort the results in ASC or DESC"
|
120
|
+
"description": "Sort the results in ASC or DESC",
|
121
|
+
"type": "string"
|
121
122
|
}
|
122
123
|
}
|
123
124
|
},
|