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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -1
  3. data/README.rdoc +1 -1
  4. data/json/v1.0/account.json +2 -2
  5. data/json/v1.0/contact.json +2 -2
  6. data/json/v1.0/line_item.json +3 -3
  7. data/json/v1.0/product.json +2 -2
  8. data/json/v1.0/sub.json +3 -3
  9. data/json/v2.0/account.json +172 -0
  10. data/json/v2.0/account_billing.json +131 -0
  11. data/json/v2.0/account_entry.json +212 -0
  12. data/json/v2.0/address.json +85 -0
  13. data/json/v2.0/attachment.json +133 -0
  14. data/json/v2.0/auth_permission.json +75 -0
  15. data/json/v2.0/client.json +318 -0
  16. data/json/v2.0/comment.json +122 -0
  17. data/json/v2.0/company.json +141 -0
  18. data/json/v2.0/contact.json +418 -0
  19. data/json/v2.0/credit_note.json +380 -0
  20. data/json/v2.0/divider_item.json +47 -0
  21. data/json/v2.0/document.json +240 -0
  22. data/json/v2.0/email.json +191 -0
  23. data/json/v2.0/email_template.json +132 -0
  24. data/json/v2.0/estimate.json +408 -0
  25. data/json/v2.0/export.json +142 -0
  26. data/json/v2.0/export_template.json +100 -0
  27. data/json/v2.0/invoice.json +407 -0
  28. data/json/v2.0/language.json +82 -0
  29. data/json/v2.0/line_item.json +121 -0
  30. data/json/v2.0/order.json +373 -0
  31. data/json/v2.0/payment.json +148 -0
  32. data/json/v2.0/payment_reminder.json +301 -0
  33. data/json/v2.0/pdf_template.json +99 -0
  34. data/json/v2.0/product.json +144 -0
  35. data/json/v2.0/recurring.json +340 -0
  36. data/json/v2.0/sub.json +60 -0
  37. data/json/v2.0/sub_total_item.json +57 -0
  38. data/json/v2.0/tag.json +76 -0
  39. data/json/v2.0/task.json +229 -0
  40. data/json/v2.0/text_template.json +95 -0
  41. data/json/v2.0/user.json +103 -0
  42. data/lib/sk_api_schema/version.rb +1 -1
  43. metadata +35 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9132c50c6ac95daba55a76fec7ef54eb3b9e2205
4
- data.tar.gz: 435a1bb9244473eb914c395dbca125a6e7576ca2
3
+ metadata.gz: abde1b5b42fecd8924f6807b99891be589fd17a0
4
+ data.tar.gz: 397c6504cd713e94ced42ac68b45951fe9fdeea3
5
5
  SHA512:
6
- metadata.gz: 93e7a0259df3f37806ddf5798c404f5101bef772fd4101e399386d3729282a64242ea937bee0ce9c28c92c2b978e1eb5d5d2ec3aadb6045623f6a34d94e0953d
7
- data.tar.gz: 9d860e071300a8f3178617fd814b6d2ca9fbdf0da0cfc8c41ff23b45563c885d4f999605cedf7a5806c0ea12e7395f46e59f35144b1b0573cb7b624745b82c12
6
+ metadata.gz: 25bfc2130cb635266c2e9775797881bfb68c2b4e61c72babaab55405441507545746e3598a35c6f20dbf8b83a7d2b1639ada0e8281825f90b2804334f2131df2
7
+ data.tar.gz: e6e78e2f97eace77224d1f552155912ab29f7355338fe0502b5b0322c7f847a249f477a6b9de858902347ddd843bd0ea9b3471ed2f0f97ba785614dc283e972f
data/CHANGELOG.md CHANGED
@@ -1,7 +1,12 @@
1
1
  # SalesKing API Changelog
2
2
 
3
3
  See [commit messages](https://github.com/salesking/sk_api_schema/commits/) for details.
4
- Also sign up to our [Developer Newsletter](http://www.salesking.eu/dev/newsletter/) to stay up-to-date !!!
4
+ Also sign up to our [Developer Newsletter](http://www.salesking.eu/dev/newsletter/) to stay up-to-date!
5
+
6
+ ##2015-10
7
+
8
+ * Update description to clarify number field decimal places length
9
+ * Contact fix lead_ref/lead_source to be strings
5
10
 
6
11
  ##2014-08
7
12
 
data/README.rdoc CHANGED
@@ -27,7 +27,7 @@ Other languages should take advantage of the raw json files.
27
27
  == Tutorial & Docs
28
28
 
29
29
  * {API Browser}[http://sk-api-browser.herokuapp.com/]
30
- * {API Intro}[http://www.salesking.eu/dev/api/]
30
+ * {API Intro}[https://developer.salesking.eu/articles/tips-tricks/api-documentation]
31
31
  * {Ruby SDK - API Client}[https://github.com/salesking/sk_sdk]
32
32
  * {PHP SDK - API Client}[https://github.com/salesking/salesking_php_sdk]
33
33
  * {Python SDK - API Client}[https://github.com/salesking/salesking_python_sdk]
@@ -38,11 +38,11 @@
38
38
  "type":"number"
39
39
  },
40
40
  "default_price":{
41
- "description": "The default price single for new account entries. Is only used if price single is left empty on create.",
41
+ "description": "The default price single for new account entries, if price single is empty on create. Max 6 decimal places.",
42
42
  "type":"number"
43
43
  },
44
44
  "default_unit":{
45
- "description": "The default quantity unit for new account entries. Is only used if unit is left empty on create.",
45
+ "description": "The default quantity unit for new account entries, if unit is empty on create.",
46
46
  "type":"string",
47
47
  "maxLength": 30
48
48
  },
@@ -207,11 +207,11 @@
207
207
  },
208
208
  "lead_source":{
209
209
  "description": "Lead source describing where a contact came from e.g. a campaign name, website, facebook, URL",
210
- "type":"text"
210
+ "type":"string"
211
211
  },
212
212
  "lead_ref":{
213
213
  "description": "Lead reference e.g. a tracking id, web-url",
214
- "type":"text"
214
+ "type":"string"
215
215
  },
216
216
  "lead_date":{
217
217
  "description": "Lead date e.g. date of first contact with your company. YYYY-MM-DD",
@@ -37,12 +37,12 @@
37
37
  "format": "text"
38
38
  },
39
39
  "price_single":{
40
- "description": "Net price of a single item. If a product id is given, price_single is taken from the product if not set.",
40
+ "description": "Net price of a single item. If a product id is given, price_single is taken from the product if not set. Max 6 decimal places.",
41
41
  "type":"number",
42
42
  "required" : true
43
43
  },
44
44
  "cost":{
45
- "description": "Cost price for a single item. Used to calculate the gross margin",
45
+ "description": "Cost price for a single item. Used to calculate the gross margin. Max 6 decimal places.",
46
46
  "type":"number"
47
47
  },
48
48
  "cost_total":{
@@ -84,7 +84,7 @@
84
84
  "maxLength": 30
85
85
  },
86
86
  "quantity":{
87
- "description": "Quantity of the item. Must be >= 0",
87
+ "description": "Quantity of the item. Must be >= 0. Max 6 decimal places.",
88
88
  "type":"number",
89
89
  "minimum":0,
90
90
  "default": 1
@@ -32,12 +32,12 @@
32
32
  "type":"string"
33
33
  },
34
34
  "price":{
35
- "description": "Net price of a single product",
35
+ "description": "Net price of a single product. Max 6 decimal places.",
36
36
  "type":"number",
37
37
  "required":true
38
38
  },
39
39
  "cost":{
40
- "description": "Cost price of a single product",
40
+ "description": "Cost price of a single product. Max 6 decimal places.",
41
41
  "type":"number"
42
42
  },
43
43
  "category_name":{
data/json/v1.0/sub.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {"type":"object",
2
2
  "title": "sub",
3
3
  "name": "sub",
4
- "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
+ "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 POST containing a JSON object with the object in it's latest state, the user_id & subdomain, company_id, hmac-signed with your app secret as base64 encode string.<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.",
5
5
  "properties":{
6
6
  "id":{
7
7
  "description":"Unique identifier - UUID",
@@ -18,7 +18,7 @@
18
18
  "maxLength": 100
19
19
  },
20
20
  "callback_url":{
21
- "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.",
21
+ "description": "An url receiving the notification. The url MUST be within the url of the current app and receives a POST having the signed_request parameter containing an base64 encoded JSON object in the body.",
22
22
  "type":"string",
23
23
  "format":"uri",
24
24
  "required":true,
@@ -57,4 +57,4 @@
57
57
  "href": "subs/channels"
58
58
  }
59
59
  ]
60
- }
60
+ }
@@ -0,0 +1,172 @@
1
+ { "type":"object",
2
+ "title": "account",
3
+ "name": "account",
4
+ "description": "BETA An account to track times, expenses, projects, usages, etc. Those are single entry accounts, opposed to double entry accounting in bookkeeping accounts.",
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
+ "number":{
15
+ "description": "Unique number assigned by you or if empty SK account number schema.",
16
+ "type":"string",
17
+ "maxLength": 50
18
+ },
19
+ "name":{
20
+ "description": "The name of the account",
21
+ "type":"string",
22
+ "required":true,
23
+ "maxLength": 100
24
+ },
25
+ "description":{
26
+ "description": "Account description",
27
+ "type":"string",
28
+ "format":"text",
29
+ "maxLength": 255
30
+ },
31
+ "balance":{
32
+ "description": "The account balance is the sum of all entries, also those from sub-accounts.",
33
+ "type":"number",
34
+ "readonly":true
35
+ },
36
+ "budget":{
37
+ "description": "If an account is used to track budgetary things f.ex. projects, this fields can be used to perform calculations like: Are we still inside the allowed budget?",
38
+ "type":"number"
39
+ },
40
+ "default_price":{
41
+ "description": "The default price single for new account entries, if price single is empty on create. Max 6 decimal places.",
42
+ "type":"number"
43
+ },
44
+ "default_unit":{
45
+ "description": "The default quantity unit for new account entries, if unit is empty on create.",
46
+ "type":"string",
47
+ "maxLength": 30
48
+ },
49
+ "hide_fields":{
50
+ "description": "A list of account entry field names. The fields are hidden on account entry lists and forms so one can focus on the important inputs. For example hide: tax,description,billed_at",
51
+ "type":"string",
52
+ "maxLength": 255
53
+ },
54
+ "contact_id":{
55
+ "description": "The contacts uuid to which the account is related.",
56
+ "type":"string",
57
+ "maxLength": 22,
58
+ "minLength":22
59
+ },
60
+ "document_id":{
61
+ "description": "Document uuid, related to the account.",
62
+ "type":"string",
63
+ "maxLength": 22,
64
+ "minLength":22
65
+ },
66
+ "created_at":{
67
+ "description": "Date the object was created in SK. Never changes afterwards",
68
+ "format":"date-time",
69
+ "readonly":true,
70
+ "type":"string"
71
+ },
72
+ "updated_at":{
73
+ "description": "Date the object was edited in SK.",
74
+ "format":"date-time",
75
+ "readonly":true,
76
+ "type":"string"
77
+ },
78
+ "team_id":{
79
+ "description": "A team uuid. If set only the team and its parent teams can see the record.",
80
+ "type":"string",
81
+ "maxLength": 22,
82
+ "minLength":22
83
+ },
84
+ "creator_id":{
85
+ "description": "The user uuid who created the record.",
86
+ "type":"string",
87
+ "maxLength": 22,
88
+ "minLength":22,
89
+ "readonly":true
90
+ }
91
+ },
92
+ "links":[
93
+ { "rel": "self",
94
+ "href": "accounts/{id}"
95
+ },
96
+ { "rel": "instances",
97
+ "href": "accounts",
98
+ "properties" : {
99
+ "filter[q]":{
100
+ "title" : "Search",
101
+ "description": "Wildcard search in number, name, description",
102
+ "type":"string"
103
+ },
104
+ "filter[number]":{
105
+ "title" : "By number",
106
+ "description": "Search by exact number",
107
+ "type":"string"
108
+ },
109
+ "filter[balance_from]":{
110
+ "title" : "By balance from",
111
+ "description": "Find account with a balance greater(>=) than given number.",
112
+ "type":"number"
113
+ },
114
+ "filter[balance_to]":{
115
+ "title" : "By balance to",
116
+ "description": "Find accounts with a balance smaller(<=) than given number.",
117
+ "type":"number"
118
+ },
119
+ "filter[contact_ids]":{
120
+ "title" : "Contacts",
121
+ "description": "Find objects belonging to a single or a list of contacts, use ids comma separated.",
122
+ "type" : "string"
123
+ },
124
+ "filter[parent_id]":{
125
+ "title" : "By parent",
126
+ "description": "Search children of the given account.",
127
+ "type":"string"
128
+ },
129
+ "page":{
130
+ "title" : "Page",
131
+ "description": "In paginated results set the page to look for",
132
+ "type":"number"
133
+ },
134
+ "per_page":{
135
+ "title" : "Per page",
136
+ "description": "Results per page. Default is 50, max is 200",
137
+ "type":"number"
138
+ },
139
+ "sort_by":{
140
+ "title" : "Sort by",
141
+ "description": "Sort the results by the given field => number",
142
+ "enum":["name","number","balance", "created_at", "updated_at"],
143
+ "type": "string"
144
+ },
145
+ "sort":{
146
+ "title" : "Sort",
147
+ "enum":["ASC","DESC"],
148
+ "description": "Sort the results in ASC or DESC",
149
+ "type": "string"
150
+ }
151
+ }
152
+ },
153
+ { "rel": "destroy",
154
+ "href": "accounts/{id}",
155
+ "method": "DELETE"
156
+ },
157
+ { "rel": "update",
158
+ "href": "accounts/{id}",
159
+ "method": "PUT"
160
+ },
161
+ { "rel": "create",
162
+ "href": "accounts",
163
+ "method": "POST"
164
+ },
165
+ { "rel": "account_entries",
166
+ "href": "accounts/{id}/account_entries"
167
+ },
168
+ { "rel": "account_billings",
169
+ "href": "accounts/{id}/account_billings"
170
+ }
171
+ ]
172
+ }
@@ -0,0 +1,131 @@
1
+ { "type":"object",
2
+ "title": "account_billing",
3
+ "name": "account_billing",
4
+ "description": "BETA An account billing serves as the glue between an account a document and their related account entries and line items. It also lets one keep track of who billed what and when. A billing is created from billable account entries, which are turned into line items for a document.",
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": "A note for the billing e.g. happyPDF usage April 2014. The field is wildcard searchable",
16
+ "type":"string",
17
+ "maxLength": 100
18
+ },
19
+ "account_id":{
20
+ "description": "The related account. Must be set for entries to be found.",
21
+ "type":"string",
22
+ "required":true,
23
+ "maxLength": 22,
24
+ "minLength":22
25
+ },
26
+ "group_entries_by":{
27
+ "description": "Group multiple account entries into single line items, when creating a billing+document from entries. Account entries MUST have the SAME price_single and quantity unit, to land in a group. Date base groups also require the SAME entry name.",
28
+ "type":"string",
29
+ "enum": ["name", "day", "week", "month", "year"]
30
+ },
31
+ "document_type":{
32
+ "description": "The document type to create. CamelCase document class name. Invoice by default",
33
+ "type":"string",
34
+ "default" : "Invoice",
35
+ "enum": ["Invoice", "CreditNote", "Order", "Estimate"]
36
+ },
37
+ "set_billed_at":{
38
+ "description": "Set billed at date for related account entries.",
39
+ "type":"boolean",
40
+ "default" : false
41
+ },
42
+ "document_id":{
43
+ "description": "The document created by the billing.",
44
+ "type":"string",
45
+ "readonly": true,
46
+ "maxLength": 22,
47
+ "minLength":22
48
+ },
49
+ "created_at":{
50
+ "description": "Date the object was created in SK. Never changes afterwards",
51
+ "format":"date-time",
52
+ "readonly":true,
53
+ "type":"string"
54
+ },
55
+ "team_id":{
56
+ "description": "A team uuid. Is inferred from the accounts team id.",
57
+ "type":"string",
58
+ "maxLength": 22,
59
+ "minLength":22
60
+ },
61
+ "creator_id":{
62
+ "description": "User who created the record.",
63
+ "type":"string",
64
+ "maxLength": 22,
65
+ "minLength":22,
66
+ "readonly":true
67
+ }
68
+ },
69
+ "links":[
70
+ { "rel": "self",
71
+ "href": "account_billings/{id}"
72
+ },
73
+ { "rel": "instances",
74
+ "href": "account_billings",
75
+ "properties" : {
76
+ "filter[q]":{
77
+ "title" : "Search",
78
+ "description": "Wildcard search in name",
79
+ "type":"string"
80
+ },
81
+ "filter[account_ids]":{
82
+ "title" : "Accounts",
83
+ "description": "Find objects belonging to a single or a list of accounts, use ids comma separated.",
84
+ "type" : "string"
85
+ },
86
+ "filter[created_at_from]":{
87
+ "title" : "From creation date",
88
+ "description": "Objects with a date eq/after the date. YYYY-MM-DD",
89
+ "format" : "date",
90
+ "type" : "string"
91
+ },
92
+ "filter[created_at_to]":{
93
+ "title" : "To creation date",
94
+ "description": "Objects with a creation until the date(<=). ISO 8601 format YYY-MM-DDThh:mm:ss+z or just a date YYY-MM-DD. If date is given the time is set to the end of the day(23:59:59) so all objects created on that day are included. A time should be already utc time.",
95
+ "format" : "date",
96
+ "type" : "string"
97
+ },
98
+ "page":{
99
+ "title" : "Page",
100
+ "description": "In paginated results set the page to look for",
101
+ "type":"number"
102
+ },
103
+ "per_page":{
104
+ "title" : "Per page",
105
+ "description": "Results per page. Default is 50, max is 200",
106
+ "type":"number"
107
+ },
108
+ "sort_by":{
109
+ "title" : "Sort by",
110
+ "description": "Sort the results by the given field => number",
111
+ "enum":["name","number","balance", "created_at", "updated_at"],
112
+ "type": "string"
113
+ },
114
+ "sort":{
115
+ "title" : "Sort",
116
+ "enum":["ASC","DESC"],
117
+ "description": "Sort the results in ASC or DESC",
118
+ "type": "string"
119
+ }
120
+ }
121
+ },
122
+ { "rel": "destroy",
123
+ "href": "account_billings/{id}",
124
+ "method": "DELETE"
125
+ },
126
+ { "rel": "create",
127
+ "href": "account_billings",
128
+ "method": "POST"
129
+ }
130
+ ]
131
+ }
@@ -0,0 +1,212 @@
1
+ { "type":"object",
2
+ "title": "account_entry",
3
+ "name": "account_entry",
4
+ "description": "A entry for an account",
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
+ "account_id":{
15
+ "description":"Account the entry belongs to.",
16
+ "required":true,
17
+ "type":"string",
18
+ "maxLength": 22,
19
+ "minLength":22
20
+ },
21
+ "document_id":{
22
+ "description":"Document the entry is related to. This relation is set by an account billing.",
23
+ "readonly":true,
24
+ "type":"string",
25
+ "maxLength": 22,
26
+ "minLength":22
27
+ },
28
+ "item_id":{
29
+ "description":"Line item on the document the entry is related to. This relation is set by an account billing or when a document is booked onto an account.",
30
+ "readonly":true,
31
+ "type":"string",
32
+ "maxLength": 22,
33
+ "minLength":22
34
+ },
35
+ "name":{
36
+ "description": "The name of an entry",
37
+ "type":"string",
38
+ "maxLength": 50
39
+ },
40
+ "description":{
41
+ "description": "Entry description",
42
+ "type":"string",
43
+ "format": "text"
44
+ },
45
+ "price_single":{
46
+ "description": "Net price of a single entry. If a product id is given, price_single is taken from the product if not set.",
47
+ "type":"number",
48
+ "required" : true
49
+ },
50
+ "net_total":{
51
+ "description": "Net price of a single entry. Calculated from price_single * quantity",
52
+ "readonly":true,
53
+ "type":"number"
54
+ },
55
+ "tax":{
56
+ "description": "Tax percentage",
57
+ "type":"number"
58
+ },
59
+ "quantity_unit":{
60
+ "description": "Quantity unit e.g: kg, days, month, ..",
61
+ "type":"string",
62
+ "maxLength": 30
63
+ },
64
+ "quantity":{
65
+ "description": "Quantity of the entry.",
66
+ "type":"number",
67
+ "default": 1
68
+ },
69
+ "date":{
70
+ "description": "Date of the entry. Defaults to today. Entries are sorted by date per default.",
71
+ "format":"date-time",
72
+ "type":"string"
73
+ },
74
+ "billable":{
75
+ "description": "True if the entry can be billed.",
76
+ "type":"boolean",
77
+ "default": false
78
+ },
79
+ "billed_at":{
80
+ "description": "Date the object was billed. Automatically set when the entry is used on an invoice.",
81
+ "format":"date-time",
82
+ "type":"string"
83
+ },
84
+ "created_at":{
85
+ "description": "Date the object was created. Never changes afterwards",
86
+ "format":"date-time",
87
+ "readonly":true,
88
+ "type":"string"
89
+ },
90
+ "updated_at":{
91
+ "description": "Date the object was edited.",
92
+ "format":"date-time",
93
+ "readonly":true,
94
+ "type":"string"
95
+ },
96
+ "_destroy":{
97
+ "description": "When set an existing entry will be deleted. This switch is used for entries passed during batch operations.",
98
+ "type":"boolean"
99
+ }
100
+ },
101
+ "links":[
102
+
103
+ { "rel": "self",
104
+ "href": "account_entries/{id}"
105
+ },
106
+ { "rel": "instances",
107
+ "href": "account_entries",
108
+ "properties" : {
109
+ "page":{
110
+ "title" : "Page",
111
+ "description": "In paginated results set the page to look for",
112
+ "type":"number"
113
+ },
114
+ "per_page":{
115
+ "title" : "Per page",
116
+ "description": "Results per page. Default is 50, max is 200",
117
+ "type":"number"
118
+ },
119
+ "filter[q]":{
120
+ "title" : "Search",
121
+ "description": "Wildcard search in name, description",
122
+ "type":"string"
123
+ },
124
+ "filter[account_ids]":{
125
+ "title" : "Search by related accounts",
126
+ "description": "Set multiple account ids comma separated or as array",
127
+ "type":"string"
128
+ },
129
+ "filter[document_ids]":{
130
+ "title" : "Search by related documents",
131
+ "description": "Set multiple document ids comma separated or as array",
132
+ "type":"string"
133
+ },
134
+ "filter[ids]":{
135
+ "title" : "Search by account entry ids",
136
+ "description": "Set multiple entry ids comma separated or as array",
137
+ "type":"string"
138
+ },
139
+ "filter[unbilled]":{
140
+ "title" : "Unbilled",
141
+ "description": "Entries available for billing: marked as billable without a billing date(billed_at) set. False values will skip this filter. To find billed entries simply use filter[billed_at_to] e.g with todays date.",
142
+ "type":"boolean"
143
+ },
144
+ "filter[billable]":{
145
+ "title" : "Billable",
146
+ "description": "Billable or not billable entries. Set false(string) or 0(Integer) to get not billable entries. For billable entries use true or 1. Also see filter[unbilled] to find not yet billed entries.",
147
+ "type":"boolean"
148
+ },
149
+ "filter[date_from]":{
150
+ "title" : "From date",
151
+ "description": "Objects with a date eq/after the date. YYYY-MM-DD",
152
+ "format" : "date",
153
+ "type" : "string"
154
+ },
155
+ "filter[date_to]":{
156
+ "title" : "To date",
157
+ "description": "Objects with date eq/before the date. YYYY-MM-DD",
158
+ "format" : "date",
159
+ "type" : "string"
160
+ },
161
+ "filter[billed_at_from]":{
162
+ "title" : "From billing date",
163
+ "description": "Objects with a billing date eq/after the date. YYYY-MM-DD",
164
+ "format" : "date",
165
+ "type" : "string"
166
+ },
167
+ "filter[billed_at_to]":{
168
+ "title" : "To billing date",
169
+ "description": "Objects with billing date eq/before the date. YYYY-MM-DD. A set billing date means the entry has been billed, so simply use this filter e.g with date today to find all billed entries.",
170
+ "format" : "date",
171
+ "type" : "string"
172
+ },
173
+ "filter[created_at_from]":{
174
+ "title" : "From creation date",
175
+ "description": "Objects with a date eq/after the date. YYYY-MM-DD",
176
+ "format" : "date",
177
+ "type" : "string"
178
+ },
179
+ "filter[created_at_to]":{
180
+ "title" : "To creation date",
181
+ "description": "Objects with a creation until the date(<=). ISO 8601 format YYY-MM-DDThh:mm:ss+z or just a date YYY-MM-DD. If date is given the time is set to the end of the day(23:59:59) so all objects created on that day are included. A time should be already utc time.",
182
+ "format" : "date",
183
+ "type" : "string"
184
+ },
185
+ "sort_by":{
186
+ "title" : "Sort by",
187
+ "description": "Sort the results by the given field => number",
188
+ "enum":["name","number","date","quantity","price_single","created_at", "updated_at"],
189
+ "type": "string"
190
+ },
191
+ "sort":{
192
+ "title" : "Sort",
193
+ "enum":["ASC","DESC"],
194
+ "description": "Sort the results in ASC or DESC",
195
+ "type": "string"
196
+ }
197
+ }
198
+ },
199
+ { "rel": "destroy",
200
+ "href": "account_entries/{id}",
201
+ "method": "DELETE"
202
+ },
203
+ { "rel": "update",
204
+ "href": "account_entries/{id}",
205
+ "method": "PUT"
206
+ },
207
+ { "rel": "create",
208
+ "href": "account_entries",
209
+ "method": "POST"
210
+ }
211
+ ]
212
+ }