Weeding Templates

Create Weeding Template

POST /api/.../templates/{objectid}

Creates a weeding template.

Parameters
Name Type Required Description
objectid Integer Yes ID of Object Type to create bulk change templates for: Weeding Template = 108.
DtoWeedingTemplateData
Property Type Nullable Description
Name String No Required.
OrganizationOwnerID Int32 No Required.
Examples: org:3
LastCopyAlert Boolean No Required. Should the user be alerted when the last copy is included.
WithdrawnOption Int32 No Required. Should items be marked as Withdrawn at specific stages.
Accepts: 0 (Never), 1 (Immediately), 2 (At Approval)
DeleteAtApproval Boolean No Required. Should the items be deleted when approved.
DiscardOption Int32 No Required. Discard amount configuration.
Accepts: 0 (None), 1 (Use Item Price), 2 (By Language)
DiscardAmounts List of DtoWeedingDiscardAmountData Yes List of language specific discard amount values.
DtoWeedingDiscardAmountData
Property Type Nullable Description
LanguageID Int16 No Required.
Amount Decimal No Required.
Request body
application/json, text/json
{
    "Name": "Sample Weeding Template",
    "OrganizationOwnerID": 3,
    "LastCopyAlert": true,
    "WithdrawnOption": 1,
    "DeleteAtApproval": false,
    "DiscardOption": 2,
    "DiscardAmounts": [
        { "LanguageID": 1, "Amount": 3.28 }
    ]
}

Response Information

Returns a WeedingTemplateID, an unique ID

application/json, text/json
{
    15
}

HTTP Response Codes

Code Description
200 OK. Success
400 Bad request
404 Invalid object ID


Update Weeding Template

PUT /api/.../templates/{objectid}/{id}

Update a weeding template.

Parameters
Name Type Required Description
objectid Integer Yes ID of Object Type to create bulk change templates for: Weeding Template = 108.
id Integer Yes ID of template to update.
DtoWeedingTemplateData
Property Type Nullable Description
Name String No Required.
OrganizationOwnerID Int32 No Required.
Examples: org:3
LastCopyAlert Boolean No Required. Should the user be alerted when the last copy is included.
WithdrawnOption Int32 No Required. Should items be marked as Withdrawn at specific stages.
Accepts: 0 (Never), 1 (Immediately), 2 (At Approval)
DeleteAtApproval Boolean No Required. Should the items be deleted when approved.
DiscardOption Int32 No Required. Discard amount configuration.
Accepts: 0 (None), 1 (Use Item Price), 2 (By Language)
DiscardAmounts List of DtoWeedingDiscardAmountData Yes List of language specific discard amount values.
DtoWeedingDiscardAmountData
Property Type Nullable Description
LanguageID Int16 No Required.
Amount Decimal No Required.
Request body
application/json, text/json
{
    "Name": "Sample Weeding Template",
    "OrganizationOwnerID": 3,
    "LastCopyAlert": true,
    "WithdrawnOption": 1,
    "DeleteAtApproval": false,
    "DiscardOption": 2,
    "DiscardAmounts": [
        { "LanguageID": 1, "Amount": 3.28 }
    ]
}

Response Information

true is returned upon success.

HTTP Response Codes

Code Description
200 OK. Success
400 Bad request
404 Invalid object ID


Get All Weeding Criteria by Template ID

GET /api/.../templates/{objectid}/{id}?type=criteria

Return all weeding criteria assigned to the template.

Response Information

Example
application/json, text/json
[
    {
        "WeedingCriteriaID": 3,
        "Name": "Weeding Criteria - Template 1",
        "WeedingTemplateID": 1,
        "WeedingTemplateName": "Sample Weeding Template 1",
        "CreatorID": 1,
        "CreatorName": "PolarisExec",
        "CreationDate": "2023-05-04T15:50:57.263-04:00",
        "ModifierID": 1,
        "ModifierName": "PolarisExec",
        "ModificationDate": "2023-05-04T15:55:12.547-04:00",
        "QueryText": "FREQ = a",
        "NewerThanValue": 11,
        "NewerThanTerm": "Y",
        "OlderThanValue": 58,
        "OlderThanTerm": "M",
        "LifetimeCircCount": 20,
        "LifetimeCircTerm": "O",
        "LifetimeInHouseUse": 20,
        "LifetimeInHouseTerm": "U",
        "YTDCircCount": 4,
        "YTDCircTerm": "U",
        "YTDInHouseUse": 4,
        "YTDInHouseTerm": "U"
    }
]

HTTP Response Codes

Code Description
200 OK. Success
404 Not Found