{
  "openapi": "3.1.0",
  "info": {
    "title": "IMPARGO Webhooks",
    "version": "1.0.0",
    "description": "Webhook events sent by IMPARGO. The wire format follows the Standard Webhooks specification v1.0 (https://www.standardwebhooks.com)."
  },
  "webhooks": {
    "companyorder.created": {
      "post": {
        "summary": "companyorder.created",
        "description": "An order was created.",
        "operationId": "companyorder.created",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyorderCreatedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "companyorder.updated": {
      "post": {
        "summary": "companyorder.updated",
        "description": "An order was updated (including archiving).",
        "operationId": "companyorder.updated",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyorderUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "companyorder.status_changed": {
      "post": {
        "summary": "companyorder.status_changed",
        "description": "The status of an order changed.",
        "operationId": "companyorder.status_changed",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyorderStatusChangedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "companyorder.deleted": {
      "post": {
        "summary": "companyorder.deleted",
        "description": "An order was deleted.",
        "operationId": "companyorder.deleted",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyorderDeletedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "companyorder.document_uploaded": {
      "post": {
        "summary": "companyorder.document_uploaded",
        "description": "Documents were uploaded to an order by a driver (DriverApp), a shipper (ShipperPortal) or a partner (shared order link). Documents uploaded by your own dispatchers via the CargoApps trigger `companyorder.updated` instead.",
        "operationId": "companyorder.document_uploaded",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyorderDocumentUploadedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "customer.created": {
      "post": {
        "summary": "customer.created",
        "description": "A customer was created.",
        "operationId": "customer.created",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreatedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "customer.updated": {
      "post": {
        "summary": "customer.updated",
        "description": "A customer was updated.",
        "operationId": "customer.updated",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "customer.deleted": {
      "post": {
        "summary": "customer.deleted",
        "description": "A customer was deleted.",
        "operationId": "customer.deleted",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerDeletedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "partner.created": {
      "post": {
        "summary": "partner.created",
        "description": "A partner was created.",
        "operationId": "partner.created",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCreatedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "partner.updated": {
      "post": {
        "summary": "partner.updated",
        "description": "A partner was updated.",
        "operationId": "partner.updated",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    },
    "partner.deleted": {
      "post": {
        "summary": "partner.deleted",
        "description": "A partner was deleted.",
        "operationId": "partner.deleted",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "Unique event ID. Stays the same across retries, use it to deduplicate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "Unix timestamp (seconds) of this delivery attempt.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "Space-separated list of `v1,<base64 HMAC-SHA256>` signatures over `<webhook-id>.<webhook-timestamp>.<body>`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerDeletedEvent"
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The webhook is disabled and no further events are sent."
          },
          "2XX": {
            "description": "Delivery succeeded. Any other response (or no response within 15 s) is retried."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WebhookCompanyOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Order ID."
          },
          "reference": {
            "type": "string",
            "description": "Order reference."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus",
            "description": "Current order status."
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the order is archived. Archiving is sent as `companyorder.updated`."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the order is deleted. Always `true` for `companyorder.deleted`."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update of the order.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "reference",
          "status",
          "archived",
          "deleted",
          "updatedAt"
        ],
        "description": "Lean representation of an order. Fetch the full order with `companyOrders(query: { _id })`."
      },
      "OrderStatus": {
        "type": "string",
        "enum": [
          "OPEN",
          "AUCTION",
          "PLANNING",
          "PLANNED",
          "DECLINED",
          "ASSIGNED",
          "CONFIRMED",
          "IN_PROGRESS",
          "FINISHED",
          "BILL_CREATED",
          "PAID",
          "CANCELLED"
        ]
      },
      "WebhookCompanyOrderDocumentUpload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Order ID."
          },
          "reference": {
            "type": "string",
            "description": "Order reference."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus",
            "description": "Current order status."
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the order is archived. Archiving is sent as `companyorder.updated`."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the order is deleted. Always `true` for `companyorder.deleted`."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update of the order.",
            "format": "date-time"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookOrderDocument"
            },
            "description": "Only the documents uploaded with this event, not all documents of the order."
          }
        },
        "required": [
          "archived",
          "deleted",
          "documents",
          "id",
          "reference",
          "status",
          "updatedAt"
        ],
        "description": "Lean representation of an order with the documents that were just uploaded. Fetch all documents of the order with `companyOrders(query: { _id })`."
      },
      "WebhookOrderDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Document ID."
          },
          "name": {
            "type": "string",
            "description": "File name."
          },
          "type": {
            "$ref": "#/components/schemas/FileType",
            "description": "Kind of document: proof of delivery, weighing document or other attachment."
          },
          "url": {
            "type": "string",
            "description": "Download URL of the file."
          },
          "contentType": {
            "type": "string",
            "description": "MIME type of the file, if known."
          },
          "size": {
            "type": "number",
            "description": "File size in bytes."
          },
          "stopId": {
            "type": "string",
            "description": "Stop the document was uploaded at, if any."
          },
          "createdAt": {
            "type": "string",
            "description": "When the document was uploaded.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "url",
          "size",
          "createdAt"
        ],
        "description": "A document uploaded to an order."
      },
      "FileType": {
        "type": "string",
        "enum": [
          "POD_UPLOAD",
          "ATTACHMENT_UPLOAD",
          "WEIGHING_DOCUMENT"
        ]
      },
      "WebhookCustomer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Customer ID."
          },
          "name": {
            "type": "string",
            "description": "Customer (company) name."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the customer is deleted. Always `true` for `customer.deleted`."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update of the customer.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "deleted"
        ],
        "description": "Lean representation of a customer. Fetch the full customer with `costprofilesCustomer(ids)`."
      },
      "WebhookPartner": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Partner ID."
          },
          "name": {
            "type": "string",
            "description": "Partner (company) name."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the partner is deleted. Always `true` for `partner.deleted`."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update of the partner.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "deleted"
        ],
        "description": "Lean representation of a partner (subcontractor). Fetch the full partner with `costprofilesSubcontractor(ids)`."
      },
      "CompanyorderCreatedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "companyorder.created"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCompanyOrder"
              }
            }
          }
        }
      },
      "CompanyorderUpdatedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "companyorder.updated"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCompanyOrder"
              }
            }
          }
        }
      },
      "CompanyorderStatusChangedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "companyorder.status_changed"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCompanyOrder"
              }
            }
          }
        }
      },
      "CompanyorderDeletedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "companyorder.deleted"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCompanyOrder"
              }
            }
          }
        }
      },
      "CompanyorderDocumentUploadedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "companyorder.document_uploaded"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCompanyOrderDocumentUpload"
              }
            }
          }
        }
      },
      "CustomerCreatedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.created"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCustomer"
              }
            }
          }
        }
      },
      "CustomerUpdatedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.updated"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCustomer"
              }
            }
          }
        }
      },
      "CustomerDeletedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.deleted"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookCustomer"
              }
            }
          }
        }
      },
      "PartnerCreatedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "partner.created"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookPartner"
              }
            }
          }
        }
      },
      "PartnerUpdatedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "partner.updated"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookPartner"
              }
            }
          }
        }
      },
      "PartnerDeletedEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "partner.deleted"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (not when it was delivered)."
          },
          "data": {
            "type": "object",
            "required": [
              "companyId",
              "object"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "Company the event belongs to."
              },
              "object": {
                "$ref": "#/components/schemas/WebhookPartner"
              }
            }
          }
        }
      }
    }
  }
}
