26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Delete codes (v2)

Delete codes (v2)

DELETE  /api/v2/billing/intercoms/{intercom}/codes

Revokes temporary codes by their id: the codes are deleted, and the panel receives a command to delete them.

JSON
{
    "ids": [
        31,
        32
    ]
}

Method parameters

int intercom  required , Intercom ID (in the URL)


array ids  required , IDs of codes on this intercom, 1 to 200

object array

int ids.  required , Code ID, without duplicates


204  No Content

Successful response

404  Not Found

Intercom not found

422  Unprocessable Entity

Returns a JSON error object. For more information, see General information > Validation.

JSON
{
    "message": "No informative message is provided here",
    "errors": {
        "any_key": [
            "The reason for the error is described here"
        ]
    }
}
cURL
Bash
curl -k --request DELETE \
	--url 'https://your-domain/api/v2/billing/intercoms/{intercom}/codes' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "ids": {
        "": 0
    },
    "ids.": "void"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'ids' => 
  array (
    '' => 0,
  ),
  'ids.' => 'void',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'DELETE',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v2/billing/intercoms/{intercom}/codes', false, $context);