External API for posting data | Community
Skip to main content
Level 3
Sep 18, 2020 2:57 PM UTC
Solved

External API for posting data

Hi there, 

 

Has anyone tried external Api for Posting data to external API

I tried to use it but noticed it only tried to retrive data from the endpoint.

Is it only used for GET data?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
pushkar_kAccepted solution
Employee
Oct 1, 2020 4:25 PM UTC

Hello,

 

ExternalApi activity can perform a POST call too. You can define whatever valid json you want to send as POST body in the Customize Parameter section under Inbound Mapping tab. You can view the POST body that will be used for the request under POST body template section (which is greyed out and is read-only). If there is something in that section, it means externalApi activity will do a POST call.

 

Thanks.

10 replies

pushkar_kAccepted solution
Employee
Oct 1, 2020 4:25 PM UTC

Hello,

 

ExternalApi activity can perform a POST call too. You can define whatever valid json you want to send as POST body in the Customize Parameter section under Inbound Mapping tab. You can view the POST body that will be used for the request under POST body template section (which is greyed out and is read-only). If there is something in that section, it means externalApi activity will do a POST call.

 

Thanks.

Translate
Level 3
Oct 5, 2020 11:58 AM UTC
Hi pushkar, I wanted to perform POST Method using payload below { "schema": [ "EMAIL", "FN" ], "data": [ [ xxxx ] ] } . However, it's modified to {"params":{"schema":["EMAIL","FN"],"data":[[xxxx]]}} in Post Body Template. I guess it might be the reason of the failure. Do you have any suggestion to fix this?
Translate
Sukrity_Wadhwa
Employee
Oct 1, 2020 11:29 AM UTC

Hi @michellelowsl,

Were you able to resolve this query with the given solution? Do let us know.

Thanks!

Translate
Sukrity Wadhwa
Level 3
Oct 1, 2020 1:50 PM UTC
Thanks Sukrity. Unfortunately I was still unable to resolve the issue. Is there any documentation that shows how to POST profiles from Adobe to other system using this activity in workflow?
Translate
DavidKangni
New Participant
Sep 21, 2020 4:32 PM UTC

Hi,

The activity also can do HTTP POST to web services.

 

You can try:

* Define any query (can have record count 0)

* Then define any field mapping in the outbound mapping

This then shall trigger a POST call.

 

Thanks,

David

Translate
David Kangni
Level 3
Sep 22, 2020 1:54 AM UTC

Hi David, Thanks for your reply. How do I define the method? It seems to be GET by default. I was able to establish connection when using Get method with end point but when I used end point for Post method, I got 400 error. I was trying to Post to https://graph.facebook.com/v7.0/<CUSTOM_AUDIENCE_ID>/users. The url, payload and token was working and tested on graph API. https://graph.facebook.com/v8.0/23845564964xxxxx/users?access_token=EAANkrpaqrfABANTbudbZAexxxx This is the json in the outbound mapping. Does it seem correct? How do I pass the inbound data to the API?

{ "data": [{ "EMAIL": "9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254", "LOOKALIKE_VALUE" : " 44.5" } ] }

Translate