Hi,
I'm having some issues and hit a dead end, hoping someone knows what I'm doing wrong. I am able to get the GET calls to work, but when I try POST, I'm having trouble sending it the parameters.
Here's my code, just using adding an action type as a test.... I get this response for this code: response: Cannot insert the value NULL into column 'description', table 'impresario.dbo.TR_ACTION'; column does not allow nulls. INSERT fails. The statement has been terminated.I've tried tons of different formats for the $postFields. I also get the same response when I change the tokenurl to like https://xxxxxx/TessituraService/ReferenceData/ActionTypes?description=asdf - still says description cant be null with that, which confuses me.
Cannot insert the value NULL into column 'description', table 'impresario.dbo.TR_ACTION'; column does not allow nulls. INSERT fails. The statement has been terminated.
I've tried tons of different formats for the $postFields. I also get the same response when I change the tokenurl to like https://xxxxxx/TessituraService/ReferenceData/ActionTypes?description=asdf - still says description cant be null with that, which confuses me.
Any ideas??? Thanks!!
$tokenURL = 'xxxxxx/.../ActionTypes'; $postFields = '{ "description": "sample string 1", "Id": 1, "Inactive": true, "CreatedDateTime": "2021-06-18T10:32:46.1000637-07:00", "CreateLocation": "sample string 2", "CreatedBy": "sample string 3", "UpdatedDateTime": "2021-06-18T10:32:46.1000637-07:00", "UpdatedBy": "sample string 4", "LetterIndicator": true}'; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $tokenURL, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $postFields, CURLOPT_HTTPHEADER => array( "Authorization: Basic $encodedauth" ), CURLOPT_SSL_VERIFYPEER => false ));
$response = curl_exec($curl);