Cougar Cash Charges API

 

Cougar Cash Backend

 

 

More information: https://it.byu.edu
Contact Info: api@byu.edu

 

Base URL: /domains/financials/csgold/v1

Version: 1.0.0

Default request content-types: application/json
Default response content-types: application/json
Schemes: https

Summary

Path Operation Description
/cards/{byuId} GET

Get user summary

/cards/{byuId}/card-info GET

Get user card info

/cards/{byuId}/photo GET

Get user photo

/cards/{byuId}/transactions GET

List transactions

POST

Create a new transaction

/cards/{byuId}/transactions/{referenceId} GET

Get transaction

/locations/{locationId} GET

Get information for a location

/status GET

Get system status

Paths

Get user summary

GET /cards/{byuId}

Tags: Gold
 
         
byuId

Cardholder's BYU ID

path string , must match [0-9]{9} #/parameters/byuId
location_id

Optional Location ID for the location being used. Limits plans to the main plan for the given location, as determined by examining the CS Gold Search Path

query string #/parameters/locationParam
all_plans_for_location

Optional parameter that works together with location_id. Normally, if location_id is passed, only one plan will be looked at for all queries. If this parameter is also passed with a value of true, all plans that can be used at the given location will be returned. In most cases, there will only be one plan, but this exists for those cases where the user has multiple valid plans.

query boolean #/parameters/allPlansForLocation

Uses default content-types: application/json

200 OK

Okay

404 Not Found #/responses/not-found

Not Found

Get user card info

GET /cards/{byuId}/card-info

Tags: Gold
 
         
byuId

Cardholder's BYU ID

path string , must match [0-9]{9} #/parameters/byuId

Uses default content-types: application/json

200 OK

Okay

404 Not Found #/responses/not-found

Not Found

Get user photo

GET /cards/{byuId}/photo

Tags: Gold
 
         
byuId

Cardholder's BYU ID

path string , must match [0-9]{9} #/parameters/byuId

image/*

200 OK

Okay

 
     
Content-Type

The MIME type of the image

string
404 Not Found #/responses/not-found

Not Found

List transactions

GET /cards/{byuId}/transactions

Tags: Gold
 
         
byuId

Cardholder's BYU ID

path string , must match [0-9]{9} #/parameters/byuId
location_id

Optional Location ID for the location being used. Limits plans to the main plan for the given location, as determined by examining the CS Gold Search Path

query string #/parameters/locationParam
all_plans_for_location

Optional parameter that works together with location_id. Normally, if location_id is passed, only one plan will be looked at for all queries. If this parameter is also passed with a value of true, all plans that can be used at the given location will be returned. In most cases, there will only be one plan, but this exists for those cases where the user has multiple valid plans.

query boolean #/parameters/allPlansForLocation
page_size   query integer 100  
page_start   query integer  

Uses default content-types: application/json

200 OK

Okay

404 Not Found #/responses/not-found

Not Found

Create a new transaction

POST /cards/{byuId}/transactions

Tags: Gold
 

Uses default content-types: application/json

         
byuId

Cardholder's BYU ID

path string , must match [0-9]{9} #/parameters/byuId

Uses default content-types: application/json

201 Created

Okay

     
Location

The URL of the newly-created transaction

string
400 Bad Request

Transaction failed to process.

404 Not Found #/responses/not-found

Not Found

409 Conflict

Transaction Already Exists

504 Gateway Timeout

CS Gold timed out before the transaction was processed. This does NOT mean that the transaction will not be successfully processed in the future.

Get transaction

GET /cards/{byuId}/transactions/{referenceId}

Tags: Gold
 
         
byuId

Cardholder's BYU ID

path string , must match [0-9]{9} #/parameters/byuId
referenceId   path string  

Uses default content-types: application/json

200 OK

Okay

404 Not Found #/responses/not-found

Not Found

Get information for a location

GET /locations/{locationId}

Tags: Gold, Location
 
         
locationId   path string  

Uses default content-types: application/json

200 OK

Okay

404 Not Found #/responses/not-found

Not Found

Get system status

GET /status

Tags: Gold

Checks that the application and all of its dependencies are working. Does NOT require authentication. If the system is working properly, a 200 response is returned. If a problem is detected, a 500 response is sent, along with details about the problem. In both cases, information about the application version is returned.

Uses default content-types: application/json

200 OK

Okay

500 Internal Server Error

System is having issues

Parameter definitions

           
locationParam location_id

Optional Location ID for the location being used. Limits plans to the main plan for the given location, as determined by examining the CS Gold Search Path

query string  
allPlansForLocation all_plans_for_location

Optional parameter that works together with location_id. Normally, if location_id is passed, only one plan will be looked at for all queries. If this parameter is also passed with a value of true, all plans that can be used at the given location will be returned. In most cases, there will only be one plan, but this exists for those cases where the user has multiple valid plans.

query boolean  
byuId byuId

Cardholder's BYU ID

path string , must match [0-9]{9}  

Response definitions

not-found

Not Found

Schema definitions

CardInfo: object

issue_number: string , must match [0-9]+
 
lost: boolean
 

CardInfoResponse: object

properties: CardInfo
 
links: object
self: ApiLink
 
user_summary: ApiLink
 

Error: object

code: integer (int32)

The error code. May or may not correspond to an HTTP status code.

 
log_id: string (uuid) , must match ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$

An unique ID that gets sent to the application logs. Send this to the developers to help diagnose the issue.

 
message: string

The error message

 
fields: string[]

For errors related to program inputs, this lists the field(s) that were rejected.

string
 

Location: object

id: string
 
name: string
 
active: boolean
 
physical_location: string
 
client_id: string

The ID of the client system associated with this location. Null if not associated with a client id.

 

LocationResponse: object

properties: Location
 
links: SelfOnlyLinks
 

Name: object

surname: string
 
given_name: string
 

NewTransaction: object

type: string , x ∈ { debit , deposit , refund }

Transaction Type

 
location_id: string

The location from which the transaction originates

 
amount: PlanAmount
 
reference_id: string

Client-supplied unique identifier for this transaction. Must be unique across all of a specific client's transactions.

 
timestamp: string (date-time)

The timestamp of when this transaction was submitted (for offline transactions).

 

PlanAmount: object

dollars: string (number)
 

SvcPlan: object

id: string
 
name: string
 
active: boolean
 
pays_sales_tax: boolean
 
balance_dollars: string (number)
 

SystemStatus: object

happy: boolean
 
messages: string[]
string
 
stage: string
 
version: object
api: string
 
commit: string
 
timestamp: string (date-time)
 

Transaction: object

transaction_id: integer (int64)

Deprecated. Use ledger_transaction_id instead.

 
ledger_transaction_id: integer (int64)
 
success: boolean
 
error_code: integer
 
error_message: string
 
reference_id: string
 
timestamp: string (date-time)
 
location_id: string
 
amount: PlanAmount
 

TransactionList: object

metadata: object
collection_size: integer
 
default_page_size: integer
 
max_page_size: integer
 
page_end: integer
 
page_size: integer
 
page_start: integer
 
values: object[]

TransactionResponse: object

properties: Transaction
 
links: SelfOnlyLinks
 

UserPhoto: object

height: integer (int32)
 
width: integer (int32)
 
image_base64: string (binary)
 
mime_type: string
 

UserPhotoResponse: object

properties: UserPhoto
 
links: object
self: ApiLink
 
user_summary: ApiLink
 

UserSummary: object

byu_id: string , must match [0-9]{9}
 
card_info: CardInfo
 
name: Name
 
svc_plans: object[]
SvcPlan
 

UserSummaryResponse: object

properties: UserSummary
 
links: object
self: ApiLink
 
card_info: ApiLink
 
card_photo: ApiLink
 
transactions: ApiLink
 
create_transaction: ApiLink
 
Service Path: 
/domains/financials/csgold/v1

Community

 

Don't see your question listed here? Ask!