{
  "swagger" : "2.0",
  "info" : {
    "description" : "API to create, update and retrieve customer details",
    "version" : "v1.0.0",
    "title" : "Customer Management"
  },
  "host" : "localhost:9089",
  "basePath" : "/api/v1.0.0/",
  "tags" : [ ],
  "schemes" : [ "http", "https" ],
  "security" : [ {
    "basicAuth" : [ ]
  }, {
    "apiKey" : [ ]
  } ],
  "paths" : {
    "/party/au/customers/addresses/{addressId}" : {
      "get" : {
        "tags" : [ ],
        "summary" : "Retrieve delivery address for the bank's customer",
        "description" : "Retrieve delivery address for the bank's customer indicating whether it is for tax reporting purpose or permanent residence address.",
        "operationId" : "getCustomerDeliveryAddress",
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "name" : "addressId",
          "in" : "path",
          "description" : "Reference Id of address record",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "credentials",
          "in" : "header",
          "description" : "Username and password to authenticate the API against core-banking.",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "companyId",
          "in" : "header",
          "description" : "Identifier of the lead company of the underlying Entity/Company/Branch for the respective contract for customer data protection purposes. Example US0010001.",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "deviceId",
          "in" : "header",
          "description" : "Identifies the device type",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "userRole",
          "in" : "header",
          "description" : "User who initiated the transaction",
          "required" : false,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "CustomerDeliveryAddressResponse",
            "schema" : {
              "$ref" : "#/definitions/CustomerDeliveryAddressResponse"
            }
          },
          "default" : {
            "description" : "ScreenErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/ScreenErrorResponse"
            }
          },
          "400" : {
            "description" : "BusinessScreenErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/BusinessScreenErrorResponse"
            }
          },
          "500" : {
            "description" : "SystemScreenErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/SystemScreenErrorResponse"
            }
          }
        }
      },
      "post" : {
        "tags" : [ ],
        "summary" : "Create delivery address for the bank's customer",
        "description" : "Create delivery address for the bank's customer indicating whether it is for tax reporting purpose or permanent residence address.",
        "operationId" : "createCustomerDeliveryAddress",
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "name" : "addressId",
          "in" : "path",
          "description" : "Reference Id of address record",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "payload",
          "description" : "body Payload",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/CustomerDeliveryAddress"
          }
        }, {
          "name" : "validate_only",
          "in" : "query",
          "description" : "The identifier to indicate if it is set to only validate or not.",
          "required" : false,
          "type" : "boolean"
        }, {
          "name" : "credentials",
          "in" : "header",
          "description" : "Username and password to authenticate the API against core-banking.",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "companyId",
          "in" : "header",
          "description" : "Identifier of the lead company of the underlying Entity/Company/Branch for the respective contract for customer data protection purposes. Example US0010001.",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "deviceId",
          "in" : "header",
          "description" : "Identifies the device type",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "userRole",
          "in" : "header",
          "description" : "User who initiated the transaction",
          "required" : false,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "CustomerDeliveryAddressResponse",
            "schema" : {
              "$ref" : "#/definitions/CustomerDeliveryAddressResponse"
            }
          },
          "default" : {
            "description" : "ScreenErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/ScreenErrorResponse"
            }
          },
          "400" : {
            "description" : "BusinessScreenErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/BusinessScreenErrorResponse"
            }
          },
          "500" : {
            "description" : "SystemScreenErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/SystemScreenErrorResponse"
            }
          }
        }
      }
    }
  },
  "securityDefinitions" : {
    "basicAuth" : {
      "type" : "basic"
    },
    "apiKey" : {
      "type" : "apiKey",
      "name" : "Authorization",
      "in" : "header"
    }
  },
  "definitions" : {
    "PayloadHeader" : {
      "properties" : {
        "override" : {
          "type" : "object",
          "properties" : {
            "overrideDetails" : {
              "type" : "array",
              "items" : {
                "type" : "object",
                "properties" : {
                  "id" : {
                    "type" : "string",
                    "description" : "The identifier of the override."
                  },
                  "description" : {
                    "type" : "string",
                    "description" : "The actual override message."
                  },
                  "code" : {
                    "type" : "string",
                    "description" : "The code related to override message."
                  },
                  "responseCode" : {
                    "type" : "string",
                    "description" : "The user input to accept/reject the override."
                  }
                }
              }
            }
          }
        },
        "audit" : {
          "type" : "object",
          "properties" : {
            "versionNumber" : {
              "type" : "string",
              "description" : "The CURR.NO. of the record"
            }
          }
        }
      }
    },
    "CustomerDeliveryAddress" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/PayloadHeader"
        },
        "body" : {
          "$ref" : "#/definitions/CustomerDeliveryAddressBody"
        }
      },
      "description" : "CustomerDeliveryAddress"
    },
    "CustomerDeliveryAddressBody" : {
      "type" : "object",
      "properties" : {
        "countryDetails" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "country" : {
                "type" : "string",
                "description" : "Identifies the country of the customer.",
                "minLength" : 0,
                "maxLength" : 25
              }
            }
          }
        },
        "addressDetailsArray" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "addressDetails" : {
                "type" : "string",
                "description" : "Contains additional address details",
                "minLength" : 0,
                "maxLength" : 40
              }
            }
          }
        },
        "customerShortNames" : {
          "type" : "array",
          "description" : "Denotes the Short name registered for a customer",
          "items" : {
            "type" : "object",
            "properties" : {
              "customerShortName" : {
                "type" : "string",
                "description" : "Indicates the short name of Customer",
                "minLength" : 0,
                "maxLength" : 50
              }
            }
          }
        },
        "customerNames" : {
          "type" : "array",
          "description" : "Name of the customer",
          "items" : {
            "type" : "object",
            "properties" : {
              "customerName" : {
                "type" : "string",
                "description" : "Name of the customer",
                "minLength" : 0,
                "maxLength" : 70
              }
            }
          }
        },
        "addresses" : {
          "type" : "array",
          "description" : "Communication Address of the Customer",
          "items" : {
            "type" : "object",
            "properties" : {
              "address" : {
                "type" : "string",
                "description" : "Communication Address of the Customer",
                "minLength" : 0,
                "maxLength" : 35
              }
            }
          }
        },
        "streets" : {
          "type" : "array",
          "description" : "Contains the first line of customer's base address, example building number, street number etc.",
          "items" : {
            "type" : "object",
            "properties" : {
              "street" : {
                "type" : "string",
                "description" : "Contains the first line of customer's base address, example building number, street number etc.",
                "minLength" : 0,
                "maxLength" : 70
              }
            }
          }
        },
        "towns" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "town" : {
                "type" : "string",
                "description" : "The town associated with the address of Customer or Party",
                "minLength" : 0,
                "maxLength" : 35
              }
            }
          }
        },
        "postCodes" : {
          "type" : "array",
          "description" : "Identifies the address postal code for the customer.",
          "items" : {
            "type" : "object",
            "properties" : {
              "postCode" : {
                "type" : "string",
                "description" : "Identifies the address postal code for the customer.",
                "minLength" : 0,
                "maxLength" : 35
              }
            }
          }
        },
        "addressType" : {
          "type" : "string",
          "description" : "Indicates the address type of customer. Allowed values are: Tax reporting address or Permanent Residence Address",
          "minLength" : 0,
          "maxLength" : 30
        },
        "ownerDeliveryAddress" : {
          "type" : "string",
          "description" : "Contains the delivery address of the account owner",
          "minLength" : 0,
          "maxLength" : 30
        },
        "addressPurpose" : {
          "type" : "string",
          "description" : "Identifies the purpose or usage of the address. Allowed values are CTC (Communication to Customer), CTICOP(Communication to In Care Of Party) or CTOP(Communication to Other Party).",
          "minLength" : 0,
          "maxLength" : 35
        },
        "addressLocation" : {
          "type" : "string",
          "description" : "Identifies the nature of the postal address, like primary, secondary or office address",
          "minLength" : 0,
          "maxLength" : 35
        },
        "addressVerifier" : {
          "type" : "string",
          "description" : "Contains the party or service which was used for address confirmation purposes",
          "minLength" : 0,
          "maxLength" : 35
        },
        "countryCode" : {
          "type" : "string",
          "description" : "ISO Country code, IBAN number will be generated based on the structure of this country.",
          "minLength" : 0,
          "maxLength" : 11
        },
        "departmentId" : {
          "type" : "string",
          "description" : "Department identifier.",
          "minLength" : 0,
          "maxLength" : 70
        },
        "subDepartmentId" : {
          "type" : "string",
          "description" : "Contains a sub-division identifier of a large organisation or building",
          "minLength" : 0,
          "maxLength" : 70
        },
        "flatNumber" : {
          "type" : "string",
          "description" : "Contains the flat number of the customer",
          "minLength" : 0,
          "maxLength" : 70
        },
        "buildingName" : {
          "type" : "string",
          "description" : "Identifies the name of the building where customer resides",
          "minLength" : 0,
          "maxLength" : 35
        },
        "buildingNumber" : {
          "type" : "string",
          "description" : "Identifies the building number where customer resides",
          "minLength" : 0,
          "maxLength" : 16
        },
        "floorNumber" : {
          "type" : "string",
          "description" : "Contains the floor number of the customer address",
          "minLength" : 0,
          "maxLength" : 70
        },
        "locationName" : {
          "type" : "string",
          "description" : "Identifies specific location name with in the country or town",
          "minLength" : 0,
          "maxLength" : 35
        },
        "districtName" : {
          "type" : "string",
          "description" : "Stores the district name of the  Beneficiary Customer.",
          "minLength" : 0,
          "maxLength" : 35
        },
        "state" : {
          "type" : "string",
          "description" : "Represents a subdivision of a country such as state, region, country",
          "minLength" : 0,
          "maxLength" : 35
        },
        "postBoxNumber" : {
          "type" : "string",
          "description" : "Post Office Box (POB) number that relates to financial institution",
          "minLength" : 0,
          "maxLength" : 16
        },
        "iddPrefixPhone" : {
          "type" : "string",
          "description" : "Identifies the international calling prefix code of the phone or mobile number.",
          "minLength" : 0,
          "maxLength" : 16
        },
        "phoneNumber" : {
          "type" : "string",
          "description" : "The phone number of the customer or prospect",
          "minLength" : 0,
          "maxLength" : 17
        },
        "extensions" : {
          "type" : "object",
          "description" : "Indicates the extensions"
        }
      }
    },
    "ScreenHeader" : {
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "The Identifier of the record created"
        },
        "status" : {
          "type" : "string",
          "description" : "Status of the API(success/failed)"
        },
        "transactionStatus" : {
          "type" : "string",
          "description" : "The status of the transaction"
        },
        "uniqueIdentifier" : {
          "type" : "string",
          "description" : "The unique identifier/Message Reference of the record created."
        },
        "audit" : {
          "type" : "object",
          "properties" : {
            "T24_time" : {
              "type" : "integer",
              "format" : "int32",
              "description" : "Time taken to response by Transact"
            },
            "versionNumber" : {
              "type" : "string",
              "description" : "The CURR.NO. of the record"
            },
            "requestParse_time" : {
              "type" : "number",
              "description" : "Time taken to parse the request by IRIS"
            },
            "responseParse_time" : {
              "type" : "number",
              "description" : "Time taken to parse the response by IRIS"
            }
          }
        }
      }
    },
    "CustomerDeliveryAddressResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ScreenHeader"
        },
        "body" : {
          "$ref" : "#/definitions/CustomerDeliveryAddressResponseBody"
        }
      },
      "description" : "CustomerDeliveryAddressResponse"
    },
    "CustomerDeliveryAddressResponseBody" : {
      "type" : "object",
      "properties" : {
        "countryDetails" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "country" : {
                "type" : "string",
                "description" : "Identifies the country of the customer.",
                "minLength" : 0,
                "maxLength" : 25
              }
            }
          }
        },
        "addressDetailsArray" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "addressDetails" : {
                "type" : "string",
                "description" : "Contains additional address details",
                "minLength" : 0,
                "maxLength" : 40
              }
            }
          }
        },
        "customerShortNames" : {
          "type" : "array",
          "description" : "Denotes the Short name registered for a customer",
          "items" : {
            "type" : "object",
            "properties" : {
              "customerShortName" : {
                "type" : "string",
                "description" : "Indicates the short name of Customer",
                "minLength" : 0,
                "maxLength" : 50
              }
            }
          }
        },
        "customerNames" : {
          "type" : "array",
          "description" : "Name of the customer",
          "items" : {
            "type" : "object",
            "properties" : {
              "customerName" : {
                "type" : "string",
                "description" : "Name of the customer",
                "minLength" : 0,
                "maxLength" : 70
              }
            }
          }
        },
        "addresses" : {
          "type" : "array",
          "description" : "Communication Address of the Customer",
          "items" : {
            "type" : "object",
            "properties" : {
              "address" : {
                "type" : "string",
                "description" : "Communication Address of the Customer",
                "minLength" : 0,
                "maxLength" : 35
              }
            }
          }
        },
        "streets" : {
          "type" : "array",
          "description" : "Contains the first line of customer's base address, example building number, street number etc.",
          "items" : {
            "type" : "object",
            "properties" : {
              "street" : {
                "type" : "string",
                "description" : "Contains the first line of customer's base address, example building number, street number etc.",
                "minLength" : 0,
                "maxLength" : 70
              }
            }
          }
        },
        "towns" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "town" : {
                "type" : "string",
                "description" : "The town associated with the address of Customer or Party",
                "minLength" : 0,
                "maxLength" : 35
              }
            }
          }
        },
        "postCodes" : {
          "type" : "array",
          "description" : "Identifies the address postal code for the customer.",
          "items" : {
            "type" : "object",
            "properties" : {
              "postCode" : {
                "type" : "string",
                "description" : "Identifies the address postal code for the customer.",
                "minLength" : 0,
                "maxLength" : 35
              }
            }
          }
        },
        "addressType" : {
          "type" : "string",
          "description" : "Indicates the address type of customer. Allowed values are: Tax reporting address or Permanent Residence Address",
          "minLength" : 0,
          "maxLength" : 30
        },
        "ownerDeliveryAddress" : {
          "type" : "string",
          "description" : "Contains the delivery address of the account owner",
          "minLength" : 0,
          "maxLength" : 30
        },
        "addressPurpose" : {
          "type" : "string",
          "description" : "Identifies the purpose or usage of the address. Allowed values are CTC (Communication to Customer), CTICOP(Communication to In Care Of Party) or CTOP(Communication to Other Party).",
          "minLength" : 0,
          "maxLength" : 35
        },
        "addressLocation" : {
          "type" : "string",
          "description" : "Identifies the nature of the postal address, like primary, secondary or office address",
          "minLength" : 0,
          "maxLength" : 35
        },
        "addressVerifier" : {
          "type" : "string",
          "description" : "Contains the party or service which was used for address confirmation purposes",
          "minLength" : 0,
          "maxLength" : 35
        },
        "countryCode" : {
          "type" : "string",
          "description" : "ISO Country code, IBAN number will be generated based on the structure of this country.",
          "minLength" : 0,
          "maxLength" : 11
        },
        "departmentId" : {
          "type" : "string",
          "description" : "Department identifier.",
          "minLength" : 0,
          "maxLength" : 70
        },
        "subDepartmentId" : {
          "type" : "string",
          "description" : "Contains a sub-division identifier of a large organisation or building",
          "minLength" : 0,
          "maxLength" : 70
        },
        "flatNumber" : {
          "type" : "string",
          "description" : "Contains the flat number of the customer",
          "minLength" : 0,
          "maxLength" : 70
        },
        "buildingName" : {
          "type" : "string",
          "description" : "Identifies the name of the building where customer resides",
          "minLength" : 0,
          "maxLength" : 35
        },
        "buildingNumber" : {
          "type" : "string",
          "description" : "Identifies the building number where customer resides",
          "minLength" : 0,
          "maxLength" : 16
        },
        "floorNumber" : {
          "type" : "string",
          "description" : "Contains the floor number of the customer address",
          "minLength" : 0,
          "maxLength" : 70
        },
        "locationName" : {
          "type" : "string",
          "description" : "Identifies specific location name with in the country or town",
          "minLength" : 0,
          "maxLength" : 35
        },
        "districtName" : {
          "type" : "string",
          "description" : "Stores the district name of the  Beneficiary Customer.",
          "minLength" : 0,
          "maxLength" : 35
        },
        "state" : {
          "type" : "string",
          "description" : "Represents a subdivision of a country such as state, region, country",
          "minLength" : 0,
          "maxLength" : 35
        },
        "postBoxNumber" : {
          "type" : "string",
          "description" : "Post Office Box (POB) number that relates to financial institution",
          "minLength" : 0,
          "maxLength" : 16
        },
        "iddPrefixPhone" : {
          "type" : "string",
          "description" : "Identifies the international calling prefix code of the phone or mobile number.",
          "minLength" : 0,
          "maxLength" : 16
        },
        "phoneNumber" : {
          "type" : "string",
          "description" : "The phone number of the customer or prospect",
          "minLength" : 0,
          "maxLength" : 17
        },
        "extensions" : {
          "type" : "object",
          "description" : "Indicates the extensions"
        }
      }
    },
    "ErrorHeader" : {
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "The Identifier of the record created"
        },
        "status" : {
          "type" : "string",
          "description" : "Status of the API(success/failed)"
        },
        "transactionStatus" : {
          "type" : "string",
          "description" : "The status of the transaction"
        },
        "uniqueIdentifier" : {
          "type" : "string",
          "description" : "The unique identifier/Message Reference of the record created."
        },
        "audit" : {
          "type" : "object",
          "properties" : {
            "T24_time" : {
              "type" : "integer",
              "format" : "int32",
              "description" : "Time taken to response by Transact"
            },
            "versionNumber" : {
              "type" : "string",
              "description" : "The CURR.NO. of the record"
            },
            "requestParse_time" : {
              "type" : "number",
              "description" : "Time taken to parse the request by IRIS"
            },
            "responseParse_time" : {
              "type" : "number",
              "description" : "Time taken to parse the response by IRIS"
            }
          }
        }
      }
    },
    "overrideBody" : {
      "properties" : {
        "overrideDetails" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "id" : {
                "type" : "string",
                "description" : "The identifier of the override."
              },
              "description" : {
                "type" : "string",
                "description" : "The actual override message."
              },
              "code" : {
                "type" : "string",
                "description" : "The code related to override message."
              },
              "options" : {
                "type" : "array",
                "description" : "The usable options for the override.",
                "items" : {
                  "type" : "string"
                }
              },
              "type" : {
                "type" : "string",
                "description" : "The type of the override."
              }
            }
          }
        }
      }
    },
    "ScreenErrorResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ErrorHeader"
        },
        "error" : {
          "$ref" : "#/definitions/ScreenErrorResponseBody"
        },
        "override" : {
          "$ref" : "#/definitions/overrideBody"
        }
      },
      "description" : "ScreenErrorResponse"
    },
    "ScreenErrorResponseBody" : {
      "type" : "object",
      "properties" : {
        "errorDetails" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "fieldName" : {
                "type" : "string",
                "description" : "The name of the field"
              },
              "code" : {
                "type" : "string",
                "description" : "The identifier of the error message"
              },
              "message" : {
                "type" : "string",
                "description" : "The actual Transact error message "
              }
            }
          }
        },
        "type" : {
          "type" : "string",
          "description" : "The identifier of error type: "
        }
      }
    },
    "BusinessScreenErrorResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ErrorHeader"
        },
        "error" : {
          "$ref" : "#/definitions/BusinessScreenErrorResponseBody"
        },
        "override" : {
          "$ref" : "#/definitions/overrideBody"
        }
      },
      "description" : "BusinessScreenErrorResponse"
    },
    "BusinessScreenErrorResponseBody" : {
      "type" : "object",
      "properties" : {
        "errorDetails" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "fieldName" : {
                "type" : "string",
                "description" : "The name of the field"
              },
              "code" : {
                "type" : "string",
                "description" : "The identifier of the error message"
              },
              "message" : {
                "type" : "string",
                "description" : "The actual Transact error message for bad requests"
              }
            }
          }
        },
        "type" : {
          "type" : "string",
          "description" : "The identifier of error type: Business"
        }
      }
    },
    "SystemScreenErrorResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ErrorHeader"
        },
        "error" : {
          "$ref" : "#/definitions/SystemScreenErrorResponseBody"
        },
        "override" : {
          "$ref" : "#/definitions/overrideBody"
        }
      },
      "description" : "SystemScreenErrorResponse"
    },
    "SystemScreenErrorResponseBody" : {
      "type" : "object",
      "properties" : {
        "errorDetails" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "fieldName" : {
                "type" : "string",
                "description" : "The name of the field"
              },
              "code" : {
                "type" : "string",
                "description" : "The identifier of the error message"
              },
              "message" : {
                "type" : "string",
                "description" : "The actual Transact error message caused by server"
              }
            }
          }
        },
        "type" : {
          "type" : "string",
          "description" : "The identifier of error type: System"
        }
      }
    }
  }
}