openapi: 3.2.0 info: title: Dsv Webhook API version: v1 description: 'Operations tagged Webhook across 2 of this provider''s published API definitions: dsv-es-webhook-demo-v1-openapi.json, dsv-es-webhook-int-v1-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://api.dsv.com/my-demo/webhook/v1 - url: https://api.dsv.com/my-int/webhook/v1 security: - apiKeyHeader: [] - apiKeyQuery: [] tags: - name: Webhook paths: /subscriptions/subscribe: post: tags: - Webhook summary: Subscribe to get notification of the relevant event description: "Subscribe to get notification of the relevant event (Invoice, Visibility, Quote, Tracking, Warehousing, Customs and Downtime Notification. \nThe provided push URL will be validated first by sending an OPTIONS request. \nIf the OPTIONS request is not allowed or fails, a POST request will be sent instead\nwith the following JSON payload:\n\n{\n \"event\": \"string\",\n \"message\": \"string\"\n}" operationId: Webhook_Subscribe parameters: - name: api-version in: header description: api-version schema: type: string example: 1 - name: Authorization in: header description: OAuth header required: true schema: type: string requestBody: description: Subscriber data to be saved content: application/json: schema: $ref: '#/components/schemas/SubscriberDto' example: subscriptionEvent: ShipmentDeviceReading pushUrl: http://mysite.com customerIds: type: string values: [] authenticationData: type: Basic basic: username: test-user password: test-password oAuth: tokenGenerationUrl: https://mytokensite.com accessTokenRequest: headers: - name: client-key value: client-key-value body: formUrlEncodedValues: - name: client-key value: client-key-value refreshTokenRequest: headers: - name: client-key value: client-key-value body: formUrlEncodedValues: - name: client-key value: client-key-value headers: - name: client-key value: client-key-value responses: '200': description: Success/Failure Status '400': description: '' '500': description: '' servers: - url: https://api.dsv.com/my-demo/webhook/v1 /subscriptions/unsubscribe: post: tags: - Webhook summary: Unsubscribe subscription by providing subscription event name description: Unsubscribe subscription by providing subscription event name operationId: Webhook_Unsubscribe parameters: - name: api-version in: header description: api-version schema: type: string example: 1 - name: Authorization in: header description: OAuth header required: true schema: type: string requestBody: description: "Possible values are:\n\nGENERIC TRACKING \n- TrackingShipmentBookingSummary \n- TrackingShipmentEstimatedPickupChanged \n- TrackingShipmentEstimatedDeliveryChanged \n- TrackingShipmentEstimatedArrivalChanged \n- TrackingShipmentEstimatedDepartureChanged \n- TrackingShipmentActualArrivalChanged \n- TrackingShipmentActualDepartureChanged \n- TrackingShipmentPickedUp \n- TrackingShipmentDelivered \n- TrackingShipmentSupplierBooking \n- TrackingShipmentPodAvailable \n- TrackingShipmentExportCustomsCleared \n- TrackingShipmentImportCustomsCleared \n- TrackingShipmentGateIn \n- TrackingShipmentGateOut \n- TrackingShipmentFreightLoaded \n- TrackingShipmentFreightUnloaded \n- TrackingShipmentShipmentContainerAdded \n- TrackingShipmentShipmentStatusChanged\n\n INVOICE API \n- Invoice \n\n VISIBILITY API \n- ShipmentDeviceReading\n- ShipmentDeliveryReceipt \n\n QUOTE API \n- QuoteStatusChanged\n- QuoteRequestCreated\n- QuoteSubmitted\n- QuoteExpiringTomorrow \n\n CUSTOMS API \n- CustomsDeclarationStateUpdate \n\n DOWNTIME NOTIFICATION API \n- ApiDownTimeNotification \n\n WAREHOUSING APIs \n- WMSInboundNotificationStatusChange, \n- WMSDeliveryConfirmation, \n- WMSReceiptConfirmation, \n- WMSInventoryChange, \n- WMSOrderStatusChange, \n- WMSInventoryFull," content: application/json: schema: $ref: '#/components/schemas/UnsubscriberDto' example: subscriptionEvent: string customerIds: type: string values: [] responses: '200': description: '' '500': description: '' servers: - url: https://api.dsv.com/my-demo/webhook/v1 /subscriptions: get: tags: - Webhook summary: Get all subscriptions for the current user description: Get all subscriptions for the current user operationId: Webhook_GetSubscriptions parameters: - name: api-version in: header description: api-version schema: type: string example: 1 - name: Authorization in: header description: OAuth header required: true schema: type: string responses: '200': description: Returns the list of subscriptions content: application/json: schema: type: array items: $ref: '#/components/schemas/SubscriberDetailsDto' example: - subscriptionEvent: ShipmentDeviceReading pushUrl: http://mysite.com customerIds: type: string values: [] authenticationData: type: Basic basic: username: test-user password: test-password oAuth: tokenGenerationUrl: https://mytokensite.com accessTokenRequest: headers: - name: client-key value: client-key-value body: formUrlEncodedValues: - name: client-key value: client-key-value refreshTokenRequest: headers: - name: client-key value: client-key-value body: formUrlEncodedValues: - name: client-key value: client-key-value headers: - name: client-key value: client-key-value createdAt: '0001-01-01T12:00:00.0000000+00:00' lastModifiedAt: '0001-01-01T12:00:00.0000000+00:00' subscribedBy: string '500': description: If there is an internal server error servers: - url: https://api.dsv.com/my-demo/webhook/v1 components: schemas: SubscriberDto: type: object properties: subscriptionEvent: type: string description: "Possible values are:\n\nGENERIC TRACKING \n- TrackingShipmentBookingSummary \n- TrackingShipmentEstimatedPickupChanged \n- TrackingShipmentEstimatedDeliveryChanged \n- TrackingShipmentEstimatedArrivalChanged \n- TrackingShipmentEstimatedDepartureChanged \n- TrackingShipmentActualArrivalChanged \n- TrackingShipmentActualDepartureChanged \n- TrackingShipmentPickedUp \n- TrackingShipmentDelivered \n- TrackingShipmentSupplierBooking \n- TrackingShipmentPodAvailable \n- TrackingShipmentExportCustomsCleared \n- TrackingShipmentImportCustomsCleared \n- TrackingShipmentGateIn \n- TrackingShipmentGateOut \n- TrackingShipmentFreightLoaded \n- TrackingShipmentFreightUnloaded \n- TrackingShipmentShipmentContainerAdded \n- TrackingShipmentShipmentStatusChanged\n\n INVOICE API \n- Invoice \n\n VISIBILITY API \n- ShipmentDeviceReading\n- ShipmentDeliveryReceipt \n\n QUOTE API \n- QuoteStatusChanged\n- QuoteRequestCreated\n- QuoteSubmitted\n- QuoteExpiringTomorrow \n\n CUSTOMS API \n- CustomsDeclarationStateUpdate \n\n WAREHOUSING APIs \n- WMSInboundNotificationStatusChange \n- WMSDeliveryConfirmation \n- WMSReceiptConfirmation \n- WMSInventoryChange \n- WMSOrderStatusChange \n- WMSInventoryFull\n\n DOWNTIME NOTIFICATION API \n- ApiDownTimeNotification" example: ShipmentDeviceReading pushUrl: type: string description: Provide the URL where you want the data to be delivered example: http://mysite.com customerIds: $ref: '#/components/schemas/CustomerIdsDto' authenticationData: $ref: '#/components/schemas/AuthenticationDto' headers: type: array items: $ref: '#/components/schemas/KeyValueDto' description: Include any necessary headers. Make sure these headers match the requirements of the system receiving the data via webhook example: Headers description: Subscriber Dto RequestBodyDto: type: object properties: formUrlEncodedValues: type: array items: $ref: '#/components/schemas/KeyValueDto' description: List of FormUrlEncodedValues values in name-value pair example: FormUrlEncodedValues description: Dto to hold request body parameters OAuthDto: type: object properties: tokenGenerationUrl: type: string description: Token generation url example: https://mytokensite.com accessTokenRequest: $ref: '#/components/schemas/TokenRequestDto' refreshTokenRequest: $ref: '#/components/schemas/TokenRequestDto' description: Object to hold OAuth information KeyValueDto: type: object properties: name: type: string description: Name example: client-key value: type: string description: Value example: client-key-value description: Dto to store name value pair data (in headers, body) UnsubscriberDto: type: object properties: subscriptionEvent: type: string customerIds: $ref: '#/components/schemas/CustomerIdsDto' TokenRequestDto: type: object properties: headers: type: array items: $ref: '#/components/schemas/KeyValueDto' description: Token request headers example: Headers body: $ref: '#/components/schemas/RequestBodyDto' description: TokenRequestDto to hold token request for access Token or refresh Token AuthenticationDto: type: object properties: type: type: string description: Authentication type example: Basic basic: $ref: '#/components/schemas/BasicAuthDto' oAuth: $ref: '#/components/schemas/OAuthDto' description: Authentication object CustomerIdsDto: type: object properties: type: type: string description: Type of customer identifier (MDM or WarehouseID) values: type: array items: type: string description: List of customer identifier values SubscriberDetailsDto: allOf: - $ref: '#/components/schemas/SubscriberDto' - type: object properties: createdAt: type: string description: When the customer subscribed to the event format: date-time lastModifiedAt: type: string description: When the customer last modified the subscription format: date-time subscribedBy: type: string description: who subscribed to this event additionalProperties: false description: Subscriber Details Dto BasicAuthDto: type: object properties: username: type: string description: Username example: test-user password: type: string description: Password example: test-password description: Object to hold basic auth information SubscriberDto_2: type: object properties: subscriptionEvent: type: string description: "Possible values are:\n\n WAREHOUSING APIs \n- WMSInboundNotificationStatusChange \n- WMSDeliveryConfirmation \n- WMSReceiptConfirmation \n- WMSInventoryChange \n- WMSOrderStatusChange \n- WMSInventoryFull" example: WMSInboundNotificationStatusChange pushUrl: type: string description: Provide the URL where you want the data to be delivered example: http://mysite.com customerIds: $ref: '#/components/schemas/CustomerIdsDto_2' authenticationData: $ref: '#/components/schemas/AuthenticationDto' headers: type: array items: $ref: '#/components/schemas/KeyValueDto' description: Include any necessary headers. Make sure these headers match the requirements of the system receiving the data via webhook example: Headers createdAt: type: string description: When the customer subscribed to the event format: date-time lastModifiedAt: type: string description: When the customer last modified the subscription format: date-time subscribedBy: type: string description: who subscribed to this event description: Subscriber Dto CustomerIdsDto_2: type: object properties: type: type: string description: Type of customer identifier (MDM or WarehouseID) example: MDM values: type: array items: type: string description: List of customer identifier values example: '6400000000' description: Section to specify Customer ID securitySchemes: apiKeyHeader: type: apiKey name: DSV-Subscription-Key in: header apiKeyQuery: type: apiKey name: DSV-Subscription-Key in: query x-refined-from: - dsv-es-webhook-demo-v1-openapi.json - dsv-es-webhook-int-v1-openapi.json