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

# Get the timeline of an invoice

> Every recorded event of the invoice, oldest first: creation, payment attempts per gateway, status changes, deliveries, emails, refunds, disputes and webhook calls, each with its time and actor.



## OpenAPI

````yaml /openapi.json get /dev/v1/invoices/{uniqid}/timeline
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/invoices/{uniqid}/timeline:
    get:
      tags:
        - Invoices
      summary: Get the timeline of an invoice
      description: >-
        Every recorded event of the invoice, oldest first: creation, payment
        attempts per gateway, status changes, deliveries, emails, refunds,
        disputes and webhook calls, each with its time and actor.
      operationId: getDevV1InvoicesByUniqidTimeline
      parameters:
        - name: uniqid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - events
                    properties:
                      events:
                        type: array
                        description: Oldest first.
                        items:
                          type: object
                          required:
                            - id
                            - type
                            - occurred_at
                            - actor
                            - status
                            - previous_status
                            - gateway
                            - amount
                            - currency
                            - previous_amount
                            - line_item_id
                            - product_title
                            - recipient
                            - template
                            - channel
                            - origin
                            - field
                            - reason
                            - reference
                            - outcome
                            - note
                            - webhook
                          properties:
                            id:
                              type: string
                              description: >-
                                Stable id of the event, unique within the
                                invoice.
                            type:
                              type: string
                              enum:
                                - created
                                - total_changed
                                - payment_started
                                - payment_failed
                                - payment_cancelled
                                - marked_paid
                                - status_changed
                                - voided
                                - line_delivered
                                - shipped
                                - email_queued
                                - email_sent
                                - keys_revealed
                                - downloaded
                                - access_granted
                                - access_revoked
                                - refund_requested
                                - dispute_opened
                                - dispute_won
                                - dispute_lost
                                - buyer_details_changed
                                - webhook
                            occurred_at:
                              type: string
                              format: date-time
                              description: When it happened, ISO 8601 in UTC.
                            actor:
                              type: object
                              description: >-
                                Who caused the event; null when the source
                                recorded nobody.
                              nullable: true
                              required:
                                - type
                                - user_id
                                - name
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - merchant
                                    - support
                                    - api
                                    - buyer
                                    - provider
                                    - system
                                user_id:
                                  type: string
                                  description: >-
                                    The team member who acted; only on merchant
                                    actors.
                                  nullable: true
                                name:
                                  type: string
                                  description: The team member's name, username or email.
                                  nullable: true
                              additionalProperties: false
                            status:
                              type: string
                              description: >-
                                The invoice status the event set
                                (status_changed, voided, dispute_lost).
                              nullable: true
                            previous_status:
                              type: string
                              description: The status before, when recorded.
                              nullable: true
                            gateway:
                              type: string
                              description: >-
                                Payment gateway of the payment, refund or
                                dispute.
                              nullable: true
                            amount:
                              type: string
                              description: >-
                                Decimal amount in `currency`: the charge,
                                refund, disputed amount or new total.
                              nullable: true
                            currency:
                              type: string
                              description: >-
                                ISO 4217 currency of `amount` and
                                `previous_amount`.
                              nullable: true
                            previous_amount:
                              type: string
                              description: The total before a total_changed event.
                              nullable: true
                            line_item_id:
                              type: string
                              description: The order line the event concerns.
                              nullable: true
                            product_title:
                              type: string
                              description: Product title of a delivered line.
                              nullable: true
                            recipient:
                              type: string
                              description: >-
                                Email address of an email_queued or email_sent
                                event.
                              nullable: true
                            template:
                              type: string
                              description: Email template of an email_sent event.
                              nullable: true
                            channel:
                              type: string
                              description: >-
                                Access channel (discord, telegram), reveal
                                surface or download kind.
                              nullable: true
                            origin:
                              type: string
                              description: >-
                                Where a created invoice was placed (STOREFRONT,
                                DASHBOARD, API, ...).
                              nullable: true
                            field:
                              type: string
                              description: >-
                                The buyer detail that changed (customer_email,
                                shipping_address).
                              nullable: true
                            reason:
                              type: string
                              description: Dispute reason.
                              nullable: true
                            reference:
                              type: string
                              description: >-
                                Provider or carrier reference: dispute id,
                                refund id or tracking code.
                              nullable: true
                            outcome:
                              type: string
                              description: >-
                                Result of the step: refund request state, or
                                failed for a failed access or email step.
                              nullable: true
                            note:
                              type: string
                              description: The note recorded with the event.
                              nullable: true
                            webhook:
                              type: object
                              nullable: true
                              required:
                                - event
                                - url
                                - status
                                - attempts
                                - response_code
                                - error_message
                              properties:
                                event:
                                  type: string
                                url:
                                  type: string
                                  description: Endpoint origin and path.
                                  nullable: true
                                status:
                                  type: string
                                  enum:
                                    - PENDING
                                    - PROCESSING
                                    - SUCCESS
                                    - FAILED
                                attempts:
                                  type: number
                                response_code:
                                  type: number
                                  nullable: true
                                error_message:
                                  type: string
                                  description: >-
                                    The endpoint's error text; null without
                                    permission to view delivered goods, which an
                                    endpoint can echo.
                                  nullable: true
                              additionalProperties: false
                          additionalProperties: false
                    additionalProperties: false
                additionalProperties: true
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````

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