Previous Next JavaScript must be enabled to correctly display this content

## Adds a new rates

post

/service/rates

This endpoint is used tp add a new rates.

### Request

Supported Media Types

- application/json
- application/xml

Header Parameters

- sourceCode: string
  Source from which request is initiated

Body ()
Request Body that contains data required for creating a new rates
Root Schema : CmcTmCurrencyRateMasterDto
Type: `object`
Match All
Show Source

- allOf GenericDto
- object CmcTmCurrencyRateMasterDto-allOf[1]

    {
        "type":"object",
        "allOf":[
            {
                "$ref":"#/definitions/GenericDto"
            },
            {
                "type":"object",
                "properties":{
                    "branchCode":{
                        "type":"string",
                        "minLength":0,
                        "maxLength":3,
                        "pattern":"^[A-Z0-9]*$"
                    },
                    "currency1":{
                        "type":"string",
                        "minLength":0,
                        "maxLength":3
                    },
                    "currency2":{
                        "type":"string",
                        "minLength":0,
                        "maxLength":3
                    },
                    "CmcTmCurrencyRateDto":{
                        "type":"array",
                        "items":{
                            "$ref":"#/definitions/CmcTmCurrencyRateDto"
                        }
                    }
                },
                "required":[
                    "branchCode",
                    "currency1",
                    "currency2"
                ]
            }
        ]
    }

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 : CmcTmCurrencyRateMasterDto-allOf[1]
Type: `object`
Show Source

- branchCode: string
  Minimum Length: `0`
  Maximum Length: `3`
  Pattern: `^[A-Z0-9]*$`
- CmcTmCurrencyRateDto(optional): array CmcTmCurrencyRateDto
- currency1: string
  Minimum Length: `0`
  Maximum Length: `3`
- currency2: string
  Minimum Length: `0`
  Maximum Length: `3`

    {
        "type":"object",
        "properties":{
            "branchCode":{
                "type":"string",
                "minLength":0,
                "maxLength":3,
                "pattern":"^[A-Z0-9]*$"
            },
            "currency1":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "currency2":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "CmcTmCurrencyRateDto":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/CmcTmCurrencyRateDto"
                }
            }
        },
        "required":[
            "branchCode",
            "currency1",
            "currency2"
        ]
    }

Nested Schema : CmcTmCurrencyRateDto
Type: `array`
Show Source

- Array of: object CmcTmCurrencyRateDto

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

Nested Schema : CmcTmCurrencyRateDto
Type: `object`
Show Source

- branchCode(optional): string
  Minimum Length: `0`
  Maximum Length: `3`
  Pattern: `^[A-Z0-9]*$`
- buyRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- buySpread(optional): number
- currency1(optional): string
  Minimum Length: `0`
  Maximum Length: `3`
- currency2(optional): string
  Minimum Length: `0`
  Maximum Length: `3`
- currencyRateMasterId(optional): string
- id(optional): string
- intAuthStat(optional): string
  Minimum Length: `0`
  Maximum Length: `1`
- midRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- rateDate(optional): string
- rateSerial(optional): number
  Minimum Length: `0`
  Maximum Length: `4`
- rateType: string
  Minimum Length: `0`
  Maximum Length: `8`
- saleRate(optional): number
- saleSpread(optional): number
- unauthBuyRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- unauthBuySpread(optional): number
- unauthMidRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- unauthRateDate(optional): string
- unauthRateSerial(optional): number
  Minimum Length: `0`
  Maximum Length: `4`
- unauthSaleRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- unauthSaleSpread(optional): number

    {
        "type":"object",
        "properties":{
            "id":{
                "type":"string"
            },
            "currencyRateMasterId":{
                "type":"string"
            },
            "branchCode":{
                "type":"string",
                "minLength":0,
                "maxLength":3,
                "pattern":"^[A-Z0-9]*$"
            },
            "currency1":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "currency2":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "rateType":{
                "type":"string",
                "minLength":0,
                "maxLength":8
            },
            "midRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "buySpread":{
                "type":"number"
            },
            "saleSpread":{
                "type":"number"
            },
            "buyRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "saleRate":{
                "type":"number"
            },
            "unauthMidRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "unauthBuySpread":{
                "type":"number"
            },
            "unauthSaleSpread":{
                "type":"number"
            },
            "unauthBuyRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "unauthSaleRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "intAuthStat":{
                "type":"string",
                "minLength":0,
                "maxLength":1
            },
            "rateDate":{
                "type":"string"
            },
            "rateSerial":{
                "type":"number",
                "minLength":0,
                "maxLength":4
            },
            "unauthRateDate":{
                "type":"string"
            },
            "unauthRateSerial":{
                "type":"number",
                "minLength":0,
                "maxLength":4
            }
        },
        "required":[
            "rateType"
        ]
    }

Back to Top

### Response

Supported Media Types

- application/json
- application/xml

#### 201 Response

Returns message of succes or failure
Headers

- Location: string
  URL of newly created rates

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

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

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

Nested Schema : CmcTmCurrencyRateMasterResponseDto
Type: `object`
Match All
Show Source

- allOf GenericDto
- object CmcTmCurrencyRateMasterResponseDto-allOf[1]

    {
        "type":"object",
        "allOf":[
            {
                "$ref":"#/definitions/GenericDto"
            },
            {
                "type":"object",
                "properties":{
                    "branchCode":{
                        "type":"string",
                        "minLength":0,
                        "maxLength":3,
                        "pattern":"^[A-Z0-9]*$"
                    },
                    "currency1":{
                        "type":"string",
                        "minLength":0,
                        "maxLength":3
                    },
                    "currency2":{
                        "type":"string",
                        "minLength":0,
                        "maxLength":3
                    },
                    "CmcTmCurrencyRateResponseDto":{
                        "type":"array",
                        "items":{
                            "$ref":"#/definitions/CmcTmCurrencyRateResponseDto"
                        }
                    }
                },
                "required":[
                    "branchCode",
                    "currency1",
                    "currency2"
                ]
            }
        ]
    }

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 : 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 : CmcTmCurrencyRateMasterResponseDto-allOf[1]
Type: `object`
Show Source

- branchCode: string
  Minimum Length: `0`
  Maximum Length: `3`
  Pattern: `^[A-Z0-9]*$`
- CmcTmCurrencyRateResponseDto(optional): array CmcTmCurrencyRateResponseDto
- currency1: string
  Minimum Length: `0`
  Maximum Length: `3`
- currency2: string
  Minimum Length: `0`
  Maximum Length: `3`

    {
        "type":"object",
        "properties":{
            "branchCode":{
                "type":"string",
                "minLength":0,
                "maxLength":3,
                "pattern":"^[A-Z0-9]*$"
            },
            "currency1":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "currency2":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "CmcTmCurrencyRateResponseDto":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/CmcTmCurrencyRateResponseDto"
                }
            }
        },
        "required":[
            "branchCode",
            "currency1",
            "currency2"
        ]
    }

Nested Schema : CmcTmCurrencyRateResponseDto
Type: `array`
Show Source

- Array of: object CmcTmCurrencyRateResponseDto

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

Nested Schema : CmcTmCurrencyRateResponseDto
Type: `object`
Show Source

- branchCode(optional): string
  Minimum Length: `0`
  Maximum Length: `3`
  Pattern: `^[A-Z0-9]*$`
- buyRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- buySpread(optional): number
- currency1(optional): string
  Minimum Length: `0`
  Maximum Length: `3`
- currency2(optional): string
  Minimum Length: `0`
  Maximum Length: `3`
- intAuthStat(optional): string
  Minimum Length: `0`
  Maximum Length: `1`
- midRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- rateDate(optional): string
- rateSerial(optional): number
  Minimum Length: `0`
  Maximum Length: `4`
- rateType: string
  Minimum Length: `0`
  Maximum Length: `8`
- saleRate(optional): number
- saleSpread(optional): number
- unauthBuyRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- unauthBuySpread(optional): number
- unauthMidRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- unauthRateDate(optional): string
- unauthRateSerial(optional): number
  Minimum Length: `0`
  Maximum Length: `4`
- unauthSaleRate(optional): number
  Minimum Length: `0`
  Maximum Length: `24`
- unauthSaleSpread(optional): number

    {
        "type":"object",
        "properties":{
            "branchCode":{
                "type":"string",
                "minLength":0,
                "maxLength":3,
                "pattern":"^[A-Z0-9]*$"
            },
            "currency1":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "currency2":{
                "type":"string",
                "minLength":0,
                "maxLength":3
            },
            "rateType":{
                "type":"string",
                "minLength":0,
                "maxLength":8
            },
            "midRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "buySpread":{
                "type":"number"
            },
            "saleSpread":{
                "type":"number"
            },
            "buyRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "saleRate":{
                "type":"number"
            },
            "unauthMidRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "unauthBuySpread":{
                "type":"number"
            },
            "unauthSaleSpread":{
                "type":"number"
            },
            "unauthBuyRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "unauthSaleRate":{
                "type":"number",
                "minLength":0,
                "maxLength":24
            },
            "intAuthStat":{
                "type":"string",
                "minLength":0,
                "maxLength":1
            },
            "rateDate":{
                "type":"string"
            },
            "rateSerial":{
                "type":"number",
                "minLength":0,
                "maxLength":4
            },
            "unauthRateDate":{
                "type":"string"
            },
            "unauthRateSerial":{
                "type":"number",
                "minLength":0,
                "maxLength":4
            }
        },
        "required":[
            "rateType"
        ]
    }

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