Skip to main content

upsertAccountingVendor

Creates or updates the endless-owned accounting vendor for a supplier.

Only the fields provided are written, so a single field can be edited without sending the rest. Passing an explicit null clears that field; omitting it leaves it alone. The vendor is created on the first call for a supplier, taking its name from the supplier when no name is given.

Business Rules​

  • The supplier and the integration must both belong to this company.
  • accountingTermId must name a payment term belonging to this company.
  • billingAddressId must name an address of this supplier or one of its active locations. The vendor keeps a copy as its billing address, so a later edit to that address applies to the vendor only when it is chosen again.

Error Scenarios​

  • **NOT_FOUND**: the supplier, the integration, or the supplier address does not exist in this company.
  • **VALIDATION**: the payment term does not belong to this company.

Permissions Required​

  • accounting:configure_supplier_accounting permission.
upsertAccountingVendor(
input: UpsertAccountingVendorInput!
): UpsertAccountingVendorPayload

Arguments​

upsertAccountingVendor.input ● UpsertAccountingVendorInput! non-null input common​

Parameters for UpsertAccountingVendor

Type​

UpsertAccountingVendorPayload object common​

Autogenerated return type of UpsertAccountingVendor.