Contactos
As rotas aqui descritas permitem criar, editar e remover contactos dos clientes e fornecedores.
Consulta de contactos em um cliente/fornecedor
get
Path parameters
idintegerRequired
id of the contact of which to get the information
Responses
200
OK
application/json
get/contacts/{id}
GET /contacts/{id} HTTP/1.1
Accept: */*
200
OK
{
"data": {
"type": "contacs",
"attributes": {
"name": "Contacto 1",
"phone_number": 221111111,
"mobile_number": 931111111,
"email": "example@gmail.com",
"categories": "{others,management}",
"contactable_id": 2,
"contactable_type": "Customer | Supplier"
}
}
}Criação de contactos de um cliente/fornecedor
post
Body
Responses
200
OK
application/json
post/contacts
POST /contacts HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 377
{
"data": {
"type": "contacs",
"attributes": {
"name": "Contacto 1",
"phone_number": "221111111",
"mobile_number": "931111111",
"email": "example@gmail.com",
"categories": "Indicar tipo de contacto, pode indicar 4 valores: others,management,comercial,finance,general. Sendo necessario passar da seguinte forma {others,management}",
"contactable_id": 2,
"contactable_type": "Customer | Supplier"
}
}
}200
OK
{
"data": {
"type": "contacs",
"attributes": {
"name": "Contacto 1",
"phone_number": 221111111,
"mobile_number": 931111111,
"email": "example@gmail.com",
"categories": "{others,management}",
"contactable_id": 2,
"contactable_type": "Customer | Supplier"
}
}
}Alteração de contactos de um cliente/fornecedor
patch
Path parameters
idintegerRequired
id of the contact of which to update
Body
Responses
200
OK
application/json
patch/contacts/{id}
PATCH /contacts/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 377
{
"data": {
"type": "contacs",
"attributes": {
"name": "Contacto 1",
"phone_number": "221111111",
"mobile_number": "931111111",
"email": "example@gmail.com",
"categories": "Indicar tipo de contacto, pode indicar 4 valores: others,management,comercial,finance,general. Sendo necessario passar da seguinte forma {others,management}",
"contactable_id": 2,
"contactable_type": "Customer | Supplier"
}
}
}200
OK
{
"data": {
"type": "contacs",
"attributes": {
"name": "Contacto 1",
"phone_number": 221111111,
"mobile_number": 931111111,
"email": "example@gmail.com",
"categories": "{others,management}",
"contactable_id": 2,
"contactable_type": "Customer | Supplier"
}
}
}Eliminação de contactos de um cliente/fornecedor
delete
Path parameters
idintegerRequired
id of the contact of which to remove
Responses
200
OK
No content
delete/contacts/{id}
DELETE /contacts/{id} HTTP/1.1
Accept: */*
200
OK
No content
Last updated