Syntax
bool deleteField( string api_key, int list_id, int field_id );
Parameters
api_key
(string)Key required to access the API. See Getting Started for more information.
list_id
(int)ID of the List containing the Field.
field_id
(int)ID of the Field to delete.
Return Value
Returns true on success.
Examples
$list_id = 1234567;
$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('deleteField', $list_id, $field_id); // field_id is obtained using searchFields.
$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('deleteField', $list_id, $field_id); // field_id is obtained using searchFields.
{
"id": 1,
"method": "deleteField",
"params": [
"YOURAPIKEY",
1234567,
2345678
]
}
"id": 1,
"method": "deleteField",
"params": [
"YOURAPIKEY",
1234567,
2345678
]
}
{
"id": 1,
"result": true,
"error": null
}
"id": 1,
"result": true,
"error": null
}
Error Codes
This method may return the following error codes in addition to the standard error codes:
Code | Error | Description |
---|---|---|
303 |
Unable to Load List | list_id is not a valid List. |
313 |
Cannot Edit Account Lists | list_id is an Account List. Fields cannot be deleted from an Account List. |
315 |
Field Not Found | field_id is not a valid Field in the List. |
302 |
Undefined Error | An internal error occurred. |