TaxCategory

Tax category is a group of taxes of particular service.

GraphViz

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "TaxCategory",
  "id": "http://www.odin.com/billing/TaxCategory/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "relations": {
    "vendor": {
      "type": "http://parallels.com/aps/types/pa/account",
      "required": true
    }
  },
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

The APS type is used to manage a collection of APS resources. To get a list of resources from that collection, use the following API call:

GET  /aps/2/collections/tax-categories?<RQL-filter>

Properties

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

name

String

Not Required

Tax category name

description

String

Not Required

Tax category description

Relationship

NAME

TYPE

REQUIRED

DESCRIPTION

vendor

PAAccount

Yes

Vendor - owner of this tax category

Examples

Get all Tax Categories

To get a list of all tax categories in BSS, a management system must issue the following request:

GET /aps/2/collections/tax-categories

The list of tax categories in the response will look like this:

HTTP/1.1 200 OK

[
   {
      "aps": {
         "type": "http://www.odin.com/billing/TaxCategory/1.0",
         "id": "891950fe-9a1c-46ca-aba9-8fd860cb2be8",
         "status": "aps:ready",
         "revision": 2,
         "modified": "2017-08-04T13:53:59Z"
      },
      "name": "All products"
   },
   /* ... */
]

Get Tax Category Details

If a management system knows the APS ID of a tax category it can request its full JSON representation:

GET /aps/2/resources/891950fe-9a1c-46ca-aba9-8fd860cb2be8

The tax category representation will look like in the following response:

HTTP/1.1 200 OK

{
   "aps":
   {
      "type": "http://www.odin.com/billing/TaxCategory/1.0",
      "id": "891950fe-9a1c-46ca-aba9-8fd860cb2be8",
      "status": "aps:ready",
      "revision": 2,
      "modified": "2017-08-04T13:53:59Z",
      "schema": "/aps/2/types/108",
      "package":
      {
         "id": "2e9e3bfd-74cd-44ed-95e5-6dc22e51b1c3",
         "href": "/aps/2/packages/2e9e3bfd-74cd-44ed-95e5-6dc22e51b1c3"
      }
   },
   "name": "All products",
   "vendor":
   {
      "aps":
      {
         "link": "strong",
         "href": "/aps/2/resources/0ab950d1-abc9-4433-a87d-8ba009bf4bce",
         "id": "0ab950d1-abc9-4433-a87d-8ba009bf4bce"
      }
   }
}