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