Thanks for bringing this to our attention. The POST request is expecting a body even if it’s empty. For example '{}'. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your findings to the API product team.
Thanks a lot Bryan! It does seem to me that the intention is that it should accept an absent body - as per the API explorer and PHP SDK. This does seem a bit odd to me as post requests usually do require some form of body, but it would be great to be able to keep my codebase clean without having to write my own curl request between SDK function calls.
Can confirm this defect with NojeJS endpoint. Calling:
const result = await cardsApi.disableCard(requestBody.cardId);
Returns the following error.
[Error] Status:400, Messages: [
{
"category": "INVALID_REQUEST_ERROR",
"code": "EXPECTED_JSON_BODY",
"detail": "Expected body to be a JSON object."
}
]