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
data/json/v1.0/sub.json
CHANGED
@@ -1,36 +1,42 @@
|
|
1
1
|
{"type":"object",
|
2
2
|
"title": "sub",
|
3
3
|
"description": "Subscribe to push notifications(webhooks) about object livecycle events like new, update or delete. Only returns subscription for the current app, so you MUST be using oAuth. When a user removes your app its subs are also deleted. <br/>To register you must supply <br/>- callback_url: receives a base64 encode string containing a JSON object with the object in it's latest state, the user_id & subdomain, company_id, hmac-signed with your app secret.<br/>- channel: defining the event, made up of the SINGULAR object name and the action: invoice.delete, payment.new<br/> - register auth_permissions: An app MUST request non-api permissions f.ex.: clients:create. Perms(on company,app,user,team) are checked before any publishing, so if a user cannot create clients in the interface, his apps will not receive any callbacks.",
|
4
|
-
"properties":
|
5
|
-
"id":
|
4
|
+
"properties":{
|
5
|
+
"id":{
|
6
|
+
"description":"Unique identifier - UUID",
|
6
7
|
"identity":true,
|
7
8
|
"readonly":true,
|
8
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
9
12
|
},
|
10
|
-
"channel":
|
13
|
+
"channel":{
|
11
14
|
"description": "The channel to which to subscribe. See available at subs/channels.",
|
12
15
|
"required":true,
|
13
|
-
"type":"string"
|
16
|
+
"type":"string",
|
17
|
+
"maxLength": 100
|
14
18
|
},
|
15
|
-
"callback_url":
|
19
|
+
"callback_url":{
|
16
20
|
"description": "An url receiving the notification. The url MUST be within the url of the current app and receives a POST with a single signed_request parameter containing an base64 encoded JSON object.",
|
17
21
|
"type":"string",
|
18
|
-
"
|
22
|
+
"format":"uri",
|
23
|
+
"required":true,
|
24
|
+
"maxLength": 100
|
19
25
|
},
|
20
|
-
"created_at":
|
26
|
+
"created_at":{
|
21
27
|
"description": "Date the record was created in SK. Never changes afterwards.",
|
22
28
|
"format":"date-time",
|
23
29
|
"readonly":true,
|
24
30
|
"type":"string"
|
25
31
|
},
|
26
|
-
"updated_at":
|
32
|
+
"updated_at":{
|
27
33
|
"description": "Last date when the record was edited.",
|
28
34
|
"format":"date-time",
|
29
35
|
"readonly":true,
|
30
36
|
"type":"string"
|
31
37
|
}
|
32
38
|
},
|
33
|
-
|
39
|
+
|
34
40
|
"links":[
|
35
41
|
{ "rel": "self",
|
36
42
|
"href": "{id}"
|
data/json/v1.0/tag.json
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
{ "type":"object",
|
2
2
|
"title": "tag",
|
3
3
|
"description":"A tag",
|
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": "The tag itself",
|
13
15
|
"readonly":true,
|
14
|
-
"type":"string"
|
15
|
-
|
16
|
-
|
16
|
+
"type":"string",
|
17
|
+
"maxLength": 50
|
18
|
+
},
|
19
|
+
"taggings_count":{
|
17
20
|
"description": "Usage count of this tag, for all objects in whole company scope.",
|
18
21
|
"readonly":true,
|
19
22
|
"type":"number"
|
20
|
-
}
|
23
|
+
}
|
21
24
|
},
|
22
25
|
"links":[
|
23
26
|
{ "rel": "self",
|
@@ -1,36 +1,40 @@
|
|
1
1
|
{ "type":"object",
|
2
2
|
"title": "text_template",
|
3
3
|
"description":"An text_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 which may contain placeholders, replaced when the template is used.",
|
18
21
|
"required":true,
|
19
|
-
"type":"string"
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
"type":"string",
|
23
|
+
"format":"text"
|
24
|
+
},
|
25
|
+
"kind":{
|
26
|
+
"description": "Kind of object in which the text is used. If empty the snippet can be used global, but watch the available placeholders.",
|
23
27
|
"required":true,
|
24
28
|
"enum": ["","invoice", "estimate", "credit_note", "payment_reminder", "order", "client", "email"],
|
25
29
|
"type":"string"
|
26
30
|
},
|
27
|
-
"created_at":
|
31
|
+
"created_at":{
|
28
32
|
"description": "Date the object was created in SK. Never changes afterwards",
|
29
33
|
"format":"date-time",
|
30
34
|
"readonly":true,
|
31
35
|
"type":"string"
|
32
36
|
},
|
33
|
-
"updated_at":
|
37
|
+
"updated_at":{
|
34
38
|
"description": "Date the object was edited in SK.",
|
35
39
|
"format":"date-time",
|
36
40
|
"readonly":true,
|
@@ -38,7 +42,9 @@
|
|
38
42
|
},
|
39
43
|
"team_id":{
|
40
44
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
41
|
-
"type":"string"
|
45
|
+
"type":"string",
|
46
|
+
"maxLength": 22,
|
47
|
+
"minLength":22
|
42
48
|
}
|
43
49
|
},
|
44
50
|
"links":[
|
data/json/v1.0/user.json
CHANGED
@@ -1,85 +1,99 @@
|
|
1
1
|
{"type":"object",
|
2
2
|
"title": "user",
|
3
3
|
"description": "A user as seen by SalesKing",
|
4
|
-
"properties":
|
5
|
-
"id":
|
4
|
+
"properties":{
|
5
|
+
"id":{
|
6
|
+
"description":"Unique identifier - UUID",
|
6
7
|
"identity":true,
|
7
8
|
"readonly":true,
|
8
|
-
"type":"string"
|
9
|
+
"type":"string",
|
10
|
+
"maxLength": 22,
|
11
|
+
"minLength":22
|
9
12
|
},
|
10
|
-
"last_name":
|
13
|
+
"last_name":{
|
11
14
|
"description": "Last name of a person. At least this or the organisation field must be filled for new records",
|
12
|
-
"type":"string"
|
15
|
+
"type":"string",
|
16
|
+
"maxLength": 50
|
13
17
|
},
|
14
|
-
"first_name":
|
18
|
+
"first_name":{
|
15
19
|
"description": "First name",
|
16
|
-
"type":"string"
|
20
|
+
"type":"string",
|
21
|
+
"maxLength": 50
|
17
22
|
},
|
18
|
-
"gender":
|
23
|
+
"gender":{
|
19
24
|
"description": "The users gender, used in salutation",
|
20
25
|
"enum":["male", "female"],
|
21
26
|
"type":"string"
|
22
27
|
},
|
23
|
-
"position":
|
28
|
+
"position":{
|
24
29
|
"description": "Position of a person in a company.",
|
25
|
-
"type":"string"
|
30
|
+
"type":"string",
|
31
|
+
"maxLength": 50
|
26
32
|
},
|
27
|
-
"title":
|
33
|
+
"title":{
|
28
34
|
"description": "Academical title of a person e.g. Dr., Prof",
|
29
|
-
"type":"string"
|
35
|
+
"type":"string",
|
36
|
+
"maxLength": 50
|
30
37
|
},
|
31
|
-
"language":
|
38
|
+
"language":{
|
32
39
|
"description": "The users language, reflected in the interface.",
|
33
40
|
"required":true,
|
34
|
-
"type":"string"
|
41
|
+
"type":"string",
|
42
|
+
"maxLength": 10
|
35
43
|
},
|
36
|
-
"time_zone":
|
44
|
+
"time_zone":{
|
37
45
|
"description": "Time zone",
|
38
46
|
"type":"string"
|
39
47
|
},
|
40
|
-
"email":
|
48
|
+
"email":{
|
41
49
|
"description": "Email address of the user. Unique in SK",
|
42
50
|
"required":true,
|
43
|
-
"type":"string"
|
51
|
+
"type":"string",
|
52
|
+
"maxLength": 100
|
44
53
|
},
|
45
|
-
"url":
|
54
|
+
"url":{
|
46
55
|
"description": "An url associated with the person, e.g its company website.",
|
47
|
-
"type":"string"
|
56
|
+
"type":"string",
|
57
|
+
"maxLength": 255
|
48
58
|
},
|
49
|
-
"birthday":
|
59
|
+
"birthday":{
|
50
60
|
"format":"date",
|
51
61
|
"type":"string"
|
52
62
|
},
|
53
|
-
"phone_fax":
|
63
|
+
"phone_fax":{
|
54
64
|
"description": "Fax number",
|
55
|
-
"type":"string"
|
65
|
+
"type":"string",
|
66
|
+
"maxLength": 30
|
56
67
|
},
|
57
|
-
"phone_office":
|
68
|
+
"phone_office":{
|
58
69
|
"description": "Office phone number",
|
59
|
-
"type":"string"
|
70
|
+
"type":"string",
|
71
|
+
"maxLength": 30
|
60
72
|
},
|
61
|
-
"phone_home":
|
73
|
+
"phone_home":{
|
62
74
|
"description": "Private phone number.",
|
63
|
-
"type":"string"
|
75
|
+
"type":"string",
|
76
|
+
"maxLength": 30
|
64
77
|
},
|
65
|
-
"phone_mobile":
|
78
|
+
"phone_mobile":{
|
66
79
|
"description": "Mobile phone number",
|
67
|
-
"type":"string"
|
80
|
+
"type":"string",
|
81
|
+
"maxLength": 30
|
68
82
|
},
|
69
|
-
"created_at":
|
83
|
+
"created_at":{
|
70
84
|
"description": "Date the record was created in SK. Never changes afterwards.",
|
71
85
|
"format":"date-time",
|
72
86
|
"readonly":true,
|
73
87
|
"type":"string"
|
74
88
|
},
|
75
|
-
"updated_at":
|
89
|
+
"updated_at":{
|
76
90
|
"description": "Last date when the record was edited.",
|
77
91
|
"format":"date-time",
|
78
92
|
"readonly":true,
|
79
93
|
"type":"string"
|
80
94
|
}
|
81
95
|
},
|
82
|
-
|
96
|
+
|
83
97
|
"links":[
|
84
98
|
{ "rel": "self",
|
85
99
|
"href": "users/current"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sk_api_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 3
|
9
8
|
- 4
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Georg Leciejewski
|