{
  "swagger" : "2.0",
  "info" : {
    "description" : "Retrieve related entity",
    "version" : "v1.0.0",
    "title" : "Retrieve related entity"
  },
  "host" : "api.server.com",
  "basePath" : "/api/v1.0.0/",
  "tags" : [ {
    "name" : "RETAIL"
  } ],
  "schemes" : [ "http", "https" ],
  "security" : [ {
    "basicAuth" : [ ]
  }, {
    "apiKey" : [ ]
  } ],
  "paths" : {
    "/party/pe/partyRelationships/corporates" : {
      "get" : {
        "tags" : [ "RETAIL" ],
        "summary" : "Retrieve the details of the corporates/entities",
        "description" : "Retrieve the list of corporates",
        "operationId" : "getRelatedEntity",
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "name" : "personEntityId",
          "in" : "query",
          "description" : "Identifier of the Person or Entity",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "firstName",
          "in" : "query",
          "description" : "Specifies customer's first name",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "legalId",
          "in" : "query",
          "description" : "Unique reference number of the legal documents submitted as identification proof",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "legalDocumentName",
          "in" : "query",
          "description" : "Name of the legal documents such as passport, driving licence etc., provided as identification proof",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "page_size",
          "in" : "query",
          "description" : "The total number of records per page",
          "required" : false,
          "type" : "integer",
          "format" : "int32"
        }, {
          "name" : "page_start",
          "in" : "query",
          "description" : "The record from which the response should be displayed",
          "required" : false,
          "type" : "integer",
          "format" : "int32"
        }, {
          "name" : "page_token",
          "in" : "query",
          "description" : "Unique id expected to get as part of response from Transact on every enquiry request.",
          "required" : false,
          "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"
        }, {
          "name" : "disablePagination",
          "in" : "header",
          "description" : "Indicates the pagination header attributes availability. If set to 'true', it fetches all the data",
          "required" : false,
          "type" : "boolean"
        } ],
        "responses" : {
          "200" : {
            "description" : "RelatedEntityResponse",
            "schema" : {
              "$ref" : "#/definitions/RelatedEntityResponse"
            }
          },
          "default" : {
            "description" : "QueryErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/QueryErrorResponse"
            }
          },
          "400" : {
            "description" : "BusinessQueryErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/BusinessQueryErrorResponse"
            }
          },
          "500" : {
            "description" : "SystemQueryErrorResponse",
            "schema" : {
              "$ref" : "#/definitions/SystemQueryErrorResponse"
            }
          }
        }
      }
    }
  },
  "securityDefinitions" : {
    "basicAuth" : {
      "type" : "basic"
    },
    "apiKey" : {
      "type" : "apiKey",
      "name" : "Authorization",
      "in" : "header"
    }
  },
  "definitions" : {
    "QueryHeader" : {
      "properties" : {
        "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"
            }
          }
        },
        "status" : {
          "type" : "string",
          "description" : "Status of the API(success/failed)"
        },
        "page_size" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "The total number of records per page"
        },
        "page_start" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "The record from which the response should be displayed"
        },
        "total_size" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "The total number of records present"
        },
        "page_token" : {
          "type" : "string",
          "description" : "Unique id expected to get as part of response from Transact on every enquiry request"
        }
      }
    },
    "RelatedEntityResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/QueryHeader"
        },
        "body" : {
          "$ref" : "#/definitions/RelatedEntityResponseBody"
        }
      },
      "description" : "RelatedEntityResponse"
    },
    "RelatedEntityResponseBody" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "personEntityId" : {
            "type" : "string",
            "description" : "Identifier of the Person or Entity",
            "maxLength" : 10
          },
          "firstName" : {
            "type" : "string",
            "description" : "Specifies customer's first name",
            "maxLength" : 35
          },
          "legalDocumentName" : {
            "type" : "string",
            "description" : "Name of the legal documents such as passport, driving licence etc., provided as identification proof",
            "maxLength" : 35
          },
          "legalId" : {
            "type" : "string",
            "description" : "Unique reference number of the legal documents submitted as identification proof",
            "maxLength" : 20
          },
          "street" : {
            "type" : "string",
            "description" : "Contains the first line of customer's base address, example building number, street number etc.",
            "maxLength" : 35
          },
          "state" : {
            "type" : "string",
            "description" : "Represents a subdivision of a country such as state, region, country",
            "maxLength" : 35
          },
          "locationName" : {
            "type" : "string",
            "description" : "Identifies specific location name with in the country or town",
            "maxLength" : 35
          },
          "districtName" : {
            "type" : "string",
            "description" : "Stores the district name of the  Beneficiary Customer.",
            "maxLength" : 35
          },
          "postCode" : {
            "type" : "string",
            "description" : "Identifies the address postal code for the customer.",
            "maxLength" : 60
          },
          "address" : {
            "type" : "string",
            "description" : "Communication Address of the Customer",
            "maxLength" : 35
          },
          "buildingName" : {
            "type" : "string",
            "description" : "Identifies the name of the building where customer resides",
            "maxLength" : 35
          },
          "buildingNumber" : {
            "type" : "string",
            "description" : "Identifies the building number where customer resides",
            "maxLength" : 16
          },
          "floorNumber" : {
            "type" : "string",
            "description" : "Contains the floor number of the customer address",
            "maxLength" : 70
          },
          "flatNumber" : {
            "type" : "string",
            "description" : "Contains the flat number of the customer",
            "maxLength" : 70
          },
          "phoneNumber" : {
            "type" : "string",
            "description" : "The phone number of the customer or prospect",
            "maxLength" : 17
          },
          "email" : {
            "type" : "string",
            "description" : "Email Identifier of the Customer",
            "maxLength" : 50
          },
          "contactType" : {
            "type" : "string",
            "description" : "Types of contacts available to users to communicate",
            "maxLength" : 35
          },
          "contactData" : {
            "type" : "string",
            "description" : "Indicates the contact data of customer used for communication such as phone or mobile or e-mail address.",
            "maxLength" : 254
          },
          "iddPrefixPhone" : {
            "type" : "string",
            "description" : "Identifies the international calling prefix code of the phone or mobile number.",
            "maxLength" : 16
          },
          "socialNetworkId" : {
            "type" : "string",
            "description" : "Social Network Identification of the person/entity",
            "maxLength" : 70
          }
        }
      }
    },
    "ErrorHeader" : {
      "properties" : {
        "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"
            }
          }
        },
        "status" : {
          "type" : "string",
          "description" : "Status of the API(success/failed)"
        }
      }
    },
    "QueryErrorResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ErrorHeader"
        },
        "error" : {
          "$ref" : "#/definitions/QueryErrorResponseBody"
        }
      },
      "description" : "QueryErrorResponse"
    },
    "QueryErrorResponseBody" : {
      "type" : "object",
      "properties" : {
        "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: "
        }
      }
    },
    "BusinessQueryErrorResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ErrorHeader"
        },
        "error" : {
          "$ref" : "#/definitions/BusinessQueryErrorResponseBody"
        }
      },
      "description" : "BusinessQueryErrorResponse"
    },
    "BusinessQueryErrorResponseBody" : {
      "type" : "object",
      "properties" : {
        "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"
        }
      }
    },
    "SystemQueryErrorResponse" : {
      "properties" : {
        "header" : {
          "$ref" : "#/definitions/ErrorHeader"
        },
        "error" : {
          "$ref" : "#/definitions/SystemQueryErrorResponseBody"
        }
      },
      "description" : "SystemQueryErrorResponse"
    },
    "SystemQueryErrorResponseBody" : {
      "type" : "object",
      "properties" : {
        "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"
        }
      }
    }
  }
}