Vendors (v1)

https://github.com/folio-org/mod-vendors

Table of contents

EDI Jobs

CRUD APIs used to manage EDI jobs.

/vendor-storage/edi-jobs

Collection of edi-job items.

GET /vendor-storage/edi-jobs

Get list of EDI jobs

GET /vendor-storage/edi-jobs
Query Parameters
  • query: (string)

    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 code

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    ["code", "MEDGRANT", "="]
    
  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of edi-job items

Body

Media type: application/json

Type: json

Content:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "collection of EDI job records",
    "type": "object",
    "properties": {
      "edi_jobs": {
        "description": "The list of EDI jobs in this collection",
        "type": "array",
        "id": "edi_jobs",
        "items": {
          "type": "object",
          "$ref": "edi_job.json"
        }
      },
      "total_records": {
        "description": "The number of EDI job records returned in this collection",
        "type": "integer"
      },
      "first": {
        "description": "The index of the first object in the collection",
        "type": "integer"
      },
      "last": {
        "description": "The index of the last object in the collection",
        "type": "integer"
      }
    },
    "additionalProperties": false,
    "required": [
      "edi_jobs",
      "total_records"
    ]
  }
  

Example:

{
    "edi_jobs": [
        {
            "id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
            "schedule_edi": false,
            "date": null,
            "time": null,
            "is_monday": false,
            "is_tuesday": false,
            "is_wednesday": false,
            "is_thursday": false,
            "is_friday": false,
            "is_saturday": false,
            "is_sunday": false,
            "send_to_emails": "email1@site.com, email2@site.com",
            "notify_all_edi": true,
            "notify_invoice_only": true,
            "notify_error_only": false
        }
    ],
    "total_records": 1,
    "first": 1,
    "last": 1
}

Response 400

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.

Body

Media type: text/plain

Type: any

Example:

unable to list edi-jobs -- malformed parameter 'query', syntax error at column 6

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list edi-jobs -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /vendor-storage/edi-jobs

Create a new edi-job item.

POST /vendor-storage/edi-jobs
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A job record for a vendor EDI",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this category",
      "type": ["string", "null"],
      "description": "UUID",
      "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}$"
    },
    "schedule_edi": {
      "description": "The schedule for this EDI job",
      "type": "boolean"
    },
    "date": {
      "description": "The date for this EDI job",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "time": {
      "description": "The time for this EDI job",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "is_monday": {
      "description": "The setting to run this EDI job on Mondays",
      "type": "boolean"
    },
    "is_tuesday": {
      "description": "The setting to run this EDI job on Tuesdays",
      "type": "boolean"
    },
    "is_wednesday": {
      "description": "The setting to run this EDI job on Wednesdays",
      "type": "boolean"
    },
    "is_thursday": {
      "description": "The setting to run this EDI job on Thursdays",
      "type": "boolean"
    },
    "is_friday": {
      "description": "The setting to run this EDI job on Fridays",
      "type": "boolean"
    },
    "is_saturday": {
      "description": "The setting to run this EDI job on Saturdays",
      "type": "boolean"
    },
    "is_sunday": {
      "description": "The setting to run this EDI job on Sundays",
      "type": "boolean"
    },
    "send_to_emails": {
      "description": "The email addresses to notify when this EDI job runs",
      "type": "string"
    },
    "notify_all_edi": {
      "description": "The setting to notify all receivers when this EDI job runs",
      "type": "boolean"
    },
    "notify_invoice_only": {
      "description": "The setting to notify only the invoice receiver when this EDI job runs",
      "type": "boolean"
    },
    "notify_error_only": {
      "description": "The setting to notiry on the error receiver when this EDI job runs",
      "type": "boolean"
    },
    "scheduling_notes": {
      "description": "The schedule notes for this EDI job",
      "type": "string"
    }
  },
  "additionalProperties": false
}

Example:

{
    "schedule_edi": false,
    "date": null,
    "time": null,
    "is_monday": false,
    "is_tuesday": false,
    "is_wednesday": false,
    "is_thursday": false,
    "is_friday": false,
    "is_saturday": false,
    "is_sunday": false,
    "send_to_emails": "email1@site.com, email2@site.com",
    "notify_all_edi": true,
    "notify_invoice_only": true,
    "notify_error_only": false
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created edi-job item

Body

Media type: application/json

Type: any

Example:

{
    "schedule_edi": false,
    "date": null,
    "time": null,
    "is_monday": false,
    "is_tuesday": false,
    "is_wednesday": false,
    "is_thursday": false,
    "is_friday": false,
    "is_saturday": false,
    "is_sunday": false,
    "send_to_emails": "email1@site.com, email2@site.com",
    "notify_all_edi": true,
    "notify_invoice_only": true,
    "notify_error_only": false
}

Response 400

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.

Body

Media type: text/plain

Type: any

Example:

"unable to add edi-job -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create edi-jobs -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /vendor-storage/edi-jobs/{id}

Retrieve edi-job item with given {edi-jobId}

GET /vendor-storage/edi-jobs/{id}
URI Parameters
  • id: required (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}$)

    The UUID of a EDI Job

Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A job record for a vendor EDI",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this category",
      "type": ["string", "null"],
      "description": "UUID",
      "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}$"
    },
    "schedule_edi": {
      "description": "The schedule for this EDI job",
      "type": "boolean"
    },
    "date": {
      "description": "The date for this EDI job",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "time": {
      "description": "The time for this EDI job",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "is_monday": {
      "description": "The setting to run this EDI job on Mondays",
      "type": "boolean"
    },
    "is_tuesday": {
      "description": "The setting to run this EDI job on Tuesdays",
      "type": "boolean"
    },
    "is_wednesday": {
      "description": "The setting to run this EDI job on Wednesdays",
      "type": "boolean"
    },
    "is_thursday": {
      "description": "The setting to run this EDI job on Thursdays",
      "type": "boolean"
    },
    "is_friday": {
      "description": "The setting to run this EDI job on Fridays",
      "type": "boolean"
    },
    "is_saturday": {
      "description": "The setting to run this EDI job on Saturdays",
      "type": "boolean"
    },
    "is_sunday": {
      "description": "The setting to run this EDI job on Sundays",
      "type": "boolean"
    },
    "send_to_emails": {
      "description": "The email addresses to notify when this EDI job runs",
      "type": "string"
    },
    "notify_all_edi": {
      "description": "The setting to notify all receivers when this EDI job runs",
      "type": "boolean"
    },
    "notify_invoice_only": {
      "description": "The setting to notify only the invoice receiver when this EDI job runs",
      "type": "boolean"
    },
    "notify_error_only": {
      "description": "The setting to notiry on the error receiver when this EDI job runs",
      "type": "boolean"
    },
    "scheduling_notes": {
      "description": "The schedule notes for this EDI job",
      "type": "string"
    }
  },
  "additionalProperties": false
}

Example:

{
    "id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
    "schedule_edi": false,
    "date": null,
    "time": null,
    "is_monday": false,
    "is_tuesday": false,
    "is_wednesday": false,
    "is_thursday": false,
    "is_friday": false,
    "is_saturday": false,
    "is_sunday": false,
    "send_to_emails": "email1@site.com, email2@site.com",
    "notify_all_edi": true,
    "notify_invoice_only": true,
    "notify_error_only": false
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"edi-job not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

DELETE /vendor-storage/edi-jobs/{id}

Delete edi-job item with given {edi-jobId}

DELETE /vendor-storage/edi-jobs/{id}
URI Parameters
  • id: required (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}$)

    The UUID of a EDI Job

Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

Response 400

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.

Body

Media type: text/plain

Type: any

Example:

"unable to delete edi-job -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"edi-job not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /vendor-storage/edi-jobs/{id}

Update edi-job item with given {edi-jobId}

PUT /vendor-storage/edi-jobs/{id}
URI Parameters
  • id: required (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}$)

    The UUID of a EDI Job

Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A job record for a vendor EDI",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this category",
      "type": ["string", "null"],
      "description": "UUID",
      "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}$"
    },
    "schedule_edi": {
      "description": "The schedule for this EDI job",
      "type": "boolean"
    },
    "date": {
      "description": "The date for this EDI job",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "time": {
      "description": "The time for this EDI job",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "is_monday": {
      "description": "The setting to run this EDI job on Mondays",
      "type": "boolean"
    },
    "is_tuesday": {
      "description": "The setting to run this EDI job on Tuesdays",
      "type": "boolean"
    },
    "is_wednesday": {
      "description": "The setting to run this EDI job on Wednesdays",
      "type": "boolean"
    },
    "is_thursday": {
      "description": "The setting to run this EDI job on Thursdays",
      "type": "boolean"
    },
    "is_friday": {
      "description": "The setting to run this EDI job on Fridays",
      "type": "boolean"
    },
    "is_saturday": {
      "description": "The setting to run this EDI job on Saturdays",
      "type": "boolean"
    },
    "is_sunday": {
      "description": "The setting to run this EDI job on Sundays",
      "type": "boolean"
    },
    "send_to_emails": {
      "description": "The email addresses to notify when this EDI job runs",
      "type": "string"
    },
    "notify_all_edi": {
      "description": "The setting to notify all receivers when this EDI job runs",
      "type": "boolean"
    },
    "notify_invoice_only": {
      "description": "The setting to notify only the invoice receiver when this EDI job runs",
      "type": "boolean"
    },
    "notify_error_only": {
      "description": "The setting to notiry on the error receiver when this EDI job runs",
      "type": "boolean"
    },
    "scheduling_notes": {
      "description": "The schedule notes for this EDI job",
      "type": "string"
    }
  },
  "additionalProperties": false
}

Example:

{
    "id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
    "schedule_edi": false,
    "date": null,
    "time": null,
    "is_monday": false,
    "is_tuesday": false,
    "is_wednesday": false,
    "is_thursday": false,
    "is_friday": false,
    "is_saturday": false,
    "is_sunday": false,
    "send_to_emails": "email1@site.com, email2@site.com",
    "notify_all_edi": true,
    "notify_invoice_only": true,
    "notify_error_only": false
}

Response 204

Item successfully updated

Response 400

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.

Body

Media type: text/plain

Type: any

Example:

"unable to update edi-job -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"edi-job not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator