Webhooks

A Webhook in Pitcher identifies a document which is subscribed to by a particular customer. Each customer can have subscribe to many documents, each document can be subscribed to by many customers.

An administrator of Pitcher can subscribe any customer to any document by selecting the customer and the document. A customer with a login to Pitcher can select any document and it will be automatically linked to that customer.

The webhook also requires a token. If a customer is subscribing to updates for a document they already have, they can provide a token. If the customer does not already have the document, the token field can be left blank and a token will be generated.

The token must be stored in the customer database, and is used to identify the document in the customer's database. It is expected that if a record cannot be found in the customer's database, that one will be created.

Every time a document is updated on Pitcher, if the customer has a webhook corresponding to that document, then Pitcher will send a payload to their server


Example Payload


      payload = {
        token: '1c407a29ac9cefb005c056ae5b16e2ab',
        description: '1:200 Contour Map of the North Pole',
        link: 'http://pitcher-bucket.s3.us-east-1.amazonaws.com/document-2023-10-30-Screenshot 2023-10-04 at 10.31.15 pm.png'
      }
      

Customer URL Document Endpoint Token
Acme https://ymrk2.hatchboxapp.com/ Recipe for Rhubarb Crumble /updates 4364bb93b7a4f0aa55660ce826f8c95a Show
Acme https://ymrk2.hatchboxapp.com/ Circuit Board for Mother Board /updates 9ee010bc8d693966a01e919032d86ae1 Show
Acme https://ymrk2.hatchboxapp.com/ Treasure Maps /updates 3f0729b12f4845c62c18ad769c302e68 Show
Acme https://ymrk2.hatchboxapp.com/ Shelving /updates 30f3c3d0a45edc6c9388b195d1a6cc43 Show
New webhook