license_manager 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +95 -0
- data/README.md +2 -2
- data/docs/CancelLicense.md +22 -0
- data/docs/CancellationReason.md +15 -0
- data/docs/CancellationStats.md +30 -0
- data/docs/CancellationStatsByReasonInner.md +20 -0
- data/docs/ConnectStripe.md +1 -1
- data/docs/CreateLicense.md +2 -0
- data/docs/CreatePolicy.md +3 -1
- data/docs/CreateProductWithPolicy.md +1 -1
- data/docs/CreateToken.md +1 -1
- data/docs/EventActorOneOf.md +1 -1
- data/docs/Integration.md +5 -1
- data/docs/IntegrationsApi.md +74 -0
- data/docs/License.md +10 -0
- data/docs/LicensesApi.md +80 -3
- data/docs/Machine.md +3 -1
- data/docs/MachinesApi.md +1 -1
- data/docs/Policy.md +2 -0
- data/docs/PolicySettings.md +3 -1
- data/docs/PortalApi.md +1 -1
- data/docs/PortalLink.md +2 -2
- data/docs/Product.md +2 -0
- data/docs/ProductStats.md +6 -4
- data/docs/ProductsApi.md +2 -2
- data/docs/Revenue.md +6 -2
- data/docs/StripeIntegration.md +1 -1
- data/docs/StripePermission.md +3 -1
- data/docs/UpdateIntegration.md +18 -0
- data/docs/UpdateLicense.md +3 -1
- data/docs/UpdatePolicy.md +3 -1
- data/docs/UpdateProduct.md +3 -1
- data/lib/license_manager/api/integrations_api.rb +74 -0
- data/lib/license_manager/api/licenses_api.rb +80 -6
- data/lib/license_manager/api/machines_api.rb +3 -3
- data/lib/license_manager/api/portal_api.rb +2 -2
- data/lib/license_manager/api/products_api.rb +4 -4
- data/lib/license_manager/models/cancel_license.rb +238 -0
- data/lib/license_manager/models/cancellation_reason.rb +45 -0
- data/lib/license_manager/models/cancellation_stats.rb +347 -0
- data/lib/license_manager/models/cancellation_stats_by_reason_inner.rb +225 -0
- data/lib/license_manager/models/connect_stripe.rb +1 -1
- data/lib/license_manager/models/create_license.rb +12 -1
- data/lib/license_manager/models/create_policy.rb +40 -5
- data/lib/license_manager/models/create_product_with_policy.rb +1 -1
- data/lib/license_manager/models/create_token.rb +1 -1
- data/lib/license_manager/models/event_type.rb +4 -1
- data/lib/license_manager/models/integration.rb +55 -1
- data/lib/license_manager/models/license.rb +79 -1
- data/lib/license_manager/models/license_status.rb +2 -1
- data/lib/license_manager/models/machine.rb +17 -4
- data/lib/license_manager/models/policy.rb +14 -1
- data/lib/license_manager/models/policy_settings.rb +40 -5
- data/lib/license_manager/models/portal_link.rb +1 -1
- data/lib/license_manager/models/product.rb +28 -1
- data/lib/license_manager/models/product_stats.rb +18 -5
- data/lib/license_manager/models/revenue.rb +58 -4
- data/lib/license_manager/models/stripe_integration.rb +1 -1
- data/lib/license_manager/models/stripe_permission.rb +31 -4
- data/lib/license_manager/models/update_integration.rb +161 -0
- data/lib/license_manager/models/update_license.rb +16 -5
- data/lib/license_manager/models/update_policy.rb +40 -5
- data/lib/license_manager/models/update_product.rb +14 -4
- data/lib/license_manager/version.rb +1 -1
- data/lib/license_manager.rb +5 -0
- data/openapi.json +566 -32
- data/spec/api/integrations_api_spec.rb +13 -0
- data/spec/api/licenses_api_spec.rb +16 -3
- data/spec/api/machines_api_spec.rb +1 -1
- data/spec/api/portal_api_spec.rb +1 -1
- data/spec/api/products_api_spec.rb +2 -2
- data/spec/models/cancel_license_spec.rb +48 -0
- data/spec/models/cancellation_reason_spec.rb +30 -0
- data/spec/models/cancellation_stats_by_reason_inner_spec.rb +42 -0
- data/spec/models/cancellation_stats_spec.rb +72 -0
- data/spec/models/create_license_spec.rb +6 -0
- data/spec/models/create_policy_spec.rb +6 -0
- data/spec/models/create_token_spec.rb +1 -1
- data/spec/models/integration_spec.rb +12 -0
- data/spec/models/license_spec.rb +30 -0
- data/spec/models/machine_spec.rb +7 -1
- data/spec/models/policy_settings_spec.rb +6 -0
- data/spec/models/policy_spec.rb +6 -0
- data/spec/models/product_spec.rb +6 -0
- data/spec/models/product_stats_spec.rb +6 -0
- data/spec/models/revenue_spec.rb +12 -0
- data/spec/models/stripe_permission_spec.rb +6 -0
- data/spec/models/token_spec.rb +1 -1
- data/spec/models/update_integration_spec.rb +36 -0
- data/spec/models/update_license_spec.rb +6 -0
- data/spec/models/update_policy_spec.rb +6 -0
- data/spec/models/update_product_spec.rb +6 -0
- metadata +21 -1
data/openapi.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"type": "http",
|
|
32
32
|
"scheme": "bearer",
|
|
33
33
|
"bearerFormat": "JWT",
|
|
34
|
-
"description": "Short-lived token scoped to a customer, license or machine, signed with HS256. Its claims:\n\n- `typ`: `customer`, `license` or `machine`, the type of resource the token is scoped to.\n- `sub`: id of that resource.\n- `scope`: space separated permissions, among `customer:read`, `customer:write`, `license:read`, `license:write`, `machine:read` and `machine:write`. A write permission implies the
|
|
34
|
+
"description": "Short-lived token scoped to a customer, license or machine, signed with HS256. Its claims:\n\n- `typ`: `customer`, `license` or `machine`, the type of resource the token is scoped to.\n- `sub`: id of that resource.\n- `scope`: space separated permissions, among `customer:read`, `customer:write`, `license:read`, `license:write`, `license:cancel`, `machine:read` and `machine:write`. A write permission implies the other ones of its resource: `license:write` implies `license:read` and `license:cancel`. Without `scope`, the token can't do anything.\n- `exp`: expiration time.\n\nOnly the endpoints that say so accept tokens: the others answer `403` with `token_not_allowed`, as do the endpoints that don't accept its type. A token without the endpoint's permission answers `403` with `insufficient_scope`. The token reaches the resource it's scoped to, the ones below it and the ones above it: a license token reaches its customer and machines, but not the customer's other licenses. Resources it doesn't reach answer `404`.\n\nA token can't be revoked: it works until it expires, unless the resource it's scoped to is deleted, which makes it answer `401` with `invalid_token`. Tokens are created by `createCustomerToken`, `createLicenseToken` and `createMachineToken`, with an API key or a session, or with a token for the resources below it: a customer token creates license and machine tokens, a license token machine tokens. Portal links (`createPortalLink`, `requestPortalLink`) hold customer tokens too."
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"schemas": {
|
|
@@ -373,6 +373,11 @@
|
|
|
373
373
|
"portal": {
|
|
374
374
|
"$ref": "#/components/schemas/PortalSettings"
|
|
375
375
|
},
|
|
376
|
+
"autoMachineChange": {
|
|
377
|
+
"type": "boolean",
|
|
378
|
+
"description": "Whether a new machine validating a license already on its max machines takes the place of the license's machine validated the longest ago, rather than being refused with `machine_limit_reached`. When the replaced machine is validated again, it takes its place back and the machine that replaced it is locked. See `validateKey`.",
|
|
379
|
+
"example": true
|
|
380
|
+
},
|
|
376
381
|
"createdAt": {
|
|
377
382
|
"type": "string",
|
|
378
383
|
"format": "date-time",
|
|
@@ -391,6 +396,7 @@
|
|
|
391
396
|
"isTestFromProductId",
|
|
392
397
|
"logoUrl",
|
|
393
398
|
"portal",
|
|
399
|
+
"autoMachineChange",
|
|
394
400
|
"createdAt",
|
|
395
401
|
"updatedAt"
|
|
396
402
|
]
|
|
@@ -498,7 +504,7 @@
|
|
|
498
504
|
},
|
|
499
505
|
"isTestFromProductId": {
|
|
500
506
|
"type": "string",
|
|
501
|
-
"description": "Creates a test product: a sandbox of this live product of the organization, starting with copies of its policies, releases
|
|
507
|
+
"description": "Creates a test product: a sandbox of this live product of the organization, starting with copies of its policies, releases, portal settings and `autoMachineChange`.",
|
|
502
508
|
"example": "x7Kp2QaZ"
|
|
503
509
|
}
|
|
504
510
|
}
|
|
@@ -589,6 +595,16 @@
|
|
|
589
595
|
}
|
|
590
596
|
],
|
|
591
597
|
"description": "Latest version of the product the licenses created with this policy can use. `null` allows every version. Defaults to `null`.\n\n- `fixed`: up to a hard-coded `version`. `\"2\"` allows every 2.y.z version: its minor versions and bug fixes. `\"2.3\"` allows every 2.3.z version: its bug fixes.\n- `lock`: every version released during some time after the license is created, then only the updates of the version reached by then. The major version locks `majorAfter` the creation of the license, then the license only gets the minor versions and bug fixes of its major version. The minor version optionally locks `minorAfter` it, never sooner than the major version, then the license only gets the bug fixes of its minor version. `{ \"type\": \"lock\", \"majorAfter\": { \"value\": 1, \"unit\": \"months\" }, \"minorAfter\": { \"value\": 12, \"unit\": \"months\" } }` allows every version released during the month after the license is created, then the minor versions and bug fixes of the major version reached by then until the end of the first year, then only the bug fixes of the minor version reached by then. `majorAfter` at 0 allows minor versions only, and both at 0 allows bug fixes only: no updates.\n\nBug fixes are never locked: a hard-coded version has no patch number, like `\"2.3.1\"`, and a lock only locks major and minor versions."
|
|
598
|
+
},
|
|
599
|
+
"moneyBackGuaranteeDays": {
|
|
600
|
+
"type": [
|
|
601
|
+
"integer",
|
|
602
|
+
"null"
|
|
603
|
+
],
|
|
604
|
+
"exclusiveMinimum": 0,
|
|
605
|
+
"maximum": 3650,
|
|
606
|
+
"description": "Number of days after their creation during which customers can cancel the licenses created with this policy, from the customer portal or with `cancelLicense`, which refunds their Stripe payment. Each license keeps the end of its own period as `cancellableUntil`. `null` for no money back guarantee. Defaults to `null`.",
|
|
607
|
+
"example": 30
|
|
592
608
|
}
|
|
593
609
|
}
|
|
594
610
|
},
|
|
@@ -819,6 +835,11 @@
|
|
|
819
835
|
]
|
|
820
836
|
}
|
|
821
837
|
}
|
|
838
|
+
},
|
|
839
|
+
"autoMachineChange": {
|
|
840
|
+
"type": "boolean",
|
|
841
|
+
"description": "Whether a new machine validating a license already on its max machines takes the place of the license's machine validated the longest ago, rather than being refused with `machine_limit_reached`. When the replaced machine is validated again, it takes its place back and the machine that replaced it is locked. See `validateKey`.",
|
|
842
|
+
"example": true
|
|
822
843
|
}
|
|
823
844
|
}
|
|
824
845
|
},
|
|
@@ -845,7 +866,7 @@
|
|
|
845
866
|
},
|
|
846
867
|
"activeLicenseCount": {
|
|
847
868
|
"type": "integer",
|
|
848
|
-
"description": "Number of licenses that haven't expired, and that a machine validated in the last 90 days.",
|
|
869
|
+
"description": "Number of licenses that haven't expired nor were canceled, and that a machine validated in the last 90 days.",
|
|
849
870
|
"example": 87
|
|
850
871
|
},
|
|
851
872
|
"newLicenseCount": {
|
|
@@ -855,12 +876,12 @@
|
|
|
855
876
|
},
|
|
856
877
|
"expiringLicenseCount": {
|
|
857
878
|
"type": "integer",
|
|
858
|
-
"description": "Number of licenses expiring in the next 30 days.",
|
|
879
|
+
"description": "Number of licenses expiring in the next 30 days, canceled ones left out.",
|
|
859
880
|
"example": 3
|
|
860
881
|
},
|
|
861
882
|
"expiredLicenseCount": {
|
|
862
883
|
"type": "integer",
|
|
863
|
-
"description": "Number of licenses that expired in the last 30 days.",
|
|
884
|
+
"description": "Number of licenses that expired in the last 30 days, canceled ones left out.",
|
|
864
885
|
"example": 2
|
|
865
886
|
},
|
|
866
887
|
"activeMachineCount": {
|
|
@@ -875,7 +896,7 @@
|
|
|
875
896
|
},
|
|
876
897
|
"seatCount": {
|
|
877
898
|
"type": "integer",
|
|
878
|
-
"description": "Sum of the maximum numbers of machines of the licenses that haven't expired. Licenses without a maximum are left out.",
|
|
899
|
+
"description": "Sum of the maximum numbers of machines of the licenses that haven't expired nor were canceled. Licenses without a maximum are left out.",
|
|
879
900
|
"example": 200
|
|
880
901
|
},
|
|
881
902
|
"usedSeatCount": {
|
|
@@ -972,6 +993,17 @@
|
|
|
972
993
|
},
|
|
973
994
|
"description": "Number of licenses of each policy created each day and each month, for the policies with licenses created over the covered months."
|
|
974
995
|
},
|
|
996
|
+
"cancellation": {
|
|
997
|
+
"anyOf": [
|
|
998
|
+
{
|
|
999
|
+
"$ref": "#/components/schemas/CancellationStats"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"type": "null"
|
|
1003
|
+
}
|
|
1004
|
+
],
|
|
1005
|
+
"description": "Cancellations of the licenses with a money back guarantee. `null` when no license of the product has one."
|
|
1006
|
+
},
|
|
975
1007
|
"revenue": {
|
|
976
1008
|
"type": "array",
|
|
977
1009
|
"items": {
|
|
@@ -1079,12 +1111,105 @@
|
|
|
1079
1111
|
"newLicensesByDay",
|
|
1080
1112
|
"newLicensesByMonth",
|
|
1081
1113
|
"newLicensesByPolicy",
|
|
1114
|
+
"cancellation",
|
|
1082
1115
|
"revenue",
|
|
1083
1116
|
"activationsByVersion",
|
|
1084
1117
|
"activeMachinesByVersion",
|
|
1085
1118
|
"activeMachinesByPlatform"
|
|
1086
1119
|
]
|
|
1087
1120
|
},
|
|
1121
|
+
"CancellationStats": {
|
|
1122
|
+
"type": "object",
|
|
1123
|
+
"properties": {
|
|
1124
|
+
"licenseCount": {
|
|
1125
|
+
"type": "integer",
|
|
1126
|
+
"description": "Number of licenses with a money back guarantee: a `cancellableUntil`.",
|
|
1127
|
+
"example": 80
|
|
1128
|
+
},
|
|
1129
|
+
"canceledLicenseCount": {
|
|
1130
|
+
"type": "integer",
|
|
1131
|
+
"description": "Number of them that were canceled.",
|
|
1132
|
+
"example": 4
|
|
1133
|
+
},
|
|
1134
|
+
"cancellableLicenseCount": {
|
|
1135
|
+
"type": "integer",
|
|
1136
|
+
"description": "Number of them whose money back guarantee hasn't ended, and that weren't canceled: they can still be.",
|
|
1137
|
+
"example": 12
|
|
1138
|
+
},
|
|
1139
|
+
"rate": {
|
|
1140
|
+
"type": "number",
|
|
1141
|
+
"description": "Share of them that were canceled, from 0 to 1: `canceledLicenseCount` over `licenseCount`.",
|
|
1142
|
+
"example": 0.05
|
|
1143
|
+
},
|
|
1144
|
+
"canceledByDay": {
|
|
1145
|
+
"type": "array",
|
|
1146
|
+
"items": {
|
|
1147
|
+
"type": "integer"
|
|
1148
|
+
},
|
|
1149
|
+
"description": "Number of them canceled each day, aligned on `days`, on the day of their cancellation.",
|
|
1150
|
+
"example": [
|
|
1151
|
+
0,
|
|
1152
|
+
1,
|
|
1153
|
+
0
|
|
1154
|
+
]
|
|
1155
|
+
},
|
|
1156
|
+
"canceledByMonth": {
|
|
1157
|
+
"type": "array",
|
|
1158
|
+
"items": {
|
|
1159
|
+
"type": "integer"
|
|
1160
|
+
},
|
|
1161
|
+
"description": "Number of them canceled each month, aligned on `months`, on the month of their cancellation.",
|
|
1162
|
+
"example": [
|
|
1163
|
+
1,
|
|
1164
|
+
0,
|
|
1165
|
+
2
|
|
1166
|
+
]
|
|
1167
|
+
},
|
|
1168
|
+
"byReason": {
|
|
1169
|
+
"type": "array",
|
|
1170
|
+
"items": {
|
|
1171
|
+
"type": "object",
|
|
1172
|
+
"properties": {
|
|
1173
|
+
"reason": {
|
|
1174
|
+
"$ref": "#/components/schemas/CancellationReason"
|
|
1175
|
+
},
|
|
1176
|
+
"count": {
|
|
1177
|
+
"type": "integer",
|
|
1178
|
+
"example": 2
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
"required": [
|
|
1182
|
+
"reason",
|
|
1183
|
+
"count"
|
|
1184
|
+
]
|
|
1185
|
+
},
|
|
1186
|
+
"description": "Number of them canceled for each reason, from the most given one. Reasons never given are left out."
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
"required": [
|
|
1190
|
+
"licenseCount",
|
|
1191
|
+
"canceledLicenseCount",
|
|
1192
|
+
"cancellableLicenseCount",
|
|
1193
|
+
"rate",
|
|
1194
|
+
"canceledByDay",
|
|
1195
|
+
"canceledByMonth",
|
|
1196
|
+
"byReason"
|
|
1197
|
+
],
|
|
1198
|
+
"description": "Cancellations of the licenses with a money back guarantee. Licenses canceled without one are left out."
|
|
1199
|
+
},
|
|
1200
|
+
"CancellationReason": {
|
|
1201
|
+
"type": "string",
|
|
1202
|
+
"enum": [
|
|
1203
|
+
"too_expensive",
|
|
1204
|
+
"missing_features",
|
|
1205
|
+
"not_working",
|
|
1206
|
+
"switched",
|
|
1207
|
+
"unused",
|
|
1208
|
+
"other"
|
|
1209
|
+
],
|
|
1210
|
+
"description": "- `too_expensive`: too expensive.\n- `missing_features`: missing features i need.\n- `not_working`: doesn't work as expected.\n- `switched`: found an alternative.\n- `unused`: no longer needed.\n- `other`: other.",
|
|
1211
|
+
"example": "too_expensive"
|
|
1212
|
+
},
|
|
1088
1213
|
"Revenue": {
|
|
1089
1214
|
"type": "object",
|
|
1090
1215
|
"properties": {
|
|
@@ -1095,14 +1220,24 @@
|
|
|
1095
1220
|
},
|
|
1096
1221
|
"licenseCount": {
|
|
1097
1222
|
"type": "integer",
|
|
1098
|
-
"description": "Number of licenses sold in the currency, free ones included.",
|
|
1223
|
+
"description": "Number of licenses sold in the currency, free ones included, canceled ones left out.",
|
|
1099
1224
|
"example": 42
|
|
1100
1225
|
},
|
|
1101
1226
|
"total": {
|
|
1102
1227
|
"type": "number",
|
|
1103
|
-
"description": "Sum of the prices of the licenses sold in the currency, in major units.",
|
|
1228
|
+
"description": "Sum of the prices of the licenses sold in the currency, in major units, canceled ones left out.",
|
|
1104
1229
|
"example": 2099.58
|
|
1105
1230
|
},
|
|
1231
|
+
"canceledLicenseCount": {
|
|
1232
|
+
"type": "integer",
|
|
1233
|
+
"description": "Number of canceled licenses sold in the currency.",
|
|
1234
|
+
"example": 2
|
|
1235
|
+
},
|
|
1236
|
+
"canceledTotal": {
|
|
1237
|
+
"type": "number",
|
|
1238
|
+
"description": "Sum of the prices of the canceled licenses sold in the currency, in major units: revenue lost to cancellations.",
|
|
1239
|
+
"example": 99.98
|
|
1240
|
+
},
|
|
1106
1241
|
"thisMonth": {
|
|
1107
1242
|
"type": "number",
|
|
1108
1243
|
"description": "Revenue of the current month, in UTC.",
|
|
@@ -1189,6 +1324,8 @@
|
|
|
1189
1324
|
"currency",
|
|
1190
1325
|
"licenseCount",
|
|
1191
1326
|
"total",
|
|
1327
|
+
"canceledLicenseCount",
|
|
1328
|
+
"canceledTotal",
|
|
1192
1329
|
"thisMonth",
|
|
1193
1330
|
"lastMonth",
|
|
1194
1331
|
"last30Days",
|
|
@@ -1196,7 +1333,7 @@
|
|
|
1196
1333
|
"byMonth",
|
|
1197
1334
|
"byPolicy"
|
|
1198
1335
|
],
|
|
1199
|
-
"description": "Revenue of the licenses sold in one currency, each license counting on the day it was created. Licenses without a price are left out
|
|
1336
|
+
"description": "Revenue of the licenses sold in one currency, each license counting on the day it was created. Licenses without a price are left out, and so are canceled ones, but in `canceledLicenseCount` and `canceledTotal`."
|
|
1200
1337
|
},
|
|
1201
1338
|
"PolicyList": {
|
|
1202
1339
|
"type": "object",
|
|
@@ -1319,6 +1456,14 @@
|
|
|
1319
1456
|
],
|
|
1320
1457
|
"description": "Latest version of the product the licenses created with this policy can use. `null` when they can use every version.\n\n- `fixed`: up to a hard-coded `version`. `\"2\"` allows every 2.y.z version: its minor versions and bug fixes. `\"2.3\"` allows every 2.3.z version: its bug fixes.\n- `lock`: every version released during some time after the license is created, then only the updates of the version reached by then. The major version locks `majorAfter` the creation of the license, then the license only gets the minor versions and bug fixes of its major version. The minor version optionally locks `minorAfter` it, never sooner than the major version, then the license only gets the bug fixes of its minor version. `{ \"type\": \"lock\", \"majorAfter\": { \"value\": 1, \"unit\": \"months\" }, \"minorAfter\": { \"value\": 12, \"unit\": \"months\" } }` allows every version released during the month after the license is created, then the minor versions and bug fixes of the major version reached by then until the end of the first year, then only the bug fixes of the minor version reached by then. `majorAfter` at 0 allows minor versions only, and both at 0 allows bug fixes only: no updates.\n\nBug fixes are never locked: a hard-coded version has no patch number, like `\"2.3.1\"`, and a lock only locks major and minor versions."
|
|
1321
1458
|
},
|
|
1459
|
+
"moneyBackGuaranteeDays": {
|
|
1460
|
+
"type": [
|
|
1461
|
+
"integer",
|
|
1462
|
+
"null"
|
|
1463
|
+
],
|
|
1464
|
+
"description": "Number of days after their creation during which customers can cancel the licenses created with this policy, from the customer portal or with `cancelLicense`. `null` when they can't.",
|
|
1465
|
+
"example": 30
|
|
1466
|
+
},
|
|
1322
1467
|
"licenseCount": {
|
|
1323
1468
|
"type": "integer",
|
|
1324
1469
|
"description": "Number of licenses following this policy.",
|
|
@@ -1345,6 +1490,7 @@
|
|
|
1345
1490
|
"maxMachines",
|
|
1346
1491
|
"maxOfflineDurationSeconds",
|
|
1347
1492
|
"maxVersion",
|
|
1493
|
+
"moneyBackGuaranteeDays",
|
|
1348
1494
|
"licenseCount",
|
|
1349
1495
|
"createdAt",
|
|
1350
1496
|
"updatedAt"
|
|
@@ -1453,6 +1599,16 @@
|
|
|
1453
1599
|
}
|
|
1454
1600
|
],
|
|
1455
1601
|
"description": "Latest version of the product the licenses created with this policy can use. `null` allows every version. Defaults to `null`.\n\n- `fixed`: up to a hard-coded `version`. `\"2\"` allows every 2.y.z version: its minor versions and bug fixes. `\"2.3\"` allows every 2.3.z version: its bug fixes.\n- `lock`: every version released during some time after the license is created, then only the updates of the version reached by then. The major version locks `majorAfter` the creation of the license, then the license only gets the minor versions and bug fixes of its major version. The minor version optionally locks `minorAfter` it, never sooner than the major version, then the license only gets the bug fixes of its minor version. `{ \"type\": \"lock\", \"majorAfter\": { \"value\": 1, \"unit\": \"months\" }, \"minorAfter\": { \"value\": 12, \"unit\": \"months\" } }` allows every version released during the month after the license is created, then the minor versions and bug fixes of the major version reached by then until the end of the first year, then only the bug fixes of the minor version reached by then. `majorAfter` at 0 allows minor versions only, and both at 0 allows bug fixes only: no updates.\n\nBug fixes are never locked: a hard-coded version has no patch number, like `\"2.3.1\"`, and a lock only locks major and minor versions."
|
|
1602
|
+
},
|
|
1603
|
+
"moneyBackGuaranteeDays": {
|
|
1604
|
+
"type": [
|
|
1605
|
+
"integer",
|
|
1606
|
+
"null"
|
|
1607
|
+
],
|
|
1608
|
+
"exclusiveMinimum": 0,
|
|
1609
|
+
"maximum": 3650,
|
|
1610
|
+
"description": "Number of days after their creation during which customers can cancel the licenses created with this policy, from the customer portal or with `cancelLicense`, which refunds their Stripe payment. Each license keeps the end of its own period as `cancellableUntil`. `null` for no money back guarantee. Defaults to `null`.",
|
|
1611
|
+
"example": 30
|
|
1456
1612
|
}
|
|
1457
1613
|
},
|
|
1458
1614
|
"required": [
|
|
@@ -1562,6 +1718,16 @@
|
|
|
1562
1718
|
}
|
|
1563
1719
|
],
|
|
1564
1720
|
"description": "Latest version of the product the licenses created with this policy can use. `null` allows every version. Defaults to `null`.\n\n- `fixed`: up to a hard-coded `version`. `\"2\"` allows every 2.y.z version: its minor versions and bug fixes. `\"2.3\"` allows every 2.3.z version: its bug fixes.\n- `lock`: every version released during some time after the license is created, then only the updates of the version reached by then. The major version locks `majorAfter` the creation of the license, then the license only gets the minor versions and bug fixes of its major version. The minor version optionally locks `minorAfter` it, never sooner than the major version, then the license only gets the bug fixes of its minor version. `{ \"type\": \"lock\", \"majorAfter\": { \"value\": 1, \"unit\": \"months\" }, \"minorAfter\": { \"value\": 12, \"unit\": \"months\" } }` allows every version released during the month after the license is created, then the minor versions and bug fixes of the major version reached by then until the end of the first year, then only the bug fixes of the minor version reached by then. `majorAfter` at 0 allows minor versions only, and both at 0 allows bug fixes only: no updates.\n\nBug fixes are never locked: a hard-coded version has no patch number, like `\"2.3.1\"`, and a lock only locks major and minor versions."
|
|
1721
|
+
},
|
|
1722
|
+
"moneyBackGuaranteeDays": {
|
|
1723
|
+
"type": [
|
|
1724
|
+
"integer",
|
|
1725
|
+
"null"
|
|
1726
|
+
],
|
|
1727
|
+
"exclusiveMinimum": 0,
|
|
1728
|
+
"maximum": 3650,
|
|
1729
|
+
"description": "Number of days after their creation during which customers can cancel the licenses created with this policy, from the customer portal or with `cancelLicense`, which refunds their Stripe payment. Each license keeps the end of its own period as `cancellableUntil`. `null` for no money back guarantee. Defaults to `null`.",
|
|
1730
|
+
"example": 30
|
|
1565
1731
|
}
|
|
1566
1732
|
}
|
|
1567
1733
|
},
|
|
@@ -1796,6 +1962,54 @@
|
|
|
1796
1962
|
"status": {
|
|
1797
1963
|
"$ref": "#/components/schemas/LicenseStatus"
|
|
1798
1964
|
},
|
|
1965
|
+
"cancellableUntil": {
|
|
1966
|
+
"type": [
|
|
1967
|
+
"string",
|
|
1968
|
+
"null"
|
|
1969
|
+
],
|
|
1970
|
+
"format": "date-time",
|
|
1971
|
+
"description": "End of the money back guarantee: until then, the customer can cancel the license from the customer portal, or with a token. Set from the policy's `moneyBackGuaranteeDays` when the license is created. `null` when the customer can't cancel it.",
|
|
1972
|
+
"example": "2026-02-14T09:30:00.000Z"
|
|
1973
|
+
},
|
|
1974
|
+
"canceledAt": {
|
|
1975
|
+
"type": [
|
|
1976
|
+
"string",
|
|
1977
|
+
"null"
|
|
1978
|
+
],
|
|
1979
|
+
"format": "date-time",
|
|
1980
|
+
"description": "When the license was canceled: validating its key fails since. `null` when it wasn't.",
|
|
1981
|
+
"example": "2026-01-20T16:12:00.000Z"
|
|
1982
|
+
},
|
|
1983
|
+
"cancellationReason": {
|
|
1984
|
+
"allOf": [
|
|
1985
|
+
{
|
|
1986
|
+
"$ref": "#/components/schemas/CancellationReason"
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
"type": [
|
|
1990
|
+
"string",
|
|
1991
|
+
"null"
|
|
1992
|
+
],
|
|
1993
|
+
"description": "Why the license was canceled. `null` when it wasn't."
|
|
1994
|
+
}
|
|
1995
|
+
]
|
|
1996
|
+
},
|
|
1997
|
+
"cancellationComment": {
|
|
1998
|
+
"type": [
|
|
1999
|
+
"string",
|
|
2000
|
+
"null"
|
|
2001
|
+
],
|
|
2002
|
+
"description": "Comment given when the license was canceled. `null` when there's none.",
|
|
2003
|
+
"example": "I only needed it for one project."
|
|
2004
|
+
},
|
|
2005
|
+
"stripeRefundId": {
|
|
2006
|
+
"type": [
|
|
2007
|
+
"string",
|
|
2008
|
+
"null"
|
|
2009
|
+
],
|
|
2010
|
+
"description": "Id of the Stripe refund of the license's payment once it was canceled, through the Stripe integration. `null` otherwise.",
|
|
2011
|
+
"example": "re_3MtwBwLkdIwHu7ix0Bs5rA2b"
|
|
2012
|
+
},
|
|
1799
2013
|
"updatedAt": {
|
|
1800
2014
|
"type": "string",
|
|
1801
2015
|
"format": "date-time",
|
|
@@ -1820,6 +2034,11 @@
|
|
|
1820
2034
|
"maxVersion",
|
|
1821
2035
|
"price",
|
|
1822
2036
|
"status",
|
|
2037
|
+
"cancellableUntil",
|
|
2038
|
+
"canceledAt",
|
|
2039
|
+
"cancellationReason",
|
|
2040
|
+
"cancellationComment",
|
|
2041
|
+
"stripeRefundId",
|
|
1823
2042
|
"updatedAt"
|
|
1824
2043
|
]
|
|
1825
2044
|
},
|
|
@@ -1889,9 +2108,10 @@
|
|
|
1889
2108
|
"enum": [
|
|
1890
2109
|
"active",
|
|
1891
2110
|
"inactive",
|
|
1892
|
-
"expired"
|
|
2111
|
+
"expired",
|
|
2112
|
+
"canceled"
|
|
1893
2113
|
],
|
|
1894
|
-
"description": "`
|
|
2114
|
+
"description": "`canceled` when the license was canceled, `expired` when it has expired, `active` when a machine validated its key in the last 90 days, `inactive` otherwise.",
|
|
1895
2115
|
"example": "active"
|
|
1896
2116
|
},
|
|
1897
2117
|
"CreateLicense": {
|
|
@@ -1959,6 +2179,15 @@
|
|
|
1959
2179
|
"maxVersion": {
|
|
1960
2180
|
"$ref": "#/components/schemas/LicenseMaxVersionInput"
|
|
1961
2181
|
},
|
|
2182
|
+
"cancellableUntil": {
|
|
2183
|
+
"type": [
|
|
2184
|
+
"string",
|
|
2185
|
+
"null"
|
|
2186
|
+
],
|
|
2187
|
+
"format": "date-time",
|
|
2188
|
+
"description": "End of the money back guarantee: until then, the customer can cancel the license from the customer portal, or with a token. `null` to not let them. Defaults to the creation date plus the policy's `moneyBackGuaranteeDays`, or `null` when it has none.",
|
|
2189
|
+
"example": "2026-02-14T09:30:00.000Z"
|
|
2190
|
+
},
|
|
1962
2191
|
"sendKey": {
|
|
1963
2192
|
"type": "boolean",
|
|
1964
2193
|
"description": "`true` emails the key to the customer once the license is created, like `sendLicenseKeys`. Sent in the background: a failed email doesn't fail the creation. In test products, it's only sent when the customer's email is a member's of the organization. Defaults to `false`.",
|
|
@@ -2182,9 +2411,40 @@
|
|
|
2182
2411
|
},
|
|
2183
2412
|
"price": {
|
|
2184
2413
|
"$ref": "#/components/schemas/PriceInput"
|
|
2414
|
+
},
|
|
2415
|
+
"cancellableUntil": {
|
|
2416
|
+
"type": [
|
|
2417
|
+
"string",
|
|
2418
|
+
"null"
|
|
2419
|
+
],
|
|
2420
|
+
"format": "date-time",
|
|
2421
|
+
"description": "End of the money back guarantee: until then, the customer can cancel the license from the customer portal, or with a token. `null` to not let them.",
|
|
2422
|
+
"example": "2026-02-14T09:30:00.000Z"
|
|
2185
2423
|
}
|
|
2186
2424
|
}
|
|
2187
2425
|
},
|
|
2426
|
+
"CancelLicense": {
|
|
2427
|
+
"type": "object",
|
|
2428
|
+
"properties": {
|
|
2429
|
+
"reason": {
|
|
2430
|
+
"$ref": "#/components/schemas/CancellationReason"
|
|
2431
|
+
},
|
|
2432
|
+
"comment": {
|
|
2433
|
+
"type": "string",
|
|
2434
|
+
"maxLength": 2000,
|
|
2435
|
+
"description": "What the customer said about the cancellation.",
|
|
2436
|
+
"example": "I only needed it for one project."
|
|
2437
|
+
},
|
|
2438
|
+
"refund": {
|
|
2439
|
+
"type": "boolean",
|
|
2440
|
+
"description": "Whether to refund the license's Stripe payment, when it was bought through the Stripe integration. Defaults to the integration's `autoRefund`. Ignored for tokens, which always follow `autoRefund`, and when the integration's `canRefund` is false: its API key can't create refunds.",
|
|
2441
|
+
"example": true
|
|
2442
|
+
}
|
|
2443
|
+
},
|
|
2444
|
+
"required": [
|
|
2445
|
+
"reason"
|
|
2446
|
+
]
|
|
2447
|
+
},
|
|
2188
2448
|
"SendLicenseKeys": {
|
|
2189
2449
|
"type": "object",
|
|
2190
2450
|
"properties": {
|
|
@@ -2258,9 +2518,10 @@
|
|
|
2258
2518
|
"type": "string",
|
|
2259
2519
|
"enum": [
|
|
2260
2520
|
"active",
|
|
2261
|
-
"deactivated"
|
|
2521
|
+
"deactivated",
|
|
2522
|
+
"locked"
|
|
2262
2523
|
],
|
|
2263
|
-
"description": "Whether the machine counts as using the license.",
|
|
2524
|
+
"description": "Whether the machine counts as using the license. A `locked` machine doesn't, and its validations are refused with `machine_locked`: it overrode a machine that came back. See `validateKey`.",
|
|
2264
2525
|
"example": "active"
|
|
2265
2526
|
},
|
|
2266
2527
|
"version": {
|
|
@@ -2271,6 +2532,14 @@
|
|
|
2271
2532
|
"description": "Version of the application last validated on the machine.",
|
|
2272
2533
|
"example": "1.4.2"
|
|
2273
2534
|
},
|
|
2535
|
+
"overriddenByMachineId": {
|
|
2536
|
+
"type": [
|
|
2537
|
+
"string",
|
|
2538
|
+
"null"
|
|
2539
|
+
],
|
|
2540
|
+
"description": "For a machine deactivated or locked by automatic machine changes, the machine that took its place. Validating the key on a deactivated machine that has one takes its place back. `null` otherwise.",
|
|
2541
|
+
"example": null
|
|
2542
|
+
},
|
|
2274
2543
|
"lastValidatedAt": {
|
|
2275
2544
|
"type": [
|
|
2276
2545
|
"string",
|
|
@@ -2299,6 +2568,7 @@
|
|
|
2299
2568
|
"name",
|
|
2300
2569
|
"status",
|
|
2301
2570
|
"version",
|
|
2571
|
+
"overriddenByMachineId",
|
|
2302
2572
|
"lastValidatedAt",
|
|
2303
2573
|
"createdAt",
|
|
2304
2574
|
"updatedAt"
|
|
@@ -2311,11 +2581,11 @@
|
|
|
2311
2581
|
"type": "string",
|
|
2312
2582
|
"format": "uri",
|
|
2313
2583
|
"description": "Link to the customer portal, holding the token.",
|
|
2314
|
-
"example": "https://app.
|
|
2584
|
+
"example": "https://app.licensemanager.dev/portal/x7Kp2QaZ?token=eyJhbGciOi…"
|
|
2315
2585
|
},
|
|
2316
2586
|
"token": {
|
|
2317
2587
|
"type": "string",
|
|
2318
|
-
"description": "Customer token in the link, with the `customer:read`, `license:read` and `machine:write` permissions.",
|
|
2588
|
+
"description": "Customer token in the link, with the `customer:read`, `license:read`, `license:cancel` and `machine:write` permissions.",
|
|
2319
2589
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"
|
|
2320
2590
|
},
|
|
2321
2591
|
"expiresAt": {
|
|
@@ -2518,6 +2788,7 @@
|
|
|
2518
2788
|
"customer:write",
|
|
2519
2789
|
"license:read",
|
|
2520
2790
|
"license:write",
|
|
2791
|
+
"license:cancel",
|
|
2521
2792
|
"machine:read",
|
|
2522
2793
|
"machine:write"
|
|
2523
2794
|
]
|
|
@@ -2553,12 +2824,13 @@
|
|
|
2553
2824
|
"customer:write",
|
|
2554
2825
|
"license:read",
|
|
2555
2826
|
"license:write",
|
|
2827
|
+
"license:cancel",
|
|
2556
2828
|
"machine:read",
|
|
2557
2829
|
"machine:write"
|
|
2558
2830
|
]
|
|
2559
2831
|
},
|
|
2560
2832
|
"minItems": 1,
|
|
2561
|
-
"description": "Permissions of the token. A write permission implies the
|
|
2833
|
+
"description": "Permissions of the token. A write permission implies the other ones of its resource, like the read one: `license:write` implies `license:read` and `license:cancel`. A token creating a token can only give the permissions it has.",
|
|
2562
2834
|
"example": [
|
|
2563
2835
|
"license:read",
|
|
2564
2836
|
"machine:write"
|
|
@@ -2669,9 +2941,12 @@
|
|
|
2669
2941
|
"license.updated",
|
|
2670
2942
|
"license.validated",
|
|
2671
2943
|
"license.validation_failed",
|
|
2944
|
+
"license.canceled",
|
|
2945
|
+
"license.refunded",
|
|
2946
|
+
"license.refund_failed",
|
|
2672
2947
|
"machine.deactivated"
|
|
2673
2948
|
],
|
|
2674
|
-
"description": "- `policy.created`: `payload` holds the policy's settings.\n- `policy.updated`: `payload.changes` maps each changed field to its previous (`from`) and new (`to`) value. Making a policy the default also updates the previous default one.\n- `license.created`: `payload` holds the license's key, `policyId`, `customerId` and settings. Not linked to the policy.\n- `license.updated`: `payload.changes`, like `policy.updated`.\n- `license.validated`: a machine validated the license key. `payload` holds the machine's `fingerprint`, `name` and `version`,
|
|
2949
|
+
"description": "- `policy.created`: `payload` holds the policy's settings.\n- `policy.updated`: `payload.changes` maps each changed field to its previous (`from`) and new (`to`) value. Making a policy the default also updates the previous default one.\n- `license.created`: `payload` holds the license's key, `policyId`, `customerId` and settings. Not linked to the policy.\n- `license.updated`: `payload.changes`, like `policy.updated`.\n- `license.validated`: a machine validated the license key. `payload` holds the machine's `fingerprint`, `name` and `version`, whether the validation created the machine (`machineCreated`) or activated it again (`machineActivated`), the `overriddenMachineId` of the machine it deactivated to take its place, `null` when none, and the `lockedMachineIds` of the machines it locked as it took its place back (see `validateKey`).\n- `license.validation_failed`: validating the license key failed. `payload` holds the error `code` and `message`, and the `fingerprint`, `name`, `platform` and `version` sent, the name and platform being the machine's when none is sent. Linked to the machine when it exists.\n- `license.canceled`: the license was canceled. `payload` holds the cancellation `reason` and `comment`, and whether its Stripe payment is being refunded (`refund`).\n- `license.refunded`: the Stripe payment of a canceled license was refunded. `payload` holds the Stripe `refundId` and the `amount` refunded. Has the `integration` actor.\n- `license.refund_failed`: refunding the Stripe payment of a canceled license failed. `payload` holds the error `message`: refund it from Stripe. Has the `integration` actor.\n- `machine.deactivated`: a machine was deactivated or locked, so it no longer counts as using the license. `payload` holds the machine's `fingerprint` and `name`, the `overriddenByMachineId` of the machine that took its place, `null` when it was deactivated through the API, and whether it was `locked`. Deactivations by validations have the `automation` actor. Linked to the license and the machine.\n\nAn update that changes nothing records no event. Deletions record no events, and customers, products and releases have none.",
|
|
2675
2950
|
"example": "license.validated"
|
|
2676
2951
|
},
|
|
2677
2952
|
"EventMachine": {
|
|
@@ -2734,7 +3009,7 @@
|
|
|
2734
3009
|
"string",
|
|
2735
3010
|
"null"
|
|
2736
3011
|
],
|
|
2737
|
-
"example": "jane@
|
|
3012
|
+
"example": "jane@licensemanager.dev"
|
|
2738
3013
|
},
|
|
2739
3014
|
"image": {
|
|
2740
3015
|
"type": [
|
|
@@ -2890,7 +3165,7 @@
|
|
|
2890
3165
|
"items": {
|
|
2891
3166
|
"$ref": "#/components/schemas/StripePermission"
|
|
2892
3167
|
},
|
|
2893
|
-
"description": "Permissions the restricted API key needs, and why. Every other permission can stay `None`."
|
|
3168
|
+
"description": "Permissions the restricted API key needs, and why, the `optional` ones included. Every other permission can stay `None`."
|
|
2894
3169
|
},
|
|
2895
3170
|
"integration": {
|
|
2896
3171
|
"anyOf": [
|
|
@@ -2936,12 +3211,18 @@
|
|
|
2936
3211
|
"reason": {
|
|
2937
3212
|
"type": "string",
|
|
2938
3213
|
"example": "Lists your prices so you can choose which ones create licenses, and checks they can still be paid."
|
|
3214
|
+
},
|
|
3215
|
+
"optional": {
|
|
3216
|
+
"type": "boolean",
|
|
3217
|
+
"description": "Whether the key can connect without it, losing what it's for, explained by `reason`.",
|
|
3218
|
+
"example": false
|
|
2939
3219
|
}
|
|
2940
3220
|
},
|
|
2941
3221
|
"required": [
|
|
2942
3222
|
"resource",
|
|
2943
3223
|
"access",
|
|
2944
|
-
"reason"
|
|
3224
|
+
"reason",
|
|
3225
|
+
"optional"
|
|
2945
3226
|
]
|
|
2946
3227
|
},
|
|
2947
3228
|
"Integration": {
|
|
@@ -2977,7 +3258,7 @@
|
|
|
2977
3258
|
"webhookUrl": {
|
|
2978
3259
|
"type": "string",
|
|
2979
3260
|
"description": "URL of the webhook endpoint created on the Stripe account.",
|
|
2980
|
-
"example": "https://api.
|
|
3261
|
+
"example": "https://api.licensemanager.dev/v1/webhooks/stripe/i8Fz4QnRt"
|
|
2981
3262
|
},
|
|
2982
3263
|
"status": {
|
|
2983
3264
|
"$ref": "#/components/schemas/IntegrationStatus"
|
|
@@ -3006,6 +3287,16 @@
|
|
|
3006
3287
|
"format": "date-time",
|
|
3007
3288
|
"description": "Last time it received an event from the provider."
|
|
3008
3289
|
},
|
|
3290
|
+
"autoRefund": {
|
|
3291
|
+
"type": "boolean",
|
|
3292
|
+
"description": "Whether canceling a license bought through Stripe refunds its payment. On by default, always off when `canRefund` is false.",
|
|
3293
|
+
"example": true
|
|
3294
|
+
},
|
|
3295
|
+
"canRefund": {
|
|
3296
|
+
"type": "boolean",
|
|
3297
|
+
"description": "Whether the API key has the optional Refunds: Write permission, checked when connecting and every day. Without it, canceled licenses aren't refunded: refund their payments from Stripe.",
|
|
3298
|
+
"example": true
|
|
3299
|
+
},
|
|
3009
3300
|
"createdAt": {
|
|
3010
3301
|
"type": "string",
|
|
3011
3302
|
"format": "date-time"
|
|
@@ -3022,6 +3313,8 @@
|
|
|
3022
3313
|
"statusReason",
|
|
3023
3314
|
"lastCheckedAt",
|
|
3024
3315
|
"lastEventAt",
|
|
3316
|
+
"autoRefund",
|
|
3317
|
+
"canRefund",
|
|
3025
3318
|
"createdAt"
|
|
3026
3319
|
]
|
|
3027
3320
|
},
|
|
@@ -3109,7 +3402,7 @@
|
|
|
3109
3402
|
"apiKey": {
|
|
3110
3403
|
"type": "string",
|
|
3111
3404
|
"minLength": 1,
|
|
3112
|
-
"description": "Restricted API key of the Stripe account (`rk_live_…` for live products, `rk_test_…` for test products), with the `requiredPermissions` of `getStripeIntegration`. A secret key works too, but gives the app more access than it needs.",
|
|
3405
|
+
"description": "Restricted API key of the Stripe account (`rk_live_…` for live products, `rk_test_…` for test products), with the `requiredPermissions` of `getStripeIntegration`. Without the optional ones, it connects with what they're for turned off. A secret key works too, but gives the app more access than it needs.",
|
|
3113
3406
|
"example": "rk_live_51Nv0FG…"
|
|
3114
3407
|
}
|
|
3115
3408
|
},
|
|
@@ -3117,6 +3410,16 @@
|
|
|
3117
3410
|
"apiKey"
|
|
3118
3411
|
]
|
|
3119
3412
|
},
|
|
3413
|
+
"UpdateIntegration": {
|
|
3414
|
+
"type": "object",
|
|
3415
|
+
"properties": {
|
|
3416
|
+
"autoRefund": {
|
|
3417
|
+
"type": "boolean",
|
|
3418
|
+
"description": "Whether canceling a license bought through Stripe refunds its payment. Can only be turned on when the integration's `canRefund` is true: the API key has the Refunds: Write permission.",
|
|
3419
|
+
"example": false
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
},
|
|
3120
3423
|
"StripePrice": {
|
|
3121
3424
|
"type": "object",
|
|
3122
3425
|
"properties": {
|
|
@@ -3200,7 +3503,7 @@
|
|
|
3200
3503
|
],
|
|
3201
3504
|
"operationId": "validateKey",
|
|
3202
3505
|
"summary": "Validate a license key",
|
|
3203
|
-
"description": "Checks the license key of the product on a machine and returns a token the application can verify offline with the organization's public key. Doesn't need authentication.\n\nThe license must allow the `version`: up to its `maxVersion.version` when it has one, like `\"2.3\"` for every 2.3.z version and older. Its `maxVersion.lockMajorAt` and `maxVersion.lockMinorAt` are enforced once they hard-code `maxVersion.version`, within the hour they're reached. When it doesn't, the error's `latestAllowedVersion` is the latest release of the product the license allows, so the application can offer to install it.\n\nThe machine with the `fingerprint` is created when the license has none, and activated when it's deactivated, unless the license is already active on its maximum number of machines. A machine that's already active is never refused for the maximum number of machines, even when it was lowered below the number of active machines. Its `version`, and its `name` and `platform` when given, are updated: they can't be cleared.\n\nThe checks run in this order, and the first one failing answers: the license has expired, then it doesn't allow the version, then it's on its maximum number of machines. Each failure is recorded as a `license.validation_failed` event, except for keys that don't exist.\n\nChanges to the license, like deactivating the machine or shortening its expiration, don't revoke the tokens already returned: the application only sees them when it validates its key again, at the latest when its token expires.",
|
|
3506
|
+
"description": "Checks the license key of the product on a machine and returns a token the application can verify offline with the organization's public key. Doesn't need authentication.\n\nThe license must allow the `version`: up to its `maxVersion.version` when it has one, like `\"2.3\"` for every 2.3.z version and older. Its `maxVersion.lockMajorAt` and `maxVersion.lockMinorAt` are enforced once they hard-code `maxVersion.version`, within the hour they're reached. When it doesn't, the error's `latestAllowedVersion` is the latest release of the product the license allows, so the application can offer to install it.\n\nThe machine with the `fingerprint` is created when the license has none, and activated when it's deactivated, unless the license is already active on its maximum number of machines. A machine that's already active is never refused for the maximum number of machines, even when it was lowered below the number of active machines. Its `version`, and its `name` and `platform` when given, are updated: they can't be cleared.\n\nUnless the product disables `autoMachineChange`, a new machine isn't refused when the license is on its maximum number of machines: it takes the place of the active machine validated the longest ago, which is deactivated with its `overriddenByMachineId` set to the new machine, and recorded as a `machine.deactivated` event. When a machine deactivated this way is validated again, it takes its place back: the machine that overrode it, and the ones that overrode that one in turn, are locked, with their `overriddenByMachineId` set to the machine coming back. A locked machine is always refused, so two machines can't take turns on one place.\n\nThe checks run in this order, and the first one failing answers: the license has expired or was canceled, then it doesn't allow the version, then the machine is locked, then it's on its maximum number of machines. Each failure is recorded as a `license.validation_failed` event, except for keys that don't exist.\n\nChanges to the license, like deactivating the machine or shortening its expiration, don't revoke the tokens already returned: the application only sees them when it validates its key again, at the latest when its token expires.",
|
|
3204
3507
|
"security": [],
|
|
3205
3508
|
"parameters": [
|
|
3206
3509
|
{
|
|
@@ -3245,7 +3548,7 @@
|
|
|
3245
3548
|
}
|
|
3246
3549
|
},
|
|
3247
3550
|
"403": {
|
|
3248
|
-
"description": "`license_expired`: the license has expired. `version_not_allowed`: the license doesn't allow the version, with the `latestAllowedVersion`. `machine_limit_reached`: the license is already active on its maximum number of machines",
|
|
3551
|
+
"description": "`license_expired`: the license has expired, or was canceled. `version_not_allowed`: the license doesn't allow the version, with the `latestAllowedVersion`. `machine_locked`: the machine was locked after the machine it overrode came back. `machine_limit_reached`: the license is already active on its maximum number of machines, and the product disables `autoMachineChange` or the machine isn't new",
|
|
3249
3552
|
"content": {
|
|
3250
3553
|
"application/json": {
|
|
3251
3554
|
"schema": {
|
|
@@ -3555,7 +3858,7 @@
|
|
|
3555
3858
|
],
|
|
3556
3859
|
"operationId": "createProduct",
|
|
3557
3860
|
"summary": "Create a product",
|
|
3558
|
-
"description": "Without a `slug`, the product gets one derived from its name: lower cased, without accents and special characters (`Élan Pro 2!` becomes `elan-pro-2`).\nWhen another product of the organization already uses it, a dash and 3 random lowercase letters or digits are appended (`elan-pro-2-k3f`), until the slug is free.\n\nAn explicit `slug` is used as is: the request fails with a `409` when it's taken, it's never changed.\n\nSlug uniqueness is enforced by the database, so when concurrent requests end up with the same slug, only one succeeds and the others get a `409`, even without an explicit `slug`. Retrying such a request without a `slug` derives a new one.\n\nThe product is created with its default policy, named `Default policy` with the `default` slug, whose settings are given by `defaultPolicy`. Omitted settings default to licenses that never expire, on a single machine, offline for one week, for every version of the product. Unlike `createPolicy`, where `maxMachines` defaults to no limit.\n\nWith `isTestFromProductId`, the product is a test product: its id, its slug, and the ids, slugs and license keys of its resources start with `test_` (`TEST-` for license keys), and only test API keys reach it. It starts with copies of the policies, releases
|
|
3861
|
+
"description": "Without a `slug`, the product gets one derived from its name: lower cased, without accents and special characters (`Élan Pro 2!` becomes `elan-pro-2`).\nWhen another product of the organization already uses it, a dash and 3 random lowercase letters or digits are appended (`elan-pro-2-k3f`), until the slug is free.\n\nAn explicit `slug` is used as is: the request fails with a `409` when it's taken, it's never changed.\n\nSlug uniqueness is enforced by the database, so when concurrent requests end up with the same slug, only one succeeds and the others get a `409`, even without an explicit `slug`. Retrying such a request without a `slug` derives a new one.\n\nThe product is created with its default policy, named `Default policy` with the `default` slug, whose settings are given by `defaultPolicy`. Omitted settings default to licenses that never expire, on a single machine, offline for one week, for every version of the product. Unlike `createPolicy`, where `maxMachines` defaults to no limit.\n\nWith `isTestFromProductId`, the product is a test product: its id, its slug, and the ids, slugs and license keys of its resources start with `test_` (`TEST-` for license keys), and only test API keys reach it. It starts with copies of the policies, releases, portal settings and `autoMachineChange` of the live product, `defaultPolicy` is ignored. Later changes to the live product aren't copied: reset the test product to copy them again. Test API keys can only create test products, live API keys only live ones.\n\n**Required role permission**: `product:create` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
3559
3862
|
"x-required-permissions": [
|
|
3560
3863
|
"product:create"
|
|
3561
3864
|
],
|
|
@@ -3963,7 +4266,7 @@
|
|
|
3963
4266
|
],
|
|
3964
4267
|
"operationId": "resetProduct",
|
|
3965
4268
|
"summary": "Reset a test product",
|
|
3966
|
-
"description": "Deletes the customers, licenses, machines, policies and releases of the test product, with their events, then copies the policies, releases
|
|
4269
|
+
"description": "Deletes the customers, licenses, machines, policies and releases of the test product, with their events, then copies the policies, releases, portal settings and `autoMachineChange` of its live product again. Its id, name and slug are kept, but the copied policies get new ids. The tokens of its customers, licenses and machines stop working.\n\n**Required role permission**: `product:update` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
3967
4270
|
"x-required-permissions": [
|
|
3968
4271
|
"product:update"
|
|
3969
4272
|
],
|
|
@@ -6001,7 +6304,7 @@
|
|
|
6001
6304
|
],
|
|
6002
6305
|
"operationId": "createLicense",
|
|
6003
6306
|
"summary": "Create a license",
|
|
6004
|
-
"description": "Without a `key`, the license gets a random one, like `7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF`: 5 groups of 5 characters separated by dashes, each character an upper case letter or a digit other than `O`, `0`, `I` and `1`. That's 32 possible characters encoding 5 bits each, for 125 random bits.\n\nWithout a `policyId`, the license follows the product's default policy.\n\nWithout an `expiresAt`, the license expires after the duration of its policy, or never when the policy has none. `expiresAt: null` makes it never expire.\n\nWithout a `price`, the price paid for the license is unknown: it's left out of the revenue stats.\n\nThe values of `maxVersion` left out are taken from the max version of the policy: its hard-coded version, or the times after the creation of the license its versions lock.\n\nThe license belongs to the product's customer with the given `email`, which is created when there's none.\n\nWith `sendKey: true`, the key is emailed to the customer once the license is created.\n\nThe license copies the settings of its policy when it's created: later changes to the policy don't affect it. Its key, policy and customer can't be changed afterwards.\n\n**Required role permission**: `license:create` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
6307
|
+
"description": "Without a `key`, the license gets a random one, like `7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF`: 5 groups of 5 characters separated by dashes, each character an upper case letter or a digit other than `O`, `0`, `I` and `1`. That's 32 possible characters encoding 5 bits each, for 125 random bits.\n\nWithout a `policyId`, the license follows the product's default policy.\n\nWithout an `expiresAt`, the license expires after the duration of its policy, or never when the policy has none. `expiresAt: null` makes it never expire.\n\nWithout a `price`, the price paid for the license is unknown: it's left out of the revenue stats.\n\nWithout a `cancellableUntil`, the customer can cancel the license during the policy's `moneyBackGuaranteeDays` after its creation, or never when the policy has none.\n\nThe values of `maxVersion` left out are taken from the max version of the policy: its hard-coded version, or the times after the creation of the license its versions lock.\n\nThe license belongs to the product's customer with the given `email`, which is created when there's none.\n\nWith `sendKey: true`, the key is emailed to the customer once the license is created.\n\nThe license copies the settings of its policy when it's created: later changes to the policy don't affect it. Its key, policy and customer can't be changed afterwards.\n\n**Required role permission**: `license:create` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
6005
6308
|
"x-required-permissions": [
|
|
6006
6309
|
"license:create"
|
|
6007
6310
|
],
|
|
@@ -6605,7 +6908,7 @@
|
|
|
6605
6908
|
],
|
|
6606
6909
|
"operationId": "updateLicense",
|
|
6607
6910
|
"summary": "Update a license",
|
|
6608
|
-
"description": "The key, policy and customer of a license can't be changed: sending them does nothing.\n\nThe changes apply to the next validations of the key, not to the license tokens `validateKey` already returned, which stay valid until they expire. Lowering `maxMachines` doesn't deactivate machines: the ones already active keep validating, and new ones are refused until enough are deactivated.\n\n**Required role permission**: `license:update` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
6911
|
+
"description": "The key, policy and customer of a license can't be changed: sending them does nothing.\n\nThe changes apply to the next validations of the key, not to the license tokens `validateKey` already returned, which stay valid until they expire. Lowering `maxMachines` doesn't deactivate machines: the ones already active keep validating, and new ones replace them one at a time when the product has `autoMachineChange`, or are refused until enough are deactivated.\n\n**Required role permission**: `license:update` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
6609
6912
|
"x-required-permissions": [
|
|
6610
6913
|
"license:update"
|
|
6611
6914
|
],
|
|
@@ -6894,6 +7197,132 @@
|
|
|
6894
7197
|
}
|
|
6895
7198
|
}
|
|
6896
7199
|
},
|
|
7200
|
+
"/v1/licenses/{id}/cancel": {
|
|
7201
|
+
"post": {
|
|
7202
|
+
"tags": [
|
|
7203
|
+
"Licenses"
|
|
7204
|
+
],
|
|
7205
|
+
"operationId": "cancelLicense",
|
|
7206
|
+
"summary": "Cancel a license",
|
|
7207
|
+
"description": "Cancels the license right away: validating its key then fails with `license_expired`, like an expired license, and its status is `canceled`. A cancellation can't be undone.\n\nCustomers can cancel their licenses until their `cancellableUntil`, the end of their money back guarantee: tokens can't cancel a license past it, or without one. API keys and sessions can cancel any license.\n\nWhen the license was bought through the Stripe integration, its payment is refunded in the background, unless the integration disables `autoRefund`, its API key lacks the optional Refunds: Write permission (`canRefund`), or `refund` is `false`: the refund is its price paid, taxes included, and its id is set as `stripeRefundId`. The customer is emailed a confirmation, and the owners and admins of the organization are told about the cancellation and its refund. In test products, the customer is only emailed when their email is a member's of the organization.\n\nRecords a `license.canceled` event, then a `license.refunded` or `license.refund_failed` one once the refund is done.\n\n**Token access**: customer, license tokens with the `license:cancel` permission (or the matching write one). A token reaches the license it's scoped to, or the licenses of its customer.\n\n**Required role permission**: `license:cancel` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
7208
|
+
"security": [
|
|
7209
|
+
{
|
|
7210
|
+
"apiKey": []
|
|
7211
|
+
},
|
|
7212
|
+
{
|
|
7213
|
+
"token": [
|
|
7214
|
+
"license:cancel"
|
|
7215
|
+
]
|
|
7216
|
+
}
|
|
7217
|
+
],
|
|
7218
|
+
"x-required-permissions": [
|
|
7219
|
+
"license:cancel"
|
|
7220
|
+
],
|
|
7221
|
+
"parameters": [
|
|
7222
|
+
{
|
|
7223
|
+
"schema": {
|
|
7224
|
+
"type": "string",
|
|
7225
|
+
"example": "l3Nv8KwB"
|
|
7226
|
+
},
|
|
7227
|
+
"required": true,
|
|
7228
|
+
"name": "id",
|
|
7229
|
+
"in": "path"
|
|
7230
|
+
}
|
|
7231
|
+
],
|
|
7232
|
+
"requestBody": {
|
|
7233
|
+
"required": true,
|
|
7234
|
+
"content": {
|
|
7235
|
+
"application/json": {
|
|
7236
|
+
"schema": {
|
|
7237
|
+
"$ref": "#/components/schemas/CancelLicense"
|
|
7238
|
+
}
|
|
7239
|
+
}
|
|
7240
|
+
}
|
|
7241
|
+
},
|
|
7242
|
+
"responses": {
|
|
7243
|
+
"200": {
|
|
7244
|
+
"description": "Canceled license",
|
|
7245
|
+
"content": {
|
|
7246
|
+
"application/json": {
|
|
7247
|
+
"schema": {
|
|
7248
|
+
"$ref": "#/components/schemas/License"
|
|
7249
|
+
}
|
|
7250
|
+
}
|
|
7251
|
+
}
|
|
7252
|
+
},
|
|
7253
|
+
"401": {
|
|
7254
|
+
"description": "`unauthorized`: no credentials. `invalid_api_key`: the API key doesn't exist, was revoked or has expired. `invalid_token`: the token's signature is invalid, it has expired, or the resource it's scoped to was deleted",
|
|
7255
|
+
"content": {
|
|
7256
|
+
"application/json": {
|
|
7257
|
+
"schema": {
|
|
7258
|
+
"$ref": "#/components/schemas/Error"
|
|
7259
|
+
}
|
|
7260
|
+
}
|
|
7261
|
+
}
|
|
7262
|
+
},
|
|
7263
|
+
"402": {
|
|
7264
|
+
"description": "`plan_limit_exceeded`: the organization stayed over its plan's limits after the grace period, its API is blocked until it upgrades. `plan_limit_reached`: creating the resource would go over the plan's limit",
|
|
7265
|
+
"content": {
|
|
7266
|
+
"application/json": {
|
|
7267
|
+
"schema": {
|
|
7268
|
+
"$ref": "#/components/schemas/Error"
|
|
7269
|
+
}
|
|
7270
|
+
}
|
|
7271
|
+
}
|
|
7272
|
+
},
|
|
7273
|
+
"403": {
|
|
7274
|
+
"description": "`token_not_allowed`: the endpoint doesn't accept tokens, or not of this type. `insufficient_scope`: the token lacks the permission. `no_active_organization` or `forbidden`: the session has no organization, or isn't a member of the one requested",
|
|
7275
|
+
"content": {
|
|
7276
|
+
"application/json": {
|
|
7277
|
+
"schema": {
|
|
7278
|
+
"$ref": "#/components/schemas/Error"
|
|
7279
|
+
}
|
|
7280
|
+
}
|
|
7281
|
+
}
|
|
7282
|
+
},
|
|
7283
|
+
"404": {
|
|
7284
|
+
"description": "License not found",
|
|
7285
|
+
"content": {
|
|
7286
|
+
"application/json": {
|
|
7287
|
+
"schema": {
|
|
7288
|
+
"$ref": "#/components/schemas/Error"
|
|
7289
|
+
}
|
|
7290
|
+
}
|
|
7291
|
+
}
|
|
7292
|
+
},
|
|
7293
|
+
"409": {
|
|
7294
|
+
"description": "`already_canceled`: the license is already canceled. `not_cancellable`: for tokens, the license has no money back guarantee, or it has ended",
|
|
7295
|
+
"content": {
|
|
7296
|
+
"application/json": {
|
|
7297
|
+
"schema": {
|
|
7298
|
+
"$ref": "#/components/schemas/Error"
|
|
7299
|
+
}
|
|
7300
|
+
}
|
|
7301
|
+
}
|
|
7302
|
+
},
|
|
7303
|
+
"422": {
|
|
7304
|
+
"description": "`validation_error`: invalid path, query or body, with the `issues`",
|
|
7305
|
+
"content": {
|
|
7306
|
+
"application/json": {
|
|
7307
|
+
"schema": {
|
|
7308
|
+
"$ref": "#/components/schemas/Error"
|
|
7309
|
+
}
|
|
7310
|
+
}
|
|
7311
|
+
}
|
|
7312
|
+
},
|
|
7313
|
+
"429": {
|
|
7314
|
+
"description": "`rate_limited`: the API key made more than 10 requests in the last second. Wait for the `Retry-After` seconds",
|
|
7315
|
+
"content": {
|
|
7316
|
+
"application/json": {
|
|
7317
|
+
"schema": {
|
|
7318
|
+
"$ref": "#/components/schemas/Error"
|
|
7319
|
+
}
|
|
7320
|
+
}
|
|
7321
|
+
}
|
|
7322
|
+
}
|
|
7323
|
+
}
|
|
7324
|
+
}
|
|
7325
|
+
},
|
|
6897
7326
|
"/v1/licenses/send-keys": {
|
|
6898
7327
|
"post": {
|
|
6899
7328
|
"tags": [
|
|
@@ -7098,7 +7527,8 @@
|
|
|
7098
7527
|
"type": "string",
|
|
7099
7528
|
"enum": [
|
|
7100
7529
|
"active",
|
|
7101
|
-
"deactivated"
|
|
7530
|
+
"deactivated",
|
|
7531
|
+
"locked"
|
|
7102
7532
|
],
|
|
7103
7533
|
"description": "Only returns the machines with this status.",
|
|
7104
7534
|
"example": "active"
|
|
@@ -7293,7 +7723,7 @@
|
|
|
7293
7723
|
],
|
|
7294
7724
|
"operationId": "deactivateMachine",
|
|
7295
7725
|
"summary": "Deactivate a machine",
|
|
7296
|
-
"description": "The machine no longer counts as using the license, freeing its place when the license has a maximum number of machines. Validating the license key on the machine activates it again, unless the license is on its maximum number of machines by then. Deactivating a deactivated machine does nothing.\n\nThe license token `validateKey` returned to the machine isn't revoked: the application can keep running offline until it expires. Machines can't be deleted: they're deleted with their license.\n\n**Token access**: customer, license, machine tokens with the `machine:write` permission (or the matching write one). A token reaches the machine it's scoped to, or the machines of its license or customer.\n\n**Required role permission**: `machine:deactivate` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
7726
|
+
"description": "The machine no longer counts as using the license, freeing its place when the license has a maximum number of machines. Validating the license key on the machine activates it again, unless the license is on its maximum number of machines by then. Deactivating a deactivated or locked machine does nothing.\n\nThe license token `validateKey` returned to the machine isn't revoked: the application can keep running offline until it expires. Machines can't be deleted: they're deleted with their license.\n\n**Token access**: customer, license, machine tokens with the `machine:write` permission (or the matching write one). A token reaches the machine it's scoped to, or the machines of its license or customer.\n\n**Required role permission**: `machine:deactivate` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
7297
7727
|
"security": [
|
|
7298
7728
|
{
|
|
7299
7729
|
"apiKey": []
|
|
@@ -7399,7 +7829,7 @@
|
|
|
7399
7829
|
],
|
|
7400
7830
|
"operationId": "createPortalLink",
|
|
7401
7831
|
"summary": "Create a link to the customer portal",
|
|
7402
|
-
"description": "Link letting the customer see their licenses and deactivate their machines in the customer portal, without signing in. Anyone with the link can, until it expires or the customer is deleted: it can't be revoked otherwise. The token also works with the API endpoints that accept customer tokens.\n\nLinks can be created while the product's customer portal is disabled, but the portal answers `404` until it's enabled, and `sendPortalLink` refuses to email them.\n\n**Required role permission**: `portalLink:create` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
7832
|
+
"description": "Link letting the customer see their licenses, cancel them during their money back guarantee, and deactivate their machines in the customer portal, without signing in. Anyone with the link can, until it expires or the customer is deleted: it can't be revoked otherwise. The token also works with the API endpoints that accept customer tokens.\n\nLinks can be created while the product's customer portal is disabled, but the portal answers `404` until it's enabled, and `sendPortalLink` refuses to email them.\n\n**Required role permission**: `portalLink:create` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
7403
7833
|
"x-required-permissions": [
|
|
7404
7834
|
"portalLink:create"
|
|
7405
7835
|
],
|
|
@@ -9140,7 +9570,7 @@
|
|
|
9140
9570
|
}
|
|
9141
9571
|
},
|
|
9142
9572
|
"422": {
|
|
9143
|
-
"description": "`validation_error`: invalid body. `invalid_api_key`: not a Stripe secret or restricted key, or Stripe rejected it. `key_mode_mismatch`: a test mode key for a live product, or the opposite. `missing_permission`: the key lacks required permissions, listed in the message",
|
|
9573
|
+
"description": "`validation_error`: invalid body. `invalid_api_key`: not a Stripe secret or restricted key, or Stripe rejected it. `key_mode_mismatch`: a test mode key for a live product, or the opposite. `missing_permission`: the key lacks required permissions, listed in the message. Optional ones aren't required: without Refunds: Write, it connects with `canRefund` false",
|
|
9144
9574
|
"content": {
|
|
9145
9575
|
"application/json": {
|
|
9146
9576
|
"schema": {
|
|
@@ -9269,6 +9699,110 @@
|
|
|
9269
9699
|
}
|
|
9270
9700
|
}
|
|
9271
9701
|
}
|
|
9702
|
+
},
|
|
9703
|
+
"patch": {
|
|
9704
|
+
"tags": [
|
|
9705
|
+
"Integrations"
|
|
9706
|
+
],
|
|
9707
|
+
"operationId": "updateIntegration",
|
|
9708
|
+
"summary": "Update an integration",
|
|
9709
|
+
"description": "Changes the settings of the integration, for every product of its mode. Doesn't accept tokens: only API keys and sessions.\n\n**Required role permission**: `integration:update` when called with a session, granted by the member's role. API keys aren't limited by roles.",
|
|
9710
|
+
"x-required-permissions": [
|
|
9711
|
+
"integration:update"
|
|
9712
|
+
],
|
|
9713
|
+
"parameters": [
|
|
9714
|
+
{
|
|
9715
|
+
"schema": {
|
|
9716
|
+
"type": "string",
|
|
9717
|
+
"example": "i8Fz4QnRt"
|
|
9718
|
+
},
|
|
9719
|
+
"required": true,
|
|
9720
|
+
"name": "id",
|
|
9721
|
+
"in": "path"
|
|
9722
|
+
}
|
|
9723
|
+
],
|
|
9724
|
+
"requestBody": {
|
|
9725
|
+
"required": true,
|
|
9726
|
+
"content": {
|
|
9727
|
+
"application/json": {
|
|
9728
|
+
"schema": {
|
|
9729
|
+
"$ref": "#/components/schemas/UpdateIntegration"
|
|
9730
|
+
}
|
|
9731
|
+
}
|
|
9732
|
+
}
|
|
9733
|
+
},
|
|
9734
|
+
"responses": {
|
|
9735
|
+
"200": {
|
|
9736
|
+
"description": "Updated integration",
|
|
9737
|
+
"content": {
|
|
9738
|
+
"application/json": {
|
|
9739
|
+
"schema": {
|
|
9740
|
+
"$ref": "#/components/schemas/Integration"
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
}
|
|
9744
|
+
},
|
|
9745
|
+
"401": {
|
|
9746
|
+
"description": "`unauthorized`: no credentials. `invalid_api_key`: the API key doesn't exist, was revoked or has expired. `invalid_token`: the token's signature is invalid, it has expired, or the resource it's scoped to was deleted",
|
|
9747
|
+
"content": {
|
|
9748
|
+
"application/json": {
|
|
9749
|
+
"schema": {
|
|
9750
|
+
"$ref": "#/components/schemas/Error"
|
|
9751
|
+
}
|
|
9752
|
+
}
|
|
9753
|
+
}
|
|
9754
|
+
},
|
|
9755
|
+
"402": {
|
|
9756
|
+
"description": "`plan_limit_exceeded`: the organization stayed over its plan's limits after the grace period, its API is blocked until it upgrades. `plan_limit_reached`: creating the resource would go over the plan's limit",
|
|
9757
|
+
"content": {
|
|
9758
|
+
"application/json": {
|
|
9759
|
+
"schema": {
|
|
9760
|
+
"$ref": "#/components/schemas/Error"
|
|
9761
|
+
}
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
},
|
|
9765
|
+
"403": {
|
|
9766
|
+
"description": "`token_not_allowed`: the endpoint doesn't accept tokens, or not of this type. `insufficient_scope`: the token lacks the permission. `no_active_organization` or `forbidden`: the session has no organization, or isn't a member of the one requested",
|
|
9767
|
+
"content": {
|
|
9768
|
+
"application/json": {
|
|
9769
|
+
"schema": {
|
|
9770
|
+
"$ref": "#/components/schemas/Error"
|
|
9771
|
+
}
|
|
9772
|
+
}
|
|
9773
|
+
}
|
|
9774
|
+
},
|
|
9775
|
+
"404": {
|
|
9776
|
+
"description": "Integration not found",
|
|
9777
|
+
"content": {
|
|
9778
|
+
"application/json": {
|
|
9779
|
+
"schema": {
|
|
9780
|
+
"$ref": "#/components/schemas/Error"
|
|
9781
|
+
}
|
|
9782
|
+
}
|
|
9783
|
+
}
|
|
9784
|
+
},
|
|
9785
|
+
"422": {
|
|
9786
|
+
"description": "`validation_error`: invalid body. `missing_permission`: turning `autoRefund` on while the API key lacks the Refunds: Write permission",
|
|
9787
|
+
"content": {
|
|
9788
|
+
"application/json": {
|
|
9789
|
+
"schema": {
|
|
9790
|
+
"$ref": "#/components/schemas/Error"
|
|
9791
|
+
}
|
|
9792
|
+
}
|
|
9793
|
+
}
|
|
9794
|
+
},
|
|
9795
|
+
"429": {
|
|
9796
|
+
"description": "`rate_limited`: the API key made more than 10 requests in the last second. Wait for the `Retry-After` seconds",
|
|
9797
|
+
"content": {
|
|
9798
|
+
"application/json": {
|
|
9799
|
+
"schema": {
|
|
9800
|
+
"$ref": "#/components/schemas/Error"
|
|
9801
|
+
}
|
|
9802
|
+
}
|
|
9803
|
+
}
|
|
9804
|
+
}
|
|
9805
|
+
}
|
|
9272
9806
|
}
|
|
9273
9807
|
},
|
|
9274
9808
|
"/v1/integrations/{id}/check": {
|