SolariumSolariumDocs
Browse The Docs

Docs/API Reference/Contacts

POST

Create A Contact

Adds a customer or vendor. If one with the same name and type exists, that one is returned and nothing is added.

Parameters

organizationIdUUID!required

Organization ID

nameString!required

"create_contact"

params.nameString!required

The contact's name

params.contact_typeString!required

customer or vendor

params.emailString

Email address

params.phoneString

Phone number

params.regionString

The province of a customer's address, as a code (NS) or its name. Invoice tax follows it. Given for a contact that exists, it updates theirs

params.legal_nameString

A customer's legal name, printed on their invoices (blank: the name)

params.contact_nameString

The person their invoices are marked for, printed as Attn:

params.billing_addressString

Their billing address, one line per line

applyBoolean

true to keep it

Request
mutation {
  runOp(
    organizationId: "a1b2c3d4-..."
    name: "create_contact"
    apply: true
    params: { name: "North Group", contact_type: "customer", email: "[email protected]" }
  ) { success applied result }
}
Response
{
  "data": {
    "runOp": {
      "success": true,
      "applied": true,
      "result": {
        "summary": "Added North Group As A Customer.",
        "data": {
          "id": "b2c3d4e5-...",
          "name": "North Group",
          "type": "customer",
          "email": "[email protected]",
          "phone": null,
          "region": null,
          "created": true
        }
      }
    }
  }
}