---
title: "Retrieve a outbound rule"
method: GET
path: "/outbound_rules/{id}"
tags: ["Outbound Rule"]
---

# Retrieve a outbound rule

`GET /outbound_rules/{id}`

## Request

- Base URL: `https://HOSTNAME:8887/api`
- URL: `https://HOSTNAME:8887/api/outbound_rules/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/docs/outbound_rules/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required: The unique ID of the resource.

## Response `200`

OK

- object
  - `id` string: The unique ID of the resource.
  - `name` string: The name of outbound rule.
  - `number_prefix` string: Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
  - `number_length` string: The length of number prefix. A semicolon-separated list of integer. For example by specifying "1;2", calls with a caller ID of 1 or 2 digits will be applied this rule.
  - `number_mask` string: Extension who starts the call. A semicolon-separated list of extensions allowed. For example by specifying "101-110;199", extensions from 101 to 110 and 199 will be applied this rule.
  - `enabled` boolean: Whether to enable outbound rule.
  - `priority` integer: The priority of outbound rule.
  - `office_hours` object
    - `mode` 'GLOBAL' | 'CUSTOM': The office hours mode can be either: - `GLOBAL`: Use global office hours. - `CUSTOM`: Use specific office hours.
    - `monday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `tuesday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `wednesday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `thursday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `friday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `saturday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `sunday` object
      - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[]: Multiple start and end time periods make up the working time.
        - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
  - `holidays` object[]: A collection of tenant's holidays.
    - `id` string: The unique ID of the resource.
    - `name` string: The name of the holiday.
    - `every_year` boolean: Does the holiday take effect every year.
    - `consecutive` boolean: Whether the holiday consists of consecutive days.
    - `year_start` integer: The start year of holiday.
    - `year_end` integer: The end year of holiday.
    - `month_start` integer: The start month of holiday.
    - `month_end` integer: The end month of holiday.
    - `day_start` integer: The start day of holiday.
    - `day_end` integer: The end day of holiday.
    - `hour_start` integer: The start hour of holiday.
    - `hour_end` integer: The end hour of holiday.
    - `minute_start` integer: The start minute of holiday.
    - `minute_end` integer: The end minute of holiday.
  - `routing_strategy` 'PRIORITIZED' | 'RANDOMLY': Routing strategy: Can be either: - `PRIORITIZED`: Selected according to the priority order of the route list. - `RANDOMLY`: Randomly select one of the route list.
  - `routes` object[]
    - `enabled` boolean: Enable this route or not.
    - `provider_id` string: The unique ID of the resource.
    - `strip_digits` integer: Digits for striping number. Values: 0-9. For example if it is set to 2, the first two digits for caller ID of calling from route_provider_1 will be removed.
    - `prepend` string: Prefix number. If it is set to "0086", call ID for calling from route_provider_1 will be prefixed with "0086".
    - `outbound_caller_id` string: Outbound caller id.

## Other responses

- `4XX`: Error

---

[API](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api.md) - [All operations](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/revisions/577415d4a3d5?raw)
