Skip to main content
Solved

Custom API handler

  • December 30, 2025
  • 3 replies
  • 97 views
  • Translate All

I am trying to create a simple api handler as part of a customization

 

using System.Collections.Generic;
using System.IO;
using System.Web;
using Newtonsoft.Json;

namespace SampleAPI
{


public class SampleApiHandler : IHttpHandler
{
public bool IsReusable => false;

public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "application/json";
context.Response.Write("{\"status\":\"ok\"}");
}
}
}

I published the customization and changed web.config

 

 <add name="SampleAPI"
path="api/sampleApi"
verb="POST"
type="SampleAPI.SampleAPIHandler"
resourceType="Unspecified"
preCondition="integratedMode" />

 

But I am not able to call it, it times out, am I doing anything wrong?

Best answer by Dmitrii Naumov

​@dkasparianacumatica I’d not recommend doing that. Webhook or the standard CB REST API should be the way to go here.

View original

3 replies

Tony Lanzer
Captain II
Forum|alt.badge.img+3

​@dkasparianacumatica If you’re modifying the web.config, you must be working with an on-prem or local instance. Acumatica doesn’t support web.config changes for SaaS instances. That said, what are you trying to do exactly, create an HTTP interceptor or API handler on top of the Acumatica web application? For what purpose?

Translate

Forum|alt.badge.img+11
  • Captain II
  • January 5, 2026

​@dkasparianacumatica 

 

Would a webhook handler not fit that purpose for you? You can direct the API to send the request to your webhook link and process the request there.

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

​@dkasparianacumatica I’d not recommend doing that. Webhook or the standard CB REST API should be the way to go here.

Translate