0
$info = array(
  'values' => array(
'email' => 'email@email.com',
'firstname' => "firstname",
'lastname' => "lastname",
'source' => "WEB",
  ),
);
$infoo=json_encode($info);
$sf_auth = 'Bearer ' . $data['accessToken'];

$finalUrl="https://www.exacttargetapis.com/hub/v1/dataevents/key:Web_Registrations/rows/GUID:7777";
$result= wp_remote_post( $finalUrl, array(
    'method' => 'POST',
    'timeout' => 45,
    'redirection' => 5,
    'httpversion' => '1.0',
    'blocking' => true,
    'headers' => array(
       'Content-Type' => 'application/json',
       'Authorization' => $sf_auth,
      ),
   'body' => $infoo,
   'cookies' => array()
    )
 );

Trying to post it within wordpress but i am receiving message: Not Found and errorcode: 404

Can anyone tell me what i am doing wrong?? Thank you

  • Have you filled out the External Key field in your Data Extension, within Marketing Cloud? This is per default set to a GUID value. You want to change it to Web_Registrations – Lukas Lunow Feb 17 '18 at 11:36
1

Have you tried to change the method from POST to PUT? (Vide: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/putDataExtensionRowByKey.htm )

Additionally make sure that External Key of that data extension is for sure Web_Registrations and primary key of that Data Extension is for sure GUID.

1

Thank you for the replies. I solved it by changing the method to PUT & httpversion to 1.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.