GetRules (Pull Method)
GetRules
Retrieves the rules configuration for a given company, including assignment type, assignment category, and line‑item name metadata.
Request
| Parameter | Type | Description |
|---|---|---|
| Company | String | Required. Company identifier returned by GetCompanies. |
Response
| Parameter | Type | Description |
|---|---|---|
| RuleId | String | Unique identifier of the rule. |
| Errors | Array | Contains error message(s) should an error occur. |
| AssignmentType | String | Assignment type associated with the rule. |
| AssignmentCategory | String | Assignment category associated with the rule. |
| LineItemName | String | Line‑item name associated with the rule. |
Example (C#)
// setup request parameters
NameValueCollection getRulesParams = new NameValueCollection
{
{ "Company", "ABC" } // e.g., VIP Adjusting Services
};
dynamic getRulesResponse = apiClient.GetRules(getRulesParams);
Console.WriteLine("GetRules:");
// display results
foreach (var item in getRulesResponse)
{
Console.WriteLine(
"\tRuleID: {0}; Type: {1}; AssignmentCategory: {2}; LineItemName: {3}\n",
item.RuleId,
item.AssignmentType,
item.AssignmentCategory,
item.LineItemName
);
}