This resource is used to handle new or existing sources (Static Kaisa Numbers). Please see the note on paging.
Source life cycle
All sources created with this resource will follow a pre-defined lifecycle. When a source is created, a phone number is allocated from the pool of available phone numbers.
Once created, the source can either get the status active, upcoming or reserved, depending on the activation date of the source and if reserve_number is specified. If the source is status upcoming, it will move into status active when the activation date (timestamp) is met. If a source is reserved, it must be activated by updating the source, if a reserved source is never activated it will return to the pool of available numbers within a short period of time.
When a source is deleted (either because meeting the expiry date or because it was manually removed), the source status will become quarantined for a pre-defined period of time. During the quarantined period, the source can be re-activated using the resource /sources/reactivate and become status active again.
If the source has spent enough time in status quarantined, the phone number of the source will be returned to the pool of available numbers and the source will get the status archived.
A special, not mandatory, stage in the number life cycle is the extended status, achievable by calling the resource /sources/extend.
Please consider this schematic picture of the source/number lifecycle:
GET
Mandatory parameters
None.
Optional parameters
Name | Type | Description |
---|---|---|
source_id | int | Kaisa's unique ID for source. |
customer_id | int | Kaisa's unique ID for customer. |
custnr | string | Partners unique customer number / id. |
destnr | string | Kaisa number. |
campaign_id | int | Kaisa's unique ID for campaign. |
status | string | Source status. |
class | int | Source class. Defaults to 0. |
Output
Name | Type | Description |
---|---|---|
source_id | int | Kaisa's unique ID for source. |
name | string | Source name. |
media | string | Source media. |
string | Source email address (for notifications). | |
smsnumber | string | Source SMS number (for notifications). |
customer_id | int | Kaisa's unique ID for customer. |
phonenr | string | Customers real phone number. |
destnr | string | Assigned source number. |
timestamp | string | Source activation timestamp in UTC. |
expire | string | Source expiry timestamp in UTC. |
created | string | Source creation timestamp in UTC. |
modified | string | Source modification timestamp in UTC. |
class | int | Source class. |
status | string | Source status; active, upcoming, reserved, extended, archived or quarantined. |
custom_N | string | Source custom field value where N between 101 and 120, 255 characters. |
notify_on_missed_call | int | Send notification on missed call, 1=true, 0=false. |
notify_on_answered_call | int | Send notification on answered call, 1=true, 0=false. |
notify_on_new_voicemail | int | Send notification on new voicemail, 1=true, 0=false. |
*allocation_status | string | Source allocation status. |
vm_divert_all | int | Divert all calls to voicemail, 1=true, 0=false. |
vm_divert_busy | int | Divert calls to voicemail when busy, 1=true, 0=false. |
vm_divert_noanswer | int | Divert calls to voicemail when no answer, 1=true, 0=false. |
vm_disable_recording | int | If sent to voicemail disable recording (just play message and hangup), 1=true, 0=false |
call_recording | int | Enable call recording, 1=true, 0=false. |
alt_numbers | json | Alternate response numbers, JSON. See example for more information. |
campaign_id | int | Unique campaign ID |
publisher_id | int | Unique publisher ID |
* Only used in Germany.
POST
Mandatory parameters
Name | Type | Description |
---|---|---|
customer_id | int | Kaisa's unique ID for customer. |
name | string | Source name, 45 characters. |
phonenr | string | Customers real phone number, 45 characters. |
Optional parameters
Name | Type | Description |
---|---|---|
ndc | int | Used to request a source number in a different area code than customers real phone number. Format is e.g. “468” for Sweden, Stockholm. |
media | string | Source media. |
destnr | string | Used to request a specific number from the available pool. (The number has to exist and be available in our pool) /sources/available_numbers API can be used to get a list of available numbers. |
timestamp | string | Source activation date (YYYY-MM-DD), leave empty or set in the past for immediate activation. |
expire | string | Source expiry date (YYYY-MM-DD). |
string | Source email address (for notifications), 150 characters. | |
smsnumber | string | Source SMS number (for notifications), 45 characters. |
custom_N | string | Source custom field value where N between 101 and 120, 255 characters. |
notify_on_missed_call | int | Send notification on missed call, 1=true, 0=false. |
notify_on_answered_call | int | Send notification on answered call, 1=true, 0=false. |
notify_on_new_voicemail | int | Send notification on new voicemail, 1=true, 0=false. |
vm_divert_all | int | Divert all calls to voicemail, 1=true, 0=false. |
vm_divert_busy | int | Divert calls to voicemail when busy, 1=true, 0=false. |
vm_divert_noanswer | int | Divert calls to voicemail when no answer, 1=true, 0=false. |
vm_disable_recording | int | If sent to voicemail disable recording (just play message and hangup), 1=true, 0=false |
call_recording | int | Enable call recording, 1=true, 0=false. |
alt_numbers | json | Alternate response numbers, JSON. See example for more information. |
campaign_id | int | Unique campaign ID |
*publisher_id | int | Unique publisher ID |
reserve_number | int | Option to reserve the number temporarily. It will return to the number pool after a short period of time if not activated. 1 = true, 0 = false |
skipnotification | int | Do not send SMS or email notifications about changes in this request, 1=true (do not send), 0=false (do send, default value) |
* Only valid if campaign_id is specified.
Output
Same as GET.
PUT
Mandatory parameters
Name | Type | Description |
---|---|---|
source_id | int | Kaisa's unique ID for source. |
Optional parameters
Name | Type | Description |
---|---|---|
name | string | Source name. |
media | string | Source media. |
phonenr | string | Customers real phone number. |
timestamp | string | Source activation date (YYYY-MM-DD). |
expire | string | Source expiry date (YYYY-MM-DD). |
string | Source email address (for notifications). | |
smsnumber | string | Source SMS number (for notifications). |
custom_N | string | Source custom field value where N between 101 and 120, 255 characters. |
notify_missed_call | int | Send notification on missed call, 1=true, 0=false. |
notify_on_answered_call | int | Send notification on answered call, 1=true, 0=false. |
notify_on_new_voicemail | int | Send notification on new voicemail, 1=true, 0=false. |
vm_divert_all | int | Divert all calls to voicemail, 1=true, 0=false. |
vm_divert_busy | int | Divert calls to voicemail when busy, 1=true, 0=false. |
vm_divert_noanswer | int | Divert calls to voicemail when no answer, 1=true, 0=false. |
vm_disable_recording | int | If sent to voicemail disable recording (just play message and hangup), 1=true, 0=false |
call_recording | int | Enable call recording, 1=true, 0=false. |
alt_numbers | json | Alternate response numbers, JSON. See example for more information. |
campaign_id | int | Unique campaign ID |
*publisher_id | int | Unique publisher ID |
activate_number | int | Set a reserved call as active. 1=true, 0=false |
skipnotification | int | Do not send SMS or email notifications about changes in this request, 1=true (do not send), 0=false (do send, default value) |
* Only valid if campaign_id is specified.
Output
Same as GET.
DELETE
Mandatory parameters
Name | Type | Description |
---|---|---|
source_id | int | Kaisa's unique ID for source. |
Optional parameters
None.
Output
N/A.
Comments
0 comments
Please sign in to leave a comment.