Unidades de Medida
Página dedicada a instruir sobre a criação, edição e remoção de unidades de medida.
Criar Unidade de Medida
Payload
{
"data": {
"type": "units_of_measure",
"attributes": {
"unit_of_measure": "Anos de Luz",
"is_default": false
}
}
}
Response
{
"data": {
"type": "units_of_measure",
"id": "9",
"attributes": {
"unit_of_measure": "Anos de Luz",
"is_default": false
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
}
}
Obter Todas as Unidade de Medida
GET
https://api/v1.toconline.com/api/units_of_measure
Exemplo de Response
{
"data": [
{
"type": "units_of_measure",
"id": "6",
"attributes": {
"unit_of_measure": "horas",
"is_default": false
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
},
{
"type": "units_of_measure",
"id": "5",
"attributes": {
"unit_of_measure": "Kg",
"is_default": false
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
},
{
"type": "units_of_measure",
"id": "4",
"attributes": {
"unit_of_measure": "Lt",
"is_default": false
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
},
{
"type": "units_of_measure",
"id": "3",
"attributes": {
"unit_of_measure": "m",
"is_default": false
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
},
{
"type": "units_of_measure",
"id": "2",
"attributes": {
"unit_of_measure": "un",
"is_default": true
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
},
{
"type": "units_of_measure",
"id": "9",
"attributes": {
"unit_of_measure": "Anos de Luz",
"is_default": false
},
"relationships": {
"company": {
"data": {
"type": "current_company",
"id": "800000046"
}
}
}
}
]
}
Remover Unidades de Medida
DELETE
https://api/v1.toconline.com/api/units_of_measure/{id}
Last updated