-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschematic-api-structure.json
More file actions
148 lines (148 loc) · 4.08 KB
/
schematic-api-structure.json
File metadata and controls
148 lines (148 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"title": "Schematic API Structure",
"description": "Document structure for the Schematic feature and entitlement management API.",
"baseUrl": "https://api.schematichq.com",
"authentication": {
"type": "API Key",
"header": "X-Schematic-Api-Key",
"key_prefixes": {
"production": "sch_prod_",
"staging": "sch_stag_",
"development": "sch_dev_"
},
"key_types": ["secret", "publishable", "readonly"]
},
"resource_groups": {
"account": {
"description": "Account members, API keys, and environments",
"endpoints": [
"GET /account-members",
"GET /api-keys",
"POST /api-keys",
"PUT /api-keys/{id}",
"DELETE /api-keys/{id}"
]
},
"companies": {
"description": "Customer organization management",
"endpoints": [
"GET /companies",
"POST /companies (upsert)",
"POST /companies/create",
"GET /companies/{id}",
"DELETE /companies/{id}",
"GET /companies/lookup",
"POST /company-traits"
]
},
"users": {
"description": "Individual user management",
"endpoints": [
"GET /users",
"POST /users (upsert)",
"POST /users/create",
"GET /users/{id}",
"DELETE /users/{id}",
"GET /users/lookup",
"POST /user-traits"
]
},
"features": {
"description": "Product feature definitions",
"endpoints": [
"GET /features",
"POST /features",
"GET /features/{id}",
"PUT /features/{id}",
"DELETE /features/{id}"
]
},
"flags": {
"description": "Feature flags with rule-based evaluation",
"endpoints": [
"GET /flags",
"POST /flags",
"POST /flags/check (single)",
"POST /flags/check-bulk",
"POST /flags/{key}/check",
"PUT /flags/{id}/rules",
"GET /flags/{id}",
"PUT /flags/{id}",
"DELETE /flags/{id}"
]
},
"plans": {
"description": "Subscription plan management",
"endpoints": [
"GET /plans",
"POST /plans",
"GET /plans/{id}",
"PUT /plans/{id}",
"DELETE /plans/{id}",
"PUT /plans/version/{id}/publish"
]
},
"entitlements": {
"description": "Plan and company entitlement management",
"endpoints": [
"GET /plan-entitlements",
"POST /plan-entitlements",
"GET /company-overrides",
"POST /company-overrides",
"PUT /company-overrides/{id}",
"DELETE /company-overrides/{id}"
]
},
"billing": {
"description": "Stripe and billing provider integration",
"endpoints": [
"POST /billing/customer/upsert",
"POST /billing/subscription/upsert",
"POST /billing/product/upsert",
"POST /billing/price/upsert",
"GET /billing/products",
"GET /billing/credits",
"POST /billing/credits"
]
},
"events": {
"description": "Usage event tracking",
"endpoints": [
"POST /events",
"POST /events/batch",
"GET /events"
]
},
"webhooks": {
"description": "Outbound webhook configuration",
"endpoints": [
"GET /webhooks",
"POST /webhooks",
"GET /webhooks/{id}",
"PUT /webhooks/{id}",
"DELETE /webhooks/{id}",
"GET /webhook-events"
]
},
"insights": {
"description": "Usage analytics and reporting",
"endpoints": [
"GET /insights/summary",
"GET /insights/activity",
"GET /insights/plan-growth",
"GET /insights/top-features",
"GET /insights/feature-usage-timeseries"
]
}
},
"common_patterns": {
"upsert": "POST with keys object to create-or-update by external identifiers",
"list": "GET returning paginated array with limit/offset params",
"count": "GET /resource/count returning total count",
"lookup": "GET /resource/lookup?key=val for key-based lookup",
"pagination": {
"limit": "integer: items per page",
"offset": "integer: items to skip"
}
}
}