When a contact is inactive in Zoho Books, they are hidden from the primary list and cannot be selected for new Invoices, Sales Orders, or Bills. The Mark as Active API is a specific "action" endpoint that restores the contact's visibility and usability across the organization.
At Kalki LLP, we recommend using this specific action endpoint rather than a general PUT update, as it triggers the necessary background validation required to re-enable the contact.
To activate a contact, you must perform a POST request to the specialized /active sub-resource.
Endpoint: POST /contacts/{contact_id}/active?organization_id={organization_id}
Method: POST (Even though no body is required, the method must be POST).
URL: Requires the unique contact_id.
Body: Empty (No JSON payload is needed).
A successful activation will return a code: 0 and a success message.
Sample JSON Response:
{
"code": 0,
"message": "The contact has been marked as active."
}
This is a common requirement in "Sync" scripts—for example, if a customer who was previously deactivated in your CRM becomes an "Active" lead again.
// Define the Contact ID to activate
contactID = "460000000026049";
orgID = "123456789";
// Construct the URL
urlPath = "https://www.zohoapis.in/books/v3/contacts/" + contactID + "/active?organization_id=" + orgID;
// Execute the POST request
response = invokeurl
[
url :urlPath
type :POST
connection :"kalki_connection"
];
if(response.get("code") == 0)
{
info "Kalki Success: Customer " + contactID + " is now active in Zoho Books.";
}
else
{
info "Activation failed: " + response.get("message");
}
| Error Code | Meaning | Fix for Kalki LLP Developers |
| 2 | Invalid ID | The contact_id provided does not exist in the database. |
| 57 | Unauthorized | Your OAuth token lacks the ZohoBooks.contacts.UPDATE scope. |
| Method Not Allowed | Wrong Method | You attempted a GET or PUT instead of a POST. |
| 3031 | Already Active | The contact is already in an active state. |
For kalkillp.com clients, we always suggest deactivating instead of deleting for two reasons:
Audit Trail: Deleting a contact with existing transactions is restricted in Zoho Books. Making them inactive preserves the financial history while cleaning up the UI.
API Performance: It is much faster to "toggle" a status via this endpoint than to manage the lifecycle of deleting and recreating records.
Manual status updates can lead to billing delays and "missing" customer records. Kalki LLP can help you automate the active/inactive status of your vendors and customers based on their real-time engagement in your CRM or external platforms.