http://github.com/folio-org/mod-invoice
This documents the API calls that can be made to manage batch voucher export configurations
Collection of export-configuration items.
Get list of batch voucher export configurations
GET /batch-voucher/export-configurations
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example format
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
format=="Application/xml"
Returns a list of export-configuration items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of batch voucher export configurations",
"type": "object",
"properties": {
"exportConfigs": {
"description": "an array of batch voucher export configuration records",
"id": "exportConfigs",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
},
"totalRecords": {
"description": "total number of records in the array",
"type": "integer"
}
},
"required": [
"exportConfigs",
"totalRecords"
]
}
Example:
{
"exportConfigs": [
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp://ftp.amherst-lib.edu/invoices/",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
],
"totalRecords": 1
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
unable to list export-configurations -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
unable to list export-configurations -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new export-configuration item.
POST /batch-voucher/export-configurations
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"type": "object",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created export-configuration item
Media type: application/json
Type: any
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"unable to add export-configuration -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
unable to create export-configurations -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve export-configuration item with given {export-configurationId}
GET /batch-voucher/export-configurations/{id}
The UUID of a batch voucher export configuration
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"type": "object",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Item with a given ID not found
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"export-configuration not found"
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete export-configuration item with given {export-configurationId}
DELETE /batch-voucher/export-configurations/{id}
The UUID of a batch voucher export configuration
Item deleted successfully
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"unable to delete export-configuration -- constraint violation"
Item with a given ID not found
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"export-configuration not found"
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update export-configuration item with given {export-configurationId}
PUT /batch-voucher/export-configurations/{id}
The UUID of a batch voucher export configuration
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"type": "object",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Item successfully updated
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"unable to update export-configuration -- malformed JSON at 13:4"
Item with a given ID not found
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"export-configuration not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a credentials record
POST /batch-voucher/export-configurations/{id}/credentials
The UUID of a batch voucher export configuration
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Credentials used to upload batch vouchers. Part of the batch voucher export configuration, but separated for security reasons",
"type": "object",
"properties": {
"id": {
"description": "UUID of this credentials record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"username": {
"description": "The username portion of these credentials",
"type": "string"
},
"password": {
"description": "The password portion of these credentials",
"type": "string"
},
"exportConfigId": {
"description": "UUID of the batch voucher export configuration record these credentials as associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"exportConfigId",
"username"
]
}
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Returns the newly created credentials, with server-controlled fields like 'id' populated
URI to the created credentials
Media type: application/json
Type: any
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to add credentials -- malformed JSON at 13:3
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create credentials -- unauthorized
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Get the credentials for the specified export_configuration
GET /batch-voucher/export-configurations/{id}/credentials
The UUID of a batch voucher export configuration
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Credentials used to upload batch vouchers. Part of the batch voucher export configuration, but separated for security reasons",
"type": "object",
"properties": {
"id": {
"description": "UUID of this credentials record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"username": {
"description": "The username portion of these credentials",
"type": "string"
},
"password": {
"description": "The password portion of these credentials",
"type": "string"
},
"exportConfigId": {
"description": "UUID of the batch voucher export configuration record these credentials as associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"exportConfigId",
"username"
]
}
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
Credentials not found
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Edit a credentials record
PUT /batch-voucher/export-configurations/{id}/credentials
The UUID of a batch voucher export configuration
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Credentials used to upload batch vouchers. Part of the batch voucher export configuration, but separated for security reasons",
"type": "object",
"properties": {
"id": {
"description": "UUID of this credentials record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"username": {
"description": "The username portion of these credentials",
"type": "string"
},
"password": {
"description": "The password portion of these credentials",
"type": "string"
},
"exportConfigId": {
"description": "UUID of the batch voucher export configuration record these credentials as associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"exportConfigId",
"username"
]
}
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
Credentials successfully updated
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to update Credentials -- malformed JSON at 13:4"
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Credentials with a given ID not found
Media type: text/plain
Type: any
Example:
"Voucher not found"
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Test that you can connect to and log into the uploadURI with the configured credentials
POST /batch-voucher/export-configurations/{id}/credentials/test
The UUID of a batch voucher export configuration
Return message from FTP server
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Message with free-form text",
"type": "object",
"properties": {
"message": {
"description": "Free-form text",
"type": "string"
}
},
"additionalProperties": false
}
Example:
{
"message" : "Free-form text"
}