PUT /api/.../patrons/{id}/merge/{secondaryid}?ignoreors=false
Merge a secondary patron with the primary patron. When merge succeeded, the secondary is marked for deletion, and the primary patron is updated with merged secondary patron data.
CR_AccessPatronServices_Allow, CR_MergePatrons_Allow
Name | Type | Required | Description |
---|---|---|---|
id | Integer | Yes | The unique id assigned to the primary patron. |
secondaryid | Integer | Yes | The unique id assigned to the secondary patron. |
ignoreors | Boolean | Yes | Indicates whether or not to prompt secondary patron's outreach service profile block. Possible values: true or false. If this value is set to false and response with an "ErrorCode": 20009, can set this value to true to avoid this ErrorCode. |
On success, returns new data of the primary patron.
{
"PatronID": 358436,
"PatronCodeID": 17,
"PatronCode": {
"PatronCodeID": 17,
"Description": "CPH Outreach"
},
"OrganizationID": 90,
"CreatorID": 911,
"ModifierID": 1018,
"Barcode": "98043242",
"SystemBlocks": 0,
"YTDCircCount": 134,
"LifetimeCircCount": 8314,
"LastActivityDate": "2016-03-24T14:20:14.417-04:00",
"ClaimCount": 5,
"LostItemCount": 2,
"ChargesAmount": 310.96,
"CreditsAmount": 28.46,
"RecordStatusID": 1,
"RecordStatusDate": "2014-08-27T13:52:14.48-04:00",
"YTDYouSavedAmount": 0,
"LifetimeYouSavedAmount": 0,
"Registration": {
"PatronID": 358436,
"LanguageID": 1,
"NameFirst": "TEST LEAPREG",
"NameLast": "Zhang",
"NameMiddle": null,
"NameTitle": "Ms.",
"NameSuffix": "Jr.",
"PhoneVoice1": "351-123-4567",
"PhoneVoice2": null,
"PhoneVoice3": null,
"EmailAddress": "peng.zhang@iii.com",
"Password": "1234",
"EntryDate": "2014-03-31T15:22:34.737-04:00",
"ExpirationDate": "2017-09-29T00:00:00-04:00",
"AddrCheckDate": "2016-09-29T00:00:00-04:00",
"UpdateDate": "2016-04-21T13:49:44.033-04:00",
"User1": "id's number",
"User2": "Privileges/Restrictions",
"User3": "Voter Registration",
"User4": "CybraryN Use's Only",
"User5": "Peter's test",
"Gender": 1,
"Birthdate": "1989-03-31T00:00:00-05:00",
"RegistrationDate": "1986-12-26T00:00:00-05:00",
"FormerID": "1000500119010",
"ReadingListEnabled": false,
"PhoneFAX": null,
"DeliveryOptionID": null,
"StatisticalClassID": 11421,
"PatronStatClassCode": {
"StatisticalClassID": 11421,
"OrganizationID": 90,
"Description": "Saratoga Springs-City"
},
"CollectionExempt": false,
"AltEmailAddress": null,
"ExcludeFromOverdues": false,
"SDIEmailAddress": null,
"SDIEmailFormatID": null,
"SDIPositiveAssent": null,
"SDIPositiveAssentDate": null,
"DeletionExempt": false,
"PatronFullName": "Zhang, TEST LEAPREG ",
"ExcludeFromHolds": false,
"ExcludeFromBills": false,
"EmailFormatID": 2,
"PatronFirstLastName": "TEST LEAPREG Zhang",
"Username": null,
"MergeDate": "2016-04-21T13:49:44.033-04:00",
"MergeUserID": 1018,
"MergeBarcode": "1000500119010",
"EnableSMS": false,
"RequestPickupBranchID": 5,
"Phone1CarrierID": null,
"Phone2CarrierID": null,
"Phone3CarrierID": null,
"eReceiptOptionID": null,
"TxtPhoneNumber": null,
"ExcludeFromAlmostOverdueAutoRenew": false,
"ExcludeFromPatronRecExpiration": false,
"ExcludeFromInactivePatron": false,
"DoNotShowEReceiptPrompt": false,
"PrivateFieldsCleared": false,
"Addresses": [
{
"PatronID": 358436,
"AddressID": 1090296,
"AddressTypeID": 2,
"AddressTypeDescription": " Notice",
"AddressLabelID": "1",
"AddressLabelDescription": "Home",
"Verified": false,
"VerificationDate": null,
"PolarisUserID": 1,
"StreetOne": "Ontario",
"StreetTwo": null,
"StreetThree": null,
"MunicipalityName": null,
"PostalCode": "13078",
"ZipPlusFour": null,
"City": "JAMESVILLE",
"State": "NY",
"CountryName": "USA",
"CountryID": 1,
"County": "ONONDAGA",
"VerificationStatus": 0
}
],
"PatronCustomData": [
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 8,
"PatronDataLabelValue": "Parent/Guardian",
"PolarisCustomDataTypeID": 2,
"CustomDataEntry": "parent/guardian",
"DefaultValue": "John Smith",
"IsRequired": true,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 22,
"PatronDataLabelValue": "Restricted patron Two",
"PolarisCustomDataTypeID": 4,
"CustomDataEntry": false,
"DefaultValue": false,
"IsRequired": false,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 9,
"PatronDataLabelValue": "Parent/Guardian birth date",
"PolarisCustomDataTypeID": 3,
"CustomDataEntry": "1990-07-17T00:00:00-04:00",
"DefaultValue": null,
"IsRequired": true,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 16,
"PatronDataLabelValue": "City ID",
"PolarisCustomDataTypeID": 2,
"CustomDataEntry": "city id",
"DefaultValue": null,
"IsRequired": true,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 12,
"PatronDataLabelValue": "New Text Entry",
"PolarisCustomDataTypeID": 2,
"CustomDataEntry": "new text entry",
"DefaultValue": "Default",
"IsRequired": true,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 11,
"PatronDataLabelValue": "Numeric text box",
"PolarisCustomDataTypeID": 1,
"CustomDataEntry": 9809231,
"DefaultValue": "",
"IsRequired": true,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 13,
"PatronDataLabelValue": "Another Text Box",
"PolarisCustomDataTypeID": 2,
"CustomDataEntry": null,
"DefaultValue": null,
"IsRequired": false,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 20,
"PatronDataLabelValue": "Test1",
"PolarisCustomDataTypeID": 1,
"CustomDataEntry": 989809321,
"DefaultValue": 1,
"IsRequired": true,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 10,
"PatronDataLabelValue": "Restricted patron",
"PolarisCustomDataTypeID": 4,
"CustomDataEntry": false,
"DefaultValue": false,
"IsRequired": false,
"IsEnabled": false,
"IsDataChanged": false
},
{
"PatronID": 0,
"PatronCustomDataDefinitionID": 24,
"PatronDataLabelValue": "Leap",
"PolarisCustomDataTypeID": 2,
"CustomDataEntry": null,
"DefaultValue": null,
"IsRequired": false,
"IsEnabled": false,
"IsDataChanged": false
}
]
},
"DtoPatronPreCheckoutBrief": {
"PatronBlocksCount": 5,
"PatronNotesExist": true,
"OverdueItemsCount": 2,
"ItemsOutCount": 19,
"OutstandingFines": 325.91,
"OverallClaimCount": 5,
"CurrentClaimCount": 0,
"SystemBlockFlags": 0,
"FreeTextBlocksCount": 1,
"OverallLostCount": 2,
"CurrentLostCount": 2,
"LongOverdueItemsCount": 17,
"PatronAssociationsCount": 4,
"BlocksExist": true,
"NonBlockingStatusNotesExist": true,
"BlockingStatusNotesExist": true,
"AccruingFines": true
},
"DtoPatronBasicData": {
"PatronID": 358436,
"Username": null,
"Password": "1234",
"NameFirst": "TEST LEAPREG",
"NameLast": "Zhang",
"NameMiddle": null,
"LanguageID": 1,
"DeliveryOptionID": null,
"ReadingListEnabled": false,
"EmailFormatID": 2,
"RequestPickupBranchID": 5,
"PhoneNumber": "351-123-4567",
"Phone1": "351-123-4567",
"Phone2": null,
"Phone3": null,
"EMail": "peng.zhang@iii.com",
"AltEMail": null,
"PhoneFax": null,
"SMSEnabled": false,
"CarrierName": null,
"IsActiveORSPatron": false,
"ItemsOutCount": 19,
"ItemsOverdueCount": 19,
"ItemsOutLostCount": 2,
"HoldRequestsTotalCount": 1,
"HoldRequestsCurrentCount": 1,
"HoldRequestsShippedCount": 0,
"HoldRequestsHeldCount": 0,
"HoldRequestsLocalHeldCount": 0,
"HoldRequestsILLHeldCount": 0,
"HoldRequestsLocalTotalCount": 0,
"HoldRequestsILLTotalCount": 1,
"HoldRequestsUnclaimedCount": 0,
"ChargeBalance": 325.91,
"CreditBalance": 28.46,
"DepositBalance": 5.13,
"Email2SMSAddress": null,
"EReceiptOptionID": null,
"Phone1CarrierID": 0,
"Phone2CarrierID": 0,
"Phone3CarrierID": 0,
"TxtPhoneNumber": 0,
"DMLID": 160,
"ExcludeFromAlmostOverdueAutoRenew": false,
"ExcludeFromInactivePatron": false,
"ExcludeFromPatronRecExpiration": false,
"RecordStatusID": 1,
"RecordStatusDate": "2014-08-27T13:52:14.48-04:00",
"DoNotShowEReceiptPrompt": false,
"PrivateFieldsCleared": false,
"Addresses": [
{
"AddressID": 1090296,
"AddressLabelDescription": "Home",
"StreetOne": "Ontario",
"StreetTwo": null,
"StreetThree": null,
"City": "JAMESVILLE",
"State": "NY",
"County": "ONONDAGA",
"PostalCode": "13078",
"ZipPlusFour": null,
"Country": "USA",
"CountryID": 1,
"AddressTypeID": 0
}
]
}
}
{
"ErrorCode": 20009,
"Message": "The Outreach Services profile information for the secondary record (Sherman, Patrick H) will be lost.
Do you want to continue merging?",
"MessageDetail": null,
"StackTrace": null,
"InnerException": null,
"Data":
[
"The Outreach Services profile information for the secondary record (Sherman, Patrick H) will be lost.
Do you want to continue merging?"
]
}
{
"ErrorCode": 20008,
"Message": "Patron has shipped requests.",
"MessageDetail": null,
"StackTrace": null,
"InnerException": null,
"Data": [
"Patron has shipped requests.",
"Patron record is secured. No activity is permitted."
]
}
Code | Description |
---|---|
200 | OK. Success |
400 | Bad Request. Primary patron has collection agency block. |
403 | Forbidden. User does not have permission. |
404 | Not Found. Patron not found. |
409 | Conflict. Primary patron or secondary patron is locked by a different user. |