Trendsic Platform Service

<back to all web services

PayRuleSaveRequest

Requires Authentication
The following routes are available for this service:
POST/v1/workforce/payrules/{PayRulePolicyId}
PayRuleSaveRequest Parameters:
NameParameterData TypeRequiredDescription
PayRulePolicyIdpathintNo
DocbodyPayRulePolicyDocNo
ChangeNotebodystringNo
PayRulePolicyDoc Parameters:
NameParameterData TypeRequiredDescription
IntroformstringNo
LockLineformstringNo
TemplateNameformstringNo
RulesformList<PayRuleDef>No
PayRuleDef Parameters:
NameParameterData TypeRequiredDescription
RuleIdformstringNo
NameformstringNo
KindformstringNo
DemandformstringNo
SourcePolicyNameformstringNo
CascadeLevelformstringNo
WhyformstringNo
ChangeformstringNo
OverrideWhoformstringNo
OverrideConsequenceformstringNo
NoNoteformstringNo
LegalVerifyformstringNo
ParamsformDictionary<string, string>No
DocformList<PayRuleDocSection>No
TuneformPayRuleTuneNo
PayRuleDocSection Parameters:
NameParameterData TypeRequiredDescription
HformstringNo
TformstringNo
PayRuleTune Parameters:
NameParameterData TypeRequiredDescription
IntroformstringNo
OptionsformList<PayRuleTuneOption>No
PayRuleTuneOption Parameters:
NameParameterData TypeRequiredDescription
LabelformstringNo
SubformstringNo
PayRulesCascadeResponse Parameters:
NameParameterData TypeRequiredDescription
PolicyformPayRulePolicyNo
DocformPayRulePolicyDocNo
VersionNumberformintNo
VersionsformList<PayRulePolicyVersionInfo>No
CanEditRulesformboolNo
ResponseStatusformResponseStatusNo
PayRulePolicy Parameters:
NameParameterData TypeRequiredDescription
PayRulePolicyIdformintNo
PayRulePolicyUIDformGuidNo
NameformstringNo
ScopeLevelformstringNo
BranchIdformGuid?No
JurisdictionKeyformstringNo
CbaKeyformstringNo
WorkTypeKeyformstringNo
CurrentVersionformintNo
IsActiveformboolNo
BranchNameformstringNo
PayRulePolicyVersionInfo Parameters:
NameParameterData TypeRequiredDescription
PayRulePolicyVersionIdformintNo
VersionNumberformintNo
ChangeNoteformstringNo
ChangedByNameformstringNo
CreatedAtUtcformDateTimeNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/workforce/payrules/{PayRulePolicyId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	PayRulePolicyId: 0,
	Doc: 
	{
		Intro: String,
		LockLine: String,
		TemplateName: String,
		Rules: 
		[
			{
				RuleId: String,
				Name: String,
				Kind: String,
				Demand: String,
				SourcePolicyName: String,
				CascadeLevel: String,
				Why: String,
				Change: String,
				OverrideWho: String,
				OverrideConsequence: String,
				NoNote: String,
				LegalVerify: String,
				Params: 
				{
					String: String
				},
				Doc: 
				[
					{
						H: String,
						T: String
					}
				],
				Tune: 
				{
					Intro: String,
					Options: 
					[
						{
							Label: String,
							Sub: String
						}
					]
				}
			}
		]
	},
	ChangeNote: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Policy: 
	{
		PayRulePolicyId: 0,
		PayRulePolicyUID: 00000000000000000000000000000000,
		Name: String,
		ScopeLevel: String,
		BranchId: 00000000000000000000000000000000,
		JurisdictionKey: String,
		CbaKey: String,
		WorkTypeKey: String,
		CurrentVersion: 0,
		IsActive: False,
		BranchName: String
	},
	Doc: 
	{
		Intro: String,
		LockLine: String,
		TemplateName: String,
		Rules: 
		[
			{
				RuleId: String,
				Name: String,
				Kind: String,
				Demand: String,
				SourcePolicyName: String,
				CascadeLevel: String,
				Why: String,
				Change: String,
				OverrideWho: String,
				OverrideConsequence: String,
				NoNote: String,
				LegalVerify: String,
				Params: 
				{
					String: String
				},
				Doc: 
				[
					{
						H: String,
						T: String
					}
				],
				Tune: 
				{
					Intro: String,
					Options: 
					[
						{
							Label: String,
							Sub: String
						}
					]
				}
			}
		]
	},
	VersionNumber: 0,
	Versions: 
	[
		{
			PayRulePolicyVersionId: 0,
			VersionNumber: 0,
			ChangeNote: String,
			ChangedByName: String,
			CreatedAtUtc: 0001-01-01
		}
	],
	CanEditRules: False,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}