Previous Next JavaScript must be enabled to correctly display this content

## Persists Accounts

post

/accounts

This endpoint is used to create a new account.

### Request

Supported Media Types

- application/json
- application/xml

Body ()
Request Body that contains data required for creating a new account
Root Schema : LmdTbAccountDTOCollection
Type: `object`
Collection of Account
Show Source

- data(optional): array data
- paging(optional): object PagingDto

    {
        "description":"Collection of Account",
        "type":"object",
        "properties":{
            "data":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/LmdTbAccountDTO"
                }
            },
            "paging":{
                "$ref":"#/definitions/PagingDto"
            }
        }
    }

Nested Schema : data
Type: `array`
Show Source

- Array of: object LmdTbAccountDTO
  Account DTO

    {
        "type":"array",
        "items":{
            "$ref":"#/definitions/LmdTbAccountDTO"
        }
    }

Nested Schema : PagingDto
Type: `object`
Show Source

- totalResults(optional): integer

    {
        "type":"object",
        "properties":{
            "totalResults":{
                "type":"integer"
            }
        }
    }

Nested Schema : LmdTbAccountDTO
Type: `object`
Account DTO
Match All
Show Source

- allOf GenericDto
- object LmdTbAccountDTO-allOf[1]

    {
        "description":"Account DTO",
        "type":"object",
        "allOf":[
            {
                "$ref":"#/definitions/GenericDto"
            },
            {
                "type":"object",
                "properties":{
                    "accountNumber":{
                        "type":"string",
                        "maxLength":30
                    },
                    "branchCode":{
                        "type":"string",
                        "maxLength":4
                    },
                    "currencyCode":{
                        "type":"string",
                        "maxLength":3
                    },
                    "customerId":{
                        "type":"string",
                        "pattern":"[a-zA-Z0-9]{1,20}"
                    },
                    "latitude":{
                        "type":"number"
                    },
                    "longitude":{
                        "type":"number"
                    },
                    "cityName":{
                        "type":"string",
                        "maxLength":50
                    },
                    "countryName":{
                        "type":"string",
                        "maxLength":50
                    },
                    "region":{
                        "type":"string",
                        "maxLength":100
                    },
                    "structureId":{
                        "type":"string",
                        "pattern":"[A-Z0-9]{1,30}"
                    },
                    "LmdTbAccountBalancesDTO":{
                        "type":"array",
                        "items":{
                            "$ref":"#/definitions/LmdTbAccountBalancesDTO"
                        }
                    }
                }
            }
        ]
    }

Nested Schema : GenericDto
Match All
Show Source

- object GenericDto-allOf[0]
  Discriminator: `resource_type`

    {
        "allOf":[
            {
                "type":"object",
                "discriminator":"resource_type"
            }
        ]
    }

Nested Schema : GenericDto-allOf[0]
Type: `object`
Discriminator: `resource_type`
Nested Schema : LmdTbAccountDTO-allOf[1]
Type: `object`
Show Source

- accountNumber(optional): string
  Maximum Length: `30`
- branchCode(optional): string
  Maximum Length: `4`
- cityName(optional): string
  Maximum Length: `50`
- countryName(optional): string
  Maximum Length: `50`
- currencyCode(optional): string
  Maximum Length: `3`
- customerId(optional): string
  Pattern: `[a-zA-Z0-9]{1,20}`
- latitude(optional): number
- LmdTbAccountBalancesDTO(optional): array LmdTbAccountBalancesDTO
- longitude(optional): number
- region(optional): string
  Maximum Length: `100`
- structureId(optional): string
  Pattern: `[A-Z0-9]{1,30}`

    {
        "type":"object",
        "properties":{
            "accountNumber":{
                "type":"string",
                "maxLength":30
            },
            "branchCode":{
                "type":"string",
                "maxLength":4
            },
            "currencyCode":{
                "type":"string",
                "maxLength":3
            },
            "customerId":{
                "type":"string",
                "pattern":"[a-zA-Z0-9]{1,20}"
            },
            "latitude":{
                "type":"number"
            },
            "longitude":{
                "type":"number"
            },
            "cityName":{
                "type":"string",
                "maxLength":50
            },
            "countryName":{
                "type":"string",
                "maxLength":50
            },
            "region":{
                "type":"string",
                "maxLength":100
            },
            "structureId":{
                "type":"string",
                "pattern":"[A-Z0-9]{1,30}"
            },
            "LmdTbAccountBalancesDTO":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/LmdTbAccountBalancesDTO"
                }
            }
        }
    }

Nested Schema : LmdTbAccountBalancesDTO
Type: `array`
Show Source

- Array of: object LmdTbAccountBalancesDTO

    {
        "type":"array",
        "items":{
            "$ref":"#/definitions/LmdTbAccountBalancesDTO"
        }
    }

Nested Schema : LmdTbAccountBalancesDTO
Type: `object`
Show Source

- accountMaster(optional): string
  Maximum Length: `36`
- availableBalance(optional): number
- id(optional): string
  Maximum Length: `36`
- valueDate(optional): string(date)
  Pattern: `^\d{4}-\d{2}-\d{2}$`
  Example: `2018-12-25T00:00:00.000Z`

    {
        "type":"object",
        "properties":{
            "id":{
                "type":"string",
                "description":"",
                "maxLength":36
            },
            "accountMaster":{
                "type":"string",
                "description":"",
                "maxLength":36
            },
            "valueDate":{
                "type":"string",
                "format":"date",
                "pattern":"^\\d{4}-\\d{2}-\\d{2}$",
                "example":"2018-12-25T00:00:00.000Z"
            },
            "availableBalance":{
                "type":"number"
            }
        }
    }

Back to Top

### Response

Supported Media Types

- application/json
- application/xml

#### 201 Response

Returns message of success or failure
Headers

- Location: string
  URL of newly created account

Body ()
Root Schema : ResponseDtoWrapper
Type: `object`
Show Source

- data(optional): object ResponseResourceSupport
- messages(optional): object ResponseDto

    {
        "type":"object",
        "properties":{
            "messages":{
                "$ref":"#/definitions/ResponseDto"
            },
            "data":{
                "$ref":"#/definitions/ResponseResourceSupport"
            }
        }
    }

Nested Schema : ResponseResourceSupport
Type: `object`
Nested Schema : ResponseDto
Type: `object`
Show Source

- codes(optional): array codes
- id(optional): string
- requestId(optional): string
- status(optional): string

    {
        "type":"object",
        "properties":{
            "id":{
                "type":"string"
            },
            "status":{
                "type":"string"
            },
            "codes":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/ResponseCode"
                }
            },
            "requestId":{
                "type":"string"
            }
        }
    }

Nested Schema : codes
Type: `array`
Show Source

- Array of: object ResponseCode

    {
        "type":"array",
        "items":{
            "$ref":"#/definitions/ResponseCode"
        }
    }

Nested Schema : ResponseCode
Type: `object`
Show Source

- arg(optional): string
- args(optional): array args
- Code(optional): string
- Desc(optional): string
- Language(optional): string
- Type(optional): string

    {
        "type":"object",
        "properties":{
            "Code":{
                "type":"string"
            },
            "Desc":{
                "type":"string"
            },
            "Type":{
                "type":"string"
            },
            "Language":{
                "type":"string"
            },
            "args":{
                "type":"array",
                "items":{
                    "type":"object"
                }
            },
            "arg":{
                "type":"string"
            }
        }
    }

Nested Schema : args
Type: `array`
Show Source

- Array of: object items

    {
        "type":"array",
        "items":{
            "type":"object"
        }
    }

Nested Schema : items
Type: `object`

#### 400 Response

Malformed syntax.

#### 401 Response

Request does not have sufficient credentials.

#### 403 Response

Request is not authorized.

#### 405 Response

Invalid input

#### 500 Response

Internal error
Back to Top