infusionsoft / infusionsoft-php

PHP client library for the Infusionsoft API.
https://developer.infusionsoft.com/
Other
130 stars 128 forks source link

Trying to create a contact but if I put the phone_numers array I get an error #249

Closed yamyoume closed 4 years ago

yamyoume commented 4 years ago

Hey, so this is how I'm setting the phones_array

  $phones_array[] = [
    [
      "number" => $client['mobile'] ,
      "extension" => null,
      "field" => "PHONE1",
      "type" => null
    ],
  ];
  $contact = $infusionsoft->contacts()->find('362267');
  $contact['phone_numbers'] = $phones_array;
  $contact->save();
  {"message":"Input could not be converted to a valid request"}
yamyoume commented 4 years ago

apparently after sleeping and starting up in the morning made me see my where the bug was, it was because I had an extra array in there