diff --git a/builds/sdkgenerator b/builds/sdkgenerator index adf40f3..523a48b 100755 Binary files a/builds/sdkgenerator and b/builds/sdkgenerator differ diff --git a/composer.json b/composer.json index c7288c6..d12f48a 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,8 @@ "generate:stripe": "./codegen generate:sdk --force --namespace=Crescat\\\\Stripe --type=postman --name=Stripe tests/Samples/stripe.json --output tests/Output/Stripe", "generate:tableau": "./codegen generate:sdk --force --namespace=Crescat\\\\Tableau --type=postman --name=Tableau tests/Samples/tableau.json --output tests/Output/Tableau", "generate:tripletex": "./codegen generate:sdk --force --namespace=Crescat\\\\Tripletex --type=openapi --name=Tripletex tests/Samples/tripletex.json --output tests/Output/Tripletex", + "generate:checkmango": "./codegen generate:sdk --force --namespace=Checkmango\\\\Sdk --type=openapi --name=Checkmango tests/Samples/checkmango.json --output tests/Output/Checkmango", + "generate:kassalapp": "./codegen generate:sdk --force --namespace=Kassalapp\\\\Sdk --type=openapi --name=Kassalapp tests/Samples/kassalapp.json --output tests/Output/Kassalapp", "generate:zip:fiken": "./codegen generate:sdk --force --type=openapi --name=Fiken tests/Samples/fiken.yml --output tests/Output --zip", "generate:zip:gocardless": "./codegen generate:sdk --force --type=openapi --name=GoCardlessBankAccountData tests/Samples/gocardless.json --output tests/Output --zip", "generate:zip:openai": "./codegen generate:sdk --force --type=postman --name=OpenAI tests/Samples/openai.json --output tests/Output --zip", @@ -62,7 +64,9 @@ "@generate:paddle", "@generate:tableau", "@generate:tripletex", - "@generate:stripe" + "@generate:stripe", + "@generate:checkmango", + "@generate:kassalapp" ], "test": "vendor/bin/pest", "test-coverage": "vendor/bin/pest --coverage", diff --git a/src/Generators/ResourceGenerator.php b/src/Generators/ResourceGenerator.php index b39f3ee..08e52ec 100644 --- a/src/Generators/ResourceGenerator.php +++ b/src/Generators/ResourceGenerator.php @@ -58,23 +58,26 @@ public function generateResourceClass(string $resourceName, array $endpoints): ? foreach ($endpoints as $endpoint) { $requestClassName = NameHelper::safeClassName($endpoint->name); + $requestClassNameAlias = $requestClassName == $resourceName ? "{$requestClassName}Request" : null; + $requestClassFQN = "{$this->config->namespace}\\{$this->config->requestNamespaceSuffix}\\{$resourceName}\\{$requestClassName}"; $namespace + ->addUse(Response::class) ->addUse( - "{$this->config->namespace}\\{$this->config->requestNamespaceSuffix}\\{$resourceName}\\{$requestClassName}" - ) - ->addUse(Response::class); + name: $requestClassFQN, + alias: $requestClassNameAlias, + ); try { - $method = $classType->addMethod(NameHelper::safeVariableName($endpoint->name)); + $method = $classType->addMethod($requestClassName); } catch (InvalidStateException $exception) { - $unduplicated = NameHelper::safeVariableName( - $endpoint->name.' '.Str::random(3) + // TODO: handle more gracefully in the future + $deduplicated = NameHelper::safeVariableName( + sprintf('%s%s', $endpoint->name, Str::random(3)) ); - dump('DUPLICATE: '.NameHelper::safeVariableName($endpoint->name).' -> '.$unduplicated); + dump('DUPLICATE: '.$requestClassName.' -> '.$deduplicated); - // TODO: handle more gracefully in the future - $method = $classType->addMethod($unduplicated); + $method = $classType->addMethod($deduplicated); } $method->setReturnType(Response::class); @@ -104,7 +107,7 @@ public function generateResourceClass(string $resourceName, array $endpoints): ? } $method->setBody( - new Literal(sprintf('return $this->connector->send(new %s(%s));', $requestClassName, implode(', ', $args))) + new Literal(sprintf('return $this->connector->send(new %s(%s));', $requestClassNameAlias ?? $requestClassName, implode(', ', $args))) ); } diff --git a/tests/Samples/checkmango.json b/tests/Samples/checkmango.json new file mode 100644 index 0000000..8260eba --- /dev/null +++ b/tests/Samples/checkmango.json @@ -0,0 +1 @@ +{"openapi":"3.0.3","info":{"title":"Checkmango","description":"","version":"1.0.0"},"servers":[{"url":"https://checkmango.com"}],"paths":{"/api/teams/{teamId}/ingest":{"post":{"summary":"Ingest Data.","operationId":"ingestData","description":"This endpoint handles all ingestion of data into the system, including enrolments, impressions and conversions.\n\n\u003e warn\n\u003e Participants may only be enrolled into a running experiment.","parameters":[],"responses":{"202":{"description":"","content":{"text/plain":{"schema":{"type":"string","example":""}}}},"402":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Subscription required."},"properties":{"message":{"type":"string","example":"Subscription required."}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Ingestion"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"experiment":{"type":"string","description":"The key of the experiment to enroll in.","example":"CHECKOUT_CTA"},"variant":{"type":"string","description":"The key of the variant to enroll the participant into.","example":"CTA_RED"},"participant":{"type":"string","description":"The key of the participant to enroll. The participant will automatically be created if it does not yet exist.","example":"jbrooksuk"},"event":{"type":"string","description":"The key of the event that converted. Only required during a conversion.","example":"CHECKOUT"},"force":{"type":"boolean","description":"Whether to force the enrollment. By default, if the participant is already enrolled in the experiment, the enrollment will be ignored. Defaults to false.","example":true}},"required":["experiment","variant","participant"]}}}},"security":[]},"parameters":[{"in":"path","name":"teamId","description":"","example":13,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"team","description":"The ID of the team.","example":3,"required":true,"schema":{"type":"integer"}}]},"/api/teams/{team}/events":{"get":{"summary":"List Events.","operationId":"listEvents","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"experiments,team","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"experiments,team"}},{"in":"query","name":"per_page","description":"The number of results to paginate by. Defaults to 15.","example":12,"required":false,"schema":{"type":"integer","description":"The number of results to paginate by. Defaults to 15.","example":12}},{"in":"query","name":"sort","description":"Field to sort by. Defaults to 'id'.","example":"consequatur","required":false,"schema":{"type":"string","description":"Field to sort by. Defaults to 'id'.","example":"consequatur"}},{"in":"query","name":"fields","description":"List of fields to filter the attributes to.","example":["expedita"],"required":false,"schema":{"type":"array","description":"List of fields to filter the attributes to.","example":["expedita"],"items":{"type":"string"}}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":[{"id":"ENIM_IPSUM_VOLUPTAS_LABORUM","type":"events","attributes":{"id":1,"team_id":1,"key":"ENIM_IPSUM_VOLUPTAS_LABORUM","type":"unique","description":"Sequi possimus officia tempora ab. Et quo quia aut laudantium qui sunt. Temporibus rerum nisi optio ipsa exercitationem qui.\n\nNisi voluptas error voluptates eligendi ipsam. Non illo libero quae recusandae ipsam quia temporibus. Ut et ullam hic tempore accusamus eaque laboriosam. Suscipit quo nulla ut quo.\n\nSit doloremque sunt sit animi. Est veniam qui minus earum. Ex aspernatur non veritatis reiciendis. Dignissimos mollitia ratione quos voluptas.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/events/ENIM_IPSUM_VOLUPTAS_LABORUM","meta":{}}}},{"id":"EST_ET_IPSUM_NEQUE","type":"events","attributes":{"id":2,"team_id":2,"key":"EST_ET_IPSUM_NEQUE","type":"unique","description":"Cumque aspernatur autem veniam cumque vitae. Perferendis aut laboriosam sed et facilis.\n\nCommodi itaque voluptatem rerum dolorum et. Delectus hic dolor consequatur esse. Ea quasi quia fugiat quaerat et dolor adipisci voluptas. Alias dignissimos et facere et quae et rerum.\n\nDoloremque aut in voluptatem labore illum omnis animi. Officiis est vel et dolore. Libero nesciunt illo aspernatur quas.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/2/events/EST_ET_IPSUM_NEQUE","meta":{}}}}],"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"array","example":[{"id":"ENIM_IPSUM_VOLUPTAS_LABORUM","type":"events","attributes":{"id":1,"team_id":1,"key":"ENIM_IPSUM_VOLUPTAS_LABORUM","type":"unique","description":"Sequi possimus officia tempora ab. Et quo quia aut laudantium qui sunt. Temporibus rerum nisi optio ipsa exercitationem qui.\n\nNisi voluptas error voluptates eligendi ipsam. Non illo libero quae recusandae ipsam quia temporibus. Ut et ullam hic tempore accusamus eaque laboriosam. Suscipit quo nulla ut quo.\n\nSit doloremque sunt sit animi. Est veniam qui minus earum. Ex aspernatur non veritatis reiciendis. Dignissimos mollitia ratione quos voluptas.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/1/events/ENIM_IPSUM_VOLUPTAS_LABORUM","meta":[]}}},{"id":"EST_ET_IPSUM_NEQUE","type":"events","attributes":{"id":2,"team_id":2,"key":"EST_ET_IPSUM_NEQUE","type":"unique","description":"Cumque aspernatur autem veniam cumque vitae. Perferendis aut laboriosam sed et facilis.\n\nCommodi itaque voluptatem rerum dolorum et. Delectus hic dolor consequatur esse. Ea quasi quia fugiat quaerat et dolor adipisci voluptas. Alias dignissimos et facere et quae et rerum.\n\nDoloremque aut in voluptatem labore illum omnis animi. Officiis est vel et dolore. Libero nesciunt illo aspernatur quas.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/2/events/EST_ET_IPSUM_NEQUE","meta":[]}}}],"items":{"type":"object","properties":{"id":{"type":"string","example":"ENIM_IPSUM_VOLUPTAS_LABORUM"},"type":{"type":"string","example":"events"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"ENIM_IPSUM_VOLUPTAS_LABORUM"},"type":{"type":"string","example":"unique"},"description":{"type":"string","example":"Sequi possimus officia tempora ab. Et quo quia aut laudantium qui sunt. Temporibus rerum nisi optio ipsa exercitationem qui.\n\nNisi voluptas error voluptates eligendi ipsam. Non illo libero quae recusandae ipsam quia temporibus. Ut et ullam hic tempore accusamus eaque laboriosam. Suscipit quo nulla ut quo.\n\nSit doloremque sunt sit animi. Est veniam qui minus earum. Ex aspernatur non veritatis reiciendis. Dignissimos mollitia ratione quos voluptas."},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/events/ENIM_IPSUM_VOLUPTAS_LABORUM"},"meta":{"type":"object","properties":[]}}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Events"]},"post":{"summary":"Create Event.","operationId":"createEvent","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"ET_SINT_QUIA_REPELLAT","type":"events","attributes":{"id":1,"team_id":1,"key":"ET_SINT_QUIA_REPELLAT","type":"unique","description":"Quis magnam autem sunt illum. Soluta adipisci et nihil quo inventore perferendis. Accusamus magnam qui aut et.\n\nOmnis aut ut aspernatur similique voluptatem numquam natus. Fugiat voluptates ullam facilis repellendus cupiditate. Sit explicabo cumque at unde et possimus sed.\n\nCommodi natus reprehenderit vel officiis veritatis. Odit sit natus laborum fugiat earum.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/events/ET_SINT_QUIA_REPELLAT","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"ET_SINT_QUIA_REPELLAT"},"type":{"type":"string","example":"events"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"ET_SINT_QUIA_REPELLAT"},"type":{"type":"string","example":"unique"},"description":{"type":"string","example":"Quis magnam autem sunt illum. Soluta adipisci et nihil quo inventore perferendis. Accusamus magnam qui aut et.\n\nOmnis aut ut aspernatur similique voluptatem numquam natus. Fugiat voluptates ullam facilis repellendus cupiditate. Sit explicabo cumque at unde et possimus sed.\n\nCommodi natus reprehenderit vel officiis veritatis. Odit sit natus laborum fugiat earum."},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/events/ET_SINT_QUIA_REPELLAT"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"402":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Subscription required."},"properties":{"message":{"type":"string","example":"Subscription required."}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the event. Must match the regex /^[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.","example":"MY_NEW_EVENT"},"description":{"type":"string","description":"The description of the event.","example":"Consequuntur veritatis aspernatur sit ipsam at harum ut."},"type":{"type":"string","description":"The type of event to create. Must be one of \u003ccode\u003eunique\u003c/code\u003e or \u003ccode\u003ecount\u003c/code\u003e.","example":"count"}},"required":["key","type"]}}}}},"parameters":[{"in":"path","name":"team","description":"The ID of the team that events belong to.","example":4,"required":true,"schema":{"type":"integer"}}]},"/api/teams/{team}/events/{event}":{"get":{"summary":"Get Event.","operationId":"getEvent","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separate list of relationships to include in the response.","example":"experiments,team","required":false,"schema":{"type":"string","description":"Comma-separate list of relationships to include in the response.","example":"experiments,team"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"FUGIAT_REPUDIANDAE_EUM_CUM","type":"events","attributes":{"id":1,"team_id":1,"key":"FUGIAT_REPUDIANDAE_EUM_CUM","type":"unique","description":"Neque molestiae cupiditate sunt est et. Minima dolorem cupiditate natus et blanditiis eos architecto. Veritatis dolorem et nesciunt porro sint et est.\n\nId vel nulla molestiae dolorem. Nisi iure itaque officiis distinctio ut voluptatem. Voluptatem occaecati et odio.\n\nQuis commodi nihil voluptatem ut expedita tempore. Harum sed quo corporis veniam. Enim vero nisi voluptatem ut saepe error. Quisquam omnis qui sint repellat doloremque ea quia.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/events/FUGIAT_REPUDIANDAE_EUM_CUM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"FUGIAT_REPUDIANDAE_EUM_CUM"},"type":{"type":"string","example":"events"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"FUGIAT_REPUDIANDAE_EUM_CUM"},"type":{"type":"string","example":"unique"},"description":{"type":"string","example":"Neque molestiae cupiditate sunt est et. Minima dolorem cupiditate natus et blanditiis eos architecto. Veritatis dolorem et nesciunt porro sint et est.\n\nId vel nulla molestiae dolorem. Nisi iure itaque officiis distinctio ut voluptatem. Voluptatem occaecati et odio.\n\nQuis commodi nihil voluptatem ut expedita tempore. Harum sed quo corporis veniam. Enim vero nisi voluptatem ut saepe error. Quisquam omnis qui sint repellat doloremque ea quia."},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/events/FUGIAT_REPUDIANDAE_EUM_CUM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Events"]},"put":{"summary":"Update Event.","operationId":"updateEvent","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"QUI_DOLORES_ACCUSAMUS_LABORIOSAM","type":"events","attributes":{"id":1,"team_id":1,"key":"QUI_DOLORES_ACCUSAMUS_LABORIOSAM","type":"unique","description":"Nihil velit odit qui dolores consequuntur maiores eaque dolorem. Facere cupiditate atque quia totam perspiciatis harum dolore aut. Accusamus quasi sit aut ut. Doloremque fuga quis nam veniam similique commodi.\n\nRepellat quo animi maxime sint. Delectus doloribus eum quisquam id ut magnam aliquam et. Voluptas sapiente corporis dolorum ut.\n\nDeserunt ea voluptatem in nesciunt ducimus cupiditate. Nulla placeat voluptatum quas ullam.","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/events/QUI_DOLORES_ACCUSAMUS_LABORIOSAM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"QUI_DOLORES_ACCUSAMUS_LABORIOSAM"},"type":{"type":"string","example":"events"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"QUI_DOLORES_ACCUSAMUS_LABORIOSAM"},"type":{"type":"string","example":"unique"},"description":{"type":"string","example":"Nihil velit odit qui dolores consequuntur maiores eaque dolorem. Facere cupiditate atque quia totam perspiciatis harum dolore aut. Accusamus quasi sit aut ut. Doloremque fuga quis nam veniam similique commodi.\n\nRepellat quo animi maxime sint. Delectus doloribus eum quisquam id ut magnam aliquam et. Voluptas sapiente corporis dolorum ut.\n\nDeserunt ea voluptatem in nesciunt ducimus cupiditate. Nulla placeat voluptatum quas ullam."},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/events/QUI_DOLORES_ACCUSAMUS_LABORIOSAM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Events"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the event.","example":"MY_NEW_EVENT"},"description":{"type":"string","description":"The description of the event.","example":"Ea laboriosam sunt voluptas voluptate."},"type":{"type":"string","description":"The type of event to create. Must be one of \u003ccode\u003eunique\u003c/code\u003e or \u003ccode\u003ecount\u003c/code\u003e.","example":"unique"}}}}}}},"delete":{"summary":"Delete Event.","operationId":"deleteEvent","description":"\u003e warn\n\u003e Deleting an event is permanent and cannot be undone.","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Events"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the event belongs to.","example":3,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"event","description":"The key of the event to show.","example":"error","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/experiments":{"get":{"summary":"List Experiments.","operationId":"listExperiments","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"event,team,variants","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"event,team,variants"}},{"in":"query","name":"per_page","description":"The number of results to paginate by. Defaults to 15.","example":11,"required":false,"schema":{"type":"integer","description":"The number of results to paginate by. Defaults to 15.","example":11}},{"in":"query","name":"sort","description":"Field to sort by. Defaults to 'id'.","example":"sit","required":false,"schema":{"type":"string","description":"Field to sort by. Defaults to 'id'.","example":"sit"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":[{"id":"AD_LABORUM_ADIPISCI_DISTINCTIO","type":"experiments","attributes":{"id":1,"team_id":1,"key":"AD_LABORUM_ADIPISCI_DISTINCTIO","description":"Delectus dolores dolor dolor quia natus placeat quidem. Repellat ab aspernatur impedit. Molestiae dolorum et labore et. Recusandae voluptas unde enim necessitatibus fuga optio enim dolor.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/AD_LABORUM_ADIPISCI_DISTINCTIO","meta":{}}}},{"id":"RECUSANDAE_QUIBUSDAM_UT_CULPA","type":"experiments","attributes":{"id":2,"team_id":3,"key":"RECUSANDAE_QUIBUSDAM_UT_CULPA","description":"Id aut illo debitis ut repellendus nulla ab. Sit eaque rerum molestiae rem porro et. Perspiciatis et molestiae officia consequuntur vitae nesciunt.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/RECUSANDAE_QUIBUSDAM_UT_CULPA","meta":{}}}}],"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"array","example":[{"id":"AD_LABORUM_ADIPISCI_DISTINCTIO","type":"experiments","attributes":{"id":1,"team_id":1,"key":"AD_LABORUM_ADIPISCI_DISTINCTIO","description":"Delectus dolores dolor dolor quia natus placeat quidem. Repellat ab aspernatur impedit. Molestiae dolorum et labore et. Recusandae voluptas unde enim necessitatibus fuga optio enim dolor.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/AD_LABORUM_ADIPISCI_DISTINCTIO","meta":[]}}},{"id":"RECUSANDAE_QUIBUSDAM_UT_CULPA","type":"experiments","attributes":{"id":2,"team_id":3,"key":"RECUSANDAE_QUIBUSDAM_UT_CULPA","description":"Id aut illo debitis ut repellendus nulla ab. Sit eaque rerum molestiae rem porro et. Perspiciatis et molestiae officia consequuntur vitae nesciunt.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/RECUSANDAE_QUIBUSDAM_UT_CULPA","meta":[]}}}],"items":{"type":"object","properties":{"id":{"type":"string","example":"AD_LABORUM_ADIPISCI_DISTINCTIO"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"AD_LABORUM_ADIPISCI_DISTINCTIO"},"description":{"type":"string","example":"Delectus dolores dolor dolor quia natus placeat quidem. Repellat ab aspernatur impedit. Molestiae dolorum et labore et. Recusandae voluptas unde enim necessitatibus fuga optio enim dolor."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/AD_LABORUM_ADIPISCI_DISTINCTIO"},"meta":{"type":"object","properties":[]}}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Experiments"]},"post":{"summary":"Create Experiment.","operationId":"createExperiment","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"AUT_DOLOR_MINUS_NOSTRUM","type":"experiments","attributes":{"id":1,"team_id":1,"key":"AUT_DOLOR_MINUS_NOSTRUM","description":"Non laboriosam ducimus vero non ex quia. Quam nesciunt id ut ut repellendus tenetur. Fugiat placeat vitae qui est perferendis quidem. Ipsa nulla ducimus sit quod tempore.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/AUT_DOLOR_MINUS_NOSTRUM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"AUT_DOLOR_MINUS_NOSTRUM"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"AUT_DOLOR_MINUS_NOSTRUM"},"description":{"type":"string","example":"Non laboriosam ducimus vero non ex quia. Quam nesciunt id ut ut repellendus tenetur. Fugiat placeat vitae qui est perferendis quidem. Ipsa nulla ducimus sit quod tempore."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/AUT_DOLOR_MINUS_NOSTRUM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"402":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Subscription required."},"properties":{"message":{"type":"string","example":"Subscription required."}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Experiments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the experiment. Must match the regex /^[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.","example":"REGISTER_OR_SIGNUP"},"description":{"type":"string","description":"The description of the experiment.","example":"Illo quo dolor esse sequi velit perspiciatis quos."},"event_key":{"type":"string","description":"The key of the event to track the experiment against.","example":"REGISTERED"}},"required":["key","event_key"]}}}}},"parameters":[{"in":"path","name":"team","description":"The ID of the team to list experiments in.","example":3,"required":true,"schema":{"type":"integer"}}]},"/api/teams/{team}/experiments/{experiment}":{"get":{"summary":"Get Experiment.","operationId":"getExperiment","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"event,team,variants","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"event,team,variants"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"AUT_UT_NESCIUNT_ALIQUAM","type":"experiments","attributes":{"id":1,"team_id":1,"key":"AUT_UT_NESCIUNT_ALIQUAM","description":"Non deserunt repellat nihil magnam aperiam. Similique placeat vitae et consequatur dolorum voluptatem. Neque natus voluptas illum quidem repudiandae porro numquam. Ea suscipit adipisci laborum similique dolor molestiae repellat quam.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/AUT_UT_NESCIUNT_ALIQUAM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"AUT_UT_NESCIUNT_ALIQUAM"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"AUT_UT_NESCIUNT_ALIQUAM"},"description":{"type":"string","example":"Non deserunt repellat nihil magnam aperiam. Similique placeat vitae et consequatur dolorum voluptatem. Neque natus voluptas illum quidem repudiandae porro numquam. Ea suscipit adipisci laborum similique dolor molestiae repellat quam."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/AUT_UT_NESCIUNT_ALIQUAM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Experiments"]},"put":{"summary":"Update Experiment.","operationId":"updateExperiment","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"DELECTUS_QUI_DOLORES_IPSAM","type":"experiments","attributes":{"id":1,"team_id":1,"key":"DELECTUS_QUI_DOLORES_IPSAM","description":"Quo dolore quae suscipit libero. Non deleniti esse tenetur voluptate quia voluptatem aliquam et. Quia et aut aut.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/DELECTUS_QUI_DOLORES_IPSAM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"DELECTUS_QUI_DOLORES_IPSAM"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"DELECTUS_QUI_DOLORES_IPSAM"},"description":{"type":"string","example":"Quo dolore quae suscipit libero. Non deleniti esse tenetur voluptate quia voluptatem aliquam et. Quia et aut aut."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/DELECTUS_QUI_DOLORES_IPSAM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Experiments"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the experiment.","example":"REGISTER_OR_SIGNUP"},"description":{"type":"string","description":"The description of the experiment.","example":"Reprehenderit nemo vitae et aut nostrum tempore."},"algorithm_type":{"type":"string","description":"The algorithm to use for enrolling participants. Must be one of \u003ccode\u003eblockRandomization\u003c/code\u003e, \u003ccode\u003eweightedSample\u003c/code\u003e, or \u003ccode\u003ewhiplash\u003c/code\u003e.","example":"whiplash"},"event_key":{"type":"string","description":"The key of the event to track the experiment against.","example":"REGISTERED"}}}}}}},"delete":{"summary":"Delete Experiment.","operationId":"deleteExperiment","description":"\u003e warn\n\u003e Deleting Experiment is permanent and cannot be undone.\n\u003e All collected data and metrics regarding this experiment will be lost.","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Experiments"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the experiment belongs to.","example":11,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"experiment","description":"The experiment key to show.","example":"MY_NEW_EXPERIMENT","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/experiments/{experiment}/start":{"post":{"summary":"Start Experiment.","operationId":"startExperiment","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"NULLA_IPSUM_DELENITI_AUT","type":"experiments","attributes":{"id":1,"team_id":1,"key":"NULLA_IPSUM_DELENITI_AUT","description":"Sequi in suscipit quam dicta molestiae. Animi recusandae amet sed veniam. Dolorem laboriosam quo vero optio quo aut sint. Voluptate rerum odit ullam.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/NULLA_IPSUM_DELENITI_AUT","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"NULLA_IPSUM_DELENITI_AUT"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"NULLA_IPSUM_DELENITI_AUT"},"description":{"type":"string","example":"Sequi in suscipit quam dicta molestiae. Animi recusandae amet sed veniam. Dolorem laboriosam quo vero optio quo aut sint. Voluptate rerum odit ullam."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/NULLA_IPSUM_DELENITI_AUT"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Experiments"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the experiment belongs to.","example":19,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"experiment","description":"The experiment key to start.","example":"MY_NEW_EXPERIMENT","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/experiments/{experiment}/stop":{"post":{"summary":"Stop Experiment.","operationId":"stopExperiment","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"POSSIMUS_EST_NIHIL_PARIATUR","type":"experiments","attributes":{"id":1,"team_id":1,"key":"POSSIMUS_EST_NIHIL_PARIATUR","description":"Rerum nisi cum molestias rerum. Sit voluptate eos amet autem tenetur est. Dolore non cum et a unde.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/POSSIMUS_EST_NIHIL_PARIATUR","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"POSSIMUS_EST_NIHIL_PARIATUR"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"POSSIMUS_EST_NIHIL_PARIATUR"},"description":{"type":"string","example":"Rerum nisi cum molestias rerum. Sit voluptate eos amet autem tenetur est. Dolore non cum et a unde."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/POSSIMUS_EST_NIHIL_PARIATUR"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Experiments"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the experiment belongs to.","example":14,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"experiment","description":"The experiment key to stop.","example":"MY_NEW_EXPERIMENT","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/experiments/{experiment}/variants":{"get":{"summary":"List Variants.","operationId":"listVariants","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"experiment,team","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"experiment,team"}},{"in":"query","name":"per_page","description":"The number of results to paginate by. Defaults to 15.","example":14,"required":false,"schema":{"type":"integer","description":"The number of results to paginate by. Defaults to 15.","example":14}},{"in":"query","name":"sort","description":"Field to sort by. Defaults to 'id'.","example":"dolorum","required":false,"schema":{"type":"string","description":"Field to sort by. Defaults to 'id'.","example":"dolorum"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":[{"id":"MAXIME_QUIA_ILLO_RERUM","type":"variants","attributes":{"id":1,"team_id":3,"key":"MAXIME_QUIA_ILLO_RERUM","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/ID_ARCHITECTO_AUT_NON/variants/MAXIME_QUIA_ILLO_RERUM","meta":{}}}},{"id":"NEQUE_NIHIL_NOBIS_ASPERNATUR","type":"variants","attributes":{"id":2,"team_id":6,"key":"NEQUE_NIHIL_NOBIS_ASPERNATUR","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/6/experiments/DOLORUM_SIMILIQUE_QUO_VOLUPTATUM/variants/NEQUE_NIHIL_NOBIS_ASPERNATUR","meta":{}}}}],"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"array","example":[{"id":"MAXIME_QUIA_ILLO_RERUM","type":"variants","attributes":{"id":1,"team_id":3,"key":"MAXIME_QUIA_ILLO_RERUM","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/ID_ARCHITECTO_AUT_NON/variants/MAXIME_QUIA_ILLO_RERUM","meta":[]}}},{"id":"NEQUE_NIHIL_NOBIS_ASPERNATUR","type":"variants","attributes":{"id":2,"team_id":6,"key":"NEQUE_NIHIL_NOBIS_ASPERNATUR","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/6/experiments/DOLORUM_SIMILIQUE_QUO_VOLUPTATUM/variants/NEQUE_NIHIL_NOBIS_ASPERNATUR","meta":[]}}}],"items":{"type":"object","properties":{"id":{"type":"string","example":"MAXIME_QUIA_ILLO_RERUM"},"type":{"type":"string","example":"variants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":3},"key":{"type":"string","example":"MAXIME_QUIA_ILLO_RERUM"},"control":{"type":"boolean","example":false},"traffic":{"type":"string","example":null},"conversion_rate":{"type":"string","example":null},"z_score":{"type":"integer","example":0},"confidence_level":{"type":"integer","example":0},"winner_percent":{"type":"integer","example":0},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/3/experiments/ID_ARCHITECTO_AUT_NON/variants/MAXIME_QUIA_ILLO_RERUM"},"meta":{"type":"object","properties":[]}}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Variants"]},"post":{"summary":"Create Variant.","operationId":"createVariant","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"QUASI_FUGIT_ASPERIORES_DOLOREM","type":"variants","attributes":{"id":1,"team_id":3,"key":"QUASI_FUGIT_ASPERIORES_DOLOREM","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/NON_ODIT_FACERE_MOLESTIAE/variants/QUASI_FUGIT_ASPERIORES_DOLOREM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"QUASI_FUGIT_ASPERIORES_DOLOREM"},"type":{"type":"string","example":"variants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":3},"key":{"type":"string","example":"QUASI_FUGIT_ASPERIORES_DOLOREM"},"control":{"type":"boolean","example":false},"traffic":{"type":"string","example":null},"conversion_rate":{"type":"string","example":null},"z_score":{"type":"integer","example":0},"confidence_level":{"type":"integer","example":0},"winner_percent":{"type":"integer","example":0},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/3/experiments/NON_ODIT_FACERE_MOLESTIAE/variants/QUASI_FUGIT_ASPERIORES_DOLOREM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"402":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Subscription required."},"properties":{"message":{"type":"string","example":"Subscription required."}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Variants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the variant. Must match the regex /^[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.","example":"VARIANT_A"},"control":{"type":"boolean","description":"Whether the variant is the control.","example":true},"description":{"type":"string","description":"The description of the variant.","example":"Ut incidunt dignissimos id est."},"traffic":{"type":"string","description":"The amount of traffic the variant should receive. This is only needed if the experiment is using Weighted Variants. Must be at least 0 characters. Must not be greater than 100 characters.","example":50}},"required":["key"]}}}}},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the variant belongs to.","example":12,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"experiment","description":"The experiment key that the variants belong to.","example":"aut","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/experiments/{experiment}/variants/{variant}":{"get":{"summary":"Get Variant.","operationId":"getVariant","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"experiment,team","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"experiment,team"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"AUT_NEMO_QUI_ENIM","type":"variants","attributes":{"id":1,"team_id":3,"key":"AUT_NEMO_QUI_ENIM","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/OPTIO_CUMQUE_QUIA_EA/variants/AUT_NEMO_QUI_ENIM","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"AUT_NEMO_QUI_ENIM"},"type":{"type":"string","example":"variants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":3},"key":{"type":"string","example":"AUT_NEMO_QUI_ENIM"},"control":{"type":"boolean","example":false},"traffic":{"type":"string","example":null},"conversion_rate":{"type":"string","example":null},"z_score":{"type":"integer","example":0},"confidence_level":{"type":"integer","example":0},"winner_percent":{"type":"integer","example":0},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/3/experiments/OPTIO_CUMQUE_QUIA_EA/variants/AUT_NEMO_QUI_ENIM"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Variants"]},"put":{"summary":"Update Variant.","operationId":"updateVariant","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"OFFICIIS_NOSTRUM_ET_ET","type":"variants","attributes":{"id":1,"team_id":3,"key":"OFFICIIS_NOSTRUM_ET_ET","control":false,"traffic":null,"conversion_rate":null,"z_score":0,"confidence_level":0,"winner_percent":0,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/AUT_ASPERNATUR_QUI_OFFICIA/variants/OFFICIIS_NOSTRUM_ET_ET","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"OFFICIIS_NOSTRUM_ET_ET"},"type":{"type":"string","example":"variants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":3},"key":{"type":"string","example":"OFFICIIS_NOSTRUM_ET_ET"},"control":{"type":"boolean","example":false},"traffic":{"type":"string","example":null},"conversion_rate":{"type":"string","example":null},"z_score":{"type":"integer","example":0},"confidence_level":{"type":"integer","example":0},"winner_percent":{"type":"integer","example":0},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/3/experiments/AUT_ASPERNATUR_QUI_OFFICIA/variants/OFFICIIS_NOSTRUM_ET_ET"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Variants"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the variant. Must not be greater than 255 characters.","example":"VARIANT_A"},"control":{"type":"boolean","description":"Whether the variant is the control.","example":false},"description":{"type":"string","description":"The description of the variant.","example":"Repellat recusandae hic aut quisquam molestiae aut."},"traffic":{"type":"string","description":"The amount of traffic the variant should receive. This is only needed if the experiment is using Weighted Variants.","example":50}}}}}}},"delete":{"summary":"Delete Variant.","operationId":"deleteVariant","description":"\u003e warn\n\u003e Deleting a variant is permanent and cannot be undone.","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Variants"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the variant belongs to.","example":16,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"experiment","description":"The experiment key that the variants belong to.","example":"quasi","required":true,"schema":{"type":"string"}},{"in":"path","name":"variant","description":"The variant key to show.","example":"rerum","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/participants":{"get":{"summary":"List Participants.","operationId":"listParticipants","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"experiments,team","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"experiments,team"}},{"in":"query","name":"per_page","description":"The number of results to paginate by. Defaults to 15.","example":18,"required":false,"schema":{"type":"integer","description":"The number of results to paginate by. Defaults to 15.","example":18}},{"in":"query","name":"sort","description":"Field to sort by. Defaults to 'id'.","example":"vel","required":false,"schema":{"type":"string","description":"Field to sort by. Defaults to 'id'.","example":"vel"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":[{"id":"EOS_REPELLAT_ENIM_QUAM","type":"participants","attributes":{"id":1,"team_id":1,"key":"EOS_REPELLAT_ENIM_QUAM","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/participants/EOS_REPELLAT_ENIM_QUAM","meta":{}}}},{"id":"RECUSANDAE_RERUM_ET_IPSAM","type":"participants","attributes":{"id":2,"team_id":2,"key":"RECUSANDAE_RERUM_ET_IPSAM","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/2/participants/RECUSANDAE_RERUM_ET_IPSAM","meta":{}}}}],"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"array","example":[{"id":"EOS_REPELLAT_ENIM_QUAM","type":"participants","attributes":{"id":1,"team_id":1,"key":"EOS_REPELLAT_ENIM_QUAM","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/1/participants/EOS_REPELLAT_ENIM_QUAM","meta":[]}}},{"id":"RECUSANDAE_RERUM_ET_IPSAM","type":"participants","attributes":{"id":2,"team_id":2,"key":"RECUSANDAE_RERUM_ET_IPSAM","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/2/participants/RECUSANDAE_RERUM_ET_IPSAM","meta":[]}}}],"items":{"type":"object","properties":{"id":{"type":"string","example":"EOS_REPELLAT_ENIM_QUAM"},"type":{"type":"string","example":"participants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"EOS_REPELLAT_ENIM_QUAM"},"notes":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/participants/EOS_REPELLAT_ENIM_QUAM"},"meta":{"type":"object","properties":[]}}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Participants"]},"post":{"summary":"Create Participant.","operationId":"createParticipant","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"ALIQUAM_QUIBUSDAM_ET_OPTIO","type":"participants","attributes":{"id":1,"team_id":1,"key":"ALIQUAM_QUIBUSDAM_ET_OPTIO","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/participants/ALIQUAM_QUIBUSDAM_ET_OPTIO","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"ALIQUAM_QUIBUSDAM_ET_OPTIO"},"type":{"type":"string","example":"participants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"ALIQUAM_QUIBUSDAM_ET_OPTIO"},"notes":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/participants/ALIQUAM_QUIBUSDAM_ET_OPTIO"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"201":{"description":"when participant created","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"jbrooksuk","type":"participant","attributes":{"id":1,"team_id":4,"key":"jbrooksuk","experiment_count":0,"created":{"human":"6 minutes ago","string":"2021-11-02 21:43:28"},"updated":{"human":"6 minutes ago","string":"2021-11-02 21:43:28"}},"relationships":[],"links":{"self":"https://prove.dev/api/teams/1/participants/jbrooksuk"}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"jbrooksuk"},"type":{"type":"string","example":"participant"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":4},"key":{"type":"string","example":"jbrooksuk"},"experiment_count":{"type":"integer","example":0},"created":{"type":"object","properties":{"human":{"type":"string","example":"6 minutes ago"},"string":{"type":"string","example":"2021-11-02 21:43:28"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"6 minutes ago"},"string":{"type":"string","example":"2021-11-02 21:43:28"}}}}},"relationships":{"type":"array","example":[]},"links":{"type":"object","properties":{"self":{"type":"string","example":"https://prove.dev/api/teams/1/participants/jbrooksuk"}}}}}}}}}},"402":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Subscription required."},"properties":{"message":{"type":"string","example":"Subscription required."}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Participants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the participant. Must match the regex /^[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.","example":"jbrooksuk"},"notes":{"type":"string","description":"Notes about the participant.","example":"nihil"}},"required":["key"]}}}}},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the participants belong to.","example":11,"required":true,"schema":{"type":"integer"}}]},"/api/teams/{team}/participants/{participant}":{"get":{"summary":"Get Participant.","operationId":"getParticipant","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"experiments,team","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"experiments,team"}},{"in":"query","name":"per_page","description":"The number of results to paginate by. Defaults to 15.","example":6,"required":false,"schema":{"type":"integer","description":"The number of results to paginate by. Defaults to 15.","example":6}},{"in":"query","name":"sort","description":"Field to sort by. Defaults to 'id'.","example":"harum","required":false,"schema":{"type":"string","description":"Field to sort by. Defaults to 'id'.","example":"harum"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"SIT_ODIT_VELIT_AT","type":"participants","attributes":{"id":1,"team_id":1,"key":"SIT_ODIT_VELIT_AT","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/participants/SIT_ODIT_VELIT_AT","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"SIT_ODIT_VELIT_AT"},"type":{"type":"string","example":"participants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"SIT_ODIT_VELIT_AT"},"notes":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/participants/SIT_ODIT_VELIT_AT"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Participants"]},"put":{"summary":"Update Participant.","operationId":"updateParticipant","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"QUASI_DICTA_TEMPORE_ERROR","type":"participants","attributes":{"id":1,"team_id":1,"key":"QUASI_DICTA_TEMPORE_ERROR","notes":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/participants/QUASI_DICTA_TEMPORE_ERROR","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"QUASI_DICTA_TEMPORE_ERROR"},"type":{"type":"string","example":"participants"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"QUASI_DICTA_TEMPORE_ERROR"},"notes":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/participants/QUASI_DICTA_TEMPORE_ERROR"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}},"422":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"The given data was invalid.","errors":{"key":["The key has already been taken."]}},"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","properties":{"key":{"type":"array","example":["The key has already been taken."],"items":{"type":"string"}}}}}}}}}},"tags":["Participants"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key to use for the participant. Must match the regex /^[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.","example":"jbrooksuk"},"notes":{"type":"string","description":"Notes about the participant.","example":"ratione"}}}}}}},"delete":{"summary":"Delete Participant.","operationId":"deleteParticipant","description":"\u003e warn\n\u003e Deleting a participant is permanent and cannot be undone.","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Participants"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team that the participant belongs to.","example":12,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"participant","description":"The key of the participant.","example":"perspiciatis","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/participants/{participant}/experiments":{"get":{"summary":"List Participant's Experiments.","operationId":"listParticipantsExperiments","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"team,variants","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"team,variants"}},{"in":"query","name":"per_page","description":"The number of results to paginate by. Defaults to 15.","example":16,"required":false,"schema":{"type":"integer","description":"The number of results to paginate by. Defaults to 15.","example":16}},{"in":"query","name":"sort","description":"Field to sort by. Defaults to 'id'.","example":"doloribus","required":false,"schema":{"type":"string","description":"Field to sort by. Defaults to 'id'.","example":"doloribus"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":[{"id":"EOS_SUNT_PORRO_OFFICIIS","type":"experiments","attributes":{"id":1,"team_id":1,"key":"EOS_SUNT_PORRO_OFFICIIS","description":"Commodi odit maiores et et. Nulla voluptatibus asperiores necessitatibus velit maxime qui sequi. Reiciendis delectus nulla qui quod culpa.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/EOS_SUNT_PORRO_OFFICIIS","meta":{}}}},{"id":"DELECTUS_SUNT_VOLUPTATES_EA","type":"experiments","attributes":{"id":2,"team_id":3,"key":"DELECTUS_SUNT_VOLUPTATES_EA","description":"Fuga alias ut ut aut voluptas perspiciatis vitae. Praesentium ipsa molestiae sit earum rerum consectetur magnam. Quia voluptates ad cumque delectus.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/DELECTUS_SUNT_VOLUPTATES_EA","meta":{}}}}],"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"array","example":[{"id":"EOS_SUNT_PORRO_OFFICIIS","type":"experiments","attributes":{"id":1,"team_id":1,"key":"EOS_SUNT_PORRO_OFFICIIS","description":"Commodi odit maiores et et. Nulla voluptatibus asperiores necessitatibus velit maxime qui sequi. Reiciendis delectus nulla qui quod culpa.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/EOS_SUNT_PORRO_OFFICIIS","meta":[]}}},{"id":"DELECTUS_SUNT_VOLUPTATES_EA","type":"experiments","attributes":{"id":2,"team_id":3,"key":"DELECTUS_SUNT_VOLUPTATES_EA","description":"Fuga alias ut ut aut voluptas perspiciatis vitae. Praesentium ipsa molestiae sit earum rerum consectetur magnam. Quia voluptates ad cumque delectus.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/3/experiments/DELECTUS_SUNT_VOLUPTATES_EA","meta":[]}}}],"items":{"type":"object","properties":{"id":{"type":"string","example":"EOS_SUNT_PORRO_OFFICIIS"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"EOS_SUNT_PORRO_OFFICIIS"},"description":{"type":"string","example":"Commodi odit maiores et et. Nulla voluptatibus asperiores necessitatibus velit maxime qui sequi. Reiciendis delectus nulla qui quod culpa."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/EOS_SUNT_PORRO_OFFICIIS"},"meta":{"type":"object","properties":[]}}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Participants"]},"parameters":[{"in":"path","name":"team","description":"The team.","example":7,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"participant","description":"The participant.","example":"perferendis","required":true,"schema":{"type":"string"}}]},"/api/teams/{team}/participants/{participant}/experiments/{experiment}":{"get":{"summary":"Get Participant's Experiment.","operationId":"getParticipantsExperiment","description":"","parameters":[{"in":"query","name":"include","description":"Comma-separated list of relationships to include in the response.","example":"team","required":false,"schema":{"type":"string","description":"Comma-separated list of relationships to include in the response.","example":"team"}},{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"NISI_ET_INVENTORE_QUI","type":"experiments","attributes":{"id":1,"team_id":1,"key":"NISI_ET_INVENTORE_QUI","description":"Debitis asperiores totam placeat. Illum ab delectus consequatur sed aliquam ipsum. Voluptatem aut ad qui dolores.","status":"draft","created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"started":{"human":null,"string":null},"stopped":{"human":null,"string":null}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1/experiments/NISI_ET_INVENTORE_QUI","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"NISI_ET_INVENTORE_QUI"},"type":{"type":"string","example":"experiments"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"team_id":{"type":"integer","example":1},"key":{"type":"string","example":"NISI_ET_INVENTORE_QUI"},"description":{"type":"string","example":"Debitis asperiores totam placeat. Illum ab delectus consequatur sed aliquam ipsum. Voluptatem aut ad qui dolores."},"status":{"type":"string","example":"draft"},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"started":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}},"stopped":{"type":"object","properties":{"human":{"type":"string","example":null},"string":{"type":"string","example":null}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/NISI_ET_INVENTORE_QUI"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Participants"]},"delete":{"summary":"Unenrol From Experiment.","operationId":"unenrolFromExperiment","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Participants"]},"parameters":[{"in":"path","name":"team","description":"The team.","example":10,"required":true,"schema":{"type":"integer"}},{"in":"path","name":"participant","description":"The participant.","example":"vitae","required":true,"schema":{"type":"string"}},{"in":"path","name":"experiment","description":"The experiment.","example":"labore","required":true,"schema":{"type":"string"}}]},"/api/user":{"get":{"summary":"Get Account.","operationId":"getAccount","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"1","type":"users","attributes":{"name":"Bulah Ernser","email":"kling.vladimir@example.com"},"relationships":{},"meta":{},"links":{}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"1"},"type":{"type":"string","example":"users"},"attributes":{"type":"object","properties":{"name":{"type":"string","example":"Bulah Ernser"},"email":{"type":"string","example":"kling.vladimir@example.com"}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":[]}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}}},"tags":["Users"]}},"/api/teams":{"get":{"summary":"List Teams.","operationId":"listTeams","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":[{"id":"1","type":"teams","attributes":{"id":1,"name":"Langosh, Romaguera and Gerhold","events_count":null,"experiments_count":null,"participants_count":null,"is_free":false,"api_requests":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1","meta":{}}}},{"id":"2","type":"teams","attributes":{"id":2,"name":"Luettgen-Ratke","events_count":null,"experiments_count":null,"participants_count":null,"is_free":false,"api_requests":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/2","meta":{}}}}],"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"array","example":[{"id":"1","type":"teams","attributes":{"id":1,"name":"Langosh, Romaguera and Gerhold","events_count":null,"experiments_count":null,"participants_count":null,"is_free":false,"api_requests":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/1","meta":[]}}},{"id":"2","type":"teams","attributes":{"id":2,"name":"Luettgen-Ratke","events_count":null,"experiments_count":null,"participants_count":null,"is_free":false,"api_requests":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":[],"meta":[],"links":{"self":{"href":"http://checkmango.com/api/teams/2","meta":[]}}}],"items":{"type":"object","properties":{"id":{"type":"string","example":"1"},"type":{"type":"string","example":"teams"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Langosh, Romaguera and Gerhold"},"events_count":{"type":"string","example":null},"experiments_count":{"type":"string","example":null},"participants_count":{"type":"string","example":null},"is_free":{"type":"boolean","example":false},"api_requests":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1"},"meta":{"type":"object","properties":[]}}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Teams"]}},"/api/teams/{team}":{"get":{"summary":"Get Team.","operationId":"getTeam","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"1","type":"teams","attributes":{"id":1,"name":"Schamberger, Cassin and Nitzsche","events_count":null,"experiments_count":null,"participants_count":null,"is_free":false,"api_requests":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"1"},"type":{"type":"string","example":"teams"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Schamberger, Cassin and Nitzsche"},"events_count":{"type":"string","example":null},"experiments_count":{"type":"string","example":null},"participants_count":{"type":"string","example":null},"is_free":{"type":"boolean","example":false},"api_requests":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Teams"]},"parameters":[{"in":"path","name":"team","description":"The ID of the team to show.","example":9,"required":true,"schema":{"type":"integer"}}]},"/api/teams/{team}/config":{"get":{"summary":"Get Team Config.","operationId":"getTeamConfig","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"1","type":"team_config","attributes":{"team_id":1,"experiments":{"INCIDUNT_IUSTO_ET_ET":{"endpoint":"http://checkmango.com/api/teams/1/experiments/INCIDUNT_IUSTO_ET_ET","algorithm":"blockRandomization","status":"draft","variant_count":1,"total_participants":0,"timeline":{"created_at":"2023-08-08T11:11:53.000000Z","updated_at":"2023-08-08T11:11:53.000000Z","started_at":null,"stopped_at":null},"variants":{"SED_ALIQUAM_DOLORUM_DOLORES":{"control":false,"participants":0,"impressions":0,"conversions":0}}}}},"relationships":{},"meta":{},"links":{}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"1"},"type":{"type":"string","example":"team_config"},"attributes":{"type":"object","properties":{"team_id":{"type":"integer","example":1},"experiments":{"type":"object","properties":{"INCIDUNT_IUSTO_ET_ET":{"type":"object","properties":{"endpoint":{"type":"string","example":"http://checkmango.com/api/teams/1/experiments/INCIDUNT_IUSTO_ET_ET"},"algorithm":{"type":"string","example":"blockRandomization"},"status":{"type":"string","example":"draft"},"variant_count":{"type":"integer","example":1},"total_participants":{"type":"integer","example":0},"timeline":{"type":"object","properties":{"created_at":{"type":"string","example":"2023-08-08T11:11:53.000000Z"},"updated_at":{"type":"string","example":"2023-08-08T11:11:53.000000Z"},"started_at":{"type":"string","example":null},"stopped_at":{"type":"string","example":null}}},"variants":{"type":"object","properties":{"SED_ALIQUAM_DOLORUM_DOLORES":{"type":"object","properties":{"control":{"type":"boolean","example":false},"participants":{"type":"integer","example":0},"impressions":{"type":"integer","example":0},"conversions":{"type":"integer","example":0}}}}}}}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":[]}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}}},"tags":["Teams"]},"parameters":[{"in":"path","name":"team","description":"The team.","example":3,"required":true,"schema":{"type":"integer"}}]},"/api/current-team":{"get":{"summary":"Get Current Team.","operationId":"getCurrentTeam","description":"","parameters":[{"in":"header","name":"Authorization","description":"","example":"Bearer {YOUR_AUTH_KEY}","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"data":{"id":"1","type":"teams","attributes":{"id":1,"name":"Jones, Becker and Bechtelar","events_count":null,"experiments_count":null,"participants_count":null,"is_free":false,"api_requests":null,"created":{"human":"1 second ago","string":"2023-08-08 11:11:53"},"updated":{"human":"1 second ago","string":"2023-08-08 11:11:53"}},"relationships":{},"meta":{},"links":{"self":{"href":"http://checkmango.com/api/teams/1","meta":{}}}},"included":[],"jsonapi":{"version":"1.0","meta":{}}},"properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"1"},"type":{"type":"string","example":"teams"},"attributes":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Jones, Becker and Bechtelar"},"events_count":{"type":"string","example":null},"experiments_count":{"type":"string","example":null},"participants_count":{"type":"string","example":null},"is_free":{"type":"boolean","example":false},"api_requests":{"type":"string","example":null},"created":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}},"updated":{"type":"object","properties":{"human":{"type":"string","example":"1 second ago"},"string":{"type":"string","example":"2023-08-08 11:11:53"}}}}},"relationships":{"type":"object","properties":[]},"meta":{"type":"object","properties":[]},"links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","example":"http://checkmango.com/api/teams/1"},"meta":{"type":"object","properties":[]}}}}}}},"included":{"type":"array","example":[]},"jsonapi":{"type":"object","properties":{"version":{"type":"string","example":"1.0"},"meta":{"type":"object","properties":[]}}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Unauthenticated."},"properties":{"message":{"type":"string","example":"Unauthenticated."}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"message":"Not Found"},"properties":{"message":{"type":"string","example":"Not Found"}}}}}}},"tags":["Teams"]}},"/api/health":{"get":{"summary":"Health.","operationId":"health","description":"","parameters":[],"responses":{},"tags":["Health"],"security":[]}}},"tags":[{"name":"Ingestion","description":""},{"name":"Events","description":""},{"name":"Experiments","description":""},{"name":"Variants","description":""},{"name":"Participants","description":""},{"name":"Users","description":""},{"name":"Teams","description":""},{"name":"Health","description":""}],"components":{"securitySchemes":{"default":{"type":"http","scheme":"bearer","description":""}}},"security":[{"default":[]}],"x-topics":[{"title":"Rate Limits","content":"We limit API requests to 2,000 requests per hour. If you need an increased rate limit, please contact us."},{"title":"Checkmango Documentation","content":"This webpage refers to Checkmango's API documentation. If you're looking for documentation on Checkmango, you should visit the [Documentation](https://docs.checkmango.com)."},{"title":"Troubleshooting","content":"If you run into any problems using Checkmango's API, please do not hesitate to contact our support team at support@checkmango.com."}]} \ No newline at end of file diff --git a/tests/Samples/kassalapp.json b/tests/Samples/kassalapp.json new file mode 100644 index 0000000..c6c4dd2 --- /dev/null +++ b/tests/Samples/kassalapp.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"Kassalapp","version":"0.0.1","description":"This API documentation is meant to be used by OpenAI ChatGPT."},"servers":[{"url":"https:\/\/kassal.app\/api\/v1"}],"security":[{"http":[]}],"paths":{"\/health":{"get":{"operationId":"healthCheck","summary":"Checks if the Kassalapp API is working","tags":["HealthCheck"],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"The string \"Healthy\""}},"required":["status"]}}}}}}},"\/physical-stores":{"get":{"operationId":"searchPhysicalStores","description":"Useful for finding a grocery store by name, location or based on the group (grocery store chain), returns name, address, contact information and opening hours for each store.","summary":"Search for physical stores","tags":["PhysicalStore"],"parameters":[{"name":"group","in":"query","description":"Filter by group name.","schema":{"type":["string","null"],"enum":["MENY_NO","SPAR_NO","JOKER_NO","ODA_NO","ENGROSSNETT_NO","NAERBUTIKKEN","BUNNPRIS","KIWI","REMA_1000","EUROPRIS_NO","HAVARISTEN","HOLDBART","FUDI","COOP_NO","COOP_MARKED","MATKROKEN","COOP_MEGA","COOP_PRIX","COOP_OBS","COOP_EXTRA","COOP_BYGGMIX","COOP_OBS_BYGG","COOP_ELEKTRO","ARK","NORLI","ADLIBRIS"]},"example":"BUNNPRIS"},{"name":"search","in":"query","description":"Perform a search based on a keyword.","schema":{"type":["string","null"]},"example":"land\u00e5s"},{"name":"lat","in":"query","description":"Latitude coordinate for proximity search.","schema":{"type":["number","null"]}},{"name":"lng","in":"query","description":"Longitude coordinate for proximity search.","schema":{"type":["number","null"]}},{"name":"km","in":"query","description":"Search radius in kilometers for proximity search.","schema":{"type":["number","null"]}},{"name":"size","in":"query","description":"The number of results to be displayed per page. Must be an integer between 1 and 100.","schema":{"type":["integer","null"],"minimum":1,"maximum":100}}],"responses":{"200":{"description":"Array of `PhysicalStoreResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PhysicalStoreResource"}}},"required":["data"]}}}},"422":{"$ref":"#\/components\/responses\/ValidationException"},"403":{"$ref":"#\/components\/responses\/AuthorizationException"}}}},"\/physical-stores\/{physicalStore}":{"get":{"operationId":"findPhysicalStoreById","description":"Finds a grocery store by ID. returns name, address, contact information and opening hours for the store store.","summary":"Find physical store by ID","tags":["PhysicalStore"],"parameters":[{"name":"physicalStore","in":"path","required":true,"description":"The physical store ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"`PhysicalStoreResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/PhysicalStoreResource"}},"required":["data"]}}}},"404":{"$ref":"#\/components\/responses\/ModelNotFoundException"}}}},"\/products":{"get":{"operationId":"searchProducts","description":"Useful for searching for groceries and various product to find the price, ingredients and nutritional information","summary":"Search for products","tags":["Product"],"parameters":[{"name":"brand","in":"query","description":"Filter products by brand name.","schema":{"type":["string","null"]},"example":"BAMA"},{"name":"vendor","in":"query","description":"Filter products by vendor (leverand\u00f8r).","schema":{"type":["string","null"]},"example":"orkla foods"},{"name":"price_min","in":"query","description":"Filter products by minimum price.","schema":{"type":["number","null"]}},{"name":"price_max","in":"query","description":"Filter products by maximum price.","schema":{"type":["number","null"]}},{"name":"sort","in":"query","description":"Sort the products by a specific criteria. Available options: date_asc, date_desc, name_asc, name_desc, price_asc, price_desc.","schema":{"type":["string","null"],"enum":["date_asc","date_desc","name_asc","name_desc","price_asc","price_desc"]}},{"name":"search","in":"query","description":"Search for products based on a keyword. The keyword must be a string with a minimum length of 3 characters.","schema":{"type":["string","null"]}},{"name":"size","in":"query","description":"The number of products to be displayed per page. Must be an integer between 1 and 100.","schema":{"type":["integer","null"],"minimum":1,"maximum":100}},{"name":"unique","in":"query","description":"If true, the product list will be collapsed based on the EAN number of the product; in practice, set this to true if you don't want duplicate results.","schema":{"type":["boolean","null"]}},{"name":"exclude_without_ean","in":"query","description":"If true, products without an EAN number are excluded from the results.","schema":{"type":["boolean","null"]}},{"name":"excl_allergens","in":"query","description":"Exclude specific allergens from the products. Each element must be a string.","schema":{"type":["array","null"],"items":{"type":"string"}}},{"name":"incl_allergens","in":"query","description":"Include only specific allergens in the products. Each element must be a string.","schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Array of `ProductResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProductResource"}}},"required":["data"]}}}},"422":{"$ref":"#\/components\/responses\/ValidationException"},"403":{"$ref":"#\/components\/responses\/AuthorizationException"}}}},"\/products\/id\/{product}":{"get":{"operationId":"findProductById","description":"Gets a specific product by id, returns the product price, nutritional information, ingredients, allergens for the product.","summary":"Lookup product by ID","tags":["Product"],"parameters":[{"name":"product","in":"path","required":true,"description":"The product ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"`ProductResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ProductResource"}},"required":["data"]}}}},"404":{"$ref":"#\/components\/responses\/ModelNotFoundException"}}}},"\/products\/ean\/{ean}":{"get":{"operationId":"findProductByEanBarcode","description":"Gets a specific product by EAN (barcode) number, returns the product price, nutritional information, ingredients, allergens for the product.","summary":"Lookup product by EAN number","tags":["Product"],"parameters":[{"name":"ean","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"`ProductComparisonResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ProductComparisonResource"}},"required":["data"]}}}}}}},"\/products\/find-by-url\/single":{"get":{"operationId":"findProductByUrl","description":"Will look up product information based on an URL, returns the product price, nutritional information, ingredients, allergens for the product.","summary":"Find product info by URL","tags":["Product"],"parameters":[{"name":"url","in":"query","required":true,"description":"The url of the Product you want to get information on.","schema":{"type":"string"},"example":"https:\/\/meny.no\/varer\/middag\/pizza\/pizza\/grandiosa-pizza-7039010019811"}],"responses":{"200":{"description":"`ProductResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ProductResource"}},"required":["data"]}}}},"422":{"$ref":"#\/components\/responses\/ValidationException"}}}},"\/products\/find-by-url\/compare":{"get":{"operationId":"findProductsByUrl","description":"Will look up product information based on an URL, and return all matching prices from other stores that stock that item.","summary":"Find product price comparison info by URL","tags":["Product"],"parameters":[{"name":"url","in":"query","required":true,"description":"The url of the Product you want to get comparisons for.","schema":{"type":"string"},"example":"https:\/\/meny.no\/varer\/middag\/pizza\/pizza\/grandiosa-pizza-7039010019811"}],"responses":{"200":{"description":"`ProductComparisonResource`","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ProductComparisonResource"}},"required":["data"]}}}},"422":{"$ref":"#\/components\/responses\/ValidationException"}}}}},"components":{"securitySchemes":{"http":{"type":"http","scheme":"bearer","bearerFormat":"token"}},"schemas":{"AllergenItemResource":{"type":"object","properties":{"code":{"type":"string"},"display_name":{"type":"string"},"contains":{"type":"string","description":"contains"}},"required":["code","display_name","contains"],"title":"AllergenItemResource"},"NutritionItemResource":{"type":"object","properties":{"code":{"type":"string"},"display_name":{"type":"string"},"amount":{"type":"number"},"unit":{"type":"string"}},"required":["code","display_name","amount","unit"],"title":"NutritionItemResource"},"PhysicalStoreResource":{"type":"object","properties":{"id":{"type":"integer"},"group":{"type":["string","null"]},"name":{"type":"string"},"address":{"type":"string"},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"fax":{"type":["string","null"]},"logo":{"type":"string"},"website":{"type":["string","null"]},"detailUrl":{"type":"string"},"position":{"type":"object","properties":{"lat":{"type":["number","null"]},"lng":{"type":["number","null"]}},"required":["lat","lng"]},"openingHours":{"type":"object","properties":{"monday":{"type":["string","null"]},"tuesday":{"type":["string","null"]},"wednesday":{"type":["string","null"]},"thursday":{"type":["string","null"]},"friday":{"type":["string","null"]},"saturday":{"type":["string","null"]},"sunday":{"type":["string","null"]}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]}},"required":["id","group","name","address","phone","email","fax","logo","website","detailUrl","position","openingHours"],"title":"PhysicalStoreResource"},"ProductComparisonItemResource":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"vendor":{"type":"string"},"brand":{"type":"string"},"description":{"type":"string"},"ingredients":{"type":"string"},"url":{"type":"string"},"image":{"type":"string"},"store":{"type":"string"},"current_price":{"type":"string"},"price_history":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number"},"date":{"type":"string"}},"required":["price","date"]}},"kassalapp":{"type":"object","properties":{"url":{"type":"string"},"opengraph":{"type":"string"}},"required":["url","opengraph"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","vendor","brand","description","ingredients","url","image","store","current_price","price_history","kassalapp","created_at","updated_at"],"title":"ProductComparisonItemResource"},"ProductComparisonResource":{"type":"object","properties":{"ean":{"type":"string"},"products":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProductComparisonItemResource"}},"allergens":{"type":"array","items":{"$ref":"#\/components\/schemas\/AllergenItemResource"}},"nutrition":{"type":"array","items":{"$ref":"#\/components\/schemas\/NutritionItemResource"}}},"required":["ean","products","allergens","nutrition"],"title":"ProductComparisonResource"},"ProductResource":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"brand":{"type":["string","null"]},"vendor":{"type":["string","null"]},"ean":{"type":["string","null"]},"url":{"type":"string"},"image":{"type":["string","null"]},"description":{"type":["string","null"]},"ingredients":{"type":["string","null"]},"current_price":{"type":"string"},"store":{"type":"string"},"price_history":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number"},"date":{"type":"string"}},"required":["price","date"]}},"allergens":{"type":"array","items":{"$ref":"#\/components\/schemas\/AllergenItemResource"}},"nutrition":{"type":"array","items":{"$ref":"#\/components\/schemas\/NutritionItemResource"}},"created_at":{"type":["object","null"]},"updated_at":{"type":["object","null"]}},"required":["id","name","brand","vendor","ean","url","image","description","ingredients","current_price","store","price_history","allergens","nutrition","created_at","updated_at"],"title":"ProductResource"}},"responses":{"ValidationException":{"description":"Validation error","content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}},"AuthorizationException":{"description":"Authorization error","content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}} \ No newline at end of file