> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paddock.build/llms.txt
> Use this file to discover all available pages before exploring further.

# trigger.deliveries.get(deliveryId): the delivery with its request



## OpenAPI

````yaml /api-reference/openapi.json get /triggers/{id}/deliveries/{deliveryId}
openapi: 3.1.0
info:
  title: paddock API
  version: 1.0.0
  description: >-
    The paddock API. Send an API key, or a session token on its own session, as
    a bearer token.
servers:
  - url: https://api.paddock.build/v1
security:
  - bearer: []
paths:
  /triggers/{id}/deliveries/{deliveryId}:
    get:
      summary: 'trigger.deliveries.get(deliveryId): the delivery with its request'
      operationId: getDelivery
      parameters:
        - $ref: '#/components/parameters/TriggerId'
        - $ref: '#/components/parameters/DeliveryId'
      responses:
        '200':
          description: The delivery
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryDetail'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    TriggerId:
      name: id
      in: path
      required: true
      description: The trigger's ID
      schema:
        type: string
        pattern: ^trg_[0-7][0-9a-hjkmnp-tv-z]{25}$
    DeliveryId:
      name: deliveryId
      in: path
      required: true
      description: The delivery's ID
      schema:
        type: string
        pattern: ^dlv_[0-7][0-9a-hjkmnp-tv-z]{25}$
  headers:
    RequestId:
      description: The request's ID, for support and logs
      schema:
        type: string
  schemas:
    DeliveryDetail:
      allOf:
        - $ref: '#/components/schemas/Delivery'
        - type: object
          required:
            - request
          properties:
            request:
              $ref: '#/components/schemas/DeliveryRequest'
    Delivery:
      type: object
      required:
        - id
        - triggerId
        - status
        - replayOf
        - error
        - dedupe
        - outcomes
        - attempts
        - nextAttemptAt
        - receivedAt
        - finishedAt
      properties:
        id:
          type: string
          pattern: ^dlv_[0-7][0-9a-hjkmnp-tv-z]{25}$
        triggerId:
          type: string
          pattern: ^trg_[0-7][0-9a-hjkmnp-tv-z]{25}$
        status:
          $ref: '#/components/schemas/DeliveryStatus'
        replayOf:
          type:
            - string
            - 'null'
          description: The delivery this one replays.
        error:
          oneOf:
            - $ref: '#/components/schemas/DeliveryError'
            - type: 'null'
        dedupe:
          oneOf:
            - type: object
              required:
                - source
                - hash
              properties:
                source:
                  $ref: '#/components/schemas/DedupeSource'
                hash:
                  description: SHA-256 in hex.
                  type: string
            - type: 'null'
        outcomes:
          description: One per rule enabled when it was received, in rule order.
          type: array
          items:
            $ref: '#/components/schemas/RuleOutcome'
        attempts:
          type: integer
          minimum: 0
        nextAttemptAt:
          oneOf:
            - $ref: '#/components/schemas/Timestamp'
            - type: 'null'
        receivedAt:
          $ref: '#/components/schemas/Timestamp'
        finishedAt:
          oneOf:
            - $ref: '#/components/schemas/Timestamp'
            - type: 'null'
    DeliveryRequest:
      type: object
      required:
        - headers
        - query
        - body
      properties:
        headers:
          type: object
          additionalProperties:
            type: string
        query:
          type: object
          additionalProperties:
            type: string
        body:
          type:
            - string
            - 'null'
          description: As received, as UTF-8; null when it was over the limit.
    ErrorBody:
      description: The body of every non-2xx response.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    DeliveryStatus:
      type: string
      enum:
        - pending
        - done
        - rejected
    DeliveryError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - invalid_body
            - bad_signature
        message:
          type: string
    DedupeSource:
      type: string
      enum:
        - expression
        - body
    RuleOutcome:
      type: object
      required:
        - rule
        - status
        - sessionKey
        - waitingFor
        - error
        - sessionId
        - sessionCreated
        - messageId
        - seq
      properties:
        rule:
          type: string
        status:
          $ref: '#/components/schemas/OutcomeStatus'
        sessionKey:
          type:
            - string
            - 'null'
          description: The rendered key, for a rule that matched.
        waitingFor:
          type:
            - string
            - 'null'
          description: >-
            While pending: the earlier delivery with the same agent and key it
            waits for.
        error:
          oneOf:
            - $ref: '#/components/schemas/OutcomeError'
            - type: 'null'
        sessionId:
          type:
            - string
            - 'null'
        sessionCreated:
          type: boolean
        messageId:
          type:
            - string
            - 'null'
        seq:
          oneOf:
            - $ref: '#/components/schemas/Seq'
            - type: 'null'
    Timestamp:
      description: RFC 3339 in UTC with milliseconds.
      type: string
      format: date-time
      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
      x-go-type: wire.Timestamp
      x-go-type-import:
        path: github.com/wenfengwang/paddock/internal/wire
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        details:
          type: object
    OutcomeStatus:
      type: string
      enum:
        - pending
        - filtered
        - delivered
        - failed
    OutcomeError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/OutcomeErrorCode'
        message:
          type: string
    Seq:
      description: A position in an agent's event log.
      type: integer
      minimum: 0
      maximum: 9007199254740991
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - payload_too_large
        - unsupported
        - unavailable
        - internal
    OutcomeErrorCode:
      type: string
      enum:
        - filter_error
        - template_error
        - agent_not_found
        - unavailable
        - internal
  responses:
    Error:
      description: Every non-2xx response
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, or a session token on its own session

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.