How can I insert/update data to custom resource that is linked to profile via API using custom key? | Community
Skip to main content
Level 2
September 24, 2024
Solved

How can I insert/update data to custom resource that is linked to profile via API using custom key?

  • September 24, 2024
  • 1 reply
  • 1711 views

I have tried several ways, but can't find a proper configuration.

Idea is to insert orders and update the order status afterwards by the order id.

Does anyone know how to configure it properly?

 

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 SatheeskannaK

You will have to make a PATCH request to update the existing profile. The flow would be something make a GET request on the profileAndServicesExt endpoint and if there's no profile exists then make a POST request to create a record with relevant attributes.

If the profile exists then your response will include a reference to the custom resource. Use that on the PATCH request to update the existing one.

1 reply

SatheeskannaK
Community Advisor
Community Advisor
September 24, 2024

@raultorga Have a look at this documentation on how to interact with custom resources linked with profile resource via API.

https://experienceleague.adobe.com/en/docs/campaign-standard/using/working-with-apis/global-concepts/custom-resources

Thanks, Sathees
raultorgaAuthor
Level 2
September 24, 2024

@satheeskannak unfortunately that documentation did not get me closer to the solution I'm looking for.

I can send POST request when using the https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/<resourceName>/ endpoint, but it will create a new row for every request. My aim is to use a custom key to insert a new record or update already existing one.

SatheeskannaK
Community Advisor
SatheeskannaKCommunity AdvisorAccepted solution
Community Advisor
September 25, 2024

You will have to make a PATCH request to update the existing profile. The flow would be something make a GET request on the profileAndServicesExt endpoint and if there's no profile exists then make a POST request to create a record with relevant attributes.

If the profile exists then your response will include a reference to the custom resource. Use that on the PATCH request to update the existing one.

Thanks, Sathees