Q:

POST Request with Jquery's $.post(), 405 Method Not Allowed

I have an asynchronous task set up in a C# controller like so that has been simplified here:
namespace MyApp.Api
{
public class TimeAllocationController : BaseApiController
{
    [Route("api/timeallocation")]
    [HttpPost]
    public async Task<ActivityValidationResult> Post(string id)
    {
        //logic here...
    }

Ideally I'd like to pass the whole payload in JQuery using the $.post() method, but I keep getting a 405 method not allowed if 
I try to pass in C#'s Post() string Id within the payload. I can only pass it in like so:
$.post('/api/timeallocation/' + categoryId...

I cannot pass it in like so:
$.post('/api/timeallocation?id=' + categoryId...

I'd like to do neither of the above, just set up a payload variable in the JS file with the id and all the other required attributes, and call $.post() on that.
As for other possible reasons for the 405 error, I have verified that it is not due to authentication reasons. 
Is there something I am overlooking here?

A:

I was able to solve it with the following in my controller:
public async Task<ActivityValidationResult> Post(string id, [FromBody] TimeAllocationActivity payload)

where payload handles the TimeAllocationActivity attributes. Note I did have to create the TimeAllocationActivity model as it did not exist before. 
On the JS side I created the payload variable and then set up the request like so:
processCheckAjax = $.ajax({
    url: "/api/timeallocation/" + categoryId,
    dataType: "json",
    type: "POST",
    data: JSON.stringify(payload)

I do find it odd that I still had to append categoryId to the route and it could not be included in the payload. 

