Get File

Get file information from the server

GET /api/.../files/{filegrouptype}/{fileId}?fileInfoOnly=true

Returns an object that contains the file information.

FileGroupType return values:

  • Unknown = 0
  • IDList = 1
  • MARC = 2
  • Report = 3
  • Export = 4
  • EDI = 5
  • BulkAddToPO = 6

FileFormatType return values:
  • Unknown = 0
  • CSV = 1
  • Excel = 2
  • TXT = 3
  • MARC = 4
  • ExcelXML = 5

Request Information

Parameters
Name Type Required Description
filegrouptype String Yes File group type values. "Export", "IDList", "MARC", "Report" or "BulkAddToPO"
fileId string Yes Unique ID assigned during upload process.
fileInfoOnly Bool Yes Must be set to 'true'.

Response Information

Example
application/json, text/json
{
  "FileID": "9cb81b2a-ae9c-4ebd-9fd4-29c268dafb8b_xlsx",
  "FileGroupType": 1,
  "FileFormatType": 2,
  "IsExcel": true,
  "ExcelColumnNames": {
    "Sheet1:0": "Sheet1 - Column 1 - PatronID",
    "Sheet2:0": "Sheet2 - Column 1 - MoreBarcodes",
    "Sheet2:1": "Sheet2 - Column 2 - ",
    "Sheet2:2": "Sheet2 - Column 3 - AreTheseBarcodes",
    "Sheet3:0": "Sheet3 - Column 1 - ",
    "Sheet3:1": "Sheet3 - Column 2 - ",
    "Sheet3:2": "Sheet3 - Column 3 - ",
    "Sheet3:3": "Sheet3 - Column 4 -   "
  }
}

HTTP Response Codes

Code Description
200 OK. Success
400 Bad Request. Unable to open file. Check the path and filename.

Get file

GET /api/.../files/{filegrouptype}/{fileId}?fileInfoOnly=false

Returns the raw file data.

Request Information

Parameters
Name Type Required Description
filegrouptype String Yes File group type values. "Export", "IDList", "MARC", "Report" or "BulkAddToPO"
fileId string Yes Unique ID assigned during upload or report creation process.
fileInfoOnly Bool No Defaults to 'false'.

Response Information

Example
text/plain
No matching patron record was found for the following PatronIDs:
1

The following PatronIDs were listed more than once in the external file, and were added only once to the record set:
57781, 11111

The following PatronIDs were already in the record set, and were not added again:
11111, 57781

HTTP Response Codes

Code Description
200 OK. Success
400 Bad Request. Unable to open file. Check the path and filename.

Get file as list of IDs

GET /api/.../files/{filegrouptype}/{fileId}?fileAsIdList=true&locator=

May only be used for IDList file group types. Returns the file data as a list of IDs.

Request Information

Parameters
Name Type Required Description
filegrouptype String Yes File group type values. "IDList"
fileId string Yes Unique ID assigned during upload process.
fileInfoOnly Bool No Defaults to 'false'.
fileAsIdList Bool Yes Must be set to 'true'.
locator String No Typically used when retrieving records from an Excel file. Represents the column identifier (key value) returned from the "Get File Info" method. It is case-sensitive. ie: "Sheet1:0"

Response Information

Example
application/json; charset=utf-8
[
  1,
  57781,
  11111,
  11111,
  57781
]

HTTP Response Codes

Code Description
200 OK. Success
400 Bad Request. Unable to open file. Check the path and filename.