API Callback Endpoint

The docs mention setting $statusCode and $headers local variables, but these variable names are not used anywhere, so they don’t actually change the status code or headers. Can you tell me how to set these values?

They require some updated code, I shall have eduardo contact you and update the docs on this as it is a brand new feature.

We updated the docs, find the instructions here

In order to be able to set $statusCode and $headers, the API callback hook script needs to be changed. On your API hook script in your business file, find where $$BF_Payload is set, which should be the second last line (before exit script).

Add to its JSONSetElement the following two elements:

  • [“data.headers” ; $headers ; JSONObject];

  • [“data.statusCode” ; $statusCode ; JSONNumber ];

Thanks, I got it working now.