{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crunchtime-information-systems/json-schema/crunchtime-information-systems-pbi-details-get-schema.json",
  "title": "PbiDetailsGet",
  "description": "PbiDetailsGet description",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crunchtime-information-systems-pbi-service-api-openapi.yml#/components/schemas/PbiDetailsGet",
  "type": "object",
  "properties": {
    "pbiDetailDetails": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PbiDetailDto"
      }
    },
    "pbiHeaderDetails": {
      "$ref": "#/$defs/PbiHeaderDtoGet"
    }
  },
  "$defs": {
    "PbiDetailDto": {
      "type": "object",
      "required": [
        "category",
        "detailAmount",
        "microcategory",
        "subcategory"
      ],
      "properties": {
        "category": {
          "type": "string",
          "description": "Must match an existing Category in Enterprise Manager."
        },
        "detailAmount": {
          "type": "number",
          "description": "Total value of this item row."
        },
        "detailMemo": {
          "type": "string",
          "description": "Description of the product delivered or service performed."
        },
        "glNumber": {
          "type": "string",
          "description": "Must match an existing GL Number in Enterprise Manager."
        },
        "microcategory": {
          "type": "string",
          "description": "Must match an existing Microcategory in Enterprise Manager.  Required if “Link GL to” Preference is “Microcategory”"
        },
        "subcategory": {
          "type": "string",
          "description": "Must match an existing Subcategory in Enterprise Manager.  Required if “Link GL to” Preference is “Subcategory” or “Microcategory”"
        }
      },
      "title": "PbiDetailDto",
      "description": "PbiDetailDto description"
    },
    "PbiHeaderDtoGet": {
      "type": "object",
      "required": [
        "deliveryDate",
        "invoiceDate",
        "invoiceNumber",
        "invoiceTotal",
        "vendorCode"
      ],
      "properties": {
        "checkNumber": {
          "type": "string",
          "description": "Check Number used to pay the invoice."
        },
        "deliveryDate": {
          "type": "string",
          "format": "date",
          "description": "Date the product was delivered or service performed."
        },
        "invoiceDate": {
          "type": "string",
          "format": "date",
          "description": "Date the vendor issued the invoice."
        },
        "invoiceNumber": {
          "type": "string",
          "description": "Invoice Number from the vendor's invoice."
        },
        "invoiceTotal": {
          "type": "number",
          "description": "Total value for the entire invoice."
        },
        "locationCode": {
          "type": "string",
          "description": "Code or Name for the Location. Must match an active Location in Enterprise Manager."
        },
        "vendorCode": {
          "type": "string",
          "description": "Must match a Location Export Code, Export Code, or Code for an active Vendor in Enterprise Manager."
        },
        "transactionStatus": {
          "type": "integer",
          "format": "int32",
          "description": "Indicates the transaction status: 7 for Awaiting Reconcile, 3 for Reconciled, 4 for Cancelled, and 12 for Awaiting Allocation."
        },
        "postInventoryScheduledDate": {
          "type": "string",
          "description": "Post Date for Purchase by Invoice transaction"
        },
        "reconcileDate": {
          "type": "string",
          "description": "Date the invoice was reconciled"
        }
      },
      "title": "PbiHeaderDtoGet",
      "description": "PbiHeaderDtoGet description"
    }
  }
}