Previous Next JavaScript must be enabled to correctly display this content

## Adds a new host code

post

/service/hostcodes

This endpoint is used to add a new host code.

### 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 hostcodes
Root Schema : HostCodeDTO
Type: `object`
Match All
Show Source

- allOf GenericDto
- object HostCodeDTO-allOf[1]

    {
        "type":"object",
        "allOf":[
            {
                "$ref":"#/definitions/GenericDto"
            },
            {
                "type":"object",
                "properties":{
                    "hostCode":{
                        "type":"string",
                        "description":"Processing zone that is applicable for the requests",
                        "minLength":1,
                        "maxLength":8,
                        "pattern":"[a-zA-Z0-9_]+"
                    },
                    "hostId":{
                        "type":"number",
                        "description":"Host ID"
                    },
                    "hostDescription":{
                        "type":"string",
                        "description":"Description of the host code",
                        "minLength":1,
                        "maxLength":35
                    },
                    "countryOfficeCode":{
                        "type":"string",
                        "description":"Required Country Code"
                    },
                    "processTimeZone":{
                        "type":"string",
                        "description":"Time zone that is used for processing the request"
                    },
                    "defaultBrCode":{
                        "type":"string",
                        "description":"Required branch code which indicates the main branch of the group of branches linked to the same host code"
                    }
                },
                "required":[
                    "hostCode",
                    "hostDescription",
                    "countryOfficeCode",
                    "processTimeZone"
                ]
            }
        ]
    }

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

- countryOfficeCode: string
  Required Country Code
- defaultBrCode(optional): string
  Required branch code which indicates the main branch of the group of branches linked to the same host code
- hostCode: string
  Minimum Length: `1`
  Maximum Length: `8`
  Pattern: `[a-zA-Z0-9_]+`
  Processing zone that is applicable for the requests
- hostDescription: string
  Minimum Length: `1`
  Maximum Length: `35`
  Description of the host code
- hostId(optional): number
  Host ID
- processTimeZone: string
  Time zone that is used for processing the request

    {
        "type":"object",
        "properties":{
            "hostCode":{
                "type":"string",
                "description":"Processing zone that is applicable for the requests",
                "minLength":1,
                "maxLength":8,
                "pattern":"[a-zA-Z0-9_]+"
            },
            "hostId":{
                "type":"number",
                "description":"Host ID"
            },
            "hostDescription":{
                "type":"string",
                "description":"Description of the host code",
                "minLength":1,
                "maxLength":35
            },
            "countryOfficeCode":{
                "type":"string",
                "description":"Required Country Code"
            },
            "processTimeZone":{
                "type":"string",
                "description":"Time zone that is used for processing the request"
            },
            "defaultBrCode":{
                "type":"string",
                "description":"Required branch code which indicates the main branch of the group of branches linked to the same host code"
            }
        },
        "required":[
            "hostCode",
            "hostDescription",
            "countryOfficeCode",
            "processTimeZone"
        ]
    }

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 hostcodes

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

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

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

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

- allOf GenericDto
- object HostCodeDTO-allOf[1]

    {
        "type":"object",
        "allOf":[
            {
                "$ref":"#/definitions/GenericDto"
            },
            {
                "type":"object",
                "properties":{
                    "hostCode":{
                        "type":"string",
                        "description":"Processing zone that is applicable for the requests",
                        "minLength":1,
                        "maxLength":8,
                        "pattern":"[a-zA-Z0-9_]+"
                    },
                    "hostId":{
                        "type":"number",
                        "description":"Host ID"
                    },
                    "hostDescription":{
                        "type":"string",
                        "description":"Description of the host code",
                        "minLength":1,
                        "maxLength":35
                    },
                    "countryOfficeCode":{
                        "type":"string",
                        "description":"Required Country Code"
                    },
                    "processTimeZone":{
                        "type":"string",
                        "description":"Time zone that is used for processing the request"
                    },
                    "defaultBrCode":{
                        "type":"string",
                        "description":"Required branch code which indicates the main branch of the group of branches linked to the same host code"
                    }
                },
                "required":[
                    "hostCode",
                    "hostDescription",
                    "countryOfficeCode",
                    "processTimeZone"
                ]
            }
        ]
    }

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

- countryOfficeCode: string
  Required Country Code
- defaultBrCode(optional): string
  Required branch code which indicates the main branch of the group of branches linked to the same host code
- hostCode: string
  Minimum Length: `1`
  Maximum Length: `8`
  Pattern: `[a-zA-Z0-9_]+`
  Processing zone that is applicable for the requests
- hostDescription: string
  Minimum Length: `1`
  Maximum Length: `35`
  Description of the host code
- hostId(optional): number
  Host ID
- processTimeZone: string
  Time zone that is used for processing the request

    {
        "type":"object",
        "properties":{
            "hostCode":{
                "type":"string",
                "description":"Processing zone that is applicable for the requests",
                "minLength":1,
                "maxLength":8,
                "pattern":"[a-zA-Z0-9_]+"
            },
            "hostId":{
                "type":"number",
                "description":"Host ID"
            },
            "hostDescription":{
                "type":"string",
                "description":"Description of the host code",
                "minLength":1,
                "maxLength":35
            },
            "countryOfficeCode":{
                "type":"string",
                "description":"Required Country Code"
            },
            "processTimeZone":{
                "type":"string",
                "description":"Time zone that is used for processing the request"
            },
            "defaultBrCode":{
                "type":"string",
                "description":"Required branch code which indicates the main branch of the group of branches linked to the same host code"
            }
        },
        "required":[
            "hostCode",
            "hostDescription",
            "countryOfficeCode",
            "processTimeZone"
        ]
    }

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