1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "type": "array",
4 "items": {
5 "type": "object",
6 "allOf": [
7 {
8 "oneOf": [
9 {
10 "type": "object",
11 "properties": {
12 "license_key": { "type": "string" }
13 },
14 "required": ["license_key"],
15 "additionalProperties": false
16 },
17 {
18 "type": "object",
19 "properties": {
20 "user": {
21 "type": "object",
22 "properties": {
23 "id": { "type": "number" },
24 "email": { "type": "string" },
25 "first_name": { "type": "string" },
26 "last_name": { "type": "string" },
27 "phone_number": { "type": "string" },
28 "is_initial_password": { "type": "boolean" },
29 "max_activations": { "type": "number" },
30 "allow_unlimited_activations": { "type": "boolean" },
31 "total_activations": { "type": "number" }
32 },
33 "required": ["id", "email", "first_name", "last_name", "phone_number", "is_initial_password", "max_activations", "allow_unlimited_activations", "total_activations"],
34 "additionalProperties": false
35 }
36 },
37 "required": ["user"],
38 "additionalProperties": false
39 }
40 ]
41 },
42 {
43 "type": "object",
44 "properties": {
45 "id": { "type": "number" },
46 "allow_grace_period": { "type": "boolean" },
47 "allow_overages": { "type": "boolean" },
48 "allow_unlimited_activations": { "type": "boolean" },
49 "borrowed_until": { "type": ["string", "null"] },
50 "can_borrow": { "type": "boolean" },
51 "channel": { "type": "string" },
52 "device_id": { "type": "number" },
53 "enable_maintenance_period": { "type": "boolean" },
54 "environment": { "type": "string" },
55 "eula_link": { "type": "string" },
56 "floating_timeout": { "type": "number" },
57 "grace_period": { "type": "number" },
58 "hash_md5": { "type": "string" },
59 "installation_file": { "type": "string" },
60 "is_air_gapped": { "type": "boolean" },
61 "is_borrowed": { "type": "boolean" },
62 "is_expired": { "type": "boolean" },
63 "is_floating_cloud": { "type": "boolean" },
64 "is_floating": { "type": "boolean" },
65 "is_hardware_key_auth": { "type": "boolean" },
66 "license_active": { "type": "boolean" },
67 "license_enabled": { "type": "boolean" },
68 "license_signature": { "type": "string" },
69 "license_type": { "type": "string" },
70 "maintenance_period": { "type": ["string", "null"] },
71 "max_activations": { "type": "number" },
72 "max_borrow_time": { "type": "number" },
73 "max_license_users": { "type": "number" },
74 "max_overages": { "type": "number" },
75 "max_transfers": { "type": "number" },
76 "order_store_id": { "type": "string" },
77 "prevent_vm": { "type": "boolean" },
78 "release_date": { "type": "string" },
79 "release_notes_link": { "type": "string" },
80 "requires_version": { "type": "string" },
81 "size": { "type": "string" },
82 "start_date": { "type": ["string", "null"] },
83 "times_activated": { "type": "number" },
84 "transfer_count": { "type": "number" },
85 "validity_period": { "type": ["string", "null"] },
86 "version": { "type": "string" },
87 "product_features": {
88 "type": "array",
89 "items": {
90 "type": "object",
91 "properties": {
92 "id": { "type": "number" },
93 "code": { "type": "string" },
94 "name": { "type": "string" },
95 "expiry_date": { "type": "string" },
96 "metadata": {},
97 "feature_type": { "type": "string", "enum": ["activation", "consumption"] },
98 "is_floating": { "type": "boolean" },
99 "is_floating_cloud": { "type": "boolean" },
100 "floating_users": { "type": "number" },
101 "floating_timeout": { "type": "number" },
102 "max_consumption": { "type": "number" },
103 "allow_unlimited_consumptions": { "type": "boolean" },
104 "total_consumptions": { "type": "number" },
105 "allow_overages": { "type": "number" },
106 "max_overages": { "type": "number" },
107 "reset_consumption": { "type": "boolean" },
108 "consumption_period": {
109 "type": ["string", "null"],
110 "enum": ["daily", "weekly", "monthly", "annualy", null]
111 }
112 },
113 "required": ["id", "code", "name", "expiry_date", "metadata", "feature_type", "is_floating", "is_floating_cloud"]
114 }
115 },
116 "custom_fields": {
117 "type": "array",
118 "items": {
119 "type": "object",
120 "properties": {
121 "name": { "type": "string" },
122 "data_type": { "type": "string", "enum": ["numer", "text", "date/time"] },
123 "value": { "type": "string" }
124 },
125 "required": ["name", "data_type", "value"]
126 }
127 },
128 "customer": {
129 "type": "object",
130 "properties": {
131 "email": { "type": "string" },
132 "company_name": { "type": "string" },
133 "reference": { "type": "string" },
134 "phone": { "type": "string" },
135 "first_name": { "type": "string" },
136 "last_name": { "type": "string" },
137 "city": { "type": "string" },
138 "postcode": { "type": "string" },
139 "state": { "type": "string" },
140 "country": { "type": "string" },
141 "address": { "type": "string" },
142 "customer_account": { "type": ["string", "null"] },
143 "metadata": {}
144 },
145 "required": ["email", "company_name", "reference", "phone", "first_name", "last_name", "city", "postcode", "state", "country", "address", "metadata"]
146 },
147 "product_details": {
148 "type": "object",
149 "properties": {
150 "product_id": { "type": "number" },
151 "product_name": { "type": "string" },
152 "short_code": { "type": "string" },
153 "authorization_method": { "type": "string", "enum": ["license-key", "user"] },
154 "metadata": {}
155 },
156 "required": ["product_id", "product_name", "short_code", "authorization_method", "metadata"]
157 },
158 "metadata": {},
159 "trial_days": { "type": "number" },
160 "floating_in_use_devices": { "type": "number" },
161 "floating_users": { "type": "number" },
162 "max_consumptions": { "type": "number" },
163 "total_consumptions": { "type": "number" },
164 "allow_unlimited_consumptions": { "type": "boolean" },
165 "reset_consumption": { "type": "boolean" },
166 "consumption_period": { "type": ["string", "null"] }
167 },
168 "required": [
169 "id",
170 "allow_grace_period",
171 "allow_overages",
172 "allow_unlimited_activations",
173 "can_borrow",
174 "channel",
175 "device_id",
176 "enable_maintenance_period",
177 "environment",
178 "eula_link",
179 "floating_timeout",
180 "grace_period",
181 "hash_md5",
182 "installation_file",
183 "is_air_gapped",
184 "is_borrowed",
185 "is_expired",
186 "is_floating_cloud",
187 "is_floating",
188 "is_hardware_key_auth",
189 "license_active",
190 "license_enabled",
191 "license_signature",
192 "license_type",
193 "max_activations",
194 "max_borrow_time",
195 "max_license_users",
196 "max_overages",
197 "max_transfers",
198 "order_store_id",
199 "prevent_vm",
200 "release_date",
201 "release_notes_link",
202 "requires_version",
203 "size",
204 "times_activated",
205 "transfer_count",
206 "version",
207 "product_features",
208 "custom_fields",
209 "customer",
210 "product_details",
211 "metadata"
212 ],
213 "additionalProperties": false
214 }
215 ]
216 }
217}