---
updatedAt: 2026-05-29T13:25:42.000Z
agentTools:
  projectIndex: https://developer.eftcorp.com/llms.txt
---

# Transition a sale via an event

Applies a lifecycle event to the sale, triggering the associated status transition and any downstream processing such as payment or fulfilment.

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://eclipse-java-sandbox.ukheshe.rocks",
      "description": "Eclipse sandbox environment"
    },
    {
      "url": "https://ukheshe.live",
      "description": "Eclipse production environment"
    },
    {
      "url": "https://eclipse-java-develop.ukheshe.rocks",
      "description": "Eclipse development environment"
    },
    {
      "url": "https://zw.ukheshe.live",
      "description": "Zim Eclipse production environment"
    }
  ],
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "AccountHolderDetails": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          }
        }
      },
      "Avp": {
        "description": "An attribute/value pair for providing weakly typed data on various messages",
        "type": "object",
        "required": [
          "att",
          "val"
        ],
        "properties": {
          "att": {
            "type": "string",
            "pattern": "\\S"
          },
          "val": {
            "type": "string"
          }
        }
      },
      "EclipseFulfilmentStatus": {
        "type": "string",
        "enum": [
          "ERROR",
          "SUCCESS"
        ]
      },
      "EclipseSale": {
        "type": "object",
        "properties": {
          "accountHolderDetails": {
            "$ref": "#/components/schemas/AccountHolderDetails"
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "currency": {
            "type": "string"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "mode": {
            "type": "string"
          },
          "organisationId": {
            "type": "integer",
            "format": "int64"
          },
          "outstanding": {
            "type": "number"
          },
          "paymentDue": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "previousStatus": {
            "$ref": "#/components/schemas/EclipseSaleStatus"
          },
          "saleId": {
            "type": "integer",
            "format": "int64"
          },
          "saleLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EclipseSaleLine"
            }
          },
          "salePayments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EclipseSalePayment"
            }
          },
          "saleTotalDiscountExcl": {
            "type": "number"
          },
          "saleTotalDiscountIncl": {
            "type": "number"
          },
          "saleTotalExcl": {
            "type": "number"
          },
          "saleTotalIncl": {
            "type": "number"
          },
          "saleTotalTax": {
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/EclipseSaleStatus"
          },
          "tenantId": {
            "type": "integer",
            "format": "int64"
          },
          "uniqueId": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "accountId",
          "organisationId",
          "tenantId"
        ]
      },
      "EclipseSaleEventType": {
        "type": "string",
        "enum": [
          "ALLOCATE_PAYMENT",
          "CANCEL",
          "DEALLOCATE_PAYMENT",
          "DELETE_PAYMENT",
          "EDIT",
          "FULFIL",
          "PAYMENT",
          "QUOTE_ACCEPTED",
          "QUOTE_REQUESTED"
        ]
      },
      "EclipseSaleLine": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "description": {
            "type": "string",
            "pattern": "(?s)^(?:[\\t\\r\\n]|[^\\p{C}<>])*$"
          },
          "fulfillmentDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Avp"
            }
          },
          "fulfilmentStatus": {
            "$ref": "#/components/schemas/EclipseFulfilmentStatus"
          },
          "lineDiscountExcl": {
            "type": "number"
          },
          "lineDiscountIncl": {
            "type": "number"
          },
          "lineTotalExcl": {
            "type": "number"
          },
          "lineTotalIncl": {
            "type": "number"
          },
          "lineTotalTax": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "normalUnitPriceExcl": {
            "type": "number"
          },
          "normalUnitPriceIncl": {
            "type": "number"
          },
          "parentSaleLineId": {
            "type": "integer",
            "format": "int64"
          },
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "promotionCode": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "saleId": {
            "type": "integer",
            "format": "int64"
          },
          "saleLineId": {
            "type": "integer",
            "format": "int64"
          },
          "serial": {
            "type": "string"
          },
          "taxPercent": {
            "type": "number"
          },
          "unitPriceExcl": {
            "type": "number"
          },
          "unitPriceIncl": {
            "type": "number"
          }
        }
      },
      "EclipseSalePayment": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "gateway": {
            "type": "string"
          },
          "paymentId": {
            "type": "integer",
            "format": "int64"
          },
          "saleId": {
            "type": "integer",
            "format": "int64"
          },
          "salePaymentId": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/EclipseSalePaymentType"
          }
        }
      },
      "EclipseSalePaymentType": {
        "type": "string",
        "enum": [
          "ACCOUNT_BALANCE_SETTLE",
          "ACCOUNT_DEALLOCATED_PAYMENT_SETTLE",
          "ECLIPSE_PAYMENT"
        ]
      },
      "EclipseSaleStatus": {
        "type": "string",
        "enum": [
          "BASKET",
          "CANCELLED",
          "FULFILLED",
          "INVOICED",
          "QUOTE"
        ]
      },
      "ExceptionData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "info": {
            "type": "object",
            "additionalProperties": {}
          },
          "severity": {
            "$ref": "#/components/schemas/ExceptionSeverity"
          },
          "spanId": {
            "type": "string"
          },
          "stackTrace": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ExceptionType"
          }
        }
      },
      "ExceptionSeverity": {
        "type": "string",
        "enum": [
          "CRITICAL",
          "HIGH",
          "INFO",
          "LOW",
          "MEDIUM"
        ]
      },
      "ExceptionType": {
        "type": "string",
        "enum": [
          "BUSINESS",
          "SYSTEM"
        ]
      },
      "NewEclipseEventMetaData": {
        "type": "object",
        "properties": {
          "salePaymentId": {
            "type": "integer",
            "format": "int64",
            "description": "Optional For DEALLOCATE_PAYMENT pass salePaymentId for which paid amount we want to deallocate"
          }
        }
      },
      "NewEclipseSaleEvent": {
        "type": "object",
        "properties": {
          "configuration": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Avp"
            }
          },
          "data": {
            "type": "string"
          },
          "event": {
            "$ref": "#/components/schemas/EclipseSaleEventType"
          },
          "eventMetaData": {
            "$ref": "#/components/schemas/NewEclipseEventMetaData"
          },
          "saleId": {
            "type": "integer",
            "format": "int64"
          },
          "updateFulfillmentStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateFulfillment"
            }
          },
          "userId": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "UpdateFulfillment": {
        "type": "object",
        "properties": {
          "fulfilmentStatus": {
            "$ref": "#/components/schemas/EclipseFulfilmentStatus"
          },
          "saleLineId": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "securitySchemes": {
      "JWTBearerAuthorisation": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "description": "A RESTful API using JSON as the data transfer model, covering all tenant-facing functionality in the Eclipse payments platform.",
    "title": "Eclipse ReST API",
    "version": "3.0.0"
  },
  "tags": [
    {
      "name": "x) Accounts",
      "description": "Manages tenant products and product items, including stock, batches, and supplier associations."
    }
  ],
  "paths": {
    "/eclipse-conductor/rest/v1/tenants/{tenantId}/organisations/{organisationId}/accounts/{accountId}/sales/{saleId}/events": {
      "post": {
        "summary": "Transition a sale via an event",
        "description": "Applies a lifecycle event to the sale, triggering the associated status transition and any downstream processing such as payment or fulfilment.",
        "tags": [
          "x) Accounts"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "organisationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "saleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEclipseSaleEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EclipseSale"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Invalid path parameter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExceptionData"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExceptionData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "JWTBearerAuthorisation": []
          }
        ]
      }
    }
  }
}
```