API Expire Manual Member
NATS4 now supports an API function that allows you to expire manual members. This lets you mark your Manually created members as expired in NATS through an automated process by running code that calls the expire manual member API. This function will need to send all relevant data for a manual member so NATS can expire the manual member as you would through the NATS admin.
Function Arguments
The API function to import bulk adtools is called import_adtools_dump. The arguments for this function are as follows:
- memberid -- the memberid of the manual member
- username -- the username of the manual member
- siteid -- the siteid of the manual member
If the importing worked correctly, the response will be "Expired member: xxxx" where xxxx is the memberid in NATS. If it didn't, it will start with one of the following errors:
Missing Username or Siteid No Member Found Member Already Expired This is Not a Manual Member, Cannot Expire
Our NATS4 API article contains example code for using API functions, which you can build off of when implementing our add manual member API. The following is an example of some code you can use to call the API function:
// Call the SOAP method $values = Array( 'memberid' => 1234, 'username' => 'Manual', 'siteid' => 2 ); $result = $client->call('expire_manual_member',$values, 'natsapiadmin_wsdl');