sk_api_schema 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +1 -0
- data/README.rdoc +81 -41
- data/json/v1.0/address.json +24 -22
- data/json/v1.0/attachment.json +26 -17
- data/json/v1.0/auth_permission.json +18 -11
- data/json/v1.0/client.json +42 -37
- data/json/v1.0/comment.json +17 -11
- data/json/v1.0/company.json +67 -46
- data/json/v1.0/credit_note.json +29 -15
- data/json/v1.0/document.json +23 -14
- data/json/v1.0/email.json +39 -25
- data/json/v1.0/email_template.json +22 -15
- data/json/v1.0/estimate.json +25 -14
- data/json/v1.0/export.json +27 -18
- data/json/v1.0/export_template.json +22 -15
- data/json/v1.0/invoice.json +29 -15
- data/json/v1.0/language.json +10 -6
- data/json/v1.0/line_item.json +17 -10
- data/json/v1.0/order.json +26 -15
- data/json/v1.0/payment.json +20 -13
- data/json/v1.0/payment_reminder.json +26 -14
- data/json/v1.0/product.json +17 -9
- data/json/v1.0/recurring.json +26 -15
- data/json/v1.0/sub.json +16 -10
- data/json/v1.0/tag.json +12 -9
- data/json/v1.0/text_template.json +20 -14
- data/json/v1.0/user.json +45 -31
- data/lib/sk_api_schema/version.rb +1 -1
- metadata +3 -3
@@ -1,29 +1,34 @@
|
|
1
1
|
{ "type":"object",
|
2
2
|
"title": "email_template",
|
3
3
|
"description":"An email_template in SK",
|
4
|
-
"properties":
|
5
|
-
"id":
|
6
|
-
"description":
|
4
|
+
"properties":{
|
5
|
+
"id":{
|
6
|
+
"description":"Unique identifier - UUID",
|
7
7
|
"identity":true,
|
8
8
|
"readonly":true,
|
9
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
10
12
|
},
|
11
|
-
"name":
|
13
|
+
"name":{
|
12
14
|
"description": "A meaningful name.",
|
13
15
|
"required":true,
|
14
|
-
"type":"string"
|
16
|
+
"type":"string",
|
17
|
+
"maxLength": 50
|
15
18
|
},
|
16
|
-
"subject":
|
19
|
+
"subject":{
|
17
20
|
"description": "Subject containing placeholders, replaced when the template is used.",
|
18
21
|
"required":true,
|
19
|
-
"type":"string"
|
20
|
-
|
21
|
-
|
22
|
+
"type":"string",
|
23
|
+
"maxLength": 255
|
24
|
+
},
|
25
|
+
"body":{
|
22
26
|
"description": "Body with placeholders, replaced when the template is used.",
|
23
27
|
"required":true,
|
24
|
-
"type":"string"
|
28
|
+
"type":"string",
|
29
|
+
"format":"text"
|
25
30
|
},
|
26
|
-
"kind":
|
31
|
+
"kind":{
|
27
32
|
"description": "Kind of object receiving the email.",
|
28
33
|
"required":true,
|
29
34
|
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "client"],
|
@@ -34,13 +39,13 @@
|
|
34
39
|
"type":"string",
|
35
40
|
"maxLength": 10
|
36
41
|
},
|
37
|
-
"created_at":
|
42
|
+
"created_at":{
|
38
43
|
"description": "Date the object was created in SK. Never changes afterwards",
|
39
44
|
"format":"date-time",
|
40
45
|
"readonly":true,
|
41
46
|
"type":"string"
|
42
47
|
},
|
43
|
-
"updated_at":
|
48
|
+
"updated_at":{
|
44
49
|
"description": "Date the object was edited in SK.",
|
45
50
|
"format":"date-time",
|
46
51
|
"readonly":true,
|
@@ -48,7 +53,9 @@
|
|
48
53
|
},
|
49
54
|
"team_id":{
|
50
55
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
51
|
-
"type":"string"
|
56
|
+
"type":"string",
|
57
|
+
"maxLength": 22,
|
58
|
+
"minLength":22
|
52
59
|
}
|
53
60
|
},
|
54
61
|
"links":[
|
data/json/v1.0/estimate.json
CHANGED
@@ -3,14 +3,17 @@
|
|
3
3
|
"description": "An estimate",
|
4
4
|
"properties":{
|
5
5
|
"id":{
|
6
|
-
"description":
|
6
|
+
"description":"Unique identifier - UUID",
|
7
7
|
"identity":true,
|
8
8
|
"readonly":true,
|
9
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
10
12
|
},
|
11
13
|
"number":{
|
12
14
|
"description": "Unique number assigned by SK estimate number schema. Auto-assigned when estimate is opened. Required unless doc status is draft.",
|
13
|
-
"type":"string"
|
15
|
+
"type":"string",
|
16
|
+
"maxLength": 50
|
14
17
|
},
|
15
18
|
"address_field":{
|
16
19
|
"description": "Receiver address, normally shown in envelope window. Defaults to client address_field if empty and client_id present.",
|
@@ -38,22 +41,26 @@
|
|
38
41
|
},
|
39
42
|
"external_ref":{
|
40
43
|
"description": "Some external reference, whatever this may be.",
|
41
|
-
"type":"string"
|
44
|
+
"type":"string",
|
45
|
+
"maxLength": 255
|
42
46
|
},
|
43
47
|
"title":{
|
44
|
-
"description": "The headline of a document. Use SK placeholders to prevent
|
45
|
-
"type":"string"
|
48
|
+
"description": "The headline of a document. Use SK placeholders to prevent excessive typing e.g. 'Your estimate [number]'",
|
49
|
+
"type":"string",
|
50
|
+
"maxLength": 255
|
46
51
|
},
|
47
52
|
"notes_before":{
|
48
|
-
"description": "Notes shown before the line items.
|
49
|
-
"type":"string"
|
53
|
+
"description": "Notes shown before the line items. Normally contains salutation and other introductional information. SK placeholders can be used.",
|
54
|
+
"type":"string",
|
55
|
+
"format":"text"
|
50
56
|
},
|
51
57
|
"notes_after":{
|
52
58
|
"description": "Notes shown after the line items. Can contain information about payments, bank account or a thank-you message. SK placeholders can be used.",
|
53
|
-
"type":"string"
|
59
|
+
"type":"string",
|
60
|
+
"format":"text"
|
54
61
|
},
|
55
|
-
"tag_list":
|
56
|
-
"description": "Space separated list of tags.",
|
62
|
+
"tag_list":{
|
63
|
+
"description": "Space separated list of tags. Are split and saved as Tag objects on create, update.",
|
57
64
|
"type":"string"
|
58
65
|
},
|
59
66
|
"language":{
|
@@ -75,11 +82,15 @@
|
|
75
82
|
},
|
76
83
|
"client_id":{
|
77
84
|
"description": "The clients uuid. If a new client is assigned its language, address field are used if those fields are not set.",
|
78
|
-
"type":"string"
|
85
|
+
"type":"string",
|
86
|
+
"maxLength": 22,
|
87
|
+
"minLength":22
|
79
88
|
},
|
80
89
|
"team_id":{
|
81
90
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
82
|
-
"type":"string"
|
91
|
+
"type":"string",
|
92
|
+
"maxLength": 22,
|
93
|
+
"minLength":22
|
83
94
|
},
|
84
95
|
"line_items":{
|
85
96
|
"description": "Line items for the document",
|
@@ -142,7 +153,7 @@
|
|
142
153
|
},
|
143
154
|
"filter[q]":{
|
144
155
|
"title" : "Search",
|
145
|
-
"description": "Search in title, number,
|
156
|
+
"description": "Search in title, number, address field",
|
146
157
|
"type":"string"
|
147
158
|
},
|
148
159
|
"filter[number]":{
|
data/json/v1.0/export.json
CHANGED
@@ -1,23 +1,27 @@
|
|
1
1
|
{ "type":"object",
|
2
2
|
"title": "export",
|
3
3
|
"description":"An export in SK",
|
4
|
-
"properties":
|
5
|
-
"id":
|
6
|
-
"description":
|
4
|
+
"properties":{
|
5
|
+
"id":{
|
6
|
+
"description":"Unique identifier - UUID",
|
7
7
|
"identity":true,
|
8
8
|
"readonly":true,
|
9
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
10
12
|
},
|
11
|
-
"collection_type":
|
13
|
+
"collection_type":{
|
12
14
|
"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.",
|
13
|
-
"type":"string"
|
15
|
+
"type":"string",
|
16
|
+
"maxLength": 20
|
14
17
|
},
|
15
|
-
"collection_ids":
|
18
|
+
"collection_ids":{
|
16
19
|
"description": "Comma separated uuid's of the export objects. The backend uses a mysql text-column limited to ~64kb. 100 uuids are ~2.5kb",
|
17
20
|
"required":true,
|
18
|
-
"type":"string"
|
21
|
+
"type":"string",
|
22
|
+
"format":"text"
|
19
23
|
},
|
20
|
-
"kind":
|
24
|
+
"kind":{
|
21
25
|
"description": "The export type. text: uses an export template defined by a template_id. archived_pdf: zip with archived PDF(documents only). allinone_pdf: All archived PDF(Documents) in one big PDF. attachments: All attachments of the given objects as zip. dtaus: German bank format, relies on valid bank information in your company and for each client of the exported documents. dtaus_lk Lastschrift. dtaus_gk: Gutschrift.",
|
22
26
|
"required":true,
|
23
27
|
"enum": ["text", "archived_pdf", "attachments", "dtaus_lk", "dtaus_gk", "allinone_pdf"],
|
@@ -25,22 +29,27 @@
|
|
25
29
|
},
|
26
30
|
"template_id":{
|
27
31
|
"description": "A export template uuid. Required for text exports. collection_type can be empty as is forced to the templates type",
|
28
|
-
"type":"string"
|
32
|
+
"type":"string",
|
33
|
+
"maxLength": 22,
|
34
|
+
"minLength":22
|
29
35
|
},
|
30
36
|
"team_id":{
|
31
37
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
32
|
-
"type":"string"
|
38
|
+
"type":"string",
|
39
|
+
"maxLength": 22,
|
40
|
+
"minLength":22
|
33
41
|
},
|
34
|
-
"status":
|
42
|
+
"status":{
|
35
43
|
"description": "The export status",
|
36
44
|
"readonly":true,
|
37
45
|
"enum": ["pending", "in_progress", "failed", "success"],
|
38
46
|
"type":"string"
|
39
47
|
},
|
40
|
-
"log":
|
48
|
+
"log":{
|
41
49
|
"description": "Errors and warnings, can contain html markup f.ex. links to clients with invalid back accounts when doing dtaus export",
|
42
50
|
"readonly":true,
|
43
|
-
"type":"string"
|
51
|
+
"type":"string",
|
52
|
+
"format": "text"
|
44
53
|
},
|
45
54
|
"attachments":{
|
46
55
|
"description": "The exported data as attachment.",
|
@@ -48,25 +57,25 @@
|
|
48
57
|
"type":"array",
|
49
58
|
"properties":{"$ref":"./attachment.json#properties"}
|
50
59
|
},
|
51
|
-
"started_at":
|
60
|
+
"started_at":{
|
52
61
|
"description": "Date the was started",
|
53
62
|
"format":"date-time",
|
54
63
|
"readonly":true,
|
55
64
|
"type":"string"
|
56
65
|
},
|
57
|
-
"finished_at":
|
66
|
+
"finished_at":{
|
58
67
|
"description": "Date the was finished",
|
59
68
|
"format":"date-time",
|
60
69
|
"readonly":true,
|
61
70
|
"type":"string"
|
62
71
|
},
|
63
|
-
"created_at":
|
72
|
+
"created_at":{
|
64
73
|
"description": "Date the object was created in SK. Never changes afterwards",
|
65
74
|
"format":"date-time",
|
66
75
|
"readonly":true,
|
67
76
|
"type":"string"
|
68
77
|
},
|
69
|
-
"updated_at":
|
78
|
+
"updated_at":{
|
70
79
|
"description": "Date the object was edited in SK.",
|
71
80
|
"format":"date-time",
|
72
81
|
"readonly":true,
|
@@ -1,40 +1,45 @@
|
|
1
1
|
{ "type":"object",
|
2
2
|
"title": "export_template",
|
3
3
|
"description":"An export_template in SK",
|
4
|
-
"properties":
|
5
|
-
"id":
|
6
|
-
"description":
|
4
|
+
"properties":{
|
5
|
+
"id":{
|
6
|
+
"description":"Unique identifier - UUID",
|
7
7
|
"identity":true,
|
8
8
|
"readonly":true,
|
9
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
10
12
|
},
|
11
|
-
"name":
|
13
|
+
"name":{
|
12
14
|
"description": "A meaningful name.",
|
13
15
|
"required":true,
|
14
|
-
"type":"string"
|
16
|
+
"type":"string",
|
17
|
+
"maxLength": 50
|
15
18
|
},
|
16
|
-
"text":
|
19
|
+
"text":{
|
17
20
|
"description": "Text with placeholders, replaced when the template is used.",
|
18
21
|
"required":true,
|
19
|
-
"type":"string"
|
20
|
-
|
21
|
-
|
22
|
+
"type":"string",
|
23
|
+
"format":"text"
|
24
|
+
},
|
25
|
+
"kind":{
|
22
26
|
"description": "Kind of exported data.",
|
23
27
|
"required":true,
|
24
28
|
"enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "client", "payment", "comment", "email", "history", "product","recurring"],
|
25
29
|
"type":"string"
|
26
30
|
},
|
27
|
-
"filename":
|
31
|
+
"filename":{
|
28
32
|
"description": "Name of the created export file. Date placeholders can be used: %y-%m-%d_%H-%M_clients.csv",
|
29
|
-
"type":"string"
|
33
|
+
"type":"string",
|
34
|
+
"maxLength": 255
|
30
35
|
},
|
31
|
-
"created_at":
|
36
|
+
"created_at":{
|
32
37
|
"description": "Date the object was created in SK. Never changes afterwards",
|
33
38
|
"format":"date-time",
|
34
39
|
"readonly":true,
|
35
40
|
"type":"string"
|
36
41
|
},
|
37
|
-
"updated_at":
|
42
|
+
"updated_at":{
|
38
43
|
"description": "Date the object was edited in SK.",
|
39
44
|
"format":"date-time",
|
40
45
|
"readonly":true,
|
@@ -42,7 +47,9 @@
|
|
42
47
|
},
|
43
48
|
"team_id":{
|
44
49
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
45
|
-
"type":"string"
|
50
|
+
"type":"string",
|
51
|
+
"maxLength": 22,
|
52
|
+
"minLength":22
|
46
53
|
}
|
47
54
|
},
|
48
55
|
"links":[
|
data/json/v1.0/invoice.json
CHANGED
@@ -3,14 +3,17 @@
|
|
3
3
|
"description": "An invoice",
|
4
4
|
"properties":{
|
5
5
|
"id":{
|
6
|
-
"description":
|
6
|
+
"description":"Unique identifier - UUID",
|
7
7
|
"identity":true,
|
8
8
|
"readonly":true,
|
9
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength": 22
|
10
12
|
},
|
11
13
|
"number":{
|
12
14
|
"description": "Unique number assigned by SK invoice number schema. Auto-assigned when invoice is opened. Required unless doc status is draft.",
|
13
|
-
"type":"string"
|
15
|
+
"type":"string",
|
16
|
+
"maxLength": 50
|
14
17
|
},
|
15
18
|
"address_field":{
|
16
19
|
"description": "Receiver address, normally shown in envelope window. Defaults to client address_field if empty and client_id given.",
|
@@ -38,27 +41,31 @@
|
|
38
41
|
},
|
39
42
|
"external_ref":{
|
40
43
|
"description": "Some external reference, whatever this may be.",
|
41
|
-
"type":"string"
|
44
|
+
"type":"string",
|
45
|
+
"maxLength": 255
|
42
46
|
},
|
43
47
|
"payment_method":{
|
44
|
-
"description": "How the document is
|
48
|
+
"description": "How the document is being payed. Used in new payments.",
|
45
49
|
"enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
|
46
50
|
"type":"string"
|
47
51
|
},
|
48
52
|
"title":{
|
49
|
-
"description": "The headline of a document. Use SK placeholders to prevent
|
50
|
-
"type":"string"
|
53
|
+
"description": "The headline of a document. Use SK placeholders to prevent excessive typing e.g. 'Your invoice [number]'",
|
54
|
+
"type":"string",
|
55
|
+
"maxLength": 255
|
51
56
|
},
|
52
57
|
"notes_before":{
|
53
|
-
"description": "Notes shown before the line items.
|
54
|
-
"type":"string"
|
58
|
+
"description": "Notes shown before the line items. Normally contains salutation and other introductional information. SK placeholders can be used.",
|
59
|
+
"type":"string",
|
60
|
+
"format":"text"
|
55
61
|
},
|
56
62
|
"notes_after":{
|
57
63
|
"description": "Notes shown after the line items. Can contain information about payments, bank account or a thank-you message. SK placeholders can be used.",
|
58
|
-
"type":"string"
|
64
|
+
"type":"string",
|
65
|
+
"format":"text"
|
59
66
|
},
|
60
|
-
"tag_list":
|
61
|
-
"description": "Space separated list of tags.",
|
67
|
+
"tag_list":{
|
68
|
+
"description": "Space separated list of tags. Are split and saved as Tag objects on create, update.",
|
62
69
|
"type":"string"
|
63
70
|
},
|
64
71
|
"language":{
|
@@ -80,11 +87,15 @@
|
|
80
87
|
},
|
81
88
|
"client_id":{
|
82
89
|
"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.",
|
83
|
-
"type":"string"
|
90
|
+
"type":"string",
|
91
|
+
"maxLength": 22,
|
92
|
+
"minLength": 22
|
84
93
|
},
|
85
94
|
"team_id":{
|
86
95
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
87
|
-
"type":"string"
|
96
|
+
"type":"string",
|
97
|
+
"maxLength": 22,
|
98
|
+
"minLength": 22
|
88
99
|
},
|
89
100
|
"line_items":{
|
90
101
|
"description": "Line items for the document",
|
@@ -157,7 +168,7 @@
|
|
157
168
|
},
|
158
169
|
"filter[q]":{
|
159
170
|
"title" : "Search",
|
160
|
-
"description": "Search in title, number,
|
171
|
+
"description": "Search in title, number, address field",
|
161
172
|
"type":"string"
|
162
173
|
},
|
163
174
|
"filter[number]":{
|
@@ -243,6 +254,9 @@
|
|
243
254
|
{ "rel": "attachments",
|
244
255
|
"href": "invoices/{id}/attachments"
|
245
256
|
},
|
257
|
+
{ "rel": "payments",
|
258
|
+
"href": "invoices/{id}/payments"
|
259
|
+
},
|
246
260
|
{ "rel": "payment_reminders",
|
247
261
|
"href": "invoices/{id}/payment_reminders"
|
248
262
|
},
|
data/json/v1.0/language.json
CHANGED
@@ -3,20 +3,24 @@
|
|
3
3
|
"description": "A language in SK can be assigned to documents, contacts and templates. When creating new documents, emails or PDF the language is used to select a specific template or language agnostic defaults. A language has many translations.",
|
4
4
|
"properties":{
|
5
5
|
"id":{
|
6
|
-
"description":
|
6
|
+
"description":"Unique identifier - UUID",
|
7
7
|
"identity":true,
|
8
8
|
"readonly":true,
|
9
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
10
12
|
},
|
11
13
|
"code":{
|
12
14
|
"description": "Language short-code",
|
13
|
-
"type":"string"
|
15
|
+
"type":"string",
|
16
|
+
"maxLength": 10
|
14
17
|
},
|
15
18
|
"name":{
|
16
19
|
"description": "The name of the language, shown in the interface",
|
17
20
|
"type":"string",
|
18
|
-
"required":true
|
19
|
-
|
21
|
+
"required":true,
|
22
|
+
"maxLength": 30
|
23
|
+
},
|
20
24
|
"created_at":{
|
21
25
|
"description": "Date the object was created in SK. Never changes afterwards",
|
22
26
|
"format":"date-time",
|
@@ -46,7 +50,7 @@
|
|
46
50
|
"title" : "Per page",
|
47
51
|
"description": "Results per page. Default is 10, max is 100",
|
48
52
|
"type":"number"
|
49
|
-
},
|
53
|
+
},
|
50
54
|
"sort_by":{
|
51
55
|
"title" : "Sort by",
|
52
56
|
"description": "Sort the results by the given field => code",
|