{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kibo-commerce/main/json-schema/kibo-commerce-purchase-order-transaction-schema.json",
  "title": "PurchaseOrderTransaction",
  "description": "Customer purchase order transaction log",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kibo-commerce-customer-openapi.yml#/components/schemas/PurchaseOrderTransaction",
  "properties": {
    "additionalTransactionDetail": {
      "description": "Any additional transaction detail other than transaction description",
      "type": [
        "string",
        "null"
      ]
    },
    "auditInfo": {
      "$ref": "#/$defs/AuditInfo"
    },
    "author": {
      "type": [
        "string",
        "null"
      ]
    },
    "availableBalance": {
      "description": "Current available balance on Purchase Order account",
      "format": "double",
      "type": "number"
    },
    "creditLimit": {
      "description": "Maximum credit available on a purchase order account",
      "format": "double",
      "type": "number"
    },
    "customerPurchaseOrderAccountId": {
      "description": "Unique identifier for Customer purchase order account",
      "format": "int32",
      "type": "integer"
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "orderId": {
      "description": "Unique identifier for an order",
      "type": [
        "string",
        "null"
      ]
    },
    "purchaseOrderNumber": {
      "description": "Purchase order number",
      "type": [
        "string",
        "null"
      ]
    },
    "siteId": {
      "description": "Site Id associated with transaction log",
      "format": "int32",
      "type": "integer"
    },
    "tenantId": {
      "description": "Tenant Id associated with transaction log",
      "format": "int32",
      "type": "integer"
    },
    "transactionAmount": {
      "description": "Transaction amount in transaction log for a purchase order account",
      "format": "double",
      "type": "number"
    },
    "transactionDate": {
      "description": "Date when the transaction was made on a purchase order account",
      "format": "date-time",
      "type": "string"
    },
    "transactionDescription": {
      "description": "Purchase Order transaction description\nLine of Credit Change\nOrder Submitted\nPayment Collected\nPayment Voided\nPayment Refund\nManual Adjustment",
      "type": [
        "string",
        "null"
      ]
    },
    "transactionTypeId": {
      "description": " Purchase Order transaction type\n1 - Line of Credit Change\n2 - Order Submitted\n3 - Payment Collected\n4 - Payment Voided\n5 - Payment Refund\n6 - Manual Adjustment",
      "format": "int32",
      "type": "integer"
    }
  },
  "type": "object",
  "$defs": {
    "AuditInfo": {
      "properties": {
        "createBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "createDate": {
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "updateBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "updateDate": {
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    }
  }
}