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.
@@ -97,13 +97,25 @@
97
97
  "properties":{"$ref":"./attachment.json#properties"}
98
98
  },
99
99
  "client":{
100
- "description": "The client for the document. You cannot create a client through this, use client_id field to set it.",
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": "The clients uuid. If a new client is assigned its language, address field, due days and cash discount are used if those fields are not set.",
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", "client_id", "price_total", "price_tax", "date", "due_date"],
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 document(excl. number,date) and returns a new draft document."
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",
@@ -54,9 +54,14 @@
54
54
  "type":"string"
55
55
  },
56
56
  "client_id":{
57
- "description": "The clients uuid",
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": "A single or a list of client uuids, comma separated",
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", "client_id", "price_total", "price_tax", "date", "due_date"],
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,.., Contact for client",
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", "client"],
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 => number",
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, subject, body",
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: invoice, credit_note (singular lowercase classname)",
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
  }
@@ -92,13 +92,25 @@
92
92
  "properties":{"$ref":"./attachment.json#properties"}
93
93
  },
94
94
  "client":{
95
- "description": "The client for the document. New documents cannot create a client, use client_id field to set it.",
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": "The clients uuid. If a new client is assigned its language, address field are used if those fields are not set.",
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": "A single or a list of client uuids, comma separated",
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", "client_id", "price_total", "price_tax", "date", "due_date"],
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 document(excl. number,date) and returns a new draft document.",
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
  }
@@ -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,client ..), see available classes in json schema. Does not need to be set for text-exports as its set from the export tempaltes type.",
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 clients with invalid back accounts when doing dtaus export",
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", "client", "payment", "comment", "email", "history", "product","recurring"],
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
  },
@@ -97,16 +97,28 @@
97
97
  "properties":{"$ref":"./attachment.json#properties"}
98
98
  },
99
99
  "client":{
100
- "description": "The client for the document. New documents cannot create a client, use client_id field to set it.",
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": "The clients uuid. If a new client is assigned its language, address field, due days and cash discount are used if those fields are not set.",
106
+ "description": "DEPRECATED: use contact_id",
107
107
  "type":"string",
108
108
  "maxLength": 22,
109
- "minLength": 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.",
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": "A single or a list of client uuids, comma separated",
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", "client_id", "price_total", "price_tax", "date", "due_date"],
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 document(excl. number,date) and returns a new draft document. If the source is an Estimate or Order only line_items, client & tags are copied, so you can pass in additional fields.",
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 its line item values. A source id must be set.",
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
  }
@@ -61,7 +61,8 @@
61
61
  "sort":{
62
62
  "title" : "Sort",
63
63
  "enum":["ASC","DESC"],
64
- "description": "Sort the results in ASC or DESC"
64
+ "description": "Sort the results in ASC or DESC",
65
+ "type": "string"
65
66
  }
66
67
  }
67
68
  },
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": "The associated client. New documents cannot create a client, use client_id to set it.",
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": "The clients uuid. If a new client is assigned its language, address field are used if those fields are not set.",
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": "A single or a list of client uuids, comma separated",
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", "client_id", "price_total", "price_tax", "date", "due_date"],
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 document(excl. number,date) and returns a new draft document.",
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
  }
@@ -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 object.",
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,.., Contact for client",
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
  },