Sinch uses webhooks to notify you of events that happen in the porting system.
You can configure webhooks for porting events in the porting defaults API or via the dashboard. Anytime a port is then made via the dashboard or we at Sinch trigger an update we will call your webhook url with the event type and a payload depending on event type.
This operation allows you to get a webhook when an order is updated. This is a webhook that will be called when an order is updated, it will contain the order and the status of the order.
{- "type": "ORDER_UPDATED",
- "orderId": "897867",
- "order": {
- "id": 897867,
- "customerOrderReference": "123456",
- "desiredPortSchedule": {
- "desiredPortDate": "2024-09-24",
- "desiredPortTime": "09:00:00Z"
}, - "status": "PENDING",
- "onDemandActivation": false,
- "phoneNumbers": [
- {
- "phoneNumber": "+12345678901",
- "portOutInfo": {
- "existingPortOutPin": "1234"
}, - "endUser": {
- "name": "John Doe",
- "streetName": "Main St",
- "streetNum": "123",
- "city": "Anytown",
- "state": "NY",
- "zipCode": "12345"
}, - "voiceConfiguration": {
- "type": "EST",
- "trunkId": "123456"
}
}
]
}
}
At least one number on the port order was activated
event | string Default: "NUMBERS_ACTIVATED" The event that triggered the webhook
| ||||||||||||||||||||||||||||||||||||||||||||||||
orderId | string The order id that was updated | ||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (PhoneNumberMinItem) | |||||||||||||||||||||||||||||||||||||||||||||||||
Array
|
{- "type": "NUMBERS_ACTIVATED",
- "orderId": 897867,
- "phoneNumbers": [
- {
- "phoneNumber": "+12345678901",
- "status": "Activated",
- "activatedDate": "2024-09-24T12:00:00Z"
}
]
}
At least one number on the port order was confirmed, this means that the number is ready to be activated if onDemandActivation
was set to true or if it will be activated at the specified confirmation date
event | string Default: "NUMBERS_CONFIRMED" The event that triggered the webhook
| ||||||||||||||||||||||||||||||||||||||||||||||||
orderId | string The order id that was updated | ||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (PhoneNumberMinItem) | |||||||||||||||||||||||||||||||||||||||||||||||||
Array
|
{- "type": "NUMBERS_CONFIRMED",
- "orderId": 897867,
- "phoneNumbers": [
- {
- "phoneNumber": "+12345678901",
- "status": "Confirmed",
- "confirmedDate": "2024-09-24T12:00:00Z"
}
]
}
At least one number on the port order was rejected, look at rejected reasons for more details on what went wrong
event | string Default: "NUMBERS_REJECTED" The event that triggered the webhook
| ||||||||||||||||||||||||||||||||||||||||||||||||
orderId | string The order id that was updated | ||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (PhoneNumberMinItem) | |||||||||||||||||||||||||||||||||||||||||||||||||
Array
|
{- "type": "NUMBERS_REJECTED",
- "orderId": 897867,
- "phoneNumbers": [
- {
- "phoneNumber": "+12345678901",
- "status": "Confirmed",
- "confirmedDate": "2024-09-24T12:00:00Z"
}
]
}
A note was added to the order either by Sinch or you
event | string Default: "NEW_ORDER_NOTE" The event that triggered the webhook
| ||||||||||||
orderId | string The order id that was updated | ||||||||||||
note | string The note that was added |
{- "type": "NEW_ORDER_NOTE",
- "orderId": 897867,
- "note": "This is a note"
}