Document toolboxDocument toolbox

.GLA API Calls v2.1.4.7

Reading Data

In an effort to make the PCR-360 API more flexible, PCR has made the decision to no longer create individual endpoints for all the different data types. Instead, PCR is encouraging Users to use the SQL endpoint with a structured SELECT statement to retrieve exactly the data you want. Please see the SQL endpoint documentation for more information.

Example SELECT query for retrieving GLAs and their Components:

SELECT * FROM V_GLA_COMP_COMB_ADMIN;

Lists

When doing an INSERT or UPDATE for GLA records, it is sometimes necessary to provide values that exist elsewhere in the system. The LIST method can help to retrieve available options for these values. Below is how to make a LIST request:

GET http://DOMAIN/api/API_KEY/gla.OUTPUT?LIST=LISTTYPE

Searchable

If a LISTTYPE is designated as searchable in the table below, adding the "SEARCH" param will return values that contain the provided value.

GET http://DOMAIN/api/API_KEY/gla.OUTPUT?LIST=LISTTYPE&SEARCH=test

Parameter

Replace With

LISTTYPE

The type of List to be retrieved. Types can be found below.

List Types

Type

Description

Extra Parameters*

Searchable

CHARGE_CATALOG

Get available Charge Catalogs


Yes

CONTACTS

Get available Contacts

CTYPE - Type of contact. Example: "worker"

Yes

DEPTHIER

Get available Departments


No

Charge Catalog Results
{
        status: success,
        page: 1,
        count: 64,
        total_count: 64,
        charge_catalog: [
            {
                RECID: 167,
                NAME: Starship Detailing,
                DESCRIPTION: 1-time charge for cleaning of starships,
                AMOUNT: 126587,
                CHARGE_TYPE_LISTS_RECID: 1981,
                EXPENSE_TYPE_LISTS_RECID: 1182,
                PARENT_CHRG_CATALOG_RECID: ‘’,
                REVENUE_GLA_RECID: 1,
                USE_QUANTITY: 1,
                TAXABLE: 0,
                ALLOW_OVERRIDE: 1,
                CC_CHARGE_TYPE_VALUE: 1 time,
                CC_CHARGE_TYPE_CODE: 1_TIME,
                CC_EXPENSE_TYPE_VALUE: Default,
                CC_EXPENSE_TYPE_CODE: DEFAULT,
            },
	    {…}
       ]
}
Contact Results
{
        status: success,
        page: 1,
        count: 20,
        total_count: 20,
        contacts: [
            {
                RECID: 809,
                SERVICE_REP: Doe, John,
                STATUS: 1,
                CONTACT_TYPE_LISTS_RECID: 1147,
                C_TITLE_VALUE: null,
                C_TITLE_CODE: null,
                CTYPE_CONTACT_TYPE_VALUE: User,
                CTYPE_CONTACT_TYPE_CODE: USER
            },
            {…}
        ]
}
Department Hierarchy Results
{
        status: success,
        page: 1,
        count: 20,
        total_count: 20,
        depthier: [
            {
                RECID: 24,
                DH_NAME: Facilities,
                STATUS: 1,
                DEFAULT_SLA_DESC: null,
                DEFAULT_INCI_SLA_DESC: null,
                BG_NAME: Admin,
                DEPT_HIERARCHY_PATH: FM,
                DEPT_HIERARCHY_PATH_TOOLTIP: FM,
                NAME_AND_BG: FM – Admin
            },
            {…}
        ]
}

Writing GLAs

Available as of 2.1.4.5

GLAs can be easily added (INSERT) or updated (UPDATE) through the API. Each installation of PCR-360 can have a different number of GLA Components so this documentation generalizes the information, but knowledge of the specific system's requirements is necessary.

It is important to note that GLA Components can be added, but they CANNOT be updated via the API. When updating a GLA via the API, the request is limited to everything in the table below except the Component fields that begin with 'gla_item_'.

GLA Endpoint

http://DOMAIN/api/API_KEY/gla.OUTPUT

Available Fields

Field

Required

Data Type

Options

Default

Notes

recid

Conditionally*

Integer



*Required if attempting UPDATE on GLA

ledger

No

Integer

1 or 0

0

1 = Yes, 0 = No

status

No

Integer

1 or 0

1

1 = Active, 0 = Inactive

speed_code

No

String



Speed Code of the GLA

description

No

String



Description of the GLA

format

Yes

String

System Specific


Name of the Format of the GLA

revenue

Conditionally*

Integer

1 or 0

0

1 = marks GLA as Revenue / *Requirement: Either 'revenue', 'expense', or 'both' need to be set to '1'.

expense

Conditionally*

Integer

1 or 0

0

1 = marks GLA as Expense / *Requirement: Either 'revenue', 'expense', or 'both' need to be set to '1'.

taxable

No

Integer

1 or 0

0

1 = marks the GLA as taxable

gla_item_1

Yes

String



The first component of the GLA

gla_item_n

System specific*

String



See post script note

*Post script note: The value ‘gla_item_n’ represents any additional GLA Components a specific installation may have where 'n' is a sequential number starting at 2 and incrementing by 1 for each additional GLA Component. The necessity to provide each additional Component also depends on your installation of PCR-360. If a Users have any questions about how many GLA Components their system has and if the Components are Required, please contact your System Administrator.

Results

If the request is successful, the RECID of the GLA will be returned as follows:

{
    Status: success,
    page: 1,
    count: 1,
    total_count: 1,
    gla: 58337
}

In the above example, '58337' represents the returned RECID.

GLA App Record

Writing GLA Charges

Available as of 2.1.4.5

GLA Endpoint

http://DOMAIN/api/API_KEY/gla.OUTPUT

Available Fields

Field

Required

Data Type

Options

Default

Notes

type

Yes

String

CHARGES


This is REQUIRED when interacting with GLA Charges

recid

Conditionally*

Integer



*Required if attempting to UPDATE a GLA Charge

gla

Yes

Integer



RECID of the GLA for this Charge

catalog

Yes

Integer

Reading GLAs


Charge Catalog RECID for this Charge

prorate

Yes

Integer

1 or 0

0

1 = Prorate, 0 = Do not Prorate

description

No

String



Description of the Charge

amount

No

Float



Will be used if Charge Catalog does not have a Default Amount set

quantity

No

Integer



Quantity of Charge to be applied

billing_group

No

Integer



RECID of the Billing Group, if applicable

owner_type

No

String

'Contact' or 'Department'


Type of Owner of the Charge

owner

Conditionally

Integer

Contact , Department Hierarchy


RECID of the Owner, *Required if the "owner_type" is provided.

override_amount

No

Float



Amount to override the default amount with, if appplicable.

Results

If the request is successful, the RECID of the GLA Charge will be returned as follows:

{
    status: success,
    page: 1,
    count: 1,
    total_count: 1,
    gla: 2342
}

In the above example, '2342' represents the returned RECID.

GLA Charges Tab App Record

Locating GLA Data

Within PCR-360, these menu options lists a variety of Grids that can be used to help locate any of the required fields.

Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242