openapi: 3.2.0 info: title: Shipwell v2 Core Events and Webhooks API description: Partial, honestly-modeled OpenAPI description of the Shipwell transportation management system (TMS) API. version: '2.0' contact: name: Shipwell url: https://docs.shipwell.com/ servers: - url: https://api.shipwell.com/v2 description: Production (v2 Core API) - url: https://sandbox-api.shipwell.com/v2 description: Sandbox (v2 Core API) - url: https://api.shipwell.com description: Production host root (Orders API, served without the /v2 prefix) security: - authToken: [] tags: - name: Events & Webhooks description: Real-time supply-chain events and webhook subscriptions. (partly confirmed) paths: /events/: get: operationId: listEvents tags: - Events & Webhooks summary: Retrieve a list of events description: Retrieves supply-chain events, including shipment tracking timeline updates. (confirmed) parameters: - name: page in: query required: false schema: type: integer responses: '200': description: A list of events. content: application/json: schema: type: array items: $ref: '#/components/schemas/Event' '401': $ref: '#/components/responses/Unauthorized' /events/event-names-by-version/: get: operationId: listEventNames tags: - Events & Webhooks summary: List available event names by version description: Returns the up-to-date list of event names available for webhook subscriptions, keyed by version. (confirmed) responses: '200': description: A map of event names by version. content: application/json: schema: type: object additionalProperties: true '401': $ref: '#/components/responses/Unauthorized' /webhooks/: get: operationId: listWebhooks tags: - Events & Webhooks summary: List webhook subscriptions description: Lists the webhook subscriptions configured for your company. (modeled) responses: '200': description: A list of webhook subscriptions. content: application/json: schema: type: array items: $ref: '#/components/schemas/Webhook' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createWebhook tags: - Events & Webhooks summary: Create a webhook subscription description: Creates a webhook subscription. Shipwell delivers matching events by HTTP POST to the configured endpoint URL. (partly confirmed) requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Webhook' responses: '201': description: The created webhook subscription. content: application/json: schema: $ref: '#/components/schemas/Webhook' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' components: responses: ValidationError: description: The request payload failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Webhook: type: object required: - url properties: id: type: string url: type: string format: uri event_names: type: array items: type: string is_active: type: boolean Error: type: object properties: error_description: type: string errors: type: array items: type: object additionalProperties: true Event: type: object properties: id: type: string event_name: type: string version: type: string occurred_at: type: string format: date-time data: type: object additionalProperties: true securitySchemes: authToken: type: apiKey in: header name: Authorization description: Company-scoped API key passed in the Authorization header (the docs refer to this as the AuthToken scheme). Production and sandbox use separate keys. Keys can be permission-restricted.