Attempt to PATCH Constituent Address gives weird informationsource error

(My data has been anonymized)


Using cURL:
https://api.sky.blackbaud.com/constituent/v1/addresses/123456

-X PATCH --header "Content-type: application/json" --header "Bb-Api-Subscription-Key: 12345678901234567890" --header "Authorization: Bearer abc[snipped]123" --data-raw "{\\"address_lines\\":\\"123 Main Road\\",\\"city\\":\\"Victoria\\",\\"constituent_id\\":\\"87654\\",\\"country\\":\\"Canada\\",\\"do_not_mail\\":false,\\"postal_code\\":\\"V8N 1Z1\\",\\"preferred\\":true,\\"state\\":\\"BC\\",\\"type\\":\\"Home\\"}"



Gives the following error:

[{"message":"The argument 'informationsource' was not assigned a valid value.","error_name":"ContactBusinessLogicArgumentNotValid","error_code":50010,"raw_message":"The argument 'informationsource' was not assigned a valid value.","error_args":["informationsource"]}]


The constituent_id is correct and the address id has been double- and triple-checked.


There is an address entity information_source property, but it's not required, and it also has an underscore in its name, whereas the error message refers to informationsource minus the underscore.


I can PATCH other entities using the same code and appropriate properties, and don't get an error.


Any idea what's causing this error? Any help would be greatly appreciated!

Comments

  • Hi Julian,


    I just tried (using the SKY API Console app) and was unable to reproduce your issue.  I was able to use the EditConstituentAddress endpoint and send the following request to update an address (btw you don't need to provide constituent_id in the request body, as it can't be changed on an existing address).


    Here's the exact request I'm using - I wonder if you could try to repro your issue using the Console?

     

    PATCH https://api.sky.blackbaud.com/constituent/v1/addresses/1611 HTTP/1.1<br/>Host: api.sky.blackbaud.com<br/>Content-Type: application/json<br/>Bb-Api-Subscription-Key: {redacted}<br/>Authorization: Bearer {redacted} <br/><br/>{<br/> "address_lines": "100 Main Road",<br/> "city": "Victoria",<br/> "country": "Canada",<br/> "do_not_mail": false,<br/> "postal_code": "V8N 1Z1",<br/> "preferred": true,<br/> "state": "BC",<br/> "type": "Home"<br/> }
    Let me know if you're still seeing the same error (even more odd since you're not updating the info source field) and we'll troubleshoot further.
  • It turns out that it was the constituent_id that was causing the problem. Once I eliminated that field, everything worked without error.

Categories