Syncing to custom webhooks
You can have Polytomic Connect sync updates from your sources to custom webhooks. You can do this by creating a model sync that maps fields to your webhook destination.
Payload format
Polytomic’s payloads will arrive in this format:
Payload explanation
Headers
Accept-Encoding
Polytomic delivers payloads as a gzipped response to minimize bandwidth use. Your client likely supports decoding this automatically.
Content-Type
Polytomic delivers its webhooks payloads as json only. This header will always be present.
Polytomic-Signature-Timestamp
This signature lets your backend know when the request was created. In the future it may be used in combination with message signing to provide security. In general, it is a good idea to reject requests older than you expect (more than a few minutes old).
Authorization
This should be Bearer token matching the same value that was provided as the Secret during connection setup. For now, this is the only request authorization and is a static value.
Body
Whitelist IPs
Requests will arrive from Polytomic IP addresses. You may need to whitelist them if your webhook host is behind a firewall. You can find the list of Polytomic IP addresses here.
Payload API response
On receipt of the payload, your API should return 200 OK
. Any 4xx
or 5xx
error will cause Polytomic to declare the sync to have failed.