This webhook is called when checking a product’s availability during proposal creation. The request URL contains the search parameters start, end, and an optional attendees.

The POST request body looks like the following

Content Import Request
{
  id: string;
  created: number;
  type: 'content.availability';
  integration: IntegrationSessionData;
  integrationBlockSource: {
    integrationId: number;
    uniqueId: string;
    metadata: Record<string, unknown>;
  }
}

The expected response to this is a json object with the following format

Response
{
  data: {
    available?: boolean;
    quantity?: number;
  }
}

If availability is not applicable for a specific product, return an object with an empty data field. Otherwise you can either set available or quantity, depending on if it’s a single resource, or numbered.