You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/03/11 12:31:36 UTC
(camel) branch main updated: Rest out (#13442)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 93387e4bc2a Rest out (#13442)
93387e4bc2a is described below
commit 93387e4bc2aafbd6b993a3d59ffc02d9bea552ad
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 11 13:31:27 2024 +0100
Rest out (#13442)
CAMEL-19284: restdsl-openapi-generator - Add type and outType to Rest DSL
---
.../apache/camel/model/rest/RestDefinition.java | 22 +
.../ROOT/pages/camel-4x-upgrade-guide-4_5.adoc | 4 +
.../dsl/jbang/core/commands/CodeRestGenerator.java | 24 +-
.../maven/generator/openapi/GenerateMojo.java | 11 +
.../generator/openapi/GenerateWithDtoMojo.java | 2 +-
.../maven/generator/openapi/GenerateXmlMojo.java | 9 +
.../generator/openapi/GenerateXmlWithDtoMojo.java | 2 +-
.../maven/generator/openapi/GenerateYamlMojo.java | 9 +
.../generator/openapi/GenerateYamlWithDtoMojo.java | 2 +-
.../camel/generator/openapi/OperationVisitor.java | 216 +-
.../camel/generator/openapi/PathVisitor.java | 10 +-
.../openapi/RestDslDefinitionGenerator.java | 2 +-
.../camel/generator/openapi/RestDslGenerator.java | 58 +-
.../openapi/RestDslSourceCodeGenerator.java | 2 +-
.../generator/openapi/RestDslXmlGenerator.java | 3 +-
.../generator/openapi/RestDslYamlGenerator.java | 11 +-
.../generator/openapi/OperationVisitorTest.java | 5 +-
...3Test.java => RestDslYamlGeneratorV31Test.java} | 20 +-
.../openapi/RestDslYamlGeneratorV3Test.java | 20 +-
.../src/test/resources/AccountService-v6Yaml.txt | 240 +
.../resources/OpenApiV3PetstoreWithModelYaml.txt | 255 +
.../camel/generator/openapi/AccountService-v6.json | 6107 ++++++++++++++++++++
22 files changed, 6950 insertions(+), 84 deletions(-)
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index a2ebaa6404e..cb17ab754f9 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -564,6 +564,17 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition>
return this;
}
+ public RestDefinition type(String classType) {
+ // add to last verb
+ if (getVerbs().isEmpty()) {
+ throw new IllegalArgumentException(MISSING_VERB);
+ }
+
+ VerbDefinition verb = getVerbs().get(getVerbs().size() - 1);
+ verb.setType(classType);
+ return this;
+ }
+
public RestDefinition type(Class<?> classType) {
// add to last verb
if (getVerbs().isEmpty()) {
@@ -576,6 +587,17 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition>
return this;
}
+ public RestDefinition outType(String classType) {
+ // add to last verb
+ if (getVerbs().isEmpty()) {
+ throw new IllegalArgumentException(MISSING_VERB);
+ }
+
+ VerbDefinition verb = getVerbs().get(getVerbs().size() - 1);
+ verb.setOutType(classType);
+ return this;
+ }
+
public RestDefinition outType(Class<?> classType) {
// add to last verb
if (getVerbs().isEmpty()) {
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
index 8e09d0ac4b4..b8494719a05 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
@@ -164,6 +164,10 @@ To
We also renamed the `route-curcuit-breaker` console to `circuit-breaker`.
+=== camel-jbang
+
+The command `camel generate rest` have removed all the shorthand arguments `such as `-i -o` instead use the long names `--input --output`.
+
=== camel-jsonpath
The `camel-jsonpath` will now work more similar as `camel-jq` when you specify a `resultType` and have a list of entities.
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java
index f92682ac6d2..12df871ed08 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java
@@ -49,23 +49,23 @@ import static org.openapitools.codegen.CodegenConstants.SERIALIZABLE_MODEL;
@CommandLine.Command(name = "rest", description = "Generate REST DSL source code from OpenApi specification")
public class CodeRestGenerator extends CamelCommand {
- @CommandLine.Option(names = { "-i", "--input" }, required = true, description = "OpenApi specification file name")
+ @CommandLine.Option(names = { "--input" }, required = true, description = "OpenApi specification file name")
private String input;
- @CommandLine.Option(names = { "-o", "--output" }, description = "Output REST DSL file name")
+ @CommandLine.Option(names = { "--output" }, description = "Output REST DSL file name")
private String output;
- @CommandLine.Option(names = { "-t", "--type" }, description = "REST DSL type (YAML or XML)", defaultValue = "yaml")
+ @CommandLine.Option(names = { "--type" }, description = "REST DSL type (YAML or XML)", defaultValue = "yaml")
private String type;
- @CommandLine.Option(names = { "-r", "--routes" }, description = "Generate routes (only in YAML)")
+ @CommandLine.Option(names = { "--routes" }, description = "Generate routes (only in YAML)")
private boolean generateRoutes;
- @CommandLine.Option(names = { "-d", "--dto" }, description = "Generate Java Data Objects")
+ @CommandLine.Option(names = { "--dto" }, description = "Generate Java Data Objects")
private boolean generateDataObjects;
- @CommandLine.Option(names = { "-run", "--runtime" }, description = "Runtime (quarkus, or spring-boot)",
+ @CommandLine.Option(names = { "--runtime" }, description = "Runtime (quarkus, or spring-boot)",
defaultValue = "quarkus")
private String runtime;
- @CommandLine.Option(names = { "-p", "--package" }, description = "Package for generated Java models",
+ @CommandLine.Option(names = { "--package" }, description = "Package for generated Java models",
defaultValue = "model")
private String packageName;
- @CommandLine.Option(names = { "-v", "--openapi-version" }, description = "Openapi specification 3.0 or 3.1",
+ @CommandLine.Option(names = { "--openapi-version" }, description = "Openapi specification 3.0 or 3.1",
defaultValue = "3.0")
private String openApiVersion = "3.0";
@@ -93,9 +93,13 @@ public class CodeRestGenerator extends CamelCommand {
try (CamelContext context = new DefaultCamelContext()) {
String text = null;
if ("yaml".equalsIgnoreCase(type)) {
- text = RestDslGenerator.toYaml(doc).generate(context, generateRoutes);
+ text = RestDslGenerator.toYaml(doc)
+ .withDtoPackageName(generateDataObjects ? packageName : null)
+ .generate(context, generateRoutes);
} else if ("xml".equalsIgnoreCase(type)) {
- text = RestDslGenerator.toXml(doc).generate(context);
+ text = RestDslGenerator.toXml(doc)
+ .withDtoPackageName(generateDataObjects ? packageName : null)
+ .generate(context);
}
if (text != null) {
if (output == null) {
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
index 3912c0fa334..48d0fccdb6a 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
@@ -49,6 +49,10 @@ public class GenerateMojo extends AbstractGenerateMojo {
@Override
public void execute() throws MojoExecutionException {
+ execute(false);
+ }
+
+ protected void execute(boolean dto) throws MojoExecutionException {
if (skip) {
return;
}
@@ -87,6 +91,13 @@ public class GenerateMojo extends AbstractGenerateMojo {
if (ObjectHelper.isNotEmpty(packageName)) {
generator.withPackageName(packageName);
}
+ if (dto) {
+ if (modelPackage != null) {
+ generator.withDtoPackageName(modelPackage);
+ } else {
+ generator.withDtoPackageName(packageName);
+ }
+ }
if (ObjectHelper.isNotEmpty(destinationGenerator)) {
final DestinationGenerator destinationGeneratorObject = createDestinationGenerator();
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateWithDtoMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateWithDtoMojo.java
index a238b632dec..a0e72e09332 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateWithDtoMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateWithDtoMojo.java
@@ -30,7 +30,7 @@ public class GenerateWithDtoMojo extends GenerateMojo {
if (skip) {
return;
}
- super.execute();
+ super.execute(true);
generateDto("java");
}
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlMojo.java
index 8c0601592d0..c107947f87d 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlMojo.java
@@ -47,6 +47,10 @@ public class GenerateXmlMojo extends AbstractGenerateMojo {
@Override
public void execute() throws MojoExecutionException {
+ execute(false);
+ }
+
+ protected void execute(boolean dto) throws MojoExecutionException {
if (skip) {
return;
}
@@ -78,6 +82,11 @@ public class GenerateXmlMojo extends AbstractGenerateMojo {
if (ObjectHelper.isNotEmpty(filterOperation)) {
generator.withOperationFilter(filterOperation);
}
+ if (dto) {
+ if (modelPackage != null) {
+ generator.withDtoPackageName(modelPackage);
+ }
+ }
if (ObjectHelper.isNotEmpty(destinationGenerator)) {
final DestinationGenerator destinationGeneratorObject = createDestinationGenerator();
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlWithDtoMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlWithDtoMojo.java
index 96d777a6dec..d88ef7959e2 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlWithDtoMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateXmlWithDtoMojo.java
@@ -30,7 +30,7 @@ public class GenerateXmlWithDtoMojo extends GenerateXmlMojo {
if (skip) {
return;
}
- super.execute();
+ super.execute(true);
generateDto("java");
}
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlMojo.java
index c41f5f3eb3f..e1797d15f46 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlMojo.java
@@ -44,6 +44,10 @@ public class GenerateYamlMojo extends AbstractGenerateMojo {
@Override
public void execute() throws MojoExecutionException {
+ execute(false);
+ }
+
+ protected void execute(boolean dto) throws MojoExecutionException {
if (skip) {
return;
}
@@ -71,6 +75,11 @@ public class GenerateYamlMojo extends AbstractGenerateMojo {
if (ObjectHelper.isNotEmpty(filterOperation)) {
generator.withOperationFilter(filterOperation);
}
+ if (dto) {
+ if (modelPackage != null) {
+ generator.withDtoPackageName(modelPackage);
+ }
+ }
if (ObjectHelper.isNotEmpty(destinationGenerator)) {
final DestinationGenerator destinationGeneratorObject = createDestinationGenerator();
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlWithDtoMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlWithDtoMojo.java
index 77f5631119a..29217036934 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlWithDtoMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateYamlWithDtoMojo.java
@@ -30,7 +30,7 @@ public class GenerateYamlWithDtoMojo extends GenerateYamlMojo {
if (skip) {
return;
}
- super.execute();
+ super.execute(true);
generateDto("java");
}
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
index 0dbd063d88f..bc18533f3d5 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
@@ -24,6 +24,7 @@ import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
+import io.apicurio.datamodels.models.Referenceable;
import io.apicurio.datamodels.models.Schema;
import io.apicurio.datamodels.models.openapi.OpenApiMediaType;
import io.apicurio.datamodels.models.openapi.OpenApiOperation;
@@ -39,6 +40,12 @@ import io.apicurio.datamodels.models.openapi.v30.OpenApi30Parameter;
import io.apicurio.datamodels.models.openapi.v30.OpenApi30RequestBody;
import io.apicurio.datamodels.models.openapi.v30.OpenApi30Response;
import io.apicurio.datamodels.models.openapi.v30.OpenApi30Schema;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31MediaType;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31Operation;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31Parameter;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31RequestBody;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31Response;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31Schema;
import io.apicurio.datamodels.refs.ReferenceUtil;
import org.apache.camel.model.rest.CollectionFormat;
import org.apache.camel.model.rest.RestParamType;
@@ -48,19 +55,18 @@ import org.apache.camel.util.StringHelper;
class OperationVisitor<T> {
private final DestinationGenerator destinationGenerator;
-
private final CodeEmitter<T> emitter;
-
private final OperationFilter filter;
-
private final String path;
+ private final String dtoPackageName;
OperationVisitor(final CodeEmitter<T> emitter, final OperationFilter filter, final String path,
- final DestinationGenerator destinationGenerator) {
+ final DestinationGenerator destinationGenerator, final String dtoPackageName) {
this.emitter = emitter;
this.filter = filter;
this.path = path;
this.destinationGenerator = destinationGenerator;
+ this.dtoPackageName = dtoPackageName;
}
List<String> asStringList(final List<?> values) {
@@ -92,6 +98,11 @@ class OperationVisitor<T> {
if (ObjectHelper.isNotEmpty(ref)) {
toUse = (OpenApi30Parameter) ReferenceUtil.resolveRef(ref, parameter);
}
+ } else if (toUse instanceof OpenApi31Parameter) {
+ String ref = ((OpenApi31Parameter) toUse).get$ref();
+ if (ObjectHelper.isNotEmpty(ref)) {
+ toUse = (OpenApi31Parameter) ReferenceUtil.resolveRef(ref, parameter);
+ }
}
emit("name", toUse.getName());
@@ -150,6 +161,37 @@ class OperationVisitor<T> {
emit("arrayType", schema.getItems().getType());
}
}
+ } else if (toUse instanceof OpenApi31Parameter) {
+ final OpenApi31Parameter serializableParameter = (OpenApi31Parameter) toUse;
+ final OpenApi31Schema schema = (OpenApi31Schema) serializableParameter.getSchema();
+ if (schema != null) {
+ final String dataType
+ = schema.getType() != null && schema.getType().isString() ? schema.getType().asString() : null;
+ if (ObjectHelper.isNotEmpty(dataType)) {
+ emit("dataType", dataType);
+ }
+ emit("allowableValues", asStringList(schema.getEnum()));
+ final String style = serializableParameter.getStyle();
+ if (ObjectHelper.isNotEmpty(style)) {
+ if (style.equals("form")) {
+ // Guard against null explode value
+ // See: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#fixed-fields-10
+ if (Boolean.FALSE.equals(serializableParameter.isExplode())) {
+ emit("collectionFormat", CollectionFormat.csv);
+ } else {
+ emit("collectionFormat", CollectionFormat.multi);
+ }
+ }
+ }
+ if (ObjectHelper.isNotEmpty(schema.getDefault())) {
+ final String value = StringHelper.removeLeadingAndEndingQuotes(schema.getDefault().toString());
+ emit("defaultValue", value);
+ }
+
+ if ("array".equals(dataType) && schema.getItems() != null) {
+ emit("arrayType", schema.getItems().getType().asString());
+ }
+ }
}
}
if (toUse.isRequired() != null) {
@@ -198,7 +240,12 @@ class OperationVisitor<T> {
&& oas30Operation.getRequestBody().getContent() != null) {
operationLevelConsumes.addAll(oas30Operation.getRequestBody().getContent().keySet());
}
-
+ } else if (operation instanceof OpenApi31Operation) {
+ OpenApi31Operation oas31Operation = (OpenApi31Operation) operation;
+ if (oas31Operation.getRequestBody() != null
+ && oas31Operation.getRequestBody().getContent() != null) {
+ operationLevelConsumes.addAll(oas31Operation.getRequestBody().getContent().keySet());
+ }
}
emit("consumes", operationLevelConsumes);
Set<String> operationLevelProduces = new LinkedHashSet<>();
@@ -221,6 +268,20 @@ class OperationVisitor<T> {
operationLevelProduces.addAll(oas30Response.getContent().keySet());
}
}
+ } else if (operation instanceof OpenApi31Operation) {
+ final OpenApi31Operation oas31Operation = (OpenApi31Operation) operation;
+ if (oas31Operation.getResponses() != null) {
+ for (OpenApiResponse response : oas31Operation.getResponses().getItems()) {
+ OpenApi31Response oas31Response = (OpenApi31Response) response;
+ if (oas31Response.getContent() != null) {
+ operationLevelProduces.addAll(oas31Response.getContent().keySet());
+ }
+ }
+ OpenApi31Response oas31Response = (OpenApi31Response) oas31Operation.getResponses().getDefault();
+ if (oas31Response != null && oas31Response.getContent() != null) {
+ operationLevelProduces.addAll(oas31Response.getContent().keySet());
+ }
+ }
}
emit("produces", operationLevelProduces);
@@ -231,25 +292,26 @@ class OperationVisitor<T> {
if (ObjectHelper.isNotEmpty(pathItem.getParameters())) {
pathItem.getParameters().forEach(this::emit);
}
-
if (operation instanceof OpenApi30Operation) {
emitOas30Operation((OpenApi30Operation) operation);
+ } else if (operation instanceof OpenApi31Operation) {
+ emitOas31Operation((OpenApi31Operation) operation);
}
emitter.emit("to", destinationGenerator.generateDestinationFor(operation));
}
-
}
private CodeEmitter<T> emitOas30Operation(final OpenApi30Operation operation) {
if (operation.getRequestBody() != null) {
+ String dto = null;
boolean foundForm = false;
final OpenApi30RequestBody requestBody = operation.getRequestBody();
for (final Entry<String, OpenApiMediaType> entry : requestBody.getContent().entrySet()) {
final String ct = entry.getKey();
- final OpenApi30MediaType mediaType = (OpenApi30MediaType) entry.getValue();
- if (ct.contains("form") && mediaType.getSchema().getProperties() != null) {
- for (final Entry<String, Schema> entrySchema : mediaType.getSchema().getProperties().entrySet()) {
+ OpenApi30MediaType mt = (OpenApi30MediaType) entry.getValue();
+ if (ct.contains("form") && mt.getSchema().getProperties() != null) {
+ for (final Entry<String, Schema> entrySchema : mt.getSchema().getProperties().entrySet()) {
OpenApi30Schema openApi30Schema = (OpenApi30Schema) entrySchema.getValue();
foundForm = true;
emitter.emit("param");
@@ -261,6 +323,20 @@ class OperationVisitor<T> {
emitter.emit("endParam");
}
}
+ if (dto == null && mt.getSchema() instanceof Referenceable ref) {
+ OpenApi30Schema schema = (OpenApi30Schema) mt.getSchema();
+ boolean array = "array".equals(schema.getType());
+ if (array) {
+ ref = schema.getItems();
+ }
+ String r = ref.get$ref();
+ if (r != null && r.startsWith("#/components/schemas/")) {
+ dto = r.substring(21);
+ if (array) {
+ dto += "[]";
+ }
+ }
+ }
}
if (!foundForm) {
emitter.emit("param");
@@ -270,9 +346,129 @@ class OperationVisitor<T> {
emit("description", requestBody.getDescription());
emitter.emit("endParam");
}
+ if (dtoPackageName != null && dto != null) {
+ emit("type", dtoPackageName + "." + dto);
+ }
+ }
+
+ if (operation.getResponses() != null) {
+ String dto = null;
+ for (String key : operation.getResponses().getItemNames()) {
+ if ("200".equals(key)) {
+ var response = operation.getResponses().getItem(key);
+ if (response instanceof OpenApi30Response res30) {
+ for (final Entry<String, OpenApi30MediaType> entry : res30.getContent().entrySet()) {
+ final OpenApi30MediaType mediaType = entry.getValue();
+ if (dto == null && mediaType.getSchema() instanceof Referenceable ref) {
+ OpenApi30Schema schema = (OpenApi30Schema) mediaType.getSchema();
+ boolean array = "array".equals(schema.getType());
+ if (array) {
+ ref = schema.getItems();
+ }
+ String r = ref.get$ref();
+ if (r != null && r.startsWith("#/components/schemas/")) {
+ dto = r.substring(21);
+ if (array) {
+ dto += "[]";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (dtoPackageName != null && dto != null) {
+ emit("outType", dtoPackageName + "." + dto);
+ }
}
return emitter;
+ }
+ private CodeEmitter<T> emitOas31Operation(final OpenApi31Operation operation) {
+ if (operation.getRequestBody() != null) {
+ String dto = null;
+ boolean foundForm = false;
+ final OpenApi31RequestBody requestBody = operation.getRequestBody();
+ for (final Entry<String, OpenApiMediaType> entry : requestBody.getContent().entrySet()) {
+ final String ct = entry.getKey();
+ OpenApi31MediaType mt = (OpenApi31MediaType) entry.getValue();
+ if (ct.contains("form") && mt.getSchema().getProperties() != null) {
+ for (final Entry<String, Schema> entrySchema : mt.getSchema().getProperties().entrySet()) {
+ OpenApi31Schema openApi31Schema = (OpenApi31Schema) entrySchema.getValue();
+ foundForm = true;
+ emitter.emit("param");
+ emit("name", entrySchema.getKey());
+ emit("type", RestParamType.formData);
+ emit("dataType", openApi31Schema.getType());
+ emit("required", requestBody.isRequired());
+ emit("description", entrySchema.getValue().getDescription());
+ emitter.emit("endParam");
+ }
+ }
+ if (dto == null && mt.getSchema() instanceof Referenceable ref) {
+ OpenApi31Schema schema = (OpenApi31Schema) mt.getSchema();
+ boolean array = "array".equals(
+ schema.getType() != null && schema.getType().isString() ? schema.getType().asString() : false);
+ if (array) {
+ ref = schema.getItems();
+ }
+ String r = ref.get$ref();
+ if (r != null && r.startsWith("#/components/schemas/")) {
+ dto = r.substring(21);
+ if (array) {
+ dto += "[]";
+ }
+ }
+ }
+ }
+ if (!foundForm) {
+ emitter.emit("param");
+ emit("name", "body");
+ emit("type", RestParamType.valueOf("body"));
+ emit("required", Boolean.TRUE);
+ emit("description", requestBody.getDescription());
+ emitter.emit("endParam");
+ }
+ if (dtoPackageName != null && dto != null) {
+ emit("type", dtoPackageName + "." + dto);
+ }
+ }
+
+ if (operation.getResponses() != null) {
+ String dto = null;
+ for (String key : operation.getResponses().getItemNames()) {
+ if ("200".equals(key)) {
+ var response = operation.getResponses().getItem(key);
+ if (response instanceof OpenApi31Response res31) {
+ for (final Entry<String, OpenApi31MediaType> entry : res31.getContent().entrySet()) {
+ final OpenApi31MediaType mediaType = entry.getValue();
+ if (dto == null && mediaType.getSchema() instanceof Referenceable ref) {
+ OpenApi31Schema schema = (OpenApi31Schema) mediaType.getSchema();
+ boolean array
+ = "array".equals(schema.getType() != null && schema.getType().isString()
+ ? schema.getType().asString() : false);
+ if (array) {
+ ref = schema.getItems();
+ }
+ String r = ref.get$ref();
+ if (r != null && r.startsWith("#/components/schemas/")) {
+ dto = r.substring(21);
+ if (array) {
+ dto += "[]";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (dtoPackageName != null && dto != null) {
+ emit("outType", dtoPackageName + "." + dto);
+ }
+ }
+
+ return emitter;
}
+
}
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/PathVisitor.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/PathVisitor.java
index ff0f2f01cf6..de47790c72f 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/PathVisitor.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/PathVisitor.java
@@ -26,10 +26,9 @@ import org.apache.camel.util.ObjectHelper;
class PathVisitor<T> {
private final DestinationGenerator destinationGenerator;
-
private final CodeEmitter<T> emitter;
-
private final OperationFilter filter;
+ private final String dtoPackageName;
public enum HttpMethod {
DELETE,
@@ -42,10 +41,11 @@ class PathVisitor<T> {
}
PathVisitor(final String basePath, final CodeEmitter<T> emitter, final OperationFilter filter,
- final DestinationGenerator destinationGenerator) {
+ final DestinationGenerator destinationGenerator, final String dtoPackageName) {
this.emitter = emitter;
this.filter = filter;
this.destinationGenerator = destinationGenerator;
+ this.dtoPackageName = dtoPackageName;
if (ObjectHelper.isEmpty(basePath)) {
emitter.emit("rest");
@@ -55,8 +55,8 @@ class PathVisitor<T> {
}
void visit(final String path, final OpenApiPathItem definition) {
- final OperationVisitor<T> restDslOperation = new OperationVisitor<>(emitter, filter, path, destinationGenerator);
-
+ final OperationVisitor<T> restDslOperation
+ = new OperationVisitor<>(emitter, filter, path, destinationGenerator, dtoPackageName);
operationMapFrom(definition).forEach(restDslOperation::visit);
}
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslDefinitionGenerator.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslDefinitionGenerator.java
index 033cbb581db..814fc1e9926 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslDefinitionGenerator.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslDefinitionGenerator.java
@@ -30,7 +30,7 @@ public final class RestDslDefinitionGenerator extends RestDslGenerator<RestDslDe
final RestDefinitionEmitter emitter = new RestDefinitionEmitter();
final String basePath = RestDslGenerator.determineBasePathFrom(this.basePath, document);
final PathVisitor<RestsDefinition> restDslStatement
- = new PathVisitor<>(basePath, emitter, filter, destinationGenerator());
+ = new PathVisitor<>(basePath, emitter, filter, destinationGenerator(), dtoPackageName);
for (String name : document.getPaths().getItemNames()) {
OpenApiPathItem item = document.getPaths().getItem(name);
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslGenerator.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslGenerator.java
index c7b8722fab2..83e538398a0 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslGenerator.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslGenerator.java
@@ -29,6 +29,8 @@ import io.apicurio.datamodels.models.openapi.OpenApiDocument;
import io.apicurio.datamodels.models.openapi.v20.OpenApi20Document;
import io.apicurio.datamodels.models.openapi.v30.OpenApi30Document;
import io.apicurio.datamodels.models.openapi.v30.OpenApi30Server;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31Document;
+import io.apicurio.datamodels.models.openapi.v31.OpenApi31Server;
import org.apache.camel.model.rest.RestsDefinition;
import static org.apache.camel.util.ObjectHelper.notNull;
@@ -50,6 +52,7 @@ public abstract class RestDslGenerator<G> {
boolean springBootProject;
boolean springComponent;
String basePath;
+ String dtoPackageName;
RestDslGenerator(final OpenApiDocument document) {
this.document = notNull(document, "document");
@@ -57,55 +60,43 @@ public abstract class RestDslGenerator<G> {
public G asSpringBootProject() {
this.springBootProject = true;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G asSpringComponent() {
this.springComponent = true;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withApiContextPath(final String contextPath) {
this.apiContextPath = contextPath;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withClientRequestValidation() {
this.clientRequestValidation = true;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withBasePath(final String basePath) {
this.basePath = basePath;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withDestinationGenerator(final DestinationGenerator destinationGenerator) {
this.destinationGenerator = destinationGenerator;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
@@ -116,46 +107,43 @@ public abstract class RestDslGenerator<G> {
*/
public G withDestinationToSyntax(final String destinationToSyntax) {
this.destinationToSyntax = destinationToSyntax;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withOperationFilter(final OperationFilter filter) {
this.filter = filter;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withOperationFilter(final String include) {
this.filter.setIncludes(include);
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withRestComponent(final String restComponent) {
this.restComponent = restComponent;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
-
return that;
}
public G withRestContextPath(final String contextPath) {
this.restContextPath = contextPath;
-
@SuppressWarnings("unchecked")
final G that = (G) this;
+ return that;
+ }
+ public G withDtoPackageName(final String dtoPackageName) {
+ this.dtoPackageName = dtoPackageName;
+ @SuppressWarnings("unchecked")
+ final G that = (G) this;
return that;
}
@@ -174,7 +162,6 @@ public abstract class RestDslGenerator<G> {
public static String determineBasePathFrom(final String parameter) {
Objects.requireNonNull(parameter, "parameter");
-
return prepareBasePath(parameter.trim());
}
@@ -194,6 +181,17 @@ public abstract class RestDslGenerator<G> {
final OpenApi30Server firstServer = servers.get(0);
final URI serverUrl = URI.create(resolveVariablesIn(firstServer.getUrl(), firstServer));
return prepareBasePath(serverUrl.getPath());
+ } else if (document instanceof OpenApi31Document) {
+ final OpenApi31Document oas31Document = (OpenApi31Document) document;
+ final List<OpenApi31Server> servers = oas31Document.getServers();
+
+ if (servers == null || servers.get(0) == null) {
+ return "";
+ }
+
+ final OpenApi31Server firstServer = servers.get(0);
+ final URI serverUrl = URI.create(resolveVariablesIn(firstServer.getUrl(), firstServer));
+ return prepareBasePath(serverUrl.getPath());
}
throw new IllegalArgumentException("Unsupported document type: " + document.getClass().getName());
@@ -207,12 +205,10 @@ public abstract class RestDslGenerator<G> {
if (basePath.charAt(0) != '/') {
basePath = "/" + basePath;
}
-
if (basePath.indexOf("//") == 0) {
// strip off the first "/" if double "/" exists
basePath = basePath.substring(1);
}
-
if ("/".equals(basePath)) {
basePath = "";
}
@@ -230,11 +226,8 @@ public abstract class RestDslGenerator<G> {
if (servers == null || servers.get(0) == null) {
return "";
}
-
final OpenApi30Server firstServer = servers.get(0);
-
final URI serverUrl = URI.create(resolveVariablesIn(firstServer.getUrl(), firstServer));
-
return serverUrl.getHost();
}
@@ -250,7 +243,18 @@ public abstract class RestDslGenerator<G> {
withoutPlaceholders = withoutPlaceholders.replace(name, entry.getValue().getDefault());
}
}
+ return withoutPlaceholders;
+ }
+ public static String resolveVariablesIn(final String url, final OpenApi31Server server) {
+ final Map<String, ServerVariable> variables = Objects.requireNonNull(server, "server").getVariables();
+ String withoutPlaceholders = url;
+ if (variables != null) {
+ for (Map.Entry<String, ServerVariable> entry : variables.entrySet()) {
+ final String name = "{" + entry.getKey() + "}";
+ withoutPlaceholders = withoutPlaceholders.replace(name, entry.getValue().getDefault());
+ }
+ }
return withoutPlaceholders;
}
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslSourceCodeGenerator.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslSourceCodeGenerator.java
index 4388a464f3b..52a2aeda281 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslSourceCodeGenerator.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslSourceCodeGenerator.java
@@ -138,7 +138,7 @@ public abstract class RestDslSourceCodeGenerator<T> extends RestDslGenerator<Res
if (anyAccepted) {
// create new rest statement per path to avoid a giant chained single method
PathVisitor<MethodSpec> restDslStatement
- = new PathVisitor<>(basePath, emitter, filter, destinationGenerator());
+ = new PathVisitor<>(basePath, emitter, filter, destinationGenerator(), dtoPackageName);
restDslStatement.visit(name, s);
emitter.endEmit();
}
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslXmlGenerator.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslXmlGenerator.java
index 36f20c2c821..a1ebe22e705 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslXmlGenerator.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslXmlGenerator.java
@@ -53,7 +53,8 @@ public class RestDslXmlGenerator extends RestDslGenerator<RestDslXmlGenerator> {
final String basePath = RestDslGenerator.determineBasePathFrom(this.basePath, document);
final PathVisitor<RestsDefinition> restDslStatement = new PathVisitor<>(
basePath, emitter, filter,
- destinationGenerator());
+ destinationGenerator(),
+ dtoPackageName);
for (String name : document.getPaths().getItemNames()) {
OpenApiPathItem item = document.getPaths().getItem(name);
diff --git a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslYamlGenerator.java b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslYamlGenerator.java
index 8a3636c1577..c132e27b2c7 100644
--- a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslYamlGenerator.java
+++ b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/RestDslYamlGenerator.java
@@ -74,11 +74,14 @@ public class RestDslYamlGenerator extends RestDslGenerator<RestDslYamlGenerator>
final String basePath = RestDslGenerator.determineBasePathFrom(this.basePath, document);
final PathVisitor<RestsDefinition> restDslStatement = new PathVisitor<>(
basePath, emitter, filter,
- destinationGenerator());
+ destinationGenerator(),
+ dtoPackageName);
- for (String name : document.getPaths().getItemNames()) {
- OpenApiPathItem item = document.getPaths().getItem(name);
- restDslStatement.visit(name, item);
+ if (document.getPaths() != null) {
+ for (String name : document.getPaths().getItemNames()) {
+ OpenApiPathItem item = document.getPaths().getItem(name);
+ restDslStatement.visit(name, item);
+ }
}
final RestsDefinition rests = emitter.result();
diff --git a/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/OperationVisitorTest.java b/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/OperationVisitorTest.java
index d98ea155b27..774a160659b 100644
--- a/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/OperationVisitorTest.java
+++ b/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/OperationVisitorTest.java
@@ -37,7 +37,7 @@ public class OperationVisitorTest {
public void shouldEmitCodeForOas2ParameterInQuery() {
final Builder method = MethodSpec.methodBuilder("configure");
final MethodBodySourceCodeEmitter emitter = new MethodBodySourceCodeEmitter(method);
- final OperationVisitor<?> visitor = new OperationVisitor<>(emitter, null, null, null);
+ final OperationVisitor<?> visitor = new OperationVisitor<>(emitter, null, null, null, null);
final OpenApi20Parameter parameter = new OpenApi20ParameterImpl();
parameter.setName("param");
@@ -59,7 +59,8 @@ public class OperationVisitorTest {
final Builder method = MethodSpec.methodBuilder("configure");
final MethodBodySourceCodeEmitter emitter = new MethodBodySourceCodeEmitter(method);
final OperationVisitor<?> visitor
- = new OperationVisitor<>(emitter, new OperationFilter(), "/path/{param}", new DefaultDestinationGenerator());
+ = new OperationVisitor<>(
+ emitter, new OperationFilter(), "/path/{param}", new DefaultDestinationGenerator(), null);
final OpenApi20Document document = new OpenApi20DocumentImpl();
final OpenApiPaths paths = document.createPaths();
diff --git a/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java b/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV31Test.java
similarity index 68%
copy from tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java
copy to tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV31Test.java
index c3774382335..cda595ed47f 100644
--- a/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java
+++ b/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV31Test.java
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
-public class RestDslYamlGeneratorV3Test {
+public class RestDslYamlGeneratorV31Test {
static OpenApiDocument document;
@@ -41,30 +41,16 @@ public class RestDslYamlGeneratorV3Test {
try (CamelContext context = new DefaultCamelContext()) {
final String yaml = RestDslGenerator.toYaml(document).generate(context);
- final URI file = RestDslXmlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreYaml.txt").toURI();
+ final URI file = RestDslYamlGeneratorV31Test.class.getResource("/AccountService-v6Yaml.txt").toURI();
final String expectedContent = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
assertThat(yaml).isEqualTo(expectedContent);
}
}
- @Test
- public void shouldGenerateXmlWithRestComponent() throws Exception {
- try (CamelContext context = new DefaultCamelContext()) {
- final String yaml = RestDslGenerator.toYaml(document)
- .withRestComponent("servlet")
- .withRestContextPath("/foo")
- .generate(context);
-
- final URI file = RestDslXmlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreWithRestComponentYaml.txt").toURI();
- final String expectedContent = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
- assertThat(yaml).isEqualTo(expectedContent);
- }
- }
-
@BeforeAll
public static void readOpenApiDoc() throws Exception {
- try (InputStream is = RestDslYamlGeneratorV3Test.class.getResourceAsStream("openapi-spec.json")) {
+ try (InputStream is = RestDslYamlGeneratorV31Test.class.getResourceAsStream("AccountService-v6.json")) {
String json = IOHelper.loadText(is);
document = (OpenApiDocument) Library.readDocumentFromJSONString(json);
}
diff --git a/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java b/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java
index c3774382335..97d5beb24d5 100644
--- a/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java
+++ b/tooling/openapi-rest-dsl-generator/src/test/java/org/apache/camel/generator/openapi/RestDslYamlGeneratorV3Test.java
@@ -41,7 +41,7 @@ public class RestDslYamlGeneratorV3Test {
try (CamelContext context = new DefaultCamelContext()) {
final String yaml = RestDslGenerator.toYaml(document).generate(context);
- final URI file = RestDslXmlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreYaml.txt").toURI();
+ final URI file = RestDslYamlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreYaml.txt").toURI();
final String expectedContent = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
assertThat(yaml).isEqualTo(expectedContent);
@@ -49,14 +49,28 @@ public class RestDslYamlGeneratorV3Test {
}
@Test
- public void shouldGenerateXmlWithRestComponent() throws Exception {
+ public void shouldGenerateYamlWithRestComponent() throws Exception {
try (CamelContext context = new DefaultCamelContext()) {
final String yaml = RestDslGenerator.toYaml(document)
.withRestComponent("servlet")
.withRestContextPath("/foo")
.generate(context);
- final URI file = RestDslXmlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreWithRestComponentYaml.txt").toURI();
+ final URI file
+ = RestDslYamlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreWithRestComponentYaml.txt").toURI();
+ final String expectedContent = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
+ assertThat(yaml).isEqualTo(expectedContent);
+ }
+ }
+
+ @Test
+ public void shouldGenerateYamlWithModel() throws Exception {
+ try (CamelContext context = new DefaultCamelContext()) {
+ final String yaml = RestDslGenerator.toYaml(document)
+ .withDtoPackageName("model")
+ .generate(context);
+
+ final URI file = RestDslYamlGeneratorV3Test.class.getResource("/OpenApiV3PetstoreWithModelYaml.txt").toURI();
final String expectedContent = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
assertThat(yaml).isEqualTo(expectedContent);
}
diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/AccountService-v6Yaml.txt b/tooling/openapi-rest-dsl-generator/src/test/resources/AccountService-v6Yaml.txt
new file mode 100644
index 00000000000..8dad41425a5
--- /dev/null
+++ b/tooling/openapi-rest-dsl-generator/src/test/resources/AccountService-v6Yaml.txt
@@ -0,0 +1,240 @@
+- rest:
+ path: "/cal/services/Account/v6"
+ post:
+ - id: "post-checkAccountHolder"
+ path: "/checkAccountHolder"
+ description: "Triggers the verification of an account holder even if the checks\
+ \ are not yet required for the volume that they are currently processing."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-checkAccountHolder"
+ - id: "post-closeAccount"
+ path: "/closeAccount"
+ description: "Closes an account. If an account is closed, you cannot process\
+ \ transactions, pay out its funds, or reopen it. If payments are made to a\
+ \ closed account, the payments are sent to your liable account."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-closeAccount"
+ - id: "post-closeAccountHolder"
+ path: "/closeAccountHolder"
+ description: "Changes the [status of an account holder](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#account-holder-statuses)\
+ \ to **Closed**. This state is final. If an account holder is closed, you\
+ \ can't process transactions, pay out funds, or reopen it. If payments are\
+ \ made to an account of an account holder with a **Closed** [`status`](https://docs.adyen.com/api-explorer/#/Account/latest/post/getAccountHolder__resParam_verification-accountHolder-checks-status),\
+ \ the payments are sent to your liable account."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-closeAccountHolder"
+ - id: "post-closeStores"
+ path: "/closeStores"
+ description: "Closes stores associated with an account holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-closeStores"
+ - id: "post-createAccount"
+ path: "/createAccount"
+ description: "Creates an account under an account holder. An account holder\
+ \ can have [multiple accounts](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#create-additional-accounts)."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-createAccount"
+ - id: "post-createAccountHolder"
+ path: "/createAccountHolder"
+ description: "Creates an account holder that [represents the sub-merchant's\
+ \ entity](https://docs.adyen.com/marketplaces-and-platforms/classic/account-structure#your-platform)\
+ \ in your platform. The details that you need to provide in the request depend\
+ \ on the sub-merchant's legal entity type. For more information, refer to\
+ \ [Account holder and accounts](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#legal-entity-types)."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-createAccountHolder"
+ - id: "post-deleteBankAccounts"
+ path: "/deleteBankAccounts"
+ description: "Deletes bank accounts associated with an account holder. "
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-deleteBankAccounts"
+ - id: "post-deleteLegalArrangements"
+ path: "/deleteLegalArrangements"
+ description: "Deletes legal arrangements and/or legal arrangement entities associated\
+ \ with an account holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-deleteLegalArrangements"
+ - id: "post-deletePayoutMethods"
+ path: "/deletePayoutMethods"
+ description: "Deletes payout methods associated with an account holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-deletePayoutMethods"
+ - id: "post-deleteShareholders"
+ path: "/deleteShareholders"
+ description: "Deletes shareholders associated with an account holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-deleteShareholders"
+ - id: "post-deleteSignatories"
+ path: "/deleteSignatories"
+ description: "Deletes signatories associated with an account holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-deleteSignatories"
+ - id: "post-getAccountHolder"
+ path: "/getAccountHolder"
+ description: "Returns the details of an account holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-getAccountHolder"
+ - id: "post-getTaxForm"
+ path: "/getTaxForm"
+ description: "Generates a tax form for account holders operating in the US.\
+ \ For more information, refer to [Providing tax forms](https://docs.adyen.com/marketplaces-and-platforms/classic/tax-forms)."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-getTaxForm"
+ - id: "post-getUploadedDocuments"
+ path: "/getUploadedDocuments"
+ description: "Returns documents that were previously uploaded for an account\
+ \ holder. Adyen uses the documents during the [verification process](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).\n"
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-getUploadedDocuments"
+ - id: "post-suspendAccountHolder"
+ path: "/suspendAccountHolder"
+ description: "Changes the [status of an account holder](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#account-holder-statuses)\
+ \ to **Suspended**."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-suspendAccountHolder"
+ - id: "post-unSuspendAccountHolder"
+ path: "/unSuspendAccountHolder"
+ description: "Changes the [status of an account holder](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#account-holder-statuses)\
+ \ from **Suspended** to **Inactive**. \nAccount holders can have a **Suspended**\
+ \ [`status`](https://docs.adyen.com/api-explorer/#/Account/latest/post/getAccountHolder__resParam_verification-accountHolder-checks-status)\
+ \ if you suspend them through the [`/suspendAccountHolder`](https://docs.adyen.com/api-explorer/#/Account/v5/post/suspendAccountHolder)\
+ \ endpoint or if a verification deadline expires.\n\nYou can only unsuspend\
+ \ account holders if they do not have verification checks with a **FAILED**\
+ \ [`status`](https://docs.adyen.com/api-explorer/#/Account/latest/post/getAccountHolder__resParam_verification-accountHolder-checks-status)."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-unSuspendAccountHolder"
+ - id: "post-updateAccount"
+ path: "/updateAccount"
+ description: "Updates the description or payout schedule of an account."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-updateAccount"
+ - id: "post-updateAccountHolder"
+ path: "/updateAccountHolder"
+ description: "Updates the `accountHolderDetails` and `processingTier` of an\
+ \ account holder, and adds bank accounts and shareholders.\n\nWhen updating\
+ \ `accountHolderDetails`, parameters that are not included in the request\
+ \ are left unchanged except for the following object:\n\n* `metadata`: Updating\
+ \ the metadata replaces the entire object. This means that to update an existing\
+ \ key-value pair, you must provide the changes, as well as other existing\
+ \ key-value pairs.\n\nWhen updating any field in the following objects, you\
+ \ must submit all the fields required for validation:\n\n * `address`\n\n\
+ * `fullPhoneNumber`\n\n* `bankAccountDetails.BankAccountDetail`\n\n* `businessDetails.shareholders.ShareholderContact`\n\
+ \n For example, to update the `address.postalCode`, you must also submit the\
+ \ `address.country`, `.city`, `.street`, `.postalCode`, and possibly `.stateOrProvince`\
+ \ so that the address can be validated.\n\nTo add a bank account or shareholder,\
+ \ provide the bank account or shareholder details without a `bankAccountUUID`\
+ \ or a `shareholderCode`.\n\n"
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-updateAccountHolder"
+ - id: "post-updateAccountHolderState"
+ path: "/updateAccountHolderState"
+ description: "Disables or enables the processing or payout state of an account\
+ \ holder."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-updateAccountHolderState"
+ - id: "post-uploadDocument"
+ path: "/uploadDocument"
+ description: "Uploads a document for an account holder. Adyen uses the documents\
+ \ during the [verification process](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process)."
+ consumes: "application/json"
+ produces: "application/json"
+ param:
+ - name: "body"
+ required: true
+ type: "body"
+ to: "direct:post-uploadDocument"
diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithModelYaml.txt b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithModelYaml.txt
new file mode 100644
index 00000000000..8c3052f2cf1
--- /dev/null
+++ b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithModelYaml.txt
@@ -0,0 +1,255 @@
+- rest:
+ path: "/api/v3"
+ put:
+ - id: "updatePet"
+ path: "/pet"
+ consumes: "application/json,application/xml"
+ type: "model.Pet"
+ param:
+ - description: "Pet object that needs to be added to the store"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:updatePet"
+ - id: "updateUser"
+ path: "/user/{username}"
+ description: "This can only be done by the logged in user."
+ consumes: "*/*"
+ type: "model.User"
+ param:
+ - dataType: "string"
+ description: "name that need to be updated"
+ name: "username"
+ required: true
+ type: "path"
+ - description: "Updated user object"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:updateUser"
+ post:
+ - id: "addPet"
+ path: "/pet"
+ consumes: "application/json,application/xml"
+ type: "model.Pet"
+ param:
+ - dataType: "boolean"
+ defaultValue: "false"
+ description: "Verbose data"
+ name: "verbose"
+ required: false
+ type: "query"
+ - description: "Pet object that needs to be added to the store"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:addPet"
+ - id: "updatePetWithForm"
+ path: "/pet/{petId}"
+ consumes: "application/x-www-form-urlencoded"
+ param:
+ - dataType: "integer"
+ description: "ID of pet that needs to be updated"
+ name: "petId"
+ required: true
+ type: "path"
+ - dataType: "string"
+ description: "Updated name of the pet"
+ name: "name"
+ required: true
+ type: "formData"
+ - dataType: "string"
+ description: "Updated status of the pet"
+ name: "status"
+ required: true
+ type: "formData"
+ to: "direct:updatePetWithForm"
+ - id: "uploadFile"
+ path: "/pet/{petId}/uploadImage"
+ consumes: "multipart/form-data"
+ produces: "application/json"
+ outType: "model.ApiResponse"
+ param:
+ - dataType: "integer"
+ description: "ID of pet to update"
+ name: "petId"
+ required: true
+ type: "path"
+ - dataType: "string"
+ description: "Additional data to pass to server"
+ name: "additionalMetadata"
+ required: true
+ type: "formData"
+ - dataType: "string"
+ description: "file to upload"
+ name: "file"
+ required: true
+ type: "formData"
+ to: "direct:uploadFile"
+ - id: "placeOrder"
+ path: "/store/order"
+ consumes: "*/*"
+ produces: "application/xml,application/json"
+ type: "model.Order"
+ outType: "model.Order"
+ param:
+ - description: "order placed for purchasing the pet"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:placeOrder"
+ - id: "createUser"
+ path: "/user"
+ description: "This can only be done by the logged in user."
+ consumes: "*/*"
+ type: "model.User"
+ param:
+ - description: "Created user object"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:createUser"
+ - id: "createUsersWithArrayInput"
+ path: "/user/createWithArray"
+ consumes: "*/*"
+ type: "model.User[]"
+ param:
+ - description: "List of user object"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:createUsersWithArrayInput"
+ - id: "createUsersWithListInput"
+ path: "/user/createWithList"
+ consumes: "*/*"
+ type: "model.User[]"
+ param:
+ - description: "List of user object"
+ name: "body"
+ required: true
+ type: "body"
+ to: "direct:createUsersWithListInput"
+ get:
+ - id: "findPetsByStatus"
+ path: "/pet/findByStatus"
+ description: "Multiple status values can be provided with comma separated strings"
+ produces: "application/xml,application/json"
+ outType: "model.Pet[]"
+ param:
+ - arrayType: "string"
+ collectionFormat: "multi"
+ dataType: "array"
+ description: "Status values that need to be considered for filter"
+ name: "status"
+ required: true
+ type: "query"
+ to: "direct:findPetsByStatus"
+ - id: "findPetsByTags"
+ path: "/pet/findByTags"
+ description: "Muliple tags can be provided with comma separated strings. Use\
+ \ tag1, tag2, tag3 for testing."
+ produces: "application/xml,application/json"
+ outType: "model.Pet[]"
+ param:
+ - arrayType: "string"
+ collectionFormat: "multi"
+ dataType: "array"
+ description: "Tags to filter by"
+ name: "tags"
+ required: true
+ type: "query"
+ to: "direct:findPetsByTags"
+ - id: "getPetById"
+ path: "/pet/{petId}"
+ description: "Returns a single pet"
+ produces: "application/xml,application/json"
+ outType: "model.Pet"
+ param:
+ - dataType: "integer"
+ description: "ID of pet to return"
+ name: "petId"
+ required: true
+ type: "path"
+ to: "direct:getPetById"
+ - id: "getInventory"
+ path: "/store/inventory"
+ description: "Returns a map of status codes to quantities"
+ produces: "application/json"
+ to: "direct:getInventory"
+ - id: "getOrderById"
+ path: "/store/order/{orderId}"
+ description: "For valid response try integer IDs with value >= 1 and <= 10.\
+ \ Other values will generated exceptions"
+ produces: "application/xml,application/json"
+ outType: "model.Order"
+ param:
+ - dataType: "integer"
+ description: "ID of pet that needs to be fetched"
+ name: "orderId"
+ required: true
+ type: "path"
+ to: "direct:getOrderById"
+ - id: "loginUser"
+ path: "/user/login"
+ produces: "application/xml,application/json"
+ param:
+ - dataType: "string"
+ description: "The user name for login"
+ name: "username"
+ required: true
+ type: "query"
+ - dataType: "string"
+ description: "The password for login in clear text"
+ name: "password"
+ required: true
+ type: "query"
+ to: "direct:loginUser"
+ - id: "logoutUser"
+ path: "/user/logout"
+ to: "direct:logoutUser"
+ - id: "getUserByName"
+ path: "/user/{username}"
+ produces: "application/xml,application/json"
+ outType: "model.User"
+ param:
+ - dataType: "string"
+ description: "The name that needs to be fetched. Use user1 for testing. "
+ name: "username"
+ required: true
+ type: "path"
+ to: "direct:getUserByName"
+ delete:
+ - id: "deletePet"
+ path: "/pet/{petId}"
+ param:
+ - dataType: "string"
+ name: "api_key"
+ required: false
+ type: "header"
+ - dataType: "integer"
+ description: "Pet id to delete"
+ name: "petId"
+ required: true
+ type: "path"
+ to: "direct:deletePet"
+ - id: "deleteOrder"
+ path: "/store/order/{orderId}"
+ description: "For valid response try integer IDs with positive integer value.\
+ \ Negative or non-integer values will generate API errors"
+ param:
+ - dataType: "integer"
+ description: "ID of the order that needs to be deleted"
+ name: "orderId"
+ required: true
+ type: "path"
+ to: "direct:deleteOrder"
+ - id: "deleteUser"
+ path: "/user/{username}"
+ description: "This can only be done by the logged in user."
+ param:
+ - dataType: "string"
+ description: "The name that needs to be deleted"
+ name: "username"
+ required: true
+ type: "path"
+ to: "direct:deleteUser"
diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/org/apache/camel/generator/openapi/AccountService-v6.json b/tooling/openapi-rest-dsl-generator/src/test/resources/org/apache/camel/generator/openapi/AccountService-v6.json
new file mode 100644
index 00000000000..0d7d73978cd
--- /dev/null
+++ b/tooling/openapi-rest-dsl-generator/src/test/resources/org/apache/camel/generator/openapi/AccountService-v6.json
@@ -0,0 +1,6107 @@
+{
+ "openapi" : "3.1.0",
+ "servers" : [
+ {
+ "url" : "https://cal-test.adyen.com/cal/services/Account/v6"
+ }
+ ],
+ "info" : {
+ "version" : "6",
+ "x-publicVersion" : true,
+ "title" : "Account API",
+ "description" : "This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.\n\nThe Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retri [...]
+ "termsOfService" : "https://www.adyen.com/legal/terms-and-conditions",
+ "contact" : {
+ "name" : "Adyen Developer Experience team",
+ "url" : "https://github.com/Adyen/adyen-openapi"
+ }
+ },
+ "tags" : [
+ {
+ "name" : "Account holders"
+ },
+ {
+ "name" : "Accounts"
+ },
+ {
+ "name" : "Verification"
+ }
+ ],
+ "paths" : {
+ "/checkAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Trigger verification",
+ "description" : "Triggers the verification of an account holder even if the checks are not yet required for the volume that they are currently processing.",
+ "x-addedInVersion" : "5",
+ "operationId" : "post-checkAccountHolder",
+ "x-sortIndex" : 3,
+ "x-methodName" : "checkAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-checkAccountHolder-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/PerformVerificationRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/closeAccount" : {
+ "post" : {
+ "tags" : [
+ "Accounts"
+ ],
+ "summary" : "Close an account",
+ "description" : "Closes an account. If an account is closed, you cannot process transactions, pay out its funds, or reopen it. If payments are made to a closed account, the payments are sent to your liable account.",
+ "operationId" : "post-closeAccount",
+ "x-sortIndex" : 3,
+ "x-methodName" : "closeAccount",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "closeAccount" : {
+ "$ref" : "#/components/examples/post-closeAccount-closeAccount"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseAccountRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseAccountResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseAccountResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/closeAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Close an account holder",
+ "description" : "Changes the [status of an account holder](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#account-holder-statuses) to **Closed**. This state is final. If an account holder is closed, you can't process transactions, pay out funds, or reopen it. If payments are made to an account of an account holder with a **Closed** [`status`](https://docs.adyen.com/api-explorer/#/Account/latest/post/getAccountHolder__resParam_verification-a [...]
+ "operationId" : "post-closeAccountHolder",
+ "x-sortIndex" : 7,
+ "x-methodName" : "closeAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-closeAccountHolder-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseAccountHolderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/closeStores" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Close stores",
+ "description" : "Closes stores associated with an account holder.",
+ "x-addedInVersion" : "5",
+ "operationId" : "post-closeStores",
+ "x-sortIndex" : 9,
+ "x-methodName" : "closeStores",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CloseStoresRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/createAccount" : {
+ "post" : {
+ "tags" : [
+ "Accounts"
+ ],
+ "summary" : "Create an account",
+ "description" : "Creates an account under an account holder. An account holder can have [multiple accounts](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#create-additional-accounts).",
+ "operationId" : "post-createAccount",
+ "x-sortIndex" : 1,
+ "x-methodName" : "createAccount",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-createAccount-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/CreateAccountRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CreateAccountResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/CreateAccountResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/createAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Create an account holder",
+ "description" : "Creates an account holder that [represents the sub-merchant's entity](https://docs.adyen.com/marketplaces-and-platforms/classic/account-structure#your-platform) in your platform. The details that you need to provide in the request depend on the sub-merchant's legal entity type. For more information, refer to [Account holder and accounts](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#legal-entity-types).",
+ "operationId" : "post-createAccountHolder",
+ "x-sortIndex" : 1,
+ "x-methodName" : "createAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "business" : {
+ "$ref" : "#/components/examples/post-createAccountHolder-business"
+ },
+ "individual" : {
+ "$ref" : "#/components/examples/post-createAccountHolder-individual"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/CreateAccountHolderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "business" : {
+ "$ref" : "#/components/examples/post-createAccountHolder-business-200"
+ },
+ "individual" : {
+ "$ref" : "#/components/examples/post-createAccountHolder-individual-200"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/CreateAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/deleteBankAccounts" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Delete bank accounts",
+ "description" : "Deletes bank accounts associated with an account holder. ",
+ "operationId" : "post-deleteBankAccounts",
+ "x-sortIndex" : 4,
+ "x-methodName" : "deleteBankAccounts",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-deleteBankAccounts-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/DeleteBankAccountRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/deleteLegalArrangements" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Delete legal arrangements",
+ "description" : "Deletes legal arrangements and/or legal arrangement entities associated with an account holder.",
+ "operationId" : "post-deleteLegalArrangements",
+ "x-sortIndex" : 6,
+ "x-methodName" : "deleteLegalArrangements",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "arrangements" : {
+ "$ref" : "#/components/examples/post-deleteLegalArrangements-arrangements"
+ },
+ "entities" : {
+ "$ref" : "#/components/examples/post-deleteLegalArrangements-entities"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/DeleteLegalArrangementRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "arrangements" : {
+ "$ref" : "#/components/examples/post-deleteLegalArrangements-arrangements-200"
+ },
+ "entities" : {
+ "$ref" : "#/components/examples/post-deleteLegalArrangements-entities-200"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "arrangements" : {
+ "$ref" : "#/components/examples/post-deleteLegalArrangements-arrangements-400"
+ },
+ "entities" : {
+ "$ref" : "#/components/examples/post-deleteLegalArrangements-entities-400"
+ },
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/deletePayoutMethods" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Delete payout methods",
+ "description" : "Deletes payout methods associated with an account holder.",
+ "x-addedInVersion" : "5",
+ "operationId" : "post-deletePayoutMethods",
+ "x-sortIndex" : 5,
+ "x-methodName" : "deletePayoutMethods",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-deletePayoutMethods-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/DeletePayoutMethodRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/deleteShareholders" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Delete shareholders",
+ "description" : "Deletes shareholders associated with an account holder.",
+ "operationId" : "post-deleteShareholders",
+ "x-sortIndex" : 7,
+ "x-methodName" : "deleteShareholders",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-deleteShareholders-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/DeleteShareholderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/deleteSignatories" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Delete signatories",
+ "description" : "Deletes signatories associated with an account holder.",
+ "operationId" : "post-deleteSignatories",
+ "x-sortIndex" : 8,
+ "x-methodName" : "deleteSignatories",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/DeleteSignatoriesRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GenericResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/getAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Get an account holder",
+ "description" : "Returns the details of an account holder.",
+ "operationId" : "post-getAccountHolder",
+ "x-sortIndex" : 2,
+ "x-methodName" : "getAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "accountCode" : {
+ "$ref" : "#/components/examples/post-getAccountHolder-accountCode"
+ },
+ "accountHolderCode" : {
+ "$ref" : "#/components/examples/post-getAccountHolder-accountHolderCode"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/GetAccountHolderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GetAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GetAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/getTaxForm" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Get a tax form",
+ "description" : "Generates a tax form for account holders operating in the US. For more information, refer to [Providing tax forms](https://docs.adyen.com/marketplaces-and-platforms/classic/tax-forms).",
+ "operationId" : "post-getTaxForm",
+ "x-sortIndex" : 8,
+ "x-methodName" : "getTaxForm",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-getTaxForm-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/GetTaxFormRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GetTaxFormResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/getUploadedDocuments" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Get documents",
+ "description" : "Returns documents that were previously uploaded for an account holder. Adyen uses the documents during the [verification process](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).\n",
+ "operationId" : "post-getUploadedDocuments",
+ "x-sortIndex" : 2,
+ "x-methodName" : "getUploadedDocuments",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-getUploadedDocuments-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/GetUploadedDocumentsRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GetUploadedDocumentsResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/suspendAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Suspend an account holder",
+ "description" : "Changes the [status of an account holder](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#account-holder-statuses) to **Suspended**.",
+ "operationId" : "post-suspendAccountHolder",
+ "x-sortIndex" : 5,
+ "x-methodName" : "suspendAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-suspendAccountHolder-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/SuspendAccountHolderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/SuspendAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/SuspendAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/unSuspendAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Unsuspend an account holder",
+ "description" : "Changes the [status of an account holder](https://docs.adyen.com/marketplaces-and-platforms/classic/account-holders-and-accounts#account-holder-statuses) from **Suspended** to **Inactive**. \nAccount holders can have a **Suspended** [`status`](https://docs.adyen.com/api-explorer/#/Account/latest/post/getAccountHolder__resParam_verification-accountHolder-checks-status) if you suspend them through the [`/suspendAccountHolder`](https://docs.adyen.com/api-explorer/#/ [...]
+ "operationId" : "post-unSuspendAccountHolder",
+ "x-sortIndex" : 6,
+ "x-methodName" : "unSuspendAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-unSuspendAccountHolder-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/UnSuspendAccountHolderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UnSuspendAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UnSuspendAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/updateAccount" : {
+ "post" : {
+ "tags" : [
+ "Accounts"
+ ],
+ "summary" : "Update an account",
+ "description" : "Updates the description or payout schedule of an account.",
+ "operationId" : "post-updateAccount",
+ "x-sortIndex" : 2,
+ "x-methodName" : "updateAccount",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-updateAccount-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/updateAccountHolder" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Update an account holder",
+ "description" : "Updates the `accountHolderDetails` and `processingTier` of an account holder, and adds bank accounts and shareholders.\n\nWhen updating `accountHolderDetails`, parameters that are not included in the request are left unchanged except for the following object:\n\n* `metadata`: Updating the metadata replaces the entire object. This means that to update an existing key-value pair, you must provide the changes, as well as other existing key-value pairs.\n\nWhen updat [...]
+ "operationId" : "post-updateAccountHolder",
+ "x-sortIndex" : 3,
+ "x-methodName" : "updateAccountHolder",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "addShareholders" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-addShareholders"
+ },
+ "bankAccountDetails" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-bankAccountDetails"
+ },
+ "businessDetails" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-businessDetails"
+ },
+ "general" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-general"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountHolderRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "addShareholders" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-addShareholders-200"
+ },
+ "bankAccountDetails" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-bankAccountDetails-200"
+ },
+ "businessDetails" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-businessDetails-200"
+ },
+ "general" : {
+ "$ref" : "#/components/examples/post-updateAccountHolder-general-200"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/updateAccountHolderState" : {
+ "post" : {
+ "tags" : [
+ "Account holders"
+ ],
+ "summary" : "Update payout or processing state",
+ "description" : "Disables or enables the processing or payout state of an account holder.",
+ "operationId" : "post-updateAccountHolderState",
+ "x-sortIndex" : 4,
+ "x-methodName" : "updateAccountHolderState",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-updateAccountHolderState-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountHolderStateRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GetAccountHolderStatusResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/GetAccountHolderStatusResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ },
+ "/uploadDocument" : {
+ "post" : {
+ "tags" : [
+ "Verification"
+ ],
+ "summary" : "Upload a document",
+ "description" : "Uploads a document for an account holder. Adyen uses the documents during the [verification process](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).",
+ "operationId" : "post-uploadDocument",
+ "x-sortIndex" : 1,
+ "x-methodName" : "uploadDocument",
+ "security" : [
+ {
+ "BasicAuth" : [
+ ]
+ },
+ {
+ "ApiKeyAuth" : [
+ ]
+ }
+ ],
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "basic" : {
+ "$ref" : "#/components/examples/post-uploadDocument-basic"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/UploadDocumentRequest"
+ }
+ }
+ }
+ },
+ "responses" : {
+ "200" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "OK - the request has succeeded."
+ },
+ "202" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/UpdateAccountHolderResponse"
+ }
+ }
+ },
+ "description" : "Accepted - the request has been accepted for processing, but the processing has not been completed."
+ },
+ "400" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-400"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Bad Request - a problem reading or understanding the request."
+ },
+ "401" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unauthorized - authentication required."
+ },
+ "403" : {
+ "content" : {
+ "application/json" : {
+ "examples" : {
+ "generic" : {
+ "$ref" : "#/components/examples/generic-403"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Forbidden - insufficient permissions to process the request."
+ },
+ "422" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Unprocessable Entity - a request validation error."
+ },
+ "500" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ServiceError"
+ }
+ }
+ },
+ "description" : "Internal Server Error - the server could not process the request."
+ }
+ }
+ }
+ }
+ },
+ "components" : {
+ "schemas" : {
+ "Account" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of the account.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "5",
+ "description" : "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.",
+ "type" : "string"
+ },
+ "beneficiaryAccount" : {
+ "description" : "The beneficiary of the account.",
+ "type" : "string"
+ },
+ "beneficiaryMerchantReference" : {
+ "description" : "The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user.",
+ "type" : "string"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "A description of the account.",
+ "type" : "string"
+ },
+ "metadata" : {
+ "x-addedInVersion" : "5",
+ "additionalProperties" : {
+ "type" : "string"
+ },
+ "description" : "A set of key and value pairs for general use by the merchant.\nThe keys do not have specific names and may be used for storing miscellaneous data as desired.\n> Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.",
+ "type" : "object"
+ },
+ "payoutMethodCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.",
+ "type" : "string"
+ },
+ "payoutSchedule" : {
+ "description" : "The account's payout schedule.",
+ "$ref" : "#/components/schemas/PayoutScheduleResponse"
+ },
+ "payoutSpeed" : {
+ "x-addedInVersion" : "5",
+ "description" : "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.",
+ "enum" : [
+ "INSTANT",
+ "SAME_DAY",
+ "STANDARD"
+ ],
+ "type" : "string"
+ },
+ "status" : {
+ "x-addedInVersion" : "4",
+ "description" : "The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "AccountEvent" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "event" : {
+ "description" : "The event.\n>Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`.\nFor more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).",
+ "enum" : [
+ "InactivateAccount",
+ "RefundNotPaidOutTransfers"
+ ],
+ "type" : "string"
+ },
+ "executionDate" : {
+ "description" : "The date on which the event will take place.",
+ "format" : "date-time",
+ "type" : "string"
+ },
+ "reason" : {
+ "description" : "The reason why this event has been created.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "AccountHolderDetails" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "The address of the account holder.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "bankAccountDetails" : {
+ "description" : "Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information).",
+ "items" : {
+ "$ref" : "#/components/schemas/BankAccountDetail"
+ },
+ "type" : "array"
+ },
+ "bankAggregatorDataReference" : {
+ "x-addedInVersion" : "5",
+ "description" : "The opaque reference value returned by the Adyen API during bank account login.",
+ "type" : "string"
+ },
+ "businessDetails" : {
+ "description" : "Details about the business or nonprofit account holder.\nRequired when creating an account holder with `legalEntity` **Business** or **NonProfit**.",
+ "$ref" : "#/components/schemas/BusinessDetails"
+ },
+ "email" : {
+ "description" : "The email address of the account holder.",
+ "type" : "string"
+ },
+ "fullPhoneNumber" : {
+ "description" : "The phone number of the account holder provided as a single string. It will be handled as a landline phone.\n**Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"",
+ "type" : "string"
+ },
+ "individualDetails" : {
+ "description" : "Details about the individual account holder.\nRequired when creating an account holder with `legalEntity` **Individual**.\n",
+ "$ref" : "#/components/schemas/IndividualDetails"
+ },
+ "lastReviewDate" : {
+ "description" : "Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**.",
+ "type" : "string"
+ },
+ "legalArrangements" : {
+ "x-addedInVersion" : "6",
+ "description" : "An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements).",
+ "items" : {
+ "$ref" : "#/components/schemas/LegalArrangementDetail"
+ },
+ "type" : "array"
+ },
+ "merchantCategoryCode" : {
+ "description" : "The Merchant Category Code of the account holder.\n> If not specified in the request, this will be derived from the platform account (which is configured by Adyen).",
+ "type" : "string"
+ },
+ "metadata" : {
+ "additionalProperties" : {
+ "type" : "string"
+ },
+ "description" : "A set of key and value pairs for general use by the account holder or merchant.\nThe keys do not have specific names and may be used for storing miscellaneous data as desired.\n> The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary.\n> Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.",
+ "type" : "object"
+ },
+ "payoutMethods" : {
+ "x-addedInVersion" : "5",
+ "description" : "Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards).",
+ "items" : {
+ "$ref" : "#/components/schemas/PayoutMethod"
+ },
+ "type" : "array"
+ },
+ "principalBusinessAddress" : {
+ "description" : "The principal business address of the account holder.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "storeDetails" : {
+ "x-addedInVersion" : "5",
+ "description" : "Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos).",
+ "items" : {
+ "$ref" : "#/components/schemas/StoreDetail"
+ },
+ "type" : "array"
+ },
+ "webAddress" : {
+ "description" : "The URL of the website of the account holder.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "address"
+ ],
+ "type" : "object"
+ },
+ "AccountHolderStatus" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "events" : {
+ "description" : "A list of events scheduled for the account holder.",
+ "items" : {
+ "$ref" : "#/components/schemas/AccountEvent"
+ },
+ "type" : "array"
+ },
+ "payoutState" : {
+ "description" : "The payout state of the account holder.",
+ "$ref" : "#/components/schemas/AccountPayoutState"
+ },
+ "processingState" : {
+ "description" : "The processing state of the account holder.",
+ "$ref" : "#/components/schemas/AccountProcessingState"
+ },
+ "status" : {
+ "description" : "The status of the account holder.\n>Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.",
+ "enum" : [
+ "Active",
+ "Closed",
+ "Inactive",
+ "Suspended"
+ ],
+ "type" : "string"
+ },
+ "statusReason" : {
+ "description" : "The reason why the status was assigned to the account holder.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "status"
+ ],
+ "type" : "object"
+ },
+ "AccountPayoutState" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "allowPayout" : {
+ "description" : "Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts.",
+ "type" : "boolean"
+ },
+ "disableReason" : {
+ "description" : "The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why.",
+ "type" : "string"
+ },
+ "disabled" : {
+ "description" : "Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors.",
+ "type" : "boolean"
+ },
+ "notAllowedReason" : {
+ "x-addedInVersion" : "5",
+ "description" : "The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen.",
+ "type" : "string"
+ },
+ "payoutLimit" : {
+ "description" : "The maximum amount that payouts are limited to. Only applies if payouts are allowed but limited.",
+ "$ref" : "#/components/schemas/Amount"
+ },
+ "tierNumber" : {
+ "x-addedInVersion" : "3",
+ "description" : "The payout tier that the account holder occupies.",
+ "format" : "int32",
+ "type" : "integer"
+ }
+ },
+ "type" : "object"
+ },
+ "AccountProcessingState" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "disableReason" : {
+ "description" : "The reason why processing has been disabled.",
+ "type" : "string"
+ },
+ "disabled" : {
+ "description" : "Indicates whether the processing of payments is allowed.",
+ "type" : "boolean"
+ },
+ "processedFrom" : {
+ "description" : "The lower bound of the processing tier (i.e., an account holder must have processed at least this amount of money in order to be placed into this tier).",
+ "$ref" : "#/components/schemas/Amount"
+ },
+ "processedTo" : {
+ "description" : "The upper bound of the processing tier (i.e., an account holder must have processed less than this amount of money in order to be placed into this tier).",
+ "$ref" : "#/components/schemas/Amount"
+ },
+ "tierNumber" : {
+ "x-addedInVersion" : "3",
+ "description" : "The processing tier that the account holder occupies.",
+ "format" : "int32",
+ "type" : "integer"
+ }
+ },
+ "type" : "object"
+ },
+ "Amount" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "currency" : {
+ "description" : "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).",
+ "maxLength" : 3,
+ "minLength" : 3,
+ "type" : "string"
+ },
+ "value" : {
+ "description" : "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).",
+ "format" : "int64",
+ "type" : "integer"
+ }
+ },
+ "required" : [
+ "value",
+ "currency"
+ ],
+ "type" : "object"
+ },
+ "BankAccountDetail" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountNumber" : {
+ "description" : "The bank account number (without separators).\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "accountType" : {
+ "description" : "The type of bank account.\nOnly applicable to bank accounts held in the USA.\nThe permitted values are: `checking`, `savings`.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "bankAccountName" : {
+ "description" : "The name of the bank account.",
+ "type" : "string"
+ },
+ "bankAccountReference" : {
+ "x-addedInVersion" : "5",
+ "description" : "Merchant reference to the bank account.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "description" : "The unique identifier (UUID) of the Bank Account.\n>If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID.\n\n>If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue.\n\n>If, during an account holder update request, a UUID that is [...]
+ "type" : "string"
+ },
+ "bankBicSwift" : {
+ "description" : "The bank identifier code.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "bankCity" : {
+ "description" : "The city in which the bank branch is located.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "bankCode" : {
+ "description" : "The bank code of the banking institution with which the bank account is registered.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "bankName" : {
+ "description" : "The name of the banking institution with which the bank account is held.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "branchCode" : {
+ "description" : "The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account:\n* United States - Routing number\n* United Kingdom - Sort code\n* Germany - Bankleitzahl\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "checkCode" : {
+ "description" : "The check code of the bank account.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "countryCode" : {
+ "description" : "The two-letter country code in which the bank account is registered.\n>The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "currencyCode" : {
+ "description" : "The currency in which the bank account deals.\n>The permitted currency codes are defined in ISO-4217 (e.g. 'EUR').\n",
+ "type" : "string"
+ },
+ "iban" : {
+ "description" : "The international bank account number.\n>The IBAN standard is defined in ISO-13616.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerCity" : {
+ "description" : "The city of residence of the bank account owner.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerCountryCode" : {
+ "description" : "The country code of the country of residence of the bank account owner.\n>The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerDateOfBirth" : {
+ "deprecated" : true,
+ "description" : "The date of birth of the bank account owner.\nThe date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31).",
+ "type" : "string"
+ },
+ "ownerHouseNumberOrName" : {
+ "description" : "The house name or number of the residence of the bank account owner.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerName" : {
+ "description" : "The name of the bank account owner.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerNationality" : {
+ "description" : "The country code of the country of nationality of the bank account owner.\n>The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerPostalCode" : {
+ "description" : "The postal code of the residence of the bank account owner.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerState" : {
+ "description" : "The state of residence of the bank account owner.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "ownerStreet" : {
+ "description" : "The street name of the residence of the bank account owner.\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "primaryAccount" : {
+ "description" : "If set to true, the bank account is a primary account.",
+ "type" : "boolean"
+ },
+ "taxId" : {
+ "description" : "The tax ID number.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ },
+ "urlForVerification" : {
+ "description" : "The URL to be used for bank account verification.\nThis may be generated on bank account creation.\n\n>Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "BusinessDetails" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "doingBusinessAs" : {
+ "description" : "The registered name of the company (if it differs from the legal name of the company).",
+ "type" : "string"
+ },
+ "legalBusinessName" : {
+ "description" : "The legal name of the company.",
+ "type" : "string"
+ },
+ "listedUltimateParentCompany" : {
+ "description" : "Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company.",
+ "items" : {
+ "$ref" : "#/components/schemas/UltimateParentCompany"
+ },
+ "type" : "array"
+ },
+ "registrationNumber" : {
+ "x-addedInVersion" : "4",
+ "description" : "The registration number of the company.",
+ "type" : "string"
+ },
+ "shareholders" : {
+ "description" : "Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos).",
+ "items" : {
+ "$ref" : "#/components/schemas/ShareholderContact"
+ },
+ "type" : "array"
+ },
+ "signatories" : {
+ "description" : "Signatories associated with the company.\nEach array entry should represent one signatory.",
+ "items" : {
+ "$ref" : "#/components/schemas/SignatoryContact"
+ },
+ "type" : "array"
+ },
+ "stockExchange" : {
+ "x-addedInVersion" : "6",
+ "description" : "Market Identifier Code (MIC).",
+ "type" : "string"
+ },
+ "stockNumber" : {
+ "x-addedInVersion" : "6",
+ "description" : "International Securities Identification Number (ISIN).",
+ "type" : "string"
+ },
+ "stockTicker" : {
+ "x-addedInVersion" : "6",
+ "description" : "Stock Ticker symbol.",
+ "type" : "string"
+ },
+ "taxId" : {
+ "description" : "The tax ID of the company.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "CloseAccountHolderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder to be closed.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode"
+ ],
+ "type" : "object"
+ },
+ "CloseAccountHolderResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderStatus" : {
+ "description" : "The new status of the Account Holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "CloseAccountRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of account to be closed.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountCode"
+ ],
+ "type" : "object"
+ },
+ "CloseAccountResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The account code of the account that is closed.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ },
+ "status" : {
+ "x-addedInVersion" : "2",
+ "description" : "The new status of the account.\n>Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.",
+ "enum" : [
+ "Active",
+ "Closed",
+ "Inactive",
+ "Suspended"
+ ],
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "CloseStoresRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder.",
+ "type" : "string"
+ },
+ "stores" : {
+ "description" : "List of stores to be closed.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "stores"
+ ],
+ "type" : "object"
+ },
+ "CreateAccountHolderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "Your unique identifier for the prospective account holder.\nThe length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed.",
+ "type" : "string"
+ },
+ "accountHolderDetails" : {
+ "description" : "The details of the prospective account holder.",
+ "$ref" : "#/components/schemas/AccountHolderDetails"
+ },
+ "createDefaultAccount" : {
+ "description" : "If set to **true**, an account with the default options is automatically created for the account holder.\nBy default, this field is set to **true**.",
+ "type" : "boolean"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.",
+ "type" : "string"
+ },
+ "legalEntity" : {
+ "description" : "The legal entity type of the account holder. This determines the information that should be provided in the request.\n\nPossible values: **Business**, **Individual**, or **NonProfit**.\n\n* If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.\n\n* If set to **Individual**, then `accountHolderDetails.individualDetails` must [...]
+ "enum" : [
+ "Business",
+ "Individual",
+ "NonProfit",
+ "Partnership",
+ "PublicCompany"
+ ],
+ "type" : "string"
+ },
+ "primaryCurrency" : {
+ "x-addedInVersion" : "4",
+ "deprecated" : true,
+ "description" : "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.",
+ "type" : "string"
+ },
+ "processingTier" : {
+ "x-addedInVersion" : "3",
+ "description" : "The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder.",
+ "format" : "int32",
+ "type" : "integer"
+ },
+ "verificationProfile" : {
+ "x-addedInVersion" : "6",
+ "description" : "The identifier of the profile that applies to this entity.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "legalEntity",
+ "accountHolderDetails"
+ ],
+ "type" : "object"
+ },
+ "CreateAccountHolderResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of a new account created for the account holder.",
+ "type" : "string"
+ },
+ "accountHolderCode" : {
+ "description" : "The code of the new account holder.",
+ "type" : "string"
+ },
+ "accountHolderDetails" : {
+ "description" : "Details of the new account holder.",
+ "$ref" : "#/components/schemas/AccountHolderDetails"
+ },
+ "accountHolderStatus" : {
+ "x-addedInVersion" : "2",
+ "description" : "The status of the new account holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "The description of the new account holder.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "A list of fields that caused the `/createAccountHolder` request to fail.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "legalEntity" : {
+ "x-addedInVersion" : "4",
+ "description" : "The type of legal entity of the new account holder.",
+ "enum" : [
+ "Business",
+ "Individual",
+ "NonProfit",
+ "Partnership",
+ "PublicCompany"
+ ],
+ "type" : "string"
+ },
+ "primaryCurrency" : {
+ "x-addedInVersion" : "5",
+ "deprecated" : true,
+ "description" : "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.",
+ "type" : "string"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ },
+ "verification" : {
+ "x-addedInVersion" : "2",
+ "description" : "The details of KYC Verification of the account holder.",
+ "$ref" : "#/components/schemas/KYCVerificationResult"
+ },
+ "verificationProfile" : {
+ "x-addedInVersion" : "6",
+ "description" : "The identifier of the profile that applies to this entity.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "CreateAccountRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of Account Holder under which to create the account.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "5",
+ "description" : "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.",
+ "type" : "string"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.",
+ "type" : "string"
+ },
+ "metadata" : {
+ "x-addedInVersion" : "5",
+ "additionalProperties" : {
+ "type" : "string"
+ },
+ "description" : "A set of key and value pairs for general use by the merchant.\nThe keys do not have specific names and may be used for storing miscellaneous data as desired.\n> Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.",
+ "type" : "object"
+ },
+ "payoutMethodCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.",
+ "type" : "string"
+ },
+ "payoutSchedule" : {
+ "description" : "The payout schedule for the account.\n\nPossible values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`.\n> `HOLD` prevents scheduled payouts, but you can still initiate payouts manually.",
+ "enum" : [
+ "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT",
+ "DAILY",
+ "DAILY_AU",
+ "DAILY_EU",
+ "DAILY_SG",
+ "DAILY_US",
+ "HOLD",
+ "MONTHLY",
+ "WEEKLY",
+ "WEEKLY_MON_TO_FRI_AU",
+ "WEEKLY_MON_TO_FRI_EU",
+ "WEEKLY_MON_TO_FRI_US",
+ "WEEKLY_ON_TUE_FRI_MIDNIGHT",
+ "WEEKLY_SUN_TO_THU_AU",
+ "WEEKLY_SUN_TO_THU_US"
+ ],
+ "type" : "string"
+ },
+ "payoutScheduleReason" : {
+ "description" : "The reason for the payout schedule choice.\n> This field is required when the `payoutSchedule` parameter is set to `HOLD`.",
+ "type" : "string"
+ },
+ "payoutSpeed" : {
+ "x-addedInVersion" : "5",
+ "default" : "STANDARD",
+ "description" : "Speed at which payouts for this account are processed.\n\nPossible values: `STANDARD` (default), `SAME_DAY`.",
+ "enum" : [
+ "INSTANT",
+ "SAME_DAY",
+ "STANDARD"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode"
+ ],
+ "type" : "object"
+ },
+ "CreateAccountResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of the new account.",
+ "type" : "string"
+ },
+ "accountHolderCode" : {
+ "description" : "The code of the account holder.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "5",
+ "description" : "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.",
+ "type" : "string"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "The description of the account.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "A list of fields that caused the `/createAccount` request to fail.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "metadata" : {
+ "x-addedInVersion" : "5",
+ "additionalProperties" : {
+ "type" : "string"
+ },
+ "description" : "A set of key and value pairs containing metadata.",
+ "type" : "object"
+ },
+ "payoutMethodCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.",
+ "type" : "string"
+ },
+ "payoutSchedule" : {
+ "description" : "The details of the payout schedule added to the account.",
+ "$ref" : "#/components/schemas/PayoutScheduleResponse"
+ },
+ "payoutSpeed" : {
+ "x-addedInVersion" : "5",
+ "description" : "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.",
+ "enum" : [
+ "INSTANT",
+ "SAME_DAY",
+ "STANDARD"
+ ],
+ "type" : "string"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ },
+ "status" : {
+ "x-addedInVersion" : "2",
+ "description" : "The status of the account.\n>Permitted values: `Active`.",
+ "enum" : [
+ "Active",
+ "Closed",
+ "Inactive",
+ "Suspended"
+ ],
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "DeleteBankAccountRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder from which to delete the Bank Account(s).",
+ "type" : "string"
+ },
+ "bankAccountUUIDs" : {
+ "description" : "The code(s) of the Bank Accounts to be deleted.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "bankAccountUUIDs"
+ ],
+ "type" : "object"
+ },
+ "DeleteLegalArrangementRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder.",
+ "type" : "string"
+ },
+ "legalArrangements" : {
+ "description" : "List of legal arrangements.",
+ "items" : {
+ "$ref" : "#/components/schemas/LegalArrangementRequest"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "legalArrangements"
+ ],
+ "type" : "object"
+ },
+ "DeletePayoutMethodRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder, from which to delete the payout methods.",
+ "type" : "string"
+ },
+ "payoutMethodCodes" : {
+ "description" : "The codes of the payout methods to be deleted.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "payoutMethodCodes"
+ ],
+ "type" : "object"
+ },
+ "DeleteShareholderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder from which to delete the Shareholders.",
+ "type" : "string"
+ },
+ "shareholderCodes" : {
+ "description" : "The code(s) of the Shareholders to be deleted.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "shareholderCodes"
+ ],
+ "type" : "object"
+ },
+ "DeleteSignatoriesRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder from which to delete the signatories.",
+ "type" : "string"
+ },
+ "signatoryCodes" : {
+ "description" : "Array of codes of the signatories to be deleted.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "signatoryCodes"
+ ],
+ "type" : "object"
+ },
+ "DocumentDetail" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "x-addedInVersion" : "2",
+ "description" : "The code of account holder, to which the document applies.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "2",
+ "description" : "The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted.\n>Required if the `documentType` [...]
+ "type" : "string"
+ },
+ "description" : {
+ "description" : "Description of the document.",
+ "type" : "string"
+ },
+ "documentType" : {
+ "description" : "The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats.\n\nPermitted values:\n* **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account.\n* **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a c [...]
+ "enum" : [
+ "BANK_STATEMENT",
+ "BSN",
+ "COMPANY_REGISTRATION_SCREENING",
+ "CONSTITUTIONAL_DOCUMENT",
+ "DRIVING_LICENCE",
+ "DRIVING_LICENCE_BACK",
+ "DRIVING_LICENCE_FRONT",
+ "ID_CARD",
+ "ID_CARD_BACK",
+ "ID_CARD_FRONT",
+ "PASSPORT",
+ "PROOF_OF_RESIDENCY",
+ "SSN",
+ "SUPPORTING_DOCUMENTS"
+ ],
+ "type" : "string"
+ },
+ "filename" : {
+ "description" : "Filename of the document.",
+ "type" : "string"
+ },
+ "legalArrangementCode" : {
+ "x-addedInVersion" : "6",
+ "description" : "The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked.",
+ "type" : "string"
+ },
+ "legalArrangementEntityCode" : {
+ "x-addedInVersion" : "6",
+ "description" : "The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked.",
+ "type" : "string"
+ },
+ "shareholderCode" : {
+ "x-addedInVersion" : "2",
+ "description" : "The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted.\n>Required if the account holder has a `legalEntity` of type **Busin [...]
+ "type" : "string"
+ },
+ "signatoryCode" : {
+ "description" : "The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "documentType"
+ ],
+ "type" : "object"
+ },
+ "ErrorFieldType" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "errorCode" : {
+ "description" : "The validation error code.",
+ "format" : "int32",
+ "type" : "integer"
+ },
+ "errorDescription" : {
+ "description" : "A description of the validation error.",
+ "type" : "string"
+ },
+ "fieldType" : {
+ "description" : "The type of error field.",
+ "$ref" : "#/components/schemas/FieldType"
+ }
+ },
+ "type" : "object"
+ },
+ "FieldType" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "field" : {
+ "description" : "The full name of the property.",
+ "type" : "string"
+ },
+ "fieldName" : {
+ "description" : "The type of the field.",
+ "enum" : [
+ "accountCode",
+ "accountHolderCode",
+ "accountHolderDetails",
+ "accountNumber",
+ "accountStateType",
+ "accountStatus",
+ "accountType",
+ "address",
+ "balanceAccount",
+ "balanceAccountActive",
+ "balanceAccountCode",
+ "balanceAccountId",
+ "bankAccount",
+ "bankAccountCode",
+ "bankAccountName",
+ "bankAccountUUID",
+ "bankBicSwift",
+ "bankCity",
+ "bankCode",
+ "bankName",
+ "bankStatement",
+ "branchCode",
+ "businessContact",
+ "cardToken",
+ "checkCode",
+ "city",
+ "companyRegistration",
+ "constitutionalDocument",
+ "controller",
+ "country",
+ "countryCode",
+ "currency",
+ "currencyCode",
+ "dateOfBirth",
+ "description",
+ "destinationAccountCode",
+ "document",
+ "documentContent",
+ "documentExpirationDate",
+ "documentIssuerCountry",
+ "documentIssuerState",
+ "documentName",
+ "documentNumber",
+ "documentType",
+ "doingBusinessAs",
+ "drivingLicence",
+ "drivingLicenceBack",
+ "drivingLicenceFront",
+ "drivingLicense",
+ "email",
+ "firstName",
+ "formType",
+ "fullPhoneNumber",
+ "gender",
+ "hopWebserviceUser",
+ "houseNumberOrName",
+ "iban",
+ "idCard",
+ "idCardBack",
+ "idCardFront",
+ "idNumber",
+ "identityDocument",
+ "individualDetails",
+ "infix",
+ "jobTitle",
+ "lastName",
+ "lastReviewDate",
+ "legalArrangement",
+ "legalArrangementCode",
+ "legalArrangementEntity",
+ "legalArrangementEntityCode",
+ "legalArrangementLegalForm",
+ "legalArrangementMember",
+ "legalArrangementMembers",
+ "legalArrangementName",
+ "legalArrangementReference",
+ "legalArrangementRegistrationNumber",
+ "legalArrangementTaxNumber",
+ "legalArrangementType",
+ "legalBusinessName",
+ "legalEntity",
+ "legalEntityType",
+ "linkedViasVirtualAccount",
+ "logo",
+ "merchantAccount",
+ "merchantCategoryCode",
+ "merchantHouseNumber",
+ "merchantReference",
+ "microDeposit",
+ "name",
+ "nationality",
+ "originalReference",
+ "ownerCity",
+ "ownerCountryCode",
+ "ownerDateOfBirth",
+ "ownerHouseNumberOrName",
+ "ownerName",
+ "ownerPostalCode",
+ "ownerState",
+ "ownerStreet",
+ "passport",
+ "passportNumber",
+ "payoutMethod",
+ "payoutMethodCode",
+ "payoutSchedule",
+ "pciSelfAssessment",
+ "personalData",
+ "phoneCountryCode",
+ "phoneNumber",
+ "postalCode",
+ "primaryCurrency",
+ "reason",
+ "registrationNumber",
+ "returnUrl",
+ "schedule",
+ "shareholder",
+ "shareholderCode",
+ "shareholderCodeAndSignatoryCode",
+ "shareholderCodeOrSignatoryCode",
+ "shareholderType",
+ "shareholderTypes",
+ "shopperInteraction",
+ "signatory",
+ "signatoryCode",
+ "socialSecurityNumber",
+ "sourceAccountCode",
+ "splitAccount",
+ "splitConfigurationUUID",
+ "splitCurrency",
+ "splitValue",
+ "splits",
+ "stateOrProvince",
+ "status",
+ "stockExchange",
+ "stockNumber",
+ "stockTicker",
+ "store",
+ "storeDetail",
+ "storeName",
+ "storeReference",
+ "street",
+ "taxId",
+ "tier",
+ "tierNumber",
+ "transferCode",
+ "ultimateParentCompany",
+ "ultimateParentCompanyAddressDetails",
+ "ultimateParentCompanyAddressDetailsCountry",
+ "ultimateParentCompanyBusinessDetails",
+ "ultimateParentCompanyBusinessDetailsLegalBusinessName",
+ "ultimateParentCompanyBusinessDetailsRegistrationNumber",
+ "ultimateParentCompanyCode",
+ "ultimateParentCompanyStockExchange",
+ "ultimateParentCompanyStockNumber",
+ "ultimateParentCompanyStockNumberOrStockTicker",
+ "ultimateParentCompanyStockTicker",
+ "unknown",
+ "value",
+ "verificationType",
+ "virtualAccount",
+ "visaNumber",
+ "webAddress",
+ "year"
+ ],
+ "type" : "string"
+ },
+ "shareholderCode" : {
+ "description" : "The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "GenericResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "GetAccountHolderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of the account of which to retrieve the details.\n> Required if no `accountHolderCode` is provided.",
+ "type" : "string"
+ },
+ "accountHolderCode" : {
+ "description" : "The code of the account holder of which to retrieve the details.\n> Required if no `accountCode` is provided.",
+ "type" : "string"
+ },
+ "showDetails" : {
+ "x-addedInVersion" : "4",
+ "description" : "True if the request should return the account holder details",
+ "type" : "boolean"
+ }
+ },
+ "type" : "object"
+ },
+ "GetAccountHolderResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder.",
+ "type" : "string"
+ },
+ "accountHolderDetails" : {
+ "description" : "Details of the account holder.",
+ "$ref" : "#/components/schemas/AccountHolderDetails"
+ },
+ "accountHolderStatus" : {
+ "x-addedInVersion" : "2",
+ "description" : "The status of the account holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "accounts" : {
+ "description" : "A list of the accounts under the account holder.",
+ "items" : {
+ "$ref" : "#/components/schemas/Account"
+ },
+ "type" : "array"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "The description of the account holder.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "legalEntity" : {
+ "description" : "The legal entity of the account holder.",
+ "enum" : [
+ "Business",
+ "Individual",
+ "NonProfit",
+ "Partnership",
+ "PublicCompany"
+ ],
+ "type" : "string"
+ },
+ "migrationData" : {
+ "x-addedInVersion" : "5",
+ "description" : "Details of the account holder migrated to the balance platform.",
+ "$ref" : "#/components/schemas/MigrationData"
+ },
+ "primaryCurrency" : {
+ "x-addedInVersion" : "4",
+ "description" : "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.",
+ "type" : "string"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ },
+ "systemUpToDateTime" : {
+ "x-addedInVersion" : "5",
+ "description" : "The time that shows how up to date is the information in the response.",
+ "format" : "date-time",
+ "type" : "string"
+ },
+ "verification" : {
+ "x-addedInVersion" : "2",
+ "description" : "The details of KYC Verification of the account holder.",
+ "$ref" : "#/components/schemas/KYCVerificationResult"
+ },
+ "verificationProfile" : {
+ "x-addedInVersion" : "6",
+ "description" : "The identifier of the profile that applies to this entity.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "GetAccountHolderStatusResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder.",
+ "type" : "string"
+ },
+ "accountHolderStatus" : {
+ "x-addedInVersion" : "2",
+ "description" : "The status of the Account Holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "GetTaxFormRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The account holder code you provided when you created the account holder.",
+ "type" : "string"
+ },
+ "formType" : {
+ "description" : "Type of the requested tax form. For example, 1099-K.",
+ "type" : "string"
+ },
+ "year" : {
+ "description" : "Applicable tax year in the YYYY format.",
+ "format" : "int32",
+ "type" : "integer"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "formType",
+ "year"
+ ],
+ "type" : "object"
+ },
+ "GetTaxFormResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "content" : {
+ "description" : "The content of the tax form in the Base64 binary format.",
+ "format" : "byte",
+ "type" : "string"
+ },
+ "contentType" : {
+ "description" : "The content type of the tax form.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "GetUploadedDocumentsRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder for which to retrieve the documents.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "2",
+ "description" : "The code of the Bank Account for which to retrieve the documents.",
+ "type" : "string"
+ },
+ "shareholderCode" : {
+ "description" : "The code of the Shareholder for which to retrieve the documents.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode"
+ ],
+ "type" : "object"
+ },
+ "GetUploadedDocumentsResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "documentDetails" : {
+ "description" : "A list of the documents and their details.",
+ "items" : {
+ "$ref" : "#/components/schemas/DocumentDetail"
+ },
+ "type" : "array"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "IndividualDetails" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "name" : {
+ "description" : "The name of the individual.\n>Make sure your account holder registers using the name shown on their Photo ID.",
+ "$ref" : "#/components/schemas/ViasName"
+ },
+ "personalData" : {
+ "description" : "Personal information of the individual.",
+ "$ref" : "#/components/schemas/ViasPersonalData"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCCheckStatusData" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "requiredFields" : {
+ "description" : "A list of the fields required for execution of the check.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ },
+ "status" : {
+ "description" : "The status of the check.\n\nPossible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**.",
+ "enum" : [
+ "AWAITING_DATA",
+ "DATA_PROVIDED",
+ "FAILED",
+ "INVALID_DATA",
+ "PASSED",
+ "PENDING",
+ "PENDING_REVIEW",
+ "RETRY_LIMIT_REACHED",
+ "UNCHECKED"
+ ],
+ "type" : "string"
+ },
+ "summary" : {
+ "description" : "A summary of the execution of the check.",
+ "$ref" : "#/components/schemas/KYCCheckSummary"
+ },
+ "type" : {
+ "description" : "The type of check.\n\nPossible values:\n\n * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later.\n\n * **COMPANY_VERIFICATION**\n\n * **CARD_VERIFICATION**\n\n* **IDENTITY_VERIFICATION**\n\n* **LEGAL_ARRANGEMENT_VERIFICATION**\n\n* **NONPROFIT_VERIFICATION**\n\n * **PASSPORT_VERIFICATION**\n\n* **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later.\n\n* **PCI_VERIFICATION**",
+ "enum" : [
+ "BANK_ACCOUNT_VERIFICATION",
+ "CARD_VERIFICATION",
+ "COMPANY_VERIFICATION",
+ "IDENTITY_VERIFICATION",
+ "LEGAL_ARRANGEMENT_VERIFICATION",
+ "NONPROFIT_VERIFICATION",
+ "PASSPORT_VERIFICATION",
+ "PAYOUT_METHOD_VERIFICATION",
+ "PCI_VERIFICATION"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "type",
+ "status"
+ ],
+ "type" : "object"
+ },
+ "KYCCheckSummary" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "kycCheckCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes).",
+ "format" : "int32",
+ "type" : "integer"
+ },
+ "kycCheckDescription" : {
+ "x-addedInVersion" : "5",
+ "description" : "A description of the check.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCLegalArrangementCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ },
+ "legalArrangementCode" : {
+ "description" : "The unique ID of the legal arrangement to which the check applies.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCLegalArrangementEntityCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ },
+ "legalArrangementCode" : {
+ "description" : "The unique ID of the legal arrangement to which the entity belongs.",
+ "type" : "string"
+ },
+ "legalArrangementEntityCode" : {
+ "description" : "The unique ID of the legal arrangement entity to which the check applies.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCPayoutMethodCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ },
+ "payoutMethodCode" : {
+ "description" : "The unique ID of the payoput method to which the check applies.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCShareholderCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ },
+ "legalArrangementCode" : {
+ "x-addedInVersion" : "6",
+ "description" : "The unique ID of the legal arrangement to which the shareholder belongs, if applicable.",
+ "type" : "string"
+ },
+ "legalArrangementEntityCode" : {
+ "x-addedInVersion" : "6",
+ "description" : "The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable.",
+ "type" : "string"
+ },
+ "shareholderCode" : {
+ "description" : "The code of the shareholder to which the check applies.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCSignatoryCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ },
+ "signatoryCode" : {
+ "description" : "The code of the signatory to which the check applies.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCUltimateParentCompanyCheckResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "checks" : {
+ "description" : "A list of the checks and their statuses.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCCheckStatusData"
+ },
+ "type" : "array"
+ },
+ "ultimateParentCompanyCode" : {
+ "x-addedInVersion" : "6",
+ "description" : "The code of the Ultimate Parent Company to which the check applies.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "KYCVerificationResult" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolder" : {
+ "description" : "The results of the checks on the account holder.",
+ "$ref" : "#/components/schemas/KYCCheckResult"
+ },
+ "legalArrangements" : {
+ "x-addedInVersion" : "6",
+ "description" : "The results of the checks on the legal arrangements.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCLegalArrangementCheckResult"
+ },
+ "type" : "array"
+ },
+ "legalArrangementsEntities" : {
+ "x-addedInVersion" : "6",
+ "description" : "The results of the checks on the legal arrangement entities.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCLegalArrangementEntityCheckResult"
+ },
+ "type" : "array"
+ },
+ "payoutMethods" : {
+ "x-addedInVersion" : "6",
+ "description" : "The results of the checks on the payout methods.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCPayoutMethodCheckResult"
+ },
+ "type" : "array"
+ },
+ "shareholders" : {
+ "description" : "The results of the checks on the shareholders.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCShareholderCheckResult"
+ },
+ "type" : "array"
+ },
+ "signatories" : {
+ "description" : "The results of the checks on the signatories.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCSignatoryCheckResult"
+ },
+ "type" : "array"
+ },
+ "ultimateParentCompany" : {
+ "x-addedInVersion" : "6",
+ "description" : "The result of the check on the Ultimate Parent Company.",
+ "items" : {
+ "$ref" : "#/components/schemas/KYCUltimateParentCompanyCheckResult"
+ },
+ "type" : "array"
+ }
+ },
+ "type" : "object"
+ },
+ "LegalArrangementDetail" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "The address of the legal arrangement.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "legalArrangementCode" : {
+ "description" : "Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement.\nUse only when updating an account holder. If you include this field when creating an account holder, the request will fail.",
+ "type" : "string"
+ },
+ "legalArrangementEntities" : {
+ "description" : "An array containing information about other entities that are part of the legal arrangement.",
+ "items" : {
+ "$ref" : "#/components/schemas/LegalArrangementEntityDetail"
+ },
+ "type" : "array"
+ },
+ "legalArrangementReference" : {
+ "description" : "Your reference for the legal arrangement. Must be between 3 to 128 characters.",
+ "type" : "string"
+ },
+ "legalForm" : {
+ "description" : "The form of legal arrangement. Required if `type` is **Trust** or **Partnership**.\n\nThe possible values depend on the `type`.\n\n- For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, ** [...]
+ "enum" : [
+ "CashManagementTrust",
+ "CorporateUnitTrust",
+ "DeceasedEstate",
+ "DiscretionaryInvestmentTrust",
+ "DiscretionaryServicesManagementTrust",
+ "DiscretionaryTradingTrust",
+ "FirstHomeSaverAccountsTrust",
+ "FixedTrust",
+ "FixedUnitTrust",
+ "HybridTrust",
+ "ListedPublicUnitTrust",
+ "OtherTrust",
+ "PooledSuperannuationTrust",
+ "PublicTradingTrust",
+ "UnlistedPublicUnitTrust",
+ "LimitedPartnership",
+ "FamilyPartnership",
+ "OtherPartnership"
+ ],
+ "type" : "string"
+ },
+ "name" : {
+ "description" : "The legal name of the legal arrangement. Minimum length: 3 characters.",
+ "type" : "string"
+ },
+ "registrationNumber" : {
+ "description" : "The registration number of the legal arrangement.",
+ "type" : "string"
+ },
+ "taxNumber" : {
+ "description" : "The tax identification number of the legal arrangement.",
+ "type" : "string"
+ },
+ "type" : {
+ "description" : "The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements).\n\nPossible values:\n\n- **Association** \n\n- **Partnership** \n\n- **SoleProprietorship** \n\n- **Trust** \n\n",
+ "enum" : [
+ "Association",
+ "Partnership",
+ "SoleProprietorship",
+ "Trust"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "type",
+ "name",
+ "address"
+ ],
+ "type" : "object"
+ },
+ "LegalArrangementEntityDetail" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "The address of the entity.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "businessDetails" : {
+ "description" : "Required when creating an entity with `legalEntityType` **Business**, **NonProfit**, **PublicCompany**, or **Partnership**.",
+ "$ref" : "#/components/schemas/BusinessDetails"
+ },
+ "email" : {
+ "description" : "The e-mail address of the entity.",
+ "type" : "string"
+ },
+ "fullPhoneNumber" : {
+ "description" : "The phone number of the contact provided as a single string. It will be handled as a landline phone.\n**Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"",
+ "type" : "string"
+ },
+ "individualDetails" : {
+ "description" : "Required when creating an entity with `legalEntityType` **Individual**.",
+ "$ref" : "#/components/schemas/IndividualDetails"
+ },
+ "legalArrangementEntityCode" : {
+ "description" : "Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity.\nUse only when updating an account holder. If you include this field when creating an account holder, the request will fail.",
+ "type" : "string"
+ },
+ "legalArrangementEntityReference" : {
+ "description" : "Your reference for the legal arrangement entity.",
+ "type" : "string"
+ },
+ "legalArrangementMembers" : {
+ "description" : "An array containing the roles of the entity in the legal arrangement.\n\nThe possible values depend on the legal arrangement `type`.\n\n- For `type` **Association**: **ControllingPerson** and **Shareholder**.\n\n- For `type` **Partnership**: **Partner** and **Shareholder**.\n\n- For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**.\n\n",
+ "items" : {
+ "enum" : [
+ "Beneficiary",
+ "ControllingPerson",
+ "Partner",
+ "Protector",
+ "Settlor",
+ "Shareholder",
+ "Trustee"
+ ],
+ "type" : "string"
+ },
+ "type" : "array"
+ },
+ "legalEntityType" : {
+ "description" : "The legal entity type.\n\nPossible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. ",
+ "enum" : [
+ "Business",
+ "Individual",
+ "NonProfit",
+ "Partnership",
+ "PublicCompany"
+ ],
+ "type" : "string"
+ },
+ "phoneNumber" : {
+ "description" : "The phone number of the entity.",
+ "$ref" : "#/components/schemas/ViasPhoneNumber"
+ },
+ "webAddress" : {
+ "description" : "The URL of the website of the contact.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "LegalArrangementRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "legalArrangementCode" : {
+ "description" : "The code of the legal arrangement to be deleted. If you also send `legalArrangementEntityCodes`, only the entities listed will be deleted.",
+ "type" : "string"
+ },
+ "legalArrangementEntityCodes" : {
+ "description" : "List of legal arrangement entities to be deleted.",
+ "items" : {
+ "type" : "string"
+ },
+ "type" : "array"
+ }
+ },
+ "required" : [
+ "legalArrangementCode"
+ ],
+ "type" : "object"
+ },
+ "MigratedAccounts" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The unique identifier of the account of the migrated account holder in the classic integration.",
+ "type" : "string"
+ },
+ "balanceAccountId" : {
+ "description" : "The unique identifier of the account of the migrated account holder in the balance platform.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "MigratedShareholders" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "legalEntityCode" : {
+ "description" : "The unique identifier of the legal entity of that shareholder in the balance platform.",
+ "type" : "string"
+ },
+ "shareholderCode" : {
+ "description" : "The unique identifier of the account of the migrated shareholder in the classic integration.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "MigratedStores" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "businessLineId" : {
+ "description" : "The unique identifier of the business line associated with the migrated account holder in the balance platform.",
+ "type" : "string"
+ },
+ "storeCode" : {
+ "description" : "The unique identifier of the store associated with the migrated account holder in the classic integration.",
+ "type" : "string"
+ },
+ "storeId" : {
+ "description" : "The unique identifier of the store associated with the migrated account holder in the balance platform.",
+ "type" : "string"
+ },
+ "storeReference" : {
+ "description" : "Your reference for the store in the classic integration. The [Customer Area](https://ca-test.adyen.com/) uses this value for the store description.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "MigrationData" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderId" : {
+ "description" : "The unique identifier of the account holder in the balance platform.",
+ "type" : "string"
+ },
+ "balancePlatform" : {
+ "description" : "The unique identifier of the balance platfrom to which the account holder was migrated.",
+ "type" : "string"
+ },
+ "migrated" : {
+ "description" : "Set to **true** if the account holder has been migrated.",
+ "type" : "boolean"
+ },
+ "migratedAccounts" : {
+ "description" : "Contains the mapping of virtual account codes (classic integration) to the balance account codes (balance platform) associated with the migrated account holder.",
+ "items" : {
+ "$ref" : "#/components/schemas/MigratedAccounts"
+ },
+ "type" : "array"
+ },
+ "migratedShareholders" : {
+ "description" : "Contains the mapping of shareholders associated with the migrated legal entities.",
+ "items" : {
+ "$ref" : "#/components/schemas/MigratedShareholders"
+ },
+ "type" : "array"
+ },
+ "migratedStores" : {
+ "description" : "Contains the mapping of business lines and stores associated with the migrated account holder.",
+ "items" : {
+ "$ref" : "#/components/schemas/MigratedStores"
+ },
+ "type" : "array"
+ },
+ "migrationDate" : {
+ "description" : "The date when account holder was migrated.",
+ "format" : "date-time",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "PayoutMethod" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "merchantAccount" : {
+ "description" : "The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store).",
+ "type" : "string"
+ },
+ "payoutMethodCode" : {
+ "description" : "Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request.",
+ "type" : "string"
+ },
+ "payoutMethodReference" : {
+ "description" : "Your reference for the payout method.",
+ "type" : "string"
+ },
+ "recurringDetailReference" : {
+ "description" : "The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store).",
+ "type" : "string"
+ },
+ "shopperReference" : {
+ "description" : "The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store).",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "merchantAccount",
+ "shopperReference",
+ "recurringDetailReference"
+ ],
+ "type" : "object"
+ },
+ "PayoutScheduleResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "nextScheduledPayout" : {
+ "description" : "The date of the next scheduled payout.",
+ "format" : "date-time",
+ "type" : "string"
+ },
+ "schedule" : {
+ "description" : "The payout schedule for the account.\n\nPossible values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`.\n> `HOLD` prevents scheduled payouts, but you can still initiate payouts manually.",
+ "enum" : [
+ "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT",
+ "DAILY",
+ "DAILY_AU",
+ "DAILY_EU",
+ "DAILY_SG",
+ "DAILY_US",
+ "HOLD",
+ "MONTHLY",
+ "WEEKLY",
+ "WEEKLY_MON_TO_FRI_AU",
+ "WEEKLY_MON_TO_FRI_EU",
+ "WEEKLY_MON_TO_FRI_US",
+ "WEEKLY_ON_TUE_FRI_MIDNIGHT",
+ "WEEKLY_SUN_TO_THU_AU",
+ "WEEKLY_SUN_TO_THU_US"
+ ],
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "PerformVerificationRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder to verify.",
+ "type" : "string"
+ },
+ "accountStateType" : {
+ "description" : "The state required for the account holder.\n> Permitted values: `Processing`, `Payout`.",
+ "enum" : [
+ "LimitedPayout",
+ "LimitedProcessing",
+ "LimitlessPayout",
+ "LimitlessProcessing",
+ "Payout",
+ "Processing"
+ ],
+ "type" : "string"
+ },
+ "tier" : {
+ "description" : "The tier required for the account holder.",
+ "format" : "int32",
+ "type" : "integer"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "accountStateType",
+ "tier"
+ ],
+ "type" : "object"
+ },
+ "PersonalDocumentData" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "expirationDate" : {
+ "description" : "The expiry date of the document, \n in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.",
+ "type" : "string"
+ },
+ "issuerCountry" : {
+ "description" : "The country where the document was issued, in the two-character \n[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.",
+ "maxLength" : 2,
+ "minLength" : 2,
+ "type" : "string"
+ },
+ "issuerState" : {
+ "description" : "The state where the document was issued (if applicable).",
+ "type" : "string"
+ },
+ "number" : {
+ "description" : "The number in the document.",
+ "type" : "string"
+ },
+ "type" : {
+ "description" : "The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**.\n\nTo delete an existing entry for a document `type`, send only the `type` field in your request. ",
+ "enum" : [
+ "DRIVINGLICENSE",
+ "ID",
+ "PASSPORT",
+ "SOCIALSECURITY",
+ "VISA"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "type"
+ ],
+ "type" : "object"
+ },
+ "ServiceError" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "errorCode" : {
+ "description" : "The error code mapped to the error message.",
+ "type" : "string"
+ },
+ "errorType" : {
+ "description" : "The category of the error.",
+ "type" : "string"
+ },
+ "message" : {
+ "description" : "A short explanation of the issue.",
+ "type" : "string"
+ },
+ "pspReference" : {
+ "description" : "The PSP reference of the payment.",
+ "type" : "string"
+ },
+ "status" : {
+ "description" : "The HTTP response status.",
+ "format" : "int32",
+ "type" : "integer"
+ }
+ },
+ "type" : "object"
+ },
+ "ShareholderContact" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "The address of the person.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "email" : {
+ "description" : "The e-mail address of the person.",
+ "type" : "string"
+ },
+ "fullPhoneNumber" : {
+ "description" : "The phone number of the person provided as a single string. It will be handled as a landline phone.\nExamples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"",
+ "type" : "string"
+ },
+ "jobTitle" : {
+ "description" : "Job title of the person. Required when the `shareholderType` is **Controller**.\n\nExample values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.",
+ "type" : "string"
+ },
+ "name" : {
+ "description" : "The name of the person.",
+ "$ref" : "#/components/schemas/ViasName"
+ },
+ "personalData" : {
+ "description" : "Contains information about the person.",
+ "$ref" : "#/components/schemas/ViasPersonalData"
+ },
+ "phoneNumber" : {
+ "description" : "The phone number of the person.",
+ "$ref" : "#/components/schemas/ViasPhoneNumber"
+ },
+ "shareholderCode" : {
+ "description" : "The unique identifier (UUID) of the shareholder entry.\n>**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.**\n\n>**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..**\n\n>**If, during an Account Holder update request, a UUID that is not correlated wi [...]
+ "type" : "string"
+ },
+ "shareholderReference" : {
+ "x-addedInVersion" : "5",
+ "description" : "Your reference for the shareholder entry.",
+ "type" : "string"
+ },
+ "shareholderType" : {
+ "description" : "Specifies how the person is associated with the account holder. \n\nPossible values: \n\n* **Owner**: Individuals who directly or indirectly own 25% or more of a company.\n\n* **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.",
+ "enum" : [
+ "Controller",
+ "Owner",
+ "Signatory"
+ ],
+ "type" : "string"
+ },
+ "webAddress" : {
+ "description" : "The URL of the person's website.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "SignatoryContact" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "The address of the person.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "email" : {
+ "description" : "The e-mail address of the person.",
+ "type" : "string"
+ },
+ "fullPhoneNumber" : {
+ "description" : "The phone number of the person provided as a single string. It will be handled as a landline phone.\nExamples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"",
+ "type" : "string"
+ },
+ "jobTitle" : {
+ "description" : "Job title of the signatory.\n\nExample values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.",
+ "type" : "string"
+ },
+ "name" : {
+ "description" : "The name of the person.",
+ "$ref" : "#/components/schemas/ViasName"
+ },
+ "personalData" : {
+ "description" : "Contains information about the person.",
+ "$ref" : "#/components/schemas/ViasPersonalData"
+ },
+ "phoneNumber" : {
+ "description" : "The phone number of the person.",
+ "$ref" : "#/components/schemas/ViasPhoneNumber"
+ },
+ "signatoryCode" : {
+ "description" : "The unique identifier (UUID) of the signatory.\n>**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.**\n\n>**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.**\n\n>**If, during an Account Holder update request, a UUID that i [...]
+ "type" : "string"
+ },
+ "signatoryReference" : {
+ "description" : "Your reference for the signatory.",
+ "type" : "string"
+ },
+ "webAddress" : {
+ "description" : "The URL of the person's website.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "StoreDetail" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "The address of the physical store where the account holder will process payments from.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "fullPhoneNumber" : {
+ "description" : "The phone number of the store provided as a single string. It will be handled as a landline phone.\n\nExamples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"",
+ "type" : "string"
+ },
+ "logo" : {
+ "x-addedInVersion" : "5",
+ "description" : "Store logo for payment method setup.",
+ "type" : "string"
+ },
+ "merchantAccount" : {
+ "description" : "The merchant account to which the store belongs.",
+ "type" : "string"
+ },
+ "merchantCategoryCode" : {
+ "description" : "The merchant category code (MCC) that classifies the business of the account holder.",
+ "type" : "string"
+ },
+ "merchantHouseNumber" : {
+ "x-addedInVersion" : "5",
+ "description" : "Merchant house number for payment method setup.",
+ "type" : "string"
+ },
+ "phoneNumber" : {
+ "description" : "The phone number of the store.",
+ "$ref" : "#/components/schemas/ViasPhoneNumber"
+ },
+ "shopperInteraction" : {
+ "x-addedInVersion" : "5",
+ "description" : "The sales channel. Possible values: **Ecommerce**, **POS**.",
+ "enum" : [
+ "Ecommerce",
+ "POS"
+ ],
+ "type" : "string"
+ },
+ "splitConfigurationUUID" : {
+ "x-addedInVersion" : "5",
+ "description" : "The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform.",
+ "type" : "string"
+ },
+ "status" : {
+ "description" : "The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**.",
+ "enum" : [
+ "Active",
+ "Closed",
+ "Inactive",
+ "InactiveWithModifications",
+ "Pending"
+ ],
+ "type" : "string"
+ },
+ "store" : {
+ "description" : "Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request.",
+ "type" : "string"
+ },
+ "storeName" : {
+ "description" : "The name of the account holder's store. This value is shown in shopper statements.\n\n * Length: Between 3 to 22 characters \n\n * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**\n\n**Note:** storeName does not appear in American Express shopper statements by default. Contact Adyen Support to enable this for American Express.",
+ "type" : "string"
+ },
+ "storeReference" : {
+ "description" : "Your unique identifier for the store. The Customer Area also uses this value for the store description.\n\n * Length: Between 3 to 128 characters\n\n* The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**",
+ "type" : "string"
+ },
+ "virtualAccount" : {
+ "x-addedInVersion" : "5",
+ "description" : "The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`.",
+ "type" : "string"
+ },
+ "webAddress" : {
+ "x-addedInVersion" : "5",
+ "description" : "URL of the ecommerce store.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "merchantCategoryCode",
+ "address",
+ "merchantAccount"
+ ],
+ "type" : "object"
+ },
+ "SuspendAccountHolderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder to be suspended.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode"
+ ],
+ "type" : "object"
+ },
+ "SuspendAccountHolderResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderStatus" : {
+ "description" : "The new status of the Account Holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "UltimateParentCompany" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "address" : {
+ "description" : "Address of the ultimate parent company.",
+ "$ref" : "#/components/schemas/ViasAddress"
+ },
+ "businessDetails" : {
+ "description" : "Details about the ultimate parent company's business.",
+ "$ref" : "#/components/schemas/UltimateParentCompanyBusinessDetails"
+ },
+ "ultimateParentCompanyCode" : {
+ "description" : "Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "UltimateParentCompanyBusinessDetails" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "legalBusinessName" : {
+ "description" : "The legal name of the company.",
+ "type" : "string"
+ },
+ "registrationNumber" : {
+ "description" : "The registration number of the company.",
+ "type" : "string"
+ },
+ "stockExchange" : {
+ "description" : "Market Identifier Code (MIC).",
+ "type" : "string"
+ },
+ "stockNumber" : {
+ "description" : "International Securities Identification Number (ISIN).",
+ "type" : "string"
+ },
+ "stockTicker" : {
+ "description" : "Stock Ticker symbol.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "UnSuspendAccountHolderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder to be reinstated.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode"
+ ],
+ "type" : "object"
+ },
+ "UnSuspendAccountHolderResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderStatus" : {
+ "description" : "The new status of the Account Holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "Contains field validation errors that would prevent requests from being processed.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "UpdateAccountHolderRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder to be updated.",
+ "type" : "string"
+ },
+ "accountHolderDetails" : {
+ "description" : "The details to which the Account Holder should be updated.\n\nRequired if a processingTier is not provided.",
+ "$ref" : "#/components/schemas/AccountHolderDetails"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.",
+ "type" : "string"
+ },
+ "legalEntity" : {
+ "x-addedInVersion" : "5",
+ "description" : "The legal entity type of the account holder. This determines the information that should be provided in the request.\n\nPossible values: **Business**, **Individual**, or **NonProfit**.\n\n* If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.\n\n* If set to **Individual**, then `accountHolderDetails.individualDetails` must [...]
+ "enum" : [
+ "Business",
+ "Individual",
+ "NonProfit",
+ "Partnership",
+ "PublicCompany"
+ ],
+ "type" : "string"
+ },
+ "primaryCurrency" : {
+ "x-addedInVersion" : "4",
+ "deprecated" : true,
+ "description" : "The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated.",
+ "type" : "string"
+ },
+ "processingTier" : {
+ "x-addedInVersion" : "3",
+ "description" : "The processing tier to which the Account Holder should be updated.\n>The processing tier can not be lowered through this request.\n\n>Required if accountHolderDetails are not provided.",
+ "format" : "int32",
+ "type" : "integer"
+ },
+ "verificationProfile" : {
+ "x-addedInVersion" : "6",
+ "description" : "The identifier of the profile that applies to this entity.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode"
+ ],
+ "type" : "object"
+ },
+ "UpdateAccountHolderResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the account holder.",
+ "type" : "string"
+ },
+ "accountHolderDetails" : {
+ "description" : "Details of the account holder.",
+ "$ref" : "#/components/schemas/AccountHolderDetails"
+ },
+ "accountHolderStatus" : {
+ "x-addedInVersion" : "2",
+ "description" : "The new status of the account holder.",
+ "$ref" : "#/components/schemas/AccountHolderStatus"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "The description of the account holder.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "in case the account holder has not been updated, contains account holder fields, that did not pass the validation.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "legalEntity" : {
+ "x-addedInVersion" : "4",
+ "description" : "The legal entity of the account holder.",
+ "enum" : [
+ "Business",
+ "Individual",
+ "NonProfit",
+ "Partnership",
+ "PublicCompany"
+ ],
+ "type" : "string"
+ },
+ "primaryCurrency" : {
+ "x-addedInVersion" : "5",
+ "deprecated" : true,
+ "description" : "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.",
+ "type" : "string"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ },
+ "verification" : {
+ "x-addedInVersion" : "2",
+ "description" : "The details of KYC Verification of the account holder.",
+ "$ref" : "#/components/schemas/KYCVerificationResult"
+ },
+ "verificationProfile" : {
+ "x-addedInVersion" : "6",
+ "description" : "The identifier of the profile that applies to this entity.",
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "UpdateAccountHolderStateRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountHolderCode" : {
+ "description" : "The code of the Account Holder on which to update the state.",
+ "type" : "string"
+ },
+ "disable" : {
+ "description" : "If true, disable the requested state. If false, enable the requested state.",
+ "type" : "boolean"
+ },
+ "reason" : {
+ "description" : "The reason that the state is being updated.\n>Required if the state is being disabled.",
+ "type" : "string"
+ },
+ "stateType" : {
+ "description" : "The state to be updated.\n>Permitted values are: `Processing`, `Payout`",
+ "enum" : [
+ "LimitedPayout",
+ "LimitedProcessing",
+ "LimitlessPayout",
+ "LimitlessProcessing",
+ "Payout",
+ "Processing"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountHolderCode",
+ "stateType",
+ "disable"
+ ],
+ "type" : "object"
+ },
+ "UpdateAccountRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of the account to update.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "5",
+ "description" : "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.",
+ "type" : "string"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "A description of the account, maximum 256 characters.You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.",
+ "type" : "string"
+ },
+ "metadata" : {
+ "x-addedInVersion" : "5",
+ "additionalProperties" : {
+ "type" : "string"
+ },
+ "description" : "A set of key and value pairs for general use by the merchant.\nThe keys do not have specific names and may be used for storing miscellaneous data as desired.\n> Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.",
+ "type" : "object"
+ },
+ "payoutMethodCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.",
+ "type" : "string"
+ },
+ "payoutSchedule" : {
+ "description" : "The details of the payout schedule to which the account must be updated.",
+ "$ref" : "#/components/schemas/UpdatePayoutScheduleRequest"
+ },
+ "payoutSpeed" : {
+ "x-addedInVersion" : "5",
+ "description" : "Speed at which payouts for this account are processed.\n\nPossible values: `STANDARD` (default), `SAME_DAY`.",
+ "enum" : [
+ "INSTANT",
+ "SAME_DAY",
+ "STANDARD"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountCode"
+ ],
+ "type" : "object"
+ },
+ "UpdateAccountResponse" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "accountCode" : {
+ "description" : "The code of the account.",
+ "type" : "string"
+ },
+ "bankAccountUUID" : {
+ "x-addedInVersion" : "5",
+ "description" : "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.",
+ "type" : "string"
+ },
+ "description" : {
+ "x-addedInVersion" : "4",
+ "description" : "The description of the account.",
+ "type" : "string"
+ },
+ "invalidFields" : {
+ "x-addedInVersion" : "5",
+ "description" : "A list of fields that caused the `/updateAccount` request to fail.",
+ "items" : {
+ "$ref" : "#/components/schemas/ErrorFieldType"
+ },
+ "type" : "array"
+ },
+ "metadata" : {
+ "x-addedInVersion" : "5",
+ "additionalProperties" : {
+ "type" : "string"
+ },
+ "description" : "A set of key and value pairs containing metadata.",
+ "type" : "object"
+ },
+ "payoutMethodCode" : {
+ "x-addedInVersion" : "5",
+ "description" : "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.",
+ "type" : "string"
+ },
+ "payoutSchedule" : {
+ "description" : "The details of the payout schedule to which the account is updated.",
+ "$ref" : "#/components/schemas/PayoutScheduleResponse"
+ },
+ "payoutSpeed" : {
+ "x-addedInVersion" : "5",
+ "description" : "Speed at which payouts for this account are processed.\n\nPossible values: `STANDARD`, `SAME_DAY`.",
+ "enum" : [
+ "INSTANT",
+ "SAME_DAY",
+ "STANDARD"
+ ],
+ "type" : "string"
+ },
+ "pspReference" : {
+ "description" : "The reference of a request. Can be used to uniquely identify the request.",
+ "type" : "string"
+ },
+ "resultCode" : {
+ "description" : "The result code.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "accountCode"
+ ],
+ "type" : "object"
+ },
+ "UpdatePayoutScheduleRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "action" : {
+ "description" : "Direction on how to handle any payouts that have already been scheduled.\n\nPossible values:\n* `CLOSE`: close the existing batch of payouts.\n* `UPDATE`: reschedule the existing batch to the new schedule.\n* `NOTHING` (**default**): allow the payout to proceed.",
+ "enum" : [
+ "CLOSE",
+ "NOTHING",
+ "UPDATE"
+ ],
+ "type" : "string"
+ },
+ "reason" : {
+ "description" : "The reason for the payout schedule update.\n> This field is required when the `schedule` parameter is set to `HOLD`.",
+ "type" : "string"
+ },
+ "schedule" : {
+ "description" : "The new payout schedule for the account.\n\nPossible values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`.\n> `HOLD` prevents scheduled payouts, but you can still initiate payouts manually.",
+ "enum" : [
+ "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT",
+ "DAILY",
+ "DAILY_AU",
+ "DAILY_EU",
+ "DAILY_SG",
+ "DAILY_US",
+ "HOLD",
+ "MONTHLY",
+ "WEEKLY",
+ "WEEKLY_MON_TO_FRI_AU",
+ "WEEKLY_MON_TO_FRI_EU",
+ "WEEKLY_MON_TO_FRI_US",
+ "WEEKLY_ON_TUE_FRI_MIDNIGHT",
+ "WEEKLY_SUN_TO_THU_AU",
+ "WEEKLY_SUN_TO_THU_US"
+ ],
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "schedule"
+ ],
+ "type" : "object"
+ },
+ "UploadDocumentRequest" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "documentContent" : {
+ "description" : "The content of the document, in Base64-encoded string format.\n\nTo learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks).",
+ "format" : "byte",
+ "type" : "string"
+ },
+ "documentDetail" : {
+ "description" : "Details of the document being submitted.",
+ "$ref" : "#/components/schemas/DocumentDetail"
+ }
+ },
+ "required" : [
+ "documentDetail",
+ "documentContent"
+ ],
+ "type" : "object"
+ },
+ "ViasAddress" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "city" : {
+ "description" : "The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided.",
+ "type" : "string"
+ },
+ "country" : {
+ "description" : "The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**.",
+ "type" : "string"
+ },
+ "houseNumberOrName" : {
+ "description" : "The number or name of the house.",
+ "type" : "string"
+ },
+ "postalCode" : {
+ "description" : "The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided.\n\nMaximum length:\n\n* 5 digits for addresses in the US.\n\n* 10 characters for all other countries.",
+ "type" : "string"
+ },
+ "stateOrProvince" : {
+ "description" : "The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. \n\nMaximum length:\n\n* 2 characters for addresses in the US or Canada.\n\n* 3 characters for all other countries.\n",
+ "type" : "string"
+ },
+ "street" : {
+ "description" : "The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided.",
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "country"
+ ],
+ "type" : "object"
+ },
+ "ViasName" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "firstName" : {
+ "description" : "The first name.",
+ "maxLength" : 80,
+ "type" : "string"
+ },
+ "gender" : {
+ "description" : "The gender.\n>The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.",
+ "enum" : [
+ "MALE",
+ "FEMALE",
+ "UNKNOWN"
+ ],
+ "maxLength" : 1,
+ "type" : "string"
+ },
+ "infix" : {
+ "description" : "The name's infix, if applicable.\n>A maximum length of twenty (20) characters is imposed.",
+ "maxLength" : 20,
+ "type" : "string"
+ },
+ "lastName" : {
+ "description" : "The last name.",
+ "maxLength" : 80,
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "ViasPersonalData" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "dateOfBirth" : {
+ "description" : "The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.",
+ "type" : "string"
+ },
+ "documentData" : {
+ "x-addedInVersion" : "3",
+ "description" : "Array that contains information about the person's identification document. You can submit only one entry per document type.",
+ "items" : {
+ "$ref" : "#/components/schemas/PersonalDocumentData"
+ },
+ "type" : "array"
+ },
+ "nationality" : {
+ "description" : "The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.\n",
+ "maxLength" : 2,
+ "minLength" : 2,
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ },
+ "ViasPhoneNumber" : {
+ "additionalProperties" : false,
+ "properties" : {
+ "phoneCountryCode" : {
+ "description" : "The two-character country code of the phone number.\n>The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').",
+ "type" : "string"
+ },
+ "phoneNumber" : {
+ "description" : "The phone number.\n>The inclusion of the phone number country code is not necessary.",
+ "type" : "string"
+ },
+ "phoneType" : {
+ "description" : "The type of the phone number.\n>The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.",
+ "enum" : [
+ "Fax",
+ "Landline",
+ "Mobile",
+ "SIP"
+ ],
+ "type" : "string"
+ }
+ },
+ "type" : "object"
+ }
+ },
+ "securitySchemes" : {
+ "ApiKeyAuth" : {
+ "in" : "header",
+ "name" : "X-API-Key",
+ "type" : "apiKey"
+ },
+ "BasicAuth" : {
+ "scheme" : "basic",
+ "type" : "http"
+ }
+ },
+ "examples" : {
+ "generic-400" : {
+ "summary" : "Response code 400. Bad Request.",
+ "value" : {
+ "status" : 400,
+ "errorCode" : "702",
+ "message" : "Unexpected input: I",
+ "errorType" : "validation"
+ }
+ },
+ "generic-403" : {
+ "summary" : "Response code 403. Forbidden.",
+ "value" : {
+ "status" : 403,
+ "errorCode" : "10_003",
+ "message" : "Failed to authorize user",
+ "errorType" : "security"
+ }
+ },
+ "post-checkAccountHolder-basic" : {
+ "summary" : "Check the account holder.",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "accountStateType" : "Processing",
+ "tier" : "2"
+ }
+ },
+ "post-closeAccount-closeAccount" : {
+ "summary" : "Close an account",
+ "value" : {
+ "accountCode" : "CODE_OF_ACCOUNT"
+ }
+ },
+ "post-closeAccountHolder-basic" : {
+ "summary" : "Close an account holder",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER"
+ }
+ },
+ "post-createAccount-basic" : {
+ "summary" : "Add an account to an account holder",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER"
+ }
+ },
+ "post-createAccountHolder-business" : {
+ "summary" : "Create business account holder",
+ "value" : {
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "address" : {
+ "country" : "US"
+ },
+ "businessDetails" : {
+ "doingBusinessAs" : "Real Good Restaurant",
+ "legalBusinessName" : "Real Good Restaurant Inc.",
+ "shareholders" : [
+ {
+ "shareholderType" : "Controller",
+ "name" : {
+ "firstName" : "John",
+ "lastName" : "Carpenter"
+ },
+ "address" : {
+ "country" : "NL"
+ },
+ "email" : "testshareholder@email.com"
+ }
+ ]
+ },
+ "email" : "test@email.com",
+ "webAddress" : "https://www.your-website.com"
+ },
+ "legalEntity" : "Business"
+ }
+ },
+ "post-createAccountHolder-business-200" : {
+ "summary" : "Business account holder created",
+ "value" : {
+ "pspReference" : "ALPHANUMERIC_UNIQUE_RESPONSE_REFERENCE",
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "address" : {
+ "country" : "US"
+ },
+ "bankAccountDetails" : [
+ ],
+ "businessDetails" : {
+ "doingBusinessAs" : "Real Good Restaurant",
+ "legalBusinessName" : "Real Good Restaurant Inc.",
+ "shareholders" : [
+ {
+ "address" : {
+ "country" : "NL"
+ },
+ "email" : "testshareholder@email.com",
+ "name" : {
+ "firstName" : "John",
+ "lastName" : "Carpenter"
+ },
+ "shareholderCode" : "SHAREHOLDER_CODE",
+ "shareholderType" : "Controller"
+ }
+ ]
+ },
+ "email" : "test@email.com",
+ "merchantCategoryCode" : "MCC_DEFAULT_VALUE",
+ "payoutMethods" : [
+ ],
+ "webAddress" : "https://www.your-website.com"
+ },
+ "accountHolderStatus" : {
+ "status" : "Active",
+ "processingState" : {
+ "disabled" : false,
+ "processedFrom" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "processedTo" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "tierNumber" : 0
+ },
+ "payoutState" : {
+ "allowPayout" : true,
+ "payoutLimit" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "disabled" : false,
+ "tierNumber" : 0
+ },
+ "events" : [
+ ]
+ },
+ "legalEntity" : "Business",
+ "invalidFields" : [
+ ],
+ "verification" : {
+
+ }
+ }
+ },
+ "post-createAccountHolder-individual" : {
+ "summary" : "Create individual account holder",
+ "value" : {
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "email" : "tim@green.com",
+ "individualDetails" : {
+ "name" : {
+ "firstName" : "Tim",
+ "lastName" : "Green"
+ }
+ },
+ "address" : {
+ "country" : "US"
+ },
+ "webAddress" : "https://www.your-website.com"
+ },
+ "legalEntity" : "Individual"
+ }
+ },
+ "post-createAccountHolder-individual-200" : {
+ "summary" : "Individual account holder created",
+ "value" : {
+ "pspReference" : "ALPHANUMERIC_UNIQUE_RESPONSE_REFERENCE",
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "address" : {
+ "country" : "US"
+ },
+ "bankAccountDetails" : [
+ ],
+ "email" : "tim@green.com",
+ "individualDetails" : {
+ "name" : {
+ "firstName" : "Tim",
+ "lastName" : "Green"
+ }
+ },
+ "merchantCategoryCode" : "5045",
+ "payoutMethods" : [
+ ],
+ "webAddress" : "https://www.your-website.com"
+ },
+ "accountHolderStatus" : {
+ "status" : "Active",
+ "processingState" : {
+ "disabled" : false,
+ "processedFrom" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "processedTo" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "tierNumber" : 0
+ },
+ "payoutState" : {
+ "allowPayout" : true,
+ "payoutLimit" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "disabled" : false,
+ "tierNumber" : 0
+ },
+ "events" : [
+ ]
+ },
+ "legalEntity" : "Individual",
+ "invalidFields" : [
+ ],
+ "verification" : {
+
+ }
+ }
+ },
+ "post-deleteBankAccounts-basic" : {
+ "summary" : "Delete bank accounts",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "bankAccountUUIDs" : [
+ "eeb6ed22-3bae-483c-83b9-bc2097a75d40"
+ ]
+ }
+ },
+ "post-deleteLegalArrangements-arrangements" : {
+ "summary" : "Delete legal arrangements",
+ "description" : "Example request for deleting legal arrangements",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "legalArrangements" : [
+ {
+ "legalArrangementCode" : "cdf92f5a-a114-4ce6-8f19-c3f6ec83141c"
+ }
+ ]
+ }
+ },
+ "post-deleteLegalArrangements-arrangements-200" : {
+ "summary" : "Legal arrangement deleted",
+ "value" : {
+ "invalidFields" : [
+ ],
+ "pspReference" : "8816080397613514"
+ }
+ },
+ "post-deleteLegalArrangements-arrangements-400" : {
+ "summary" : "Response code 400. Bad Request.",
+ "value" : {
+ "invalidFields" : [
+ {
+ "errorCode" : 34,
+ "errorDescription" : "An invalid legalArrangementCode code is provided for value 'cdf92f5a-a114-4ce6-8f19-c3f6ec83141c'",
+ "fieldType" : {
+ "field" : "AccountHolderDetails.LegalArrangements.legalArrangementCode",
+ "fieldName" : "legalArrangementCode"
+ }
+ }
+ ],
+ "pspReference" : "9916613322577326"
+ }
+ },
+ "post-deleteLegalArrangements-entities" : {
+ "summary" : "Delete legal arrangement entities",
+ "description" : "Example request for deleting legal arrangement entities",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "legalArrangements" : [
+ {
+ "legalArrangementCode" : "cdf92f5a-a114-4ce6-8f19-c3f6ec83141c",
+ "legalArrangementEntityCodes" : [
+ "755881d3-d6b0-4b34-8ace-1caceb8add63"
+ ]
+ }
+ ]
+ }
+ },
+ "post-deleteLegalArrangements-entities-200" : {
+ "summary" : "Legal arrangement entities deleted",
+ "value" : {
+ "invalidFields" : [
+ ],
+ "pspReference" : "8816080397613514"
+ }
+ },
+ "post-deleteLegalArrangements-entities-400" : {
+ "summary" : "Response code 400. Bad Request.",
+ "value" : {
+ "invalidFields" : [
+ {
+ "errorCode" : 34,
+ "errorDescription" : "An invalid legalArrangementEntityCode code is provided for value 'c92bb932-4867-4cef-bf9d-4ecde37745cf'",
+ "fieldType" : {
+ "field" : "AccountHolderDetails.LegalArrangements.LegalArrangementsEntities.legalArrangementEntityCode",
+ "fieldName" : "legalArrangementEntityCode"
+ }
+ }
+ ],
+ "pspReference" : "9916613324987358"
+ }
+ },
+ "post-deletePayoutMethods-basic" : {
+ "summary" : "Delete a payout method",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "payoutMethodCodes" : [
+ "34b6ed22-3bae-483c-83b9-bc2097a75d40"
+ ]
+ }
+ },
+ "post-deleteShareholders-basic" : {
+ "summary" : "Delete shareholders",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "shareholderCodes" : [
+ "9188218c-576e-4cbe-8e86-72722f453920"
+ ]
+ }
+ },
+ "post-getAccountHolder-accountCode" : {
+ "summary" : "Get an account holder",
+ "value" : {
+ "accountCode" : "CODE_OF_ACCOUNT"
+ }
+ },
+ "post-getAccountHolder-accountHolderCode" : {
+ "summary" : "Get an account holder for the account",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER"
+ }
+ },
+ "post-getTaxForm-basic" : {
+ "summary" : "Get a tax form",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "formType" : "1099-K",
+ "year" : 2020
+ }
+ },
+ "post-getUploadedDocuments-basic" : {
+ "summary" : "Get uploaded documents",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "bankAccountUUID" : "EXAMPLE_UUID"
+ }
+ },
+ "post-suspendAccountHolder-basic" : {
+ "summary" : "Suspend an account holder",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER"
+ }
+ },
+ "post-unSuspendAccountHolder-basic" : {
+ "summary" : "Unsuspend an account holder",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER"
+ }
+ },
+ "post-updateAccount-basic" : {
+ "summary" : "Set a payout schedule",
+ "value" : {
+ "accountCode" : "CODE_OF_ACCOUNT",
+ "payoutSchedule" : {
+ "schedule" : "WEEKLY",
+ "action" : "CLOSE"
+ }
+ }
+ },
+ "post-updateAccountHolder-addShareholders" : {
+ "summary" : "Add shareholders",
+ "value" : {
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "businessDetails" : {
+ "shareholders" : [
+ {
+ "shareholderType" : "Controller",
+ "name" : {
+ "firstName" : "Shelly",
+ "lastName" : "Eller"
+ },
+ "address" : {
+ "city" : "San Francisco",
+ "country" : "US",
+ "houseNumberOrName" : "274",
+ "postalCode" : "94107",
+ "stateOrProvince" : "CA",
+ "street" : "Brannan"
+ },
+ "email" : "testshareholder2@email.com",
+ "personalData" : {
+ "dateOfBirth" : "1970-01-01",
+ "documentData" : [
+ {
+ "number" : "1234567890",
+ "type" : "ID"
+ }
+ ]
+ }
+ }
+ ],
+ "taxId" : "123456789"
+ },
+ "email" : "test@email.com",
+ "fullPhoneNumber" : "+14154890281",
+ "webAddress" : "http://www.accountholderwebsite.com"
+ }
+ }
+ },
+ "post-updateAccountHolder-addShareholders-200" : {
+ "summary" : "Shareholders added",
+ "value" : {
+ "invalidFields" : [
+ ],
+ "pspReference" : "ALPHANUMERIC_UNIQUE_RESPONSE_REFERENCE",
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "bankAccountDetails" : [
+ ],
+ "businessDetails" : {
+ "shareholders" : [
+ {
+ "address" : {
+ "city" : "San Francisco",
+ "country" : "US",
+ "houseNumberOrName" : "274",
+ "postalCode" : "94107",
+ "stateOrProvince" : "CA",
+ "street" : "Brannan"
+ },
+ "email" : "testshareholder2@email.com",
+ "name" : {
+ "firstName" : "Shelly",
+ "lastName" : "Eller"
+ },
+ "personalData" : {
+ "dateOfBirth" : "1970-01-01",
+ "documentData" : [
+ {
+ "number" : "1234567890",
+ "type" : "ID"
+ }
+ ]
+ },
+ "shareholderCode" : "SHAREHOLDER_CODE",
+ "shareholderType" : "Controller"
+ }
+ ],
+ "taxId" : "123456789"
+ },
+ "email" : "test@email.com",
+ "payoutMethods" : [
+ ],
+ "webAddress" : "http://www.accountholderwebsite.com"
+ }
+ }
+ },
+ "post-updateAccountHolder-bankAccountDetails" : {
+ "summary" : "Update bank account details",
+ "value" : {
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "email" : "tim@green.com",
+ "individualDetails" : {
+ "name" : {
+ "firstName" : "Tim",
+ "lastName" : "Green"
+ }
+ },
+ "bankAccountDetails" : [
+ {
+ "accountNumber" : "1678116852",
+ "branchCode" : "053101273",
+ "countryCode" : "US",
+ "currencyCode" : "USD",
+ "ownerName" : "Tim Green",
+ "ownerHouseNumberOrName" : "100",
+ "ownerStreet" : "Main Street",
+ "ownerPostalCode" : "02894",
+ "ownerCity" : "Springfield",
+ "ownerState" : "AZ",
+ "ownerCountryCode" : "US"
+ }
+ ]
+ }
+ }
+ },
+ "post-updateAccountHolder-bankAccountDetails-200" : {
+ "summary" : "Bank account details updated",
+ "value" : {
+ "invalidFields" : [
+ ],
+ "pspReference" : "ALPHANUMERIC_UNIQUE_RESPONSE_REFERENCE",
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "address" : {
+ "country" : "US"
+ },
+ "bankAccountDetails" : [
+ {
+ "accountNumber" : "######6852",
+ "bankAccountUUID" : "BANK_ACCOUNT_UUID",
+ "branchCode" : "053101273",
+ "countryCode" : "US",
+ "currencyCode" : "USD",
+ "ownerCity" : "Springfield",
+ "ownerCountryCode" : "US",
+ "ownerHouseNumberOrName" : "100",
+ "ownerName" : "Tim Green",
+ "ownerPostalCode" : "02894",
+ "ownerState" : "AZ",
+ "ownerStreet" : "Main Street",
+ "primaryAccount" : false
+ }
+ ],
+ "businessDetails" : {
+ "doingBusinessAs" : "Real Good Restaurant",
+ "legalBusinessName" : "Real Good Restaurant Inc.",
+ "shareholders" : [
+ {
+ "address" : {
+ "country" : "NL"
+ },
+ "email" : "testshareholder@email.com",
+ "name" : {
+ "firstName" : "John",
+ "lastName" : "Carpenter"
+ },
+ "shareholderCode" : "SHAREHOLDER_CODE",
+ "shareholderType" : "Controller"
+ }
+ ]
+ },
+ "email" : "tim@green.com",
+ "merchantCategoryCode" : "MCC_DEFAULT_VALUE",
+ "payoutMethods" : [
+ ],
+ "webAddress" : "https://www.your-website.com"
+ },
+ "accountHolderStatus" : {
+ "status" : "Active",
+ "processingState" : {
+ "disabled" : false,
+ "processedFrom" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "processedTo" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "tierNumber" : 0
+ },
+ "payoutState" : {
+ "allowPayout" : true,
+ "payoutLimit" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "disabled" : false,
+ "tierNumber" : 0
+ }
+ },
+ "legalEntity" : "Business",
+ "verification" : {
+
+ }
+ }
+ },
+ "post-updateAccountHolder-businessDetails" : {
+ "summary" : "Update business details",
+ "value" : {
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "businessDetails" : {
+ "shareholders" : [
+ {
+ "shareholderType" : "Owner",
+ "address" : {
+ "city" : "Amsterdam",
+ "country" : "NL",
+ "houseNumberOrName" : "1",
+ "postalCode" : "1111AA",
+ "stateOrProvince" : "NH",
+ "street" : "Main Street"
+ },
+ "email" : "testshareholder2@email.com",
+ "name" : {
+ "firstName" : "Shelly",
+ "lastName" : "Eller"
+ }
+ }
+ ],
+ "taxId" : "BV123456789"
+ },
+ "email" : "test@email.com",
+ "fullPhoneNumber" : "+31612345678",
+ "webAddress" : "http://www.accountholderwebsite.com"
+ }
+ }
+ },
+ "post-updateAccountHolder-businessDetails-200" : {
+ "summary" : "Business details updated",
+ "value" : {
+ "invalidFields" : [
+ ],
+ "pspReference" : "ALPHANUMERIC_UNIQUE_RESPONSE_REFERENCE",
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "bankAccountDetails" : [
+ ],
+ "businessDetails" : {
+ "shareholders" : [
+ {
+ "address" : {
+ "city" : "Amsterdam",
+ "country" : "NL",
+ "houseNumberOrName" : "1",
+ "postalCode" : "1111AA",
+ "stateOrProvince" : "NH",
+ "street" : "Main Street"
+ },
+ "email" : "testshareholder2@email.com",
+ "name" : {
+ "firstName" : "Shelly",
+ "lastName" : "Eller"
+ },
+ "shareholderCode" : "SHAREHOLDER_CODE",
+ "shareholderType" : "Owner"
+ }
+ ],
+ "taxId" : "BV123456789"
+ },
+ "email" : "test@email.com",
+ "payoutMethods" : [
+ ],
+ "webAddress" : "http://www.accountholderwebsite.com"
+ }
+ }
+ },
+ "post-updateAccountHolder-general" : {
+ "summary" : "Update individual with documentData property",
+ "value" : {
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "address" : {
+ "city" : "NY",
+ "country" : "US",
+ "postalCode" : "12345",
+ "stateOrProvince" : "NH",
+ "street" : "Main Street",
+ "houseNumberOrName" : "100"
+ },
+ "email" : "test@adyen.com",
+ "merchantCategoryCode" : "7999",
+ "fullPhoneNumber" : "+31612345678",
+ "webAddress" : "http://www.accountholderwebsite.com"
+ }
+ }
+ },
+ "post-updateAccountHolder-general-200" : {
+ "summary" : "Individual updated with documentData property",
+ "value" : {
+ "invalidFields" : [
+ ],
+ "pspReference" : "ALPHANUMERIC_UNIQUE_RESPONSE_REFERENCE",
+ "accountHolderCode" : "YOUR_UNIQUE_ACCOUNT_HOLDER_CODE",
+ "accountHolderDetails" : {
+ "address" : {
+ "city" : "NY",
+ "country" : "US",
+ "houseNumberOrName" : "100",
+ "postalCode" : "12345",
+ "stateOrProvince" : "NH",
+ "street" : "Main Street"
+ },
+ "bankAccountDetails" : [
+ ],
+ "businessDetails" : {
+ "doingBusinessAs" : "Real Good Restaurant",
+ "legalBusinessName" : "Real Good Restaurant Inc.",
+ "shareholders" : [
+ {
+ "address" : {
+ "country" : "NL"
+ },
+ "email" : "testshareholder@email.com",
+ "name" : {
+ "firstName" : "John",
+ "lastName" : "Carpenter"
+ },
+ "shareholderCode" : "SHAREHOLDER_CODE",
+ "shareholderType" : "Controller"
+ }
+ ]
+ },
+ "email" : "test@adyen.com",
+ "merchantCategoryCode" : "UPDATE_MCC",
+ "payoutMethods" : [
+ ],
+ "phoneNumber" : {
+ "phoneCountryCode" : "NL",
+ "phoneNumber" : "612345678",
+ "phoneType" : "Landline"
+ },
+ "webAddress" : "http://www.accountholderwebsite.com"
+ },
+ "accountHolderStatus" : {
+ "status" : "Active",
+ "processingState" : {
+ "disabled" : false,
+ "processedFrom" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "processedTo" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "tierNumber" : 0
+ },
+ "payoutState" : {
+ "allowPayout" : true,
+ "payoutLimit" : {
+ "currency" : "USD",
+ "value" : 0
+ },
+ "disabled" : false,
+ "tierNumber" : 0
+ }
+ },
+ "legalEntity" : "Business",
+ "verification" : {
+
+ }
+ }
+ },
+ "post-updateAccountHolderState-basic" : {
+ "summary" : "Update account holder state",
+ "value" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "disable" : true,
+ "reason" : "test reason payout",
+ "stateType" : "Payout"
+ }
+ },
+ "post-uploadDocument-basic" : {
+ "summary" : "Upload a document",
+ "value" : {
+ "documentContent" : "dGVzdCBkb2N1bWVudCBjb250ZW50",
+ "documentDetail" : {
+ "accountHolderCode" : "CODE_OF_ACCOUNT_HOLDER",
+ "documentType" : "PASSPORT",
+ "filename" : "passport.png",
+ "description" : "test passport description"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file