Skip to content

Analytic Codes

Description

Fields

FieldDescriptionData Type
idUnique identifier for the objectUUID
nameName of the analytic codesString
codecode of the analytic codesString
enterpriseTypeIdIdentified type of enterpriseNumber
domainIdDomain identifierString
activeState if is activeBoolean
createdAtTimestamp of when the object was createdString
updatedAtTimestamp of the last update to the objectString
deletedAtTimestamp of when the object was deleted, or null if not deletedString or null

List Analytic Codes

http
GET /analytic-codes

Response

json
{
  "data": [
    {
      "id": "74d1be46-cc85-4510-a3fb-07a16e8da77a",
      "code": "5*01",
      "name": "INTERNET",
      "enterpriseTypeId": 2,
      "domainId": "AGG",
      "createdAt": "2024-12-13T19:15:23.565Z",
      "updatedAt": "2024-12-13T19:15:23.565Z",
      "deletedAt": null
    }
  ],
  "meta": {
    "itemsPerPage": 20,
    "totalItems": 200,
    "currentPage": 1,
    "totalPages": 10,
    "sortBy": [
      [
        "createdAt",
        "DESC"
      ]
    ]
  },
  "links": {
    "current": "http://api-dev.aggraria.digital/v1.0/analytic-codes?page=1&limit=20&sortBy=createdAt:DESC",
    "next": "http://api-dev.aggraria.digital/v1.0/analytic-codes?page=2&limit=20&sortBy=createdAt:DESC",
    "last": "http://api-dev.aggraria.digital/v1.0/analytic-codes?page=10&limit=20&sortBy=createdAt:DESC"
  }
}

Create Analytic Codes

http
POST /analytic-codes

Request body

json
{
  "id": "b002e18a-43bd-4077-b501-e3e3cc4d38a2",
  "name": "1010",
  "code": "1",
  "enterpriseTypeId": 2
}

Response body

json
{
  "id": "b002e18a-43bd-4077-b501-e3e3cc4d38a2",
  "code": "1",
  "name": "1010",
  "enterpriseTypeId": 2,
  "domainId": "AGG",
  "updatedAt": "2024-12-20T02:05:14.407Z",
  "createdAt": "2024-12-20T02:05:14.407Z",
  "deletedAt": null
}

Update Analytic Codes

http
PATCH /analytic-codes/<id>

Request body

json
{
  "name": "1010-",
  "code": "222",
  "enterpriseTypeId": 2
}

Response body

json
{
  "generatedMaps": [],
  "raw": [],
  "affected": 1
}

Delete Analytic Codes

http
DELETE /analytic-codes/<id>

Response body

json
{
  "generatedMaps": [],
  "raw": [],
  "affected": 1
}