Subscriptions Payloads on Updates
# support
l
hey there! We use webhooks to sync medplum data back into our platform for a number of objects. I actually see a body payload on new records, along with the headers. Something I'm not seeing however is updates from my Subscription to my webhook when a record changes. Specifically, I'm trying to keep my Organization records sync'd to an database via webhook and I'm not seeing evetns after that initaly creationg. Any idea why that might be?
a
Howdy! By default,
Subscriptions
fire on both create and update, so if you're only getting creates, something's filtering it out does your
Subscription
has a
subscription-supported-interaction
extension with
valueCode
set to
create
?
l
hey @Aditya Suri ! looking at the JSON for the subscription I do see:
Copy code
"extension": [
    {
      "url": "https://medplum.com/fhir/StructureDefinition/subscription-supported-interaction",
      "valueCode": "create"
    }
  ],
a
Thats probably your issue, you have it restricted to just
create
not
create
and
update
. you either need a second subscription to
update
, or just remove the extension entirely and it will default to
create
and
update
l
ah ha! I'm not sure how that even got set. I'll check with my team. thank you so much!
30 Views