External API for posting data | Community
Skip to main content
Level 3
September 18, 2020
Solved

External API for posting data

  • September 18, 2020
  • 3 replies
  • 3742 views

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.
Best answer by pushkar_k

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.

3 replies

DavidKangni
Community Advisor
Community Advisor
September 21, 2020

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

David Kangni
Level 3
September 22, 2020

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" } ] }

Sukrity_Wadhwa
Community Manager
Community Manager
October 1, 2020

Hi @michellelowsl,

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

Thanks!

Sukrity Wadhwa
Level 3
October 1, 2020
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?
pushkar_kAdobe EmployeeAccepted solution
Adobe Employee
October 1, 2020

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.

Level 3
October 5, 2020
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?