Solarware API Docs
Download YAML

Update contact

put /api/v1/contacts/{id}

Security

ApiKeyAuth

Parameters

Name In Type Details
id path integer required Resource ID

Request body required

application/json

Example

{
    "firstname": "Max",
    "lastname": "Mustermann",
    "display_name": "Max Mustermann Updated",
    "notes": "Updated via Solarware API",
    "is_active": true
}

Schema

{
    "type": "object",
    "description": "Contact upsert payload. Nested `addresses` / `phones` / `emails` create or sync nested emails, phones, and addresses on the contact.\n",
    "properties": {
        "uuid": {
            "type": "string",
            "format": "uuid"
        },
        "owner_users_id": {
            "type": "integer"
        },
        "salutations_id": {
            "type": "integer"
        },
        "titles_id": {
            "type": "integer"
        },
        "firstname": {
            "type": "string"
        },
        "lastname": {
            "type": "string"
        },
        "display_name": {
            "type": "string"
        },
        "source": {
            "type": "string",
            "example": "api"
        },
        "status": {
            "type": "string",
            "example": "active"
        },
        "lifecycle_stage": {
            "type": "string"
        },
        "website": {
            "type": "string"
        },
        "language_code": {
            "type": "string"
        },
        "timezone": {
            "type": "string"
        },
        "birthday": {
            "type": "string",
            "format": "date"
        },
        "national_id": {
            "type": "string"
        },
        "tax_number": {
            "type": "string"
        },
        "vat_number": {
            "type": "string"
        },
        "preferred_channel": {
            "type": "string"
        },
        "is_customer": {
            "type": "boolean"
        },
        "is_vendor": {
            "type": "boolean"
        },
        "is_lead": {
            "type": "boolean"
        },
        "do_not_contact": {
            "type": "boolean"
        },
        "is_active": {
            "type": "boolean"
        },
        "notes": {
            "type": "string"
        },
        "meta": {
            "type": "object",
            "additionalProperties": true
        },
        "addresses": {
            "type": "array",
            "items": {
                "type": "object",
                "description": "Address fields for create/update (linked to a contact or partner).",
                "required": [
                    "address_line_1"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Existing address id (update only)"
                    },
                    "label": {
                        "type": "string"
                    },
                    "attention": {
                        "type": "string"
                    },
                    "address_line_1": {
                        "type": "string"
                    },
                    "address_line_2": {
                        "type": "string"
                    },
                    "zip_code": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "district": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "country_code": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2
                    },
                    "countries_id": {
                        "type": "integer"
                    },
                    "latitude": {
                        "type": "number"
                    },
                    "longitude": {
                        "type": "number"
                    },
                    "delivery_instructions": {
                        "type": "string"
                    },
                    "is_primary": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                }
            }
        },
        "phones": {
            "type": "array",
            "items": {
                "type": "object",
                "description": "Phone fields for create/update (linked to a contact or partner).",
                "required": [
                    "number"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Existing phone id (update only)"
                    },
                    "contact_phone_types_id": {
                        "type": "integer"
                    },
                    "label": {
                        "type": "string"
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "number": {
                        "type": "string"
                    },
                    "extension": {
                        "type": "string"
                    },
                    "e164_number": {
                        "type": "string"
                    },
                    "is_primary": {
                        "type": "boolean"
                    },
                    "is_whatsapp": {
                        "type": "boolean"
                    },
                    "is_sms_enabled": {
                        "type": "boolean"
                    },
                    "is_verified": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                }
            }
        },
        "emails": {
            "type": "array",
            "items": {
                "type": "object",
                "description": "Email fields for create/update (linked to a contact or partner).",
                "required": [
                    "email"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Existing email id (update only)"
                    },
                    "contact_email_types_id": {
                        "type": "integer"
                    },
                    "label": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "is_primary": {
                        "type": "boolean"
                    },
                    "is_verified": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                }
            }
        }
    }
}

Responses

200 Contact updated

application/json

{
    "allOf": [
        {
            "title": "API envelope",
            "type": "object",
            "properties": {
                "success": {
                    "type": "boolean"
                },
                "message": {
                    "type": "string",
                    "nullable": true
                },
                "errors": {
                    "nullable": true
                },
                "meta": {
                    "type": "object",
                    "nullable": true,
                    "additionalProperties": true
                }
            }
        },
        {
            "type": "object",
            "properties": {
                "data": {
                    "title": "Contact",
                    "type": "object",
                    "description": "Contact in list/show/create/update responses.",
                    "required": [
                        "id",
                        "display_name"
                    ],
                    "properties": {
                        "id": {
                            "type": "integer"
                        },
                        "uuid": {
                            "type": "string",
                            "nullable": true
                        },
                        "firstname": {
                            "type": "string",
                            "nullable": true
                        },
                        "lastname": {
                            "type": "string",
                            "nullable": true
                        },
                        "display_name": {
                            "type": "string"
                        },
                        "unique_number": {
                            "type": "string",
                            "nullable": true
                        },
                        "unique_number_display": {
                            "type": "string",
                            "nullable": true
                        },
                        "source": {
                            "type": "string",
                            "nullable": true
                        },
                        "status": {
                            "type": "string",
                            "nullable": true
                        },
                        "website": {
                            "type": "string",
                            "nullable": true
                        },
                        "birthday": {
                            "type": "string",
                            "format": "date",
                            "nullable": true
                        },
                        "notes": {
                            "type": "string",
                            "nullable": true
                        },
                        "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                        },
                        "salutation": {
                            "oneOf": [
                                {
                                    "title": "Salutation",
                                    "type": "object",
                                    "required": [
                                        "id",
                                        "salutation"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "salutation": {
                                            "type": "string"
                                        }
                                    }
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        },
                        "addresses": {
                            "type": "array",
                            "items": {
                                "title": "Address",
                                "type": "object",
                                "description": "Address in responses.\n",
                                "required": [
                                    "address_line_1",
                                    "is_primary"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "contacts_id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "partners_id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "label": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "address_line_1": {
                                        "type": "string"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "zip_code": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "district": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "state": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "is_primary": {
                                        "type": "boolean"
                                    },
                                    "country": {
                                        "oneOf": [
                                            {
                                                "title": "Country",
                                                "type": "object",
                                                "required": [
                                                    "id",
                                                    "name"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "iso2": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "iso3": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "numeric_code": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "phone_code": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "capital": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "currency": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "currency_symbol": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "native": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "region": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "subregion": {
                                                        "type": "string",
                                                        "nullable": true
                                                    }
                                                }
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        "phones": {
                            "type": "array",
                            "items": {
                                "title": "Phone",
                                "type": "object",
                                "description": "Phone in responses.",
                                "required": [
                                    "number",
                                    "is_primary"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "contacts_id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "partners_id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "label": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "country_code": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "number": {
                                        "type": "string"
                                    },
                                    "extension": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "e164_number": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "is_primary": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        },
                        "emails": {
                            "type": "array",
                            "items": {
                                "title": "Email",
                                "type": "object",
                                "description": "Email in responses.",
                                "required": [
                                    "email",
                                    "is_primary"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "contacts_id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "partners_id": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "label": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "is_primary": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    ]
}
401 Missing or invalid API key

application/json

{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean",
            "example": false
        },
        "message": {
            "type": "string",
            "example": "Missing API key (X-Api-Key)"
        }
    }
}
404 Resource not found

application/json

{
    "title": "API envelope",
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string",
            "nullable": true
        },
        "errors": {
            "nullable": true
        },
        "meta": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
        }
    }
}
422 Validation failed

application/json

{
    "title": "API envelope",
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string",
            "nullable": true
        },
        "errors": {
            "nullable": true
        },
        "meta": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
        }
    }
}