Creation of address with new vendor record

Hello,

We are trying to create vendor records that include a specific address type along with the vendor info. The vendor record is created correctly but no address is included. Can anyone else either show me where I set it up wrong, or verify that it does the same for you? Thank you!

Here is the JSON for my POST to https://api.sky.blackbaud.com/accountspayable/v1/vendors:

[test data, no actual personal info]

{
"vendor_name": "Johannes\Ockeghem",
"vendor_type": "Individual",
"vendor_status": "Active",
"ui_defined_id": "S5555555",
"addresses": [
{
"description": "ULS Primary Address",
"address_line": "514 Mendenhall St",
"city": "Greensboro",
"state": "NC",
"postal": "27403",
"country": "United States",
"is_primary": true,
"is_invoices": true,
"is_pos": true,
"is_1099": true
}
]
}

The vendor creation is successful (Status 200, with the vendor ID included), but no address appears on the record. The result of GET to https://api.sky.blackbaud.com/accountspayable/v1/vendors/12345/addresses is

{
"count": 1,
"results": [
{
"address_id": 0,
"description": "<Vendor Address>",
"is_primary": true,
"is_invoices": false,
"is_pos": false,
"is_1099": false,
"first_name": "",
"middle_name": "",
"last_name": "",
"position": "",
"address_contact_methods": [],
"payee_name": ""
}
]
}

Best Answer

  • Regina Okonkwo
    Regina Okonkwo Blackbaud Employee
    Fourth Anniversary First Reply Kudos 1 Name Dropper
    Answer ✓

    Hi @Kyle Barger, reviewed this with the team and you are close; it's a single field-name mismatch, not anything on your account setup.

    The Create Vendor endpoint expects the address collection under address (singular), not addresses. Because the property name doesn't match, the API ignores the array and creates the vendor with a default blank address which is exactly the empty stub you're seeing on the GET ("address_id": 0"<Vendor Address>").

    I think you should rename that one key and the rest of your payload is fine (is_1099 and the other flags are correct as-is)

    {
    "vendor_name": "Johannes\Ockeghem",
    "vendor_type": "Individual",
    "vendor_status": "Active",
    "ui_defined_id": "S5555555",
    "address": [
    {
    "description": "ULS Primary Address",
    "address_line": "514 Mendenhall St",
    "city": "Greensboro",
    "state": "NC",
    "postal": "27403",
    "country": "United States",
    "is_primary": true,
    "is_invoices": true,
    "is_pos": true,
    "is_1099": true
    }
    ]
    }


    (Minor aside: "Johannes\Ockeghem" — a single backslash isn't a valid JSON escape, so use \\ there to be safe.) After that, GET /vendors/{id}/addresses should return the populated address. Let me know if it still comes back empty.

Answers

  • Hi @Kyle Barger I am going to tag @Regina Okonkwo in this discussion to offer any insight. She may not respond right away and I'm hoping more members of the community come forward in the meantime!

  • @Regina Okonkwo Thanks for looking at this & finding my issue! I'm annoyed I didn't see it myself in all the times I pored over my code. Is there any kind of error log (beyond what gets returned with the API result) that might have shown something like this?

Categories