Entities/Contacts/{contact}/Associate
Associate contact with entity
Associates an existing contact with an entity (Customer, Supplier, Prospect, Seller).
AuthorizationBearer <token>
In: header
Path Parameters
contactstring
entity_typestring
Entity type: C (Customer), F (Supplier), P (Prospect), R (Seller).
Value in
"C" | "F" | "P" | "R"entity_idinteger
Entity ID to associate with.
is_defaultboolean
Whether this is the default contact for the entity.
role_id?string | null
Function/role code.
Length
length <= 6department?string | null
Length
length <= 40extension?string | null
Length
length <= 16observations?string | null
Length
length <= 80Response Body
curl -X POST "https://og-tenant1.test:8003/api/v2/entities/contacts/string/associate" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "C",
"entity_id": 456,
"is_default": true
}'{
"data": {
"id": 1,
"name": "Joao Silva",
"address": "Rua das Flores 123",
"city": "Lisboa",
"zipcode": "1000-001",
"country": "PT",
"phone1": "+351.912345678",
"phone2": "+351.912345679",
"mobilephone": "+351.961234567",
"email": "joao@exemplo.pt",
"email2": "string",
"email3": "string",
"taxid": "123456789",
"profession_id": "1",
"rgdp_allow_mailing": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}