Block number
Mark the number associated with an order as nonworking.
This request can change an order or incur charges. The examples do not retry it automatically. Reading a newly received SMS can trigger payment, even though the method uses GET.
Authentication
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
apikey | header | string | Yes | Your API key |
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
orderid | path | integer | Yes | Order ID |
No request body is required.
How to use this method
Mark the number for this orderid as nonworking.
Request examples
Runtime requirements and environment setup. cURL uses a POSIX shell. JavaScript and TypeScript run in Node.js. Java uses the standard HTTP client and prints raw JSON; use your application’s JSON library to inspect the body.
SMSPVA_ORDER_ID:orderid(required).
: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
: "${SMSPVA_ORDER_ID:?Set SMSPVA_ORDER_ID to your orderid}"
curl --fail-with-body --max-time 30 --request PUT \
--url "https://api.smspva.com/activation/blocknumber/${SMSPVA_ORDER_ID}" \
--header "apikey: $SMSPVA_API_KEY"Responses
The examples below show the response format. Prices, stock and account values are sample data; use the API response for current values.
| HTTP | Description |
|---|---|
| 200 | Successful operation |
| 405 | Invalid number format |
| 406 | Order ID format is invalid or not found |
| 411 | API access limited by low karma or ratelimits |
| 501 | Server failed to process request. |
| 503 | The server is overloaded and experiencing performance issues. Please try later. |
HTTP 200
Successful operation
Illustrative response
{
"statusCode": 200,
"data": {
"orderId": 123456
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
data | object | Response data |
data.orderId | integer | Order ID |
HTTP 405
Invalid number format
Illustrative response
{
"statusCode": 405,
"error": {
"type": "INVALID_PARAMS",
"description": "Invalid params."
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Response data |
error.type | string | Error type |
error.description | string | Error description |
HTTP 406
Order ID format is invalid or not found
Illustrative response
{
"statusCode": 406,
"error": {
"type": "ORDER_NOT_FOUND",
"description": "Order not found."
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Response data |
error.type | string | Error type |
error.description | string | Error description |
HTTP 411
API access limited by low karma or ratelimits
Illustrative response
{
"statusCode": 411,
"error": {
"type": "ACCESS_LIMITED",
"description": "Access is temporary limited."
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Error data |
error.type | string | Error type |
error.description | string | Error description |
HTTP 501
Server failed to process request.
Illustrative response
{
"statusCode": 501,
"error": {
"type": "SERVER_FAIL",
"description": "Server failed to process request"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Response data |
error.type | string | Error type |
error.description | string | Error description |
HTTP 503
The server is overloaded and experiencing performance issues. Please try later.
Illustrative response
{
"statusCode": 503,
"error": {
"type": "SERVER_BUSY",
"description": "Server overload, try later."
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Error data |
error.type | string | Error type |
error.description | string | Error description |
Related guides
If a connection fails during an order-changing request, check the order before trying again.