Introduction to Meta

Summary: This overview gives an introduction to ADP meta data and displays examples illustrating how using meta data can be advantageous.

Meta provides the rules that must be imposed on an interface for a given operation and within a given Context. Each API will have a Meta schema with all the possible rules that can be imposed. The meta API returns the relevant properties in a given context and the validation and presentation rules for each. An API user must use the Meta API response in conjunction with an events schema to post a valid event body.

The following meta response examples give an overview of that you can expect from meta.

GET

https://api.adp.com/events/hr/v1/worker.personal-communication.email.add/meta

This meta describes the fields that are required to make the following call, along with specifying a max length for the email address:

POST

https://api.adp.com/events/hr/v1/worker.personal-communciation.email.add

{
  "meta" : {
    "/data/transforms" : [
      {
        "/worker/person/communication" : {
          "readOnly" : false,
          "optional" : false
        },
        "/worker/person/communication/email" : {
          "readOnly" : false,
          "optional" : false
        },
        "/worker/person/communication/email/emailUri" : {
          "readOnly" : false,
          "optional" : false,
          "hidden" : false,
          "shortLabelName" : "Personal Email",
          "maxLength" : 256
        }
      }
    ],
    "/data/eventContext" : {
      "/worker" : {
        "readOnly" : true,
        "optional" : false
      },
      "/worker/associateOID" : {
        "readOnly" : true,
        "optional" : false,
        "hidden" : true
      }
    }
  }
}
GET

http://api.adp.com/events/payroll/v1/worker.pay-distribution.change/meta

Along with defining required items, this meta defines regex patterns that data must match (see /data/transforms/effectiveDateTime), min and max items an array (see /data/transforms/payDistribution/distibutionInstructions) and a list of valid values (i.e. an enumerated type) (see /data/transforms/payDistribution/distributionInstructions/depositAccount/financialAccount/typeCode).

{
  "meta" : {
    "/data/eventContext" : {
      "/worker" : {
        "readOnly" : true,
        "optional" : false
      },
      "/worker/associateOID" : {
        "readOnly" : true,
        "optional" : false,
        "hidden" : true
      },
      "/payDistribution" : {
        "readOnly" : true,
        "optional" : false
      },
      "/payDistribution/itemID" : {
        "readOnly" : true,
        "optional" : false,
        "hidden" : true
      }
    },
    "/data/transforms" : [
      {
        "/effectiveDateTime" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : false,
          "shortLabelName" : "Effective On",
          "pattern" : "^(((19|20|21)\\d\\d)-(0?[1-9]|1[012])-(0?[1-9]|[12]\\d|3[01]))?$"
        },
        "/payDistribution" : {
          "readOnly" : false,
          "optional" : true
        },
        "/payDistribution/distributionInstructions" : {
          "minItems" : 0,
          "maxItems" : 3
        },
        "/payDistribution/distributionInstructions/depositAccount/financialParty/routingTransitID" : {
          "readOnly" : false,
          "optional" : true
        },
        "/payDistribution/distributionInstructions/depositAccount/financialParty/routingTransitID/idValue" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : false,
          "shortLabelName" : "Transit ABA Number",
          "minLength" : 0,
          "maxLength" : 9,
          "pattern" : "^[0-9]*$"
        },
        "/payDistribution/distributionInstructions/depositAccount/financialAccount" : {
          "readOnly" : false,
          "optional" : true
        },
        "/payDistribution/distributionInstructions/depositAccount/financialAccount/accountNumber" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : false,
          "longLabelName" : "Bank Deposit Account Number",
          "minLength" : 0,
          "maxLength" : 17,
          "pattern" : "^[-A-Z0-9]*$"
        },
        "/payDistribution/distributionInstructions/depositAccount/financialAccount/typeCode" : {
          "codeList" : {
            "codeListTitle" : "Deposit Type",
            "listItems" : [
              {
                "codeValue" : "W"
              },
              {
                "codeValue" : "X"
              },
              {
                "codeValue" : "Y"
              },
              {
                "codeValue" : "Z"
              }
            ]
          },
          "readOnly" : false,
          "optional" : true
        },
        "/payDistribution/distributionInstructions/depositAccount/financialAccount/typeCode/codeValue" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : false,
          "shortLabelName" : "Deposit Type"
        },
        "/payDistribution/distributionInstructions/distributionAmount" : {
          "readOnly" : false,
          "optional" : true
        },
        "/payDistribution/distributionInstructions/distributionAmount/amountValue" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : false,
          "shortLabelName" : "Deduction Amount"
        },
        "/payDistribution/distributionInstructions/distributionPercentage" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : false,
          "shortLabelName" : "Full Deposit",
          "pattern" : "^(100)?$"
        },
        "/payDistribution/distributionInstructions/itemID" : {
          "readOnly" : false,
          "optional" : true,
          "hidden" : true
        }
      }
    ],
    "/serviceCategoryCode/codeValue" : "payroll",
    "/eventNameCode/codeValue" : "worker.payDistribution.change"
  }
}