Esta é uma API de cadastro de centros de custo.
Esta API é autenticada usando OAuth2, ver documentação de autenticação
API para listagem de centros de custo
GET /api/v1/cdm/billing/groups HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"cursor": {
"previous": "",
"current": "0",
"next": "",
"count": 1
},
"groups": [
{
"id": "Az2yHHgVNpCYaEoFMSvxu",
"name": "CentroCusto01",
"accountcode": null,
"server_id": "AxUBbTFhJA6cPZH56YQMG"
},
{
"id": "IrAyHHgVNpCYaEoFMSvxu",
"name": "CentroCusto03",
"accountcode": null,
"server_id": "AxUBbTFhJA6cPZH56YQMG"
},
]
}
id
API para buscar um centro de custo
GET /api/v1/cdm/billing/groups/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "CentroCusto03",
"accountcode": null,
"server_id": "AxUBbTFhJA6cPZH56YQMG"
}
API para criação de um centro de custo
POST /api/v1/cdm/billing/groups HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"name": "CentroCusto09",
"server_id": "AxUBbTFhJA6cPZH56YQMG"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "CentroCusto09",
"accountcode": null,
"server_id": "AxUBbTFhJA6cPZH56YQMG"
}
id
API para atualização de um centro de custo
PUT /api/v1/cdm/billing/groups/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"name": "CentroCusto01"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "CentroCusto01",
"accountcode": null,
"server_id": "AxUBbTFhJA6cPZH56YQMG"
}
id
API para remoção de um centro de custo
DELETE /api/v1/cdm/billing/groups/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json