Skip to main content
Skip table of contents

GLA API Calls

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:

SQL
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

Results

CHARGE_CATALOG

Get available Charge Catalogs


Yes

Charger Catalog Results

CONTACTS

Get available Contacts

CTYPE - Type of contact. Example: "worker"

Yes

Contacts Results

DEPTHIER

Get available Departments


No

Departmental Hierarchy Results

Writing GLAs

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

Using POST Calls

  • POST requests will ignore parameters supplied as a query string and need any additional parameters in the request Body.
  • To configure the number of Pages/Results returned by the API (this is most useful for the SQL Endpoint), you can send these as additional Parameter's in the Body.

    Parameter

    Data Type

    Default

    Description

    limit

    Interger

    20

    Number of listings to show.

    page

    Interger

    1

    Page number to show.

  • API fields are not case sensitive, and will always be returned in the lower case format.

UDF parameters are all lower case when processed by PCR-360. Since Organizations can create their own UDF fields, the generic use of IDENTIFIER is used as a placeholder for actual UDF Identifiers.

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 postscript note

*Postscript 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 Users have any questions about how many GLA Components their system has and if the Components are Required, please contact your System Administrator.

Results



GLA Charges

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

No*

Integer



*Conditionally Required if attempting to UPDATE a GLA Charge. RECID column from GLA_CHARGES table.

gla

Yes

Integer



RECID of the GLA for this Charge.

charge_catalog_recid

Yes

Integer

Reading GLAs


Charge Catalog RECID for this Charge.

prorate

No

Integer

1 or 0

0

1 = Prorate, 0 = Do not Prorate. Only allowed if BILL_MRC_CHANGE_FORCE_PRORATE config option is false.

description

No

String



Description of the Charge.

amount

No

Decimal



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

quantity

No

Integer



The quantity of Charge to be applied. Only allowed if Charge Catalog allows it.

start_dateNoString

MRC

ARC


The Start Date of a Charge. YYYY-MM-DD format. Other formats may give unexpected results.

Used for Monthly Recurring Charges and Alternate Recurring Charges.

stop_dateNoString

MRC

ARC


YYYY-MM-DD format. Other formats may give unexpected results.

Used for Monthly Recurring Charges and Alternate Recurring Charges.

recurring_dateNoStringARC

YYYY-MM-DD format. Other formats may give unexpected results.

Used for Alternate Recurring Charges.

transaction_dateNoStringNRC

YYYY-MM-DD format. Other formats may give unexpected results.

Used for Non-Recurring Charges.

billing_group

No

Integer



RECID of the Billing Group, if applicable.

owner_type

Yes

String

'Contact' or 'Department'


Type of Owner of the Charge.

owner

Yes

Integer

Contact, Department Hierarchy


RECID of the Owner.

override_amount

No

Decimal



Amount to override the default amount with, if applicable.

effectiveNoStringtoday, backdatetoday

Effective flag for the charge being added/stopped. if set to any value other than listed, "today" will be assumed by the API.

Alternate Recurring Charges (Quarterly, Semi-Annual, and Annual), when updated will always use backdate as the Effective Date.

Charge Validations

The following checks are made by the API when adding a Charge:

  • Charge Catalog restrictions are not violated
  • Error if the amount is provided and the Catalog does not allow overrides
  • Error if quantity provided for non/quantity Catalogs, also checks for whole numbers/fractional and errors is a fraction
  • Verify Service is billable when adding a Charge
  • Verify there exists an expense GLA that matches the Charge Catalog Expense Type
  • Monthly Recurring Charges
    • start_date is required for new charge
    • error if stop_date is provided for billing complete charges
    • error if stop_date is earlier than start_date
  • Non-Recurrring Charges
    • transaction_date is required for new charge
    • error if stop_date is provided
  • Alternate Recurring Charges (Annual, Semi-Anual, Quarterly)
    • start_date is required for new charge
    • recurring_date is required for new charge
    • error if stop_date is provided for billing complete charges

Results


Locating GLA Data

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.