Classificadores Personalizados (CustomClassifier)

Parâmetros

- name | string | Nome do Classificador Personalizado

Listar Classificadores Personalizados

GET /custom_classifiers

Exibe os Classificadores Personalizados da conta

Exemplo de Resposta

HTTP/1.1 200 OK
Date: Mon, 17 Jan 2011 20:00:02 GMT
Content-Type: application/json; charset=utf-8
[
  {
    "custom_classifier": {
      "account_id": 1,
      "created_at": "2017-05-12T18:17:14-03:00",
      "id": 3,
      "name": "Região",
      "updated_at": "2017-05-12T18:17:14-03:00"
    }
  },
  {
    "custom_classifier": {
      "account_id": 1,
      "created_at": "2017-05-18T16:20:08-03:00",
      "id": 4,
      "name": "Produto",
      "updated_at": "2017-05-18T16:20:08-03:00"
    }
  }
]
HTTP/1.1 200 OK
Date: Mon, 17 Jan 2011 20:00:02 GMT
Content-Type: application/xml; charset=utf-8
<custom-classifiers type="array">
  <custom-classifier>
    <account-id type="integer">1</account-id>
    <created-at type="dateTime">2017-05-12T18:17:14-03:00</created-at>
    <id type="integer">3</id>
    <name>Região</name>
    <updated-at type="dateTime">2017-05-12T18:17:14-03:00</updated-at>
  </custom-classifier>
  <custom-classifier>
    <account-id type="integer">1</account-id>
    <created-at type="dateTime">2017-05-18T16:20:08-03:00</created-at>
    <id type="integer">4</id>
    <name>Produto</name>
    <updated-at type="dateTime">2017-05-18T16:20:08-03:00</updated-at>
  </custom-classifier>
</custom-classifiers>

Exibir um Classificador Personalizado

GET /custom_classifiers/:id

Exibe os attributos de um Classificador Personalizado

Exemplo de Resposta

HTTP/1.1 200 OK
Date: Mon, 17 Jan 2011 20:00:02 GMT
Content-Type: application/json; charset=utf-8
{
  "custom_classifier": {
    "account_id": 1,
    "created_at": "2017-05-12T18:17:14-03:00",
    "id": 3,
    "name": "Região",
    "updated_at": "2017-05-12T18:17:14-03:00"
  }
}
HTTP/1.1 200 OK
Date: Mon, 17 Jan 2011 20:00:02 GMT
Content-Type: application/xml; charset=utf-8
<custom-classifier>
  <account-id type="integer">1</account-id>
  <created-at type="dateTime">2017-05-12T18:17:14-03:00</created-at>
  <id type="integer">3</id>
  <name>Região</name>
  <updated-at type="dateTime">2017-05-12T18:17:14-03:00</updated-at>
</custom-classifier>

Criar um Classificador Personalizado

POST /custom_classifiers

Cria um Classificador Personalizado

Exemplo de Requisição

Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/json; charset=utf-8
{
  "custom_classifier": {
    "name": "Departamento"
  }
}
Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/xml; charset=utf-8
<custom-classifier>
  <name>Departamento</name>
</custom-classifier>

Exemplo de Resposta

HTTP/1.1 201 Created
Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/json; charset=utf-8
{
  "custom_classifier": {
    "account_id": 1,
    "created_at": "2017-05-19T16:47:22-03:00",
    "id": 9,
    "name": "Departamento",
    "updated_at": "2017-05-19T16:47:22-03:00"
  }
}
HTTP/1.1 201 Created
Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/xml; charset=utf-8
<custom-classifier>
  <account-id type="integer">1</account-id>
  <created-at type="dateTime">2017-05-19T16:44:37-03:00</created-at>
  <id type="integer">9</id>
  <name>Departamento</name>
  <updated-at type="dateTime">2017-05-19T16:44:37-03:00</updated-at>
</custom-classifier>

Atualizar um Classificador Personalizado

PUT /custom_classifiers/:id

Atualiza um Classificador Personalizado

Exemplo de Requisição

Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/json; charset=utf-8
{
  "custom_classifier": {
    "name": "Departamento"
  }
}
Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/xml; charset=utf-8
<custom-classifier>
  <name>Departamento</name>
</custom-classifier>

Exemplo de Resposta

HTTP/1.1 200 OK
Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/json; charset=utf-8
{
  "custom_classifier": {
    "account_id": 1,
    "created_at": "2017-05-19T16:47:22-03:00",
    "id": 9,
    "name": "Departamento",
    "updated_at": "2017-05-19T16:47:22-03:00"
  }
}
HTTP/1.1 200 OK
Date: Mon, 24 Apr 2017 20:29:57 GMT
Content-Type: application/xml; charset=utf-8
<custom-classifier>
  <account-id type="integer">1</account-id>
  <created-at type="dateTime">2017-05-19T16:44:37-03:00</created-at>
  <id type="integer">9</id>
  <name>Departamento</name>
  <updated-at type="dateTime">2017-05-19T16:44:37-03:00</updated-at>
</custom-classifier>

Apagar um Classificador Personalizado

DELETE /custom_classifiers/:id

Apaga um Classificador Personalizado

Exemplo de Resposta

HTTP/1.1 204 No Content
Date: Mon, 17 Jan 2011 20:00:02 GMT
Content-Type: application/json; charset=utf-8
[]
HTTP/1.1 204 No Content
Date: Mon, 17 Jan 2011 20:00:02 GMT
Content-Type: application/xml; charset=utf-8