asyncapi: 2.0.0
info:
  title: eBay Notifications
  version: 1.0.0
  description: This contract defines eBay notification for ITEM_MARKED_SHIPPED.
channels:
  ITEM_MARKED_SHIPPED:
    subscribe:
      message:
        $ref: '#/components/messages/message'
      bindings:
        http:
          type: request
          method: POST
          headers:
            type: object
            properties:
              Content-Type:
                type: string
                enum: ['application/json']
components:
  messages:
    message:
      headers:
        type: object
        properties:
          X-EBAY-SIGNATURE:
            description: ECC message signature header used to verify the payload.
            type: string
      payload:
        type: object
        properties:
          metadata:
            $ref: '#/components/schemas/MetaData'
          notification:
            $ref: '#/components/schemas/Notification'

  schemas:
    MetaData:
      type: object
      properties:
        topic:
          type: string
          description: The topic to which this notification belongs.
        schemaVersion:
          type: string
          description: The schema version for this topic.
        deprecated:
          type: boolean
          description: Indicates if this schema or topic is deprecated.
          default: false

    Notification:
      type: object
      properties:
        notificationId:
          type: string
          description: The unique notification ID.
        eventDate:
          type: string
          description: The event date associated with this notification (UTC).
        publishDate:
          type: string
          description: The publish date of this message (UTC).
        publishAttemptCount:
          type: integer
          description: Number of publish attempts made for this message.
        data:
          $ref: '#/components/schemas/ItemMarkedShippedData'

    ItemMarkedShippedData:
      type: object
      description: The payload for the ITEM_MARKED_SHIPPED event.
      properties:
        trackingNumber:
          type: string
          description: The shipment tracking number.
        carrier:
          type: string
          description: The shipping carrier (e.g., USPS, UPS, FedEx).
        shippedDate:
          type: string
          format: date-time
          description: The date-time when the item was marked shipped, including timezone offset.
        orderId:
          type: string
          description: The order ID associated with the shipment.
        itemId:
          type: string
          description: The item ID.
        transactionId:
          type: string
          description: The transaction ID for the item.
        lineItemId:
          type: string
          description: Composite ID of item and transaction (line item).
        publicUserId:
          type: string
          description: Immutable user identifier associated with the seller.
        username:
          type: string
          description: >
            The seller's username. Effective September 26, 2025, select developers will no longer receive username data for U.S. users through this field. Instead, an immutable user ID will be returned in its place. For more information, please refer to [Data Handling Compliance](https://developer.ebay.com/api-docs/static/data-handling-update.html).