{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-unapproved-invoices-with-keys-schema.json",
  "title": "data_unapproved_invoices_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-ap-openapi.yml#/components/schemas/data_unapproved_invoices_withKeys",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "__ryvitKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of key paths that can be used to retrieve this object."
        },
        "__modifiedUTC": {
          "type": "string",
          "description": "UTC timestamp of when this object was last modified in the cache."
        }
      }
    },
    {
      "$ref": "#/$defs/data_unapproved_invoices"
    }
  ],
  "$defs": {
    "data_unapproved_invoices": {
      "required": [
        "APCo",
        "UIMth",
        "UISeq",
        "VendorGroup",
        "InvTotal",
        "PayMethod",
        "CMCo",
        "V1099YN",
        "PayOverrideYN",
        "SeparatePayYN",
        "KeyID",
        "InvStatus"
      ],
      "type": "object",
      "properties": {
        "APCo": {
          "type": "integer",
          "description": ""
        },
        "UIMth": {
          "type": "string",
          "description": ""
        },
        "UISeq": {
          "type": "integer",
          "description": ""
        },
        "VendorGroup": {
          "type": "integer",
          "description": ""
        },
        "Vendor": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "APRef": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Description": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "InvDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "DiscDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "DueDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "InvTotal": {
          "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
          "type": "string",
          "description": ""
        },
        "HoldCode": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PayControl": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PayMethod": {
          "maxLength": 1,
          "type": "string",
          "description": ""
        },
        "CMCo": {
          "type": "integer",
          "description": ""
        },
        "CMAcct": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "V1099YN": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "V1099Type": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "V1099Box": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "PayOverrideYN": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "PayName": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PayAddress": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PayCity": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PayState": {
          "maxLength": 4,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PayZip": {
          "maxLength": 12,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "InUseMth": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "InUseBatchId": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "PayAddInfo": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "DocName": {
          "maxLength": 128,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "SeparatePayYN": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "Notes": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "UniqueAttchID": {
          "maxLength": 36,
          "minLength": 36,
          "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "AddressSeq": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "KeyID": {
          "type": "integer",
          "description": ""
        },
        "PayCountry": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ReviewerGroup": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "SLKeyID": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "InvStatus": {
          "type": "integer",
          "description": ""
        },
        "__custom_fields": {
          "type": "object",
          "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
        },
        "Reviewers": {
          "type": "array",
          "items": {
            "required": [
              "Reviewer",
              "ApprvdYN",
              "ApprovalSeq",
              "KeyID",
              "OptionalReviewerYN",
              "InHdrRevGrp",
              "InLineRevGrp",
              "ApproveWithoutData"
            ],
            "type": "object",
            "properties": {
              "Reviewer": {
                "maxLength": 3,
                "type": "string",
                "description": "Key to this array(Reviewer)"
              },
              "ApprvdYN": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "ApprovalSeq": {
                "type": "integer",
                "description": ""
              },
              "DateAssigned": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "DateApproved": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "AmountApproved": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Rejected": {
                "enum": [
                  "Y",
                  "N",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "RejReason": {
                "maxLength": 50,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "APTrans": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "ExpMonth": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Memo": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "LoginName": {
                "maxLength": 128,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "UniqueAttchID": {
                "maxLength": 36,
                "minLength": 36,
                "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "RejectDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "KeyID": {
                "type": "integer",
                "description": ""
              },
              "ReviewerGroup": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "OptionalReviewerYN": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "Source": {
                "maxLength": 1,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "InHdrRevGrp": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "InLineRevGrp": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "ApproveWithoutData": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "__custom_fields": {
                "type": "object",
                "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
              }
            },
            "description": ""
          },
          "description": ""
        },
        "LineItems": {
          "type": "array",
          "items": {
            "required": [
              "Line",
              "LineType",
              "UnitCost",
              "GrossAmt",
              "MiscAmt",
              "MiscYN",
              "TaxBasis",
              "TaxAmt",
              "Retainage",
              "Discount",
              "KeyID"
            ],
            "type": "object",
            "properties": {
              "Line": {
                "type": "integer",
                "description": "Key for this array(Line)"
              },
              "LineType": {
                "type": "integer",
                "description": ""
              },
              "PO": {
                "maxLength": 30,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "POItem": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "ItemType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SL": {
                "maxLength": 30,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SLItem": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "JCCo": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Job": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "PhaseGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Phase": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "JCCType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "EMCo": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "WO": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "WOItem": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Equip": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "EMGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "CostCode": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "EMCType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "CompType": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Component": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "INCo": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Loc": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "MatlGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Material": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "GLCo": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "GLAcct": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Description": {
                "maxLength": 30,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "UM": {
                "maxLength": 3,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Units": {
                "pattern": "^[-+]?[0-9]{1,9}(?:.[0-9]{0,3})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "UnitCost": {
                "pattern": "^[-+]?[0-9]{1,11}(?:.[0-9]{0,5})?$",
                "type": "string",
                "description": ""
              },
              "ECM": {
                "maxLength": 1,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "VendorGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Supplier": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "PayType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "GrossAmt": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "MiscAmt": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "MiscYN": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "TaxGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxCode": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxBasis": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "TaxAmt": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "Retainage": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "Discount": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "Notes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "UniqueAttchID": {
                "maxLength": 36,
                "minLength": 36,
                "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "PayCategory": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "KeyID": {
                "type": "integer",
                "description": ""
              },
              "SLDetailKeyID": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "ReviewerGroup": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "InvOriginator": {
                "maxLength": 128,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Receiver#": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SLKeyID": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SMCo": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SMWorkOrder": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Scope": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "POItemLine": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SMCostType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SMJCCostType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SMPhaseGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "SMPhase": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "__custom_fields": {
                "type": "object",
                "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
              },
              "Reviewers": {
                "type": "array",
                "items": {
                  "required": [
                    "Reviewer",
                    "ApprvdYN",
                    "ApprovalSeq",
                    "KeyID",
                    "OptionalReviewerYN",
                    "InHdrRevGrp",
                    "InLineRevGrp",
                    "ApproveWithoutData"
                  ],
                  "type": "object",
                  "properties": {
                    "Reviewer": {
                      "maxLength": 3,
                      "type": "string",
                      "description": "Key to this array(Reviewer)"
                    },
                    "ApprvdYN": {
                      "enum": [
                        "Y",
                        "N"
                      ],
                      "type": "string",
                      "description": ""
                    },
                    "ApprovalSeq": {
                      "type": "integer",
                      "description": ""
                    },
                    "DateAssigned": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "DateApproved": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "AmountApproved": {
                      "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "Rejected": {
                      "enum": [
                        "Y",
                        "N",
                        null
                      ],
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "RejReason": {
                      "maxLength": 50,
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "APTrans": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": ""
                    },
                    "ExpMonth": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "Memo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "LoginName": {
                      "maxLength": 128,
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "UniqueAttchID": {
                      "maxLength": 36,
                      "minLength": 36,
                      "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "RejectDate": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "KeyID": {
                      "type": "integer",
                      "description": ""
                    },
                    "ReviewerGroup": {
                      "maxLength": 10,
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "OptionalReviewerYN": {
                      "enum": [
                        "Y",
                        "N"
                      ],
                      "type": "string",
                      "description": ""
                    },
                    "Source": {
                      "maxLength": 1,
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": ""
                    },
                    "InHdrRevGrp": {
                      "enum": [
                        "Y",
                        "N"
                      ],
                      "type": "string",
                      "description": ""
                    },
                    "InLineRevGrp": {
                      "enum": [
                        "Y",
                        "N"
                      ],
                      "type": "string",
                      "description": ""
                    },
                    "ApproveWithoutData": {
                      "enum": [
                        "Y",
                        "N"
                      ],
                      "type": "string",
                      "description": ""
                    },
                    "__custom_fields": {
                      "type": "object",
                      "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
                    }
                  },
                  "description": ""
                },
                "description": ""
              }
            },
            "description": ""
          },
          "description": ""
        }
      }
    }
  }
}