Hi,
I want to create an account and the contact at the same api call but my code doesn't work:
try {
$response = $client->request('POST', 'Account', [
'name' => 'Testaccount',
'accountnumber' => '12345',
'emailAddress' => 'test@test.com',
]);
$response = $client->request('POST', 'Contact', [
'firstName' => 'Test firstName',
'lastName' => 'Test lastName',
'where' => [
[
'type' => 'equals',
'attribute' => 'accountnumber',
'value' => '12345',
],
],
]);
I want to create an account and the contact at the same api call but my code doesn't work:
try {
$response = $client->request('POST', 'Account', [
'name' => 'Testaccount',
'accountnumber' => '12345',
'emailAddress' => 'test@test.com',
]);
$response = $client->request('POST', 'Contact', [
'firstName' => 'Test firstName',
'lastName' => 'Test lastName',
'where' => [
[
'type' => 'equals',
'attribute' => 'accountnumber',
'value' => '12345',
],
],
]);
Comment