{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sap-fieldglass/main/json-schema/sap-fieldglass-approval-approvals.json",
  "title": "SAP Fieldglass Approval API - approvals",
  "description": "approvals schema for SAP Fieldglass Approval API",
  "type": "object",
  "properties": {
    "HEADER": {
      "type": "object",
      "properties": {
        "appVersion": {
          "type": "string",
          "description": "API version."
        },
        "OSUAStr": {
          "type": "string",
          "description": "API version"
        },
        "numRecs": {
          "type": "integer",
          "description": "Number of records returned in the payload."
        },
        "status": {
          "type": "string",
          "description": "Status of the API call."
        },
        "details": {
          "type": "string",
          "description": "Always All Ok for successful responses."
        }
      }
    },
    "PAYLOAD": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "moduleID": {
            "type": "string",
            "description": "Numeric module reference ID."
          },
          "moduleName": {
            "type": "string",
            "description": "Name of module, also type of object to be approved."
          },
          "ID": {
            "type": "string",
            "description": "Globally unique database-level identifier of object. This is the ID used for the drill down call. Not visible to end users."
          },
          "Attributes": {
            "type": "object",
            "properties": {
              "ref": {
                "type": "string",
                "description": "Object ID, visible to end users."
              },
              "uom": {
                "type": "string",
                "description": "3-character currency code."
              },
              "name": {
                "type": "string",
                "description": "Name of object as defined by user."
              },
              "startDate": {
                "type": "string",
                "description": "Start date."
              },
              "endDate": {
                "type": "string",
                "description": "End date."
              },
              "amount": {
                "type": "string",
                "description": "Amount to be approved."
              },
              "refVersion": {
                "type": "integer",
                "description": "Revision number of object to be approved."
              },
              "validObject": {
                "type": "boolean",
                "description": "Always returns false."
              },
              "createDate": {
                "type": "string",
                "description": "Recorded start date of object to be approved. Logical value is module dependent."
              },
              "creatorName": {
                "type": "string",
                "description": "Creator name."
              },
              "uniqueName": {
                "type": "string",
                "description": "Unique name."
              },
              "emailId": {
                "type": "string",
                "description": "Unique name."
              },
              "status": {
                "type": "string",
                "description": "Ok if response is OK."
              },
              "sourceLink": {
                "type": "string",
                "description": "Source link."
              },
              "others": {
                "type": "object",
                "properties": {},
                "description": "Additional data captured in SAP Fieldglass for the object. Full list of data is module and configuration-dependent and should be consumed/presented as extrinsic."
              }
            }
          },
          "Status": {
            "type": "string",
            "description": "Ok if response is OK."
          },
          "Details": {
            "type": "string",
            "description": "All ok if response is OK."
          },
          "ActivityID": {
            "type": "string",
            "description": "Ok if response is OK."
          }
        }
      }
    }
  }
}