Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1040 Update WH docs #2284

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(docs): typo on WH
Ref. metriport/metriport-internal#1040

Signed-off-by: Rafael Leite <[email protected]>
  • Loading branch information
leite08 committed Jun 17, 2024
commit def4f9cefa727d59611f8975e18066a721008673
2 changes: 1 addition & 1 deletion docs/home/api-info/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ General requirements for the endpoint:
1. Verifies requests using the HTTP header `x-metriport-signature` - see [authentication](#authentication) below;
1. Accepts and responds to a [`ping` message](#the-ping-message);
1. Be [idempotent](https://en.wikipedia.org/wiki/Idempotence) - it should accept being called more
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts/Qs:

  • Is the "idempotent" requirement essentially just telling the cx that we always expect a 200 HTTP response? Perhaps we should just tell them that, since we don't really care what they do on their end?
  • We've had problems where cx webhook endpoints take a long time to process the payload, and we timeout waiting for the response. Should we instruct them to process the payload async and return us 200 right away?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the "idempotent" requirement essentially just telling the cx that we always expect a 200 HTTP response? Perhaps we should just tell them that, since we don't really care what they do on their end?

No, saying it should be idempotent is not the same thing as saying it should always return 200. They need to design their endpoint in a way that allows it being called multiple times w/ the same payload w/o breaking their app.

We've had problems where cx webhook endpoints take a long time to process the payload, and we timeout waiting for the response. Should we instruct them to process the payload async and return us 200 right away?

Good point, added!

whan once with the same payload, with no changes to the end result.
than once with the same payload, with no changes to the end result.

Additionally, your endpoint will need to accept and process different messages when they become available - specifically:

Expand Down