Organizations (v1.0)

https://github.com/folio-org/mod-organizations-storage

Table of contents

Organizations

CRUD APIs used to manage organizations.

/organizations-storage/organizations

Collection of organization items.

GET /organizations-storage/organizations

Get list of organizations

GET /organizations-storage/organizations
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 organization items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of organization records",
  "type": "object",
  "properties": {
    "organizations": {
      "description": "The list of organizations in this collection",
      "type": "array",
      "id": "organizationData",
      "items": {
        "type": "object",
        "$ref": "organization.json"
      }
    },
    "totalRecords": {
      "description": "The number of organization records returned in this collection",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "organizations",
    "totalRecords"
  ]
}

Example:

{
  "organizations": [
    {
      "id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
      "name": "GOBI",
      "code": "AQ-GOBI",
      "description": "This is Yankee Book Peddler.",
      "status": "Active",
      "language": "en-us",
      "isVendor": true,
      "aliases": [
        {
          "value": "YBP",
          "description": "AKA"
        },
        {
          "value": "Yankee Book Peddler",
          "description": "Formerly known as"
        }
      ],
      "addresses": [
        {
            "addressLine1": "10 Estes Street",
            "addressLine2": "",
            "city": "Ipswich",
            "stateRegion": "MA",
            "zipCode": "01938",
            "country": "USA",
            "categories": [
              "0e3f9680-ab06-4565-af64-609b7364e6eb",
              "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
              "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
              "56288fe8-8037-44da-8395-01d2d106dc54"
            ],
            "language": "en"
        }
      ],
      "phoneNumbers": [
        {
          "phoneNumber": "19789999999",
          "categories": [
            "0e3f9680-ab06-4565-af64-609b7364e6eb",
            "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
          ],
          "language": "en-us"
        }
      ],
      "emails": [
        {
          "value": "noreply@folio.org",
          "description": "Main",
          "categories": [	
            "112ae2e4-88ae-4fa5-a75b-2379d2035e52",	
            "56288fe8-8037-44da-8395-01d2d106dc54"	
          ],
          "language": "en-us"
        }
      ],
      "urls": [
        {
          "value": "http://folio.org",
          "description": "",
          "language": "en-us",
          "categories": [	
            "112ae2e4-88ae-4fa5-a75b-2379d2035e52",	
            "56288fe8-8037-44da-8395-01d2d106dc54"	
          ],
          "notes": "note"
        }
      ],
      "contacts": [
        "9a665b22-9fe5-4c95-b4ee-837a5433c95d"
      ],
      "agreements": [
        {
          "name": "History Follower Incentive",
          "discount": 10,
          "referenceUrl": "http://my_sample_agreement.com",
          "notes": "note"
        }
      ],
      "erpCode": "AQ-GOBI-HIST",
      "paymentMethod": "EFT",
      "accessProvider": true,
      "governmental": true,
      "licensor": true,
      "materialSupplier": true,
      "vendorCurrencies": [
        "USD",
        "CAD",
        "GBP"
      ],
      "claimingInterval": 30,
      "discountPercent": 10,
      "expectedActivationInterval": 1,
      "expectedInvoiceInterval": 5,
      "renewalActivationInterval": 1,
      "subscriptionInterval": 365,
      "liableForVat": false,
      "taxId": "TX-GOBI-HIST",
      "taxPercentage": 5,
      "edi": {
        "vendorEdiCode": "AQ-GOBI-HIST",
        "vendorEdiType": "014/EAN",
        "libEdiCode": "MY-LIB-1",
        "libEdiType": "014/EAN",
        "prorateTax": true,
        "prorateFees": true,
        "ediNamingConvention": "name",
        "sendAcctNum": true,
        "supportOrder": true,
        "supportInvoice": true,
        "notes": "",
        "ediFtp": {
          "ftpFormat": "SFTP",
          "serverAddress": "http://127.0.0.1",
          "username": "edi_username",
          "password": "edi_password",
          "ftpMode": "ASCII",
          "ftpConnMode": "Active",
          "ftpPort": 22,
          "orderDirectory": "/path/to/order/directory",
          "invoiceDirectory": "/path/to/invoice/directory",
          "notes": "My FTP notes"
        },
        "ediJob": {
          "scheduleEdi": false,
          "schedulingDate": null,
          "time": null,
          "isMonday": false,
          "isTuesday": false,
          "isWednesday": false,
          "isThursday": false,
          "isFriday": false,
          "isSaturday": false,
          "isSunday": false,
          "sendToEmails": "email1@site.com, email2@site.com",
          "notifyAllEdi": true,
          "notifyInvoiceOnly": true,
          "notifyErrorOnly": false
        }
      },
      "interfaces": [
        "9fc51738-e12a-4049-88dd-eb82b45da292",
        "588b5c42-8634-4af7-bc9b-5e0116ed96b6"
      ],
      "accounts": [
        {
          "name": "History Account",
          "accountNo": "GOBI-HIST-12",
          "description": "This is my account description.",
          "appSystemNo": "FIN-GOBI-HIST-12",
          "paymentMethod": "EFT",
          "accountStatus": "Active",
          "contactInfo": "Some basic contact information note.",
          "libraryCode": "My Library",
          "libraryEdiCode": "MY-LIB-1",
          "notes": "note"
        }
      ],
      "changelogs": [
        {
          "description": "This is a sample note.",
          "timestamp": "2008-05-15T03:53:00-07:00"
        }
      ]
    }
  ],
  "totalRecords": 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 organizations -- 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 organizations -- unauthorized

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /organizations-storage/organizations

Create a new organization item.

POST /organizations-storage/organizations
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": "The record of an organization",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique UUID for this organization",
      "type": ["string", "null"],
      "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}$"
    },
    "name": {
      "description": "The name of this organization",
      "type": "string"
    },
    "code": {
      "description": "The code for this organization",
      "type": "string"
    },
    "description": {
      "description": "The description for this organization",
      "type": "string"
    },
    "status": {
      "description": "The status of this organization",
      "type": "string",
      "enum": [
        "Active",
        "Inactive",
        "Pending"
      ]
    },
    "language": {
      "description": "The language for this organization",
      "type": "string"
    },
    "aliases": {
      "id": "aliases",
      "description": "The list of aliases for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "alias.json"
      }
    },
    "addresses": {
      "id": "addresses",
      "description": "The list of addresses for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "address.json"
      }
    },
    "phoneNumbers": {
      "id": "phoneNumbers",
      "description": "The list of phone numbers for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "phone_number.json"
      }
    },
    "emails": {
      "id": "emailAddresses",
      "description": "The list of emails for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "email.json"
      }
    },
    "urls": {
      "id": "urls",
      "description": "The list of URLs for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "url.json"
      }
    },
    "contacts": {
      "id": "contact",
      "description": "An array of contact record IDs",
      "type": "array",
      "items": {
        "description": "UUID of a contact record",
        "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}$"
      }
    },
    "agreements": {
      "id": "agreement",
      "description": "The the list of agreements for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "agreement.json"
      }
    },
    "erpCode": {
      "description": "The ERP code for this organization",
      "type": "string"
    },
    "paymentMethod": {
      "description": "The payment method for this organization",
      "type": "string"
    },
    "accessProvider": {
      "description": "The access provider for this organization",
      "type": "boolean"
    },
    "governmental": {
      "description": "The setting to mark this organization as governmental",
      "type": "boolean"
    },
    "licensor": {
      "description": "The setting to mark this organization as a licensor",
      "type": "boolean"
    },
    "materialSupplier": {
      "description": "The setting to mark this organization as a material supplier",
      "type": "boolean"
    },
    "vendorCurrencies": {
      "id": "vendorCurrencies",
      "description": "The list of currencies used by this organization",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "claimingInterval": {
      "description": "The claim interval for this organization",
      "type": "integer"
    },
    "discountPercent": {
      "description": "The discount percentage for this organization",
      "type": "number"
    },
    "expectedActivationInterval": {
      "description": "The expected activation interval (in days) for this organization",
      "type": "integer"
    },
    "expectedInvoiceInterval": {
      "description": "The expected invoice interval (in days) for this organization",
      "type": "integer"
    },
    "renewalActivationInterval": {
      "description": "The revewal activation interval (in days) for this organization",
      "type": "integer"
    },
    "subscriptionInterval": {
      "description": "The subscription interval (in days) for this organization",
      "type": "integer"
    },
    "expectedReceiptInterval": {
      "description": "The receipt interval (in days) for this organization",
      "type": "integer"
    },
    "taxId": {
      "description": "The tax ID for this organization",
      "type": "string"
    },
    "liableForVat": {
      "description": "The setting to mark this organization liable to collect VAT",
      "type": "boolean"
    },
    "taxPercentage": {
      "description": "The tax percentage value for this organization",
      "type": "number"
    },
    "edi": {
      "description": "The EDI object for this organization (only applicable when isVendor is true)",
      "type": "object",
      "properties": {
        "vendorEdiCode": {
          "description": "The organization code for this EDI",
          "type": "string"
        },
        "vendorEdiType": {
          "description": "The organization type for this EDI",
          "type": "string",
          "enum": [
            "014/EAN",
            "31B/US-SAN",
            "091/Vendor-assigned",
            "092/Customer-assigned"
          ]
        },
        "libEdiCode": {
          "description": "The library code for this EDI",
          "type": "string"
        },
        "libEdiType": {
          "description": "The library type for this EDI",
          "type": "string",
          "enum": [
            "014/EAN",
            "31B/US-SAN",
            "091/Vendor-assigned",
            "092/Customer-assigned"
          ]
        },
        "prorateTax": {
          "description": "The setting to prorate tax for this EDI",
          "type": "boolean"
        },
        "prorateFees": {
          "description": "The setting to prorate fees for this EDI",
          "type": "boolean"
        },
        "ediNamingConvention": {
          "description": "The naming convention for this EDI",
          "type": "string"
        },
        "sendAcctNum": {
          "description": "The setting to send the account number for this EDI",
          "type": "boolean"
        },
        "supportOrder": {
          "description": "The setting to support order for this EDI",
          "type": "boolean"
        },
        "supportInvoice": {
          "description": "The setting to support invoice for this EDI",
          "type": "boolean"
        },
        "notes": {
          "description": "The notes for this EDI",
          "type": "string"
        },
        "ediFtp": {
          "description": "The FTP object for this EDI",
          "type": "object",
          "properties": {
            "ftpFormat": {
              "description": "The FTP format for this EDI",
              "type": "string",
              "enum": [
                "SFTP",
                "FTP"
              ]
            },
            "serverAddress": {
              "description": "The server address for this EDI",
              "type": ["string", "null"],
              "pattern": "^$|(([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$)"
            },
            "username": {
              "description": "The login username for this EDI",
              "type": "string"
            },
            "password": {
              "description": "The login password for this EDI",
              "type": "string"
            },
            "ftpMode": {
              "description": "The FTP mode for this EDI",
              "type": "string",
              "enum": [
                "ASCII",
                "Binary"
              ]
            },
            "ftpConnMode": {
              "description": "The FTP connection mode for this EDI",
              "type": "string",
              "enum": [
                "Active",
                "Passive"
              ]
            },
            "ftpPort": {
              "description": "The port for this EDI",
              "type": "integer"
            },
            "orderDirectory": {
              "description": "The order directory for this EDI",
              "type": "string"
            },
            "invoiceDirectory": {
              "description": "The invoice directory for this EDI",
              "type": "string"
            },
            "notes": {
              "description": "The notes for this EDI",
              "type": "string"
            }
          }
        },
        "ediJob": {
          "description": "The job object for this EDI",
          "type": "object",
          "properties": {
            "scheduleEdi": {
              "description": "Activate the schedule for this EDI job",
              "type": "boolean"
            },
            "schedulingDate": {
              "description": "The date (MM/DD/YYYY) for this EDI job to start running",
              "type": ["string", "null"],
              "format": "date-time"
            },
            "time": {
              "description": "The time (h:mm A) for this EDI job",
              "type": ["string", "null"],
              "format": "time"
            },
            "isMonday": {
              "description": "The setting to run this EDI job on Mondays",
              "type": "boolean"
            },
            "isTuesday": {
              "description": "The setting to run this EDI job on Tuesdays",
              "type": "boolean"
            },
            "isWednesday": {
              "description": "The setting to run this EDI job on Wednesdays",
              "type": "boolean"
            },
            "isThursday": {
              "description": "The setting to run this EDI job on Thursdays",
              "type": "boolean"
            },
            "isFriday": {
              "description": "The setting to run this EDI job on Fridays",
              "type": "boolean"
            },
            "isSaturday": {
              "description": "The setting to run this EDI job on Saturdays",
              "type": "boolean"
            },
            "isSunday": {
              "description": "The setting to run this EDI job on Sundays",
              "type": "boolean"
            },
            "sendToEmails": {
              "description": "The comma delimited list of email addresses to notify when this EDI job runs",
              "type": "string"
            },
            "notifyAllEdi": {
              "description": "The setting to notify all receivers when this EDI job runs",
              "type": "boolean"
            },
            "notifyInvoiceOnly": {
              "description": "The setting to notify only the invoice receiver when this EDI job runs",
              "type": "boolean"
            },
            "notifyErrorOnly": {
              "description": "The setting to notiry on the error receiver when this EDI job runs",
              "type": "boolean"
            },
            "schedulingNotes": {
              "description": "The schedule notes for this EDI job",
              "type": "string"
            }
          }
        }
      }
    },
    "interfaces": {
      "id": "interfaces",
      "description": "The list of interfaces assigned to this organization",
      "type": "array",
      "items": {
        "description": "UUID of an interface record",
        "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}$"
      }
    },
    "accounts": {
      "id": "accounts",
      "description": "The list of accounts for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "account.json"
      }
    },
    "isVendor": {
      "id": "isVendor",
      "description": "Used to indicate that this organization is also a vendor",
      "type": "boolean"
    },
    "sanCode": {
      "description": "The SAN code for this organization address",
      "type": "string"
    },
    "changelogs": {
      "id": "changelogs",
      "description": "The list of changes applied to this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "changelog.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "status"
  ]
}

Example:

{
  "id": null,
  "name": "GOBI",
  "code": "AQ-GOBI",
  "description": "This is Yankee Book Peddler.",
  "status": "Active",
  "language": "en-us",
  "isVendor": true,
  "sanCode": "1234567",
  "aliases": [
    {
      "value": "YBP",
      "description": "AKA"
    },
    {
      "value": "Yankee Book Peddler",
      "description": "Formerly known as"
    }
  ],
  "addresses": [
    {
      "addressLine1": "10 Estes Street",
      "addressLine2": "",
      "city": "Ipswich",
      "stateRegion": "MA",
      "zipCode": "01938",
      "country": "USA",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en"
    }
  ],
  "phoneNumbers": [
    {
      "phoneNumber": "19789999999",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
      ],
      "language": "en-us"
    }
  ],
  "emails": [
    {
      "value": "noreply@folio.org",
      "description": "Main",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en-us"
    }
  ],
  "urls": [
    {
      "value": "noreply@folio.org",
      "description": "corporate",
      "language": "en-us",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "notes": "note"
    }
  ],
  "contacts": [
    "9a665b22-9fe5-4c95-b4ee-837a5433c95d"
  ],
  "agreements": [
    {
      "name": "History Follower Incentive",
      "discount": 10,
      "referenceUrl": "http://my_sample_agreement.com",
      "notes": "note"
    }
  ],
  "erpCode": "AQ-GOBI-HIST",
  "paymentMethod": "EFT",
  "accessProvider": true,
  "governmental": true,
  "licensor": true,
  "materialSupplier": true,
  "vendorCurrencies": [
    "USD",
    "CAD",
    "GBP"
  ],
  "claimingInterval": 30,
  "discountPercent": 10,
  "expectedActivationInterval": 1,
  "expectedInvoiceInterval": 5,
  "renewalActivationInterval": 1,
  "subscriptionInterval": 365,
  "expectedReceiptInterval": 1,
  "liableForVat": false,
  "taxId": "TX-GOBI-HIST",
  "taxPercentage": 5,
  "edi": {
    "vendorEdiCode": "AQ-GOBI-HIST",
    "vendorEdiType": "014/EAN",
    "libEdiCode": "MY-LIB-1",
    "libEdiType": "014/EAN",
    "prorateTax": true,
    "prorateFees": true,
    "ediNamingConvention": "",
    "sendAcctNum": true,
    "supportOrder": true,
    "supportInvoice": true,
    "notes": "",
    "ediFtp": {
      "ftpFormat": "SFTP",
      "serverAddress": "http://127.0.0.1",
      "username": "edi_username",
      "password": "edi_password",
      "ftpMode": "ASCII",
      "ftpConnMode": "Active",
      "ftpPort": 22,
      "orderDirectory": "/path/to/order/directory",
      "invoiceDirectory": "/path/to/invoice/directory",
      "notes": "My FTP notes"
    },
    "ediJob": {
      "scheduleEdi": false,
      "schedulingDate": null,
      "time": null,
      "isMonday": false,
      "isTuesday": false,
      "isWednesday": false,
      "isThursday": false,
      "isFriday": false,
      "isSaturday": false,
      "isSunday": false,
      "sendToEmails": "email1@site.com, email2@site.com",
      "notifyAllEdi": true,
      "notifyInvoiceOnly": true,
      "notifyErrorOnly": false
    }
  },
  "interfaces": [
    "9fc51738-e12a-4049-88dd-eb82b45da292",
    "588b5c42-8634-4af7-bc9b-5e0116ed96b6"
  ],
  "accounts": [
    {
      "name": "History Account",
      "accountNo": "GOBI-HIST-12",
      "description": "This is my account description.",
      "appSystemNo": "FIN-GOBI-HIST-12",
      "paymentMethod": "EFT",
      "accountStatus": "Active",
      "contactInfo": "Some basic contact information note.",
      "libraryCode": "My Library",
      "libraryEdiCode": "MY-LIB-1",
      "notes": "note"
    }
  ],
  "changelogs": [
    {
      "description": "This is a sample note.",
      "timestamp": "2008-05-15T03:53:00-07:00"
    }
  ]
}

Response 201

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

Headers
  • Location: required (string)

    URI to the created organization item

Body

Media type: application/json

Type: any

Example:

{
  "id": null,
  "name": "GOBI",
  "code": "AQ-GOBI",
  "description": "This is Yankee Book Peddler.",
  "status": "Active",
  "language": "en-us",
  "isVendor": true,
  "sanCode": "1234567",
  "aliases": [
    {
      "value": "YBP",
      "description": "AKA"
    },
    {
      "value": "Yankee Book Peddler",
      "description": "Formerly known as"
    }
  ],
  "addresses": [
    {
      "addressLine1": "10 Estes Street",
      "addressLine2": "",
      "city": "Ipswich",
      "stateRegion": "MA",
      "zipCode": "01938",
      "country": "USA",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en"
    }
  ],
  "phoneNumbers": [
    {
      "phoneNumber": "19789999999",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
      ],
      "language": "en-us"
    }
  ],
  "emails": [
    {
      "value": "noreply@folio.org",
      "description": "Main",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en-us"
    }
  ],
  "urls": [
    {
      "value": "noreply@folio.org",
      "description": "corporate",
      "language": "en-us",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "notes": "note"
    }
  ],
  "contacts": [
    "9a665b22-9fe5-4c95-b4ee-837a5433c95d"
  ],
  "agreements": [
    {
      "name": "History Follower Incentive",
      "discount": 10,
      "referenceUrl": "http://my_sample_agreement.com",
      "notes": "note"
    }
  ],
  "erpCode": "AQ-GOBI-HIST",
  "paymentMethod": "EFT",
  "accessProvider": true,
  "governmental": true,
  "licensor": true,
  "materialSupplier": true,
  "vendorCurrencies": [
    "USD",
    "CAD",
    "GBP"
  ],
  "claimingInterval": 30,
  "discountPercent": 10,
  "expectedActivationInterval": 1,
  "expectedInvoiceInterval": 5,
  "renewalActivationInterval": 1,
  "subscriptionInterval": 365,
  "expectedReceiptInterval": 1,
  "liableForVat": false,
  "taxId": "TX-GOBI-HIST",
  "taxPercentage": 5,
  "edi": {
    "vendorEdiCode": "AQ-GOBI-HIST",
    "vendorEdiType": "014/EAN",
    "libEdiCode": "MY-LIB-1",
    "libEdiType": "014/EAN",
    "prorateTax": true,
    "prorateFees": true,
    "ediNamingConvention": "",
    "sendAcctNum": true,
    "supportOrder": true,
    "supportInvoice": true,
    "notes": "",
    "ediFtp": {
      "ftpFormat": "SFTP",
      "serverAddress": "http://127.0.0.1",
      "username": "edi_username",
      "password": "edi_password",
      "ftpMode": "ASCII",
      "ftpConnMode": "Active",
      "ftpPort": 22,
      "orderDirectory": "/path/to/order/directory",
      "invoiceDirectory": "/path/to/invoice/directory",
      "notes": "My FTP notes"
    },
    "ediJob": {
      "scheduleEdi": false,
      "schedulingDate": null,
      "time": null,
      "isMonday": false,
      "isTuesday": false,
      "isWednesday": false,
      "isThursday": false,
      "isFriday": false,
      "isSaturday": false,
      "isSunday": false,
      "sendToEmails": "email1@site.com, email2@site.com",
      "notifyAllEdi": true,
      "notifyInvoiceOnly": true,
      "notifyErrorOnly": false
    }
  },
  "interfaces": [
    "9fc51738-e12a-4049-88dd-eb82b45da292",
    "588b5c42-8634-4af7-bc9b-5e0116ed96b6"
  ],
  "accounts": [
    {
      "name": "History Account",
      "accountNo": "GOBI-HIST-12",
      "description": "This is my account description.",
      "appSystemNo": "FIN-GOBI-HIST-12",
      "paymentMethod": "EFT",
      "accountStatus": "Active",
      "contactInfo": "Some basic contact information note.",
      "libraryCode": "My Library",
      "libraryEdiCode": "MY-LIB-1",
      "notes": "note"
    }
  ],
  "changelogs": [
    {
      "description": "This is a sample note.",
      "timestamp": "2008-05-15T03:53:00-07:00"
    }
  ]
}

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 organization -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create organizations -- unauthorized

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /organizations-storage/organizations/{id}

Update organization with 'organization_id'

PUT /organizations-storage/organizations/{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 Organization

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": "The record of an organization",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique UUID for this organization",
      "type": ["string", "null"],
      "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}$"
    },
    "name": {
      "description": "The name of this organization",
      "type": "string"
    },
    "code": {
      "description": "The code for this organization",
      "type": "string"
    },
    "description": {
      "description": "The description for this organization",
      "type": "string"
    },
    "status": {
      "description": "The status of this organization",
      "type": "string",
      "enum": [
        "Active",
        "Inactive",
        "Pending"
      ]
    },
    "language": {
      "description": "The language for this organization",
      "type": "string"
    },
    "aliases": {
      "id": "aliases",
      "description": "The list of aliases for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "alias.json"
      }
    },
    "addresses": {
      "id": "addresses",
      "description": "The list of addresses for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "address.json"
      }
    },
    "phoneNumbers": {
      "id": "phoneNumbers",
      "description": "The list of phone numbers for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "phone_number.json"
      }
    },
    "emails": {
      "id": "emailAddresses",
      "description": "The list of emails for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "email.json"
      }
    },
    "urls": {
      "id": "urls",
      "description": "The list of URLs for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "url.json"
      }
    },
    "contacts": {
      "id": "contact",
      "description": "An array of contact record IDs",
      "type": "array",
      "items": {
        "description": "UUID of a contact record",
        "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}$"
      }
    },
    "agreements": {
      "id": "agreement",
      "description": "The the list of agreements for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "agreement.json"
      }
    },
    "erpCode": {
      "description": "The ERP code for this organization",
      "type": "string"
    },
    "paymentMethod": {
      "description": "The payment method for this organization",
      "type": "string"
    },
    "accessProvider": {
      "description": "The access provider for this organization",
      "type": "boolean"
    },
    "governmental": {
      "description": "The setting to mark this organization as governmental",
      "type": "boolean"
    },
    "licensor": {
      "description": "The setting to mark this organization as a licensor",
      "type": "boolean"
    },
    "materialSupplier": {
      "description": "The setting to mark this organization as a material supplier",
      "type": "boolean"
    },
    "vendorCurrencies": {
      "id": "vendorCurrencies",
      "description": "The list of currencies used by this organization",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "claimingInterval": {
      "description": "The claim interval for this organization",
      "type": "integer"
    },
    "discountPercent": {
      "description": "The discount percentage for this organization",
      "type": "number"
    },
    "expectedActivationInterval": {
      "description": "The expected activation interval (in days) for this organization",
      "type": "integer"
    },
    "expectedInvoiceInterval": {
      "description": "The expected invoice interval (in days) for this organization",
      "type": "integer"
    },
    "renewalActivationInterval": {
      "description": "The revewal activation interval (in days) for this organization",
      "type": "integer"
    },
    "subscriptionInterval": {
      "description": "The subscription interval (in days) for this organization",
      "type": "integer"
    },
    "expectedReceiptInterval": {
      "description": "The receipt interval (in days) for this organization",
      "type": "integer"
    },
    "taxId": {
      "description": "The tax ID for this organization",
      "type": "string"
    },
    "liableForVat": {
      "description": "The setting to mark this organization liable to collect VAT",
      "type": "boolean"
    },
    "taxPercentage": {
      "description": "The tax percentage value for this organization",
      "type": "number"
    },
    "edi": {
      "description": "The EDI object for this organization (only applicable when isVendor is true)",
      "type": "object",
      "properties": {
        "vendorEdiCode": {
          "description": "The organization code for this EDI",
          "type": "string"
        },
        "vendorEdiType": {
          "description": "The organization type for this EDI",
          "type": "string",
          "enum": [
            "014/EAN",
            "31B/US-SAN",
            "091/Vendor-assigned",
            "092/Customer-assigned"
          ]
        },
        "libEdiCode": {
          "description": "The library code for this EDI",
          "type": "string"
        },
        "libEdiType": {
          "description": "The library type for this EDI",
          "type": "string",
          "enum": [
            "014/EAN",
            "31B/US-SAN",
            "091/Vendor-assigned",
            "092/Customer-assigned"
          ]
        },
        "prorateTax": {
          "description": "The setting to prorate tax for this EDI",
          "type": "boolean"
        },
        "prorateFees": {
          "description": "The setting to prorate fees for this EDI",
          "type": "boolean"
        },
        "ediNamingConvention": {
          "description": "The naming convention for this EDI",
          "type": "string"
        },
        "sendAcctNum": {
          "description": "The setting to send the account number for this EDI",
          "type": "boolean"
        },
        "supportOrder": {
          "description": "The setting to support order for this EDI",
          "type": "boolean"
        },
        "supportInvoice": {
          "description": "The setting to support invoice for this EDI",
          "type": "boolean"
        },
        "notes": {
          "description": "The notes for this EDI",
          "type": "string"
        },
        "ediFtp": {
          "description": "The FTP object for this EDI",
          "type": "object",
          "properties": {
            "ftpFormat": {
              "description": "The FTP format for this EDI",
              "type": "string",
              "enum": [
                "SFTP",
                "FTP"
              ]
            },
            "serverAddress": {
              "description": "The server address for this EDI",
              "type": ["string", "null"],
              "pattern": "^$|(([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$)"
            },
            "username": {
              "description": "The login username for this EDI",
              "type": "string"
            },
            "password": {
              "description": "The login password for this EDI",
              "type": "string"
            },
            "ftpMode": {
              "description": "The FTP mode for this EDI",
              "type": "string",
              "enum": [
                "ASCII",
                "Binary"
              ]
            },
            "ftpConnMode": {
              "description": "The FTP connection mode for this EDI",
              "type": "string",
              "enum": [
                "Active",
                "Passive"
              ]
            },
            "ftpPort": {
              "description": "The port for this EDI",
              "type": "integer"
            },
            "orderDirectory": {
              "description": "The order directory for this EDI",
              "type": "string"
            },
            "invoiceDirectory": {
              "description": "The invoice directory for this EDI",
              "type": "string"
            },
            "notes": {
              "description": "The notes for this EDI",
              "type": "string"
            }
          }
        },
        "ediJob": {
          "description": "The job object for this EDI",
          "type": "object",
          "properties": {
            "scheduleEdi": {
              "description": "Activate the schedule for this EDI job",
              "type": "boolean"
            },
            "schedulingDate": {
              "description": "The date (MM/DD/YYYY) for this EDI job to start running",
              "type": ["string", "null"],
              "format": "date-time"
            },
            "time": {
              "description": "The time (h:mm A) for this EDI job",
              "type": ["string", "null"],
              "format": "time"
            },
            "isMonday": {
              "description": "The setting to run this EDI job on Mondays",
              "type": "boolean"
            },
            "isTuesday": {
              "description": "The setting to run this EDI job on Tuesdays",
              "type": "boolean"
            },
            "isWednesday": {
              "description": "The setting to run this EDI job on Wednesdays",
              "type": "boolean"
            },
            "isThursday": {
              "description": "The setting to run this EDI job on Thursdays",
              "type": "boolean"
            },
            "isFriday": {
              "description": "The setting to run this EDI job on Fridays",
              "type": "boolean"
            },
            "isSaturday": {
              "description": "The setting to run this EDI job on Saturdays",
              "type": "boolean"
            },
            "isSunday": {
              "description": "The setting to run this EDI job on Sundays",
              "type": "boolean"
            },
            "sendToEmails": {
              "description": "The comma delimited list of email addresses to notify when this EDI job runs",
              "type": "string"
            },
            "notifyAllEdi": {
              "description": "The setting to notify all receivers when this EDI job runs",
              "type": "boolean"
            },
            "notifyInvoiceOnly": {
              "description": "The setting to notify only the invoice receiver when this EDI job runs",
              "type": "boolean"
            },
            "notifyErrorOnly": {
              "description": "The setting to notiry on the error receiver when this EDI job runs",
              "type": "boolean"
            },
            "schedulingNotes": {
              "description": "The schedule notes for this EDI job",
              "type": "string"
            }
          }
        }
      }
    },
    "interfaces": {
      "id": "interfaces",
      "description": "The list of interfaces assigned to this organization",
      "type": "array",
      "items": {
        "description": "UUID of an interface record",
        "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}$"
      }
    },
    "accounts": {
      "id": "accounts",
      "description": "The list of accounts for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "account.json"
      }
    },
    "isVendor": {
      "id": "isVendor",
      "description": "Used to indicate that this organization is also a vendor",
      "type": "boolean"
    },
    "sanCode": {
      "description": "The SAN code for this organization address",
      "type": "string"
    },
    "changelogs": {
      "id": "changelogs",
      "description": "The list of changes applied to this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "changelog.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "status"
  ]
}

Example:

{
  "id": null,
  "name": "GOBI",
  "code": "AQ-GOBI",
  "description": "This is Yankee Book Peddler.",
  "status": "Active",
  "language": "en-us",
  "isVendor": true,
  "sanCode": "1234567",
  "aliases": [
    {
      "value": "YBP",
      "description": "AKA"
    },
    {
      "value": "Yankee Book Peddler",
      "description": "Formerly known as"
    }
  ],
  "addresses": [
    {
      "addressLine1": "10 Estes Street",
      "addressLine2": "",
      "city": "Ipswich",
      "stateRegion": "MA",
      "zipCode": "01938",
      "country": "USA",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en"
    }
  ],
  "phoneNumbers": [
    {
      "phoneNumber": "19789999999",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
      ],
      "language": "en-us"
    }
  ],
  "emails": [
    {
      "value": "noreply@folio.org",
      "description": "Main",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en-us"
    }
  ],
  "urls": [
    {
      "value": "noreply@folio.org",
      "description": "corporate",
      "language": "en-us",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "notes": "note"
    }
  ],
  "contacts": [
    "9a665b22-9fe5-4c95-b4ee-837a5433c95d"
  ],
  "agreements": [
    {
      "name": "History Follower Incentive",
      "discount": 10,
      "referenceUrl": "http://my_sample_agreement.com",
      "notes": "note"
    }
  ],
  "erpCode": "AQ-GOBI-HIST",
  "paymentMethod": "EFT",
  "accessProvider": true,
  "governmental": true,
  "licensor": true,
  "materialSupplier": true,
  "vendorCurrencies": [
    "USD",
    "CAD",
    "GBP"
  ],
  "claimingInterval": 30,
  "discountPercent": 10,
  "expectedActivationInterval": 1,
  "expectedInvoiceInterval": 5,
  "renewalActivationInterval": 1,
  "subscriptionInterval": 365,
  "expectedReceiptInterval": 1,
  "liableForVat": false,
  "taxId": "TX-GOBI-HIST",
  "taxPercentage": 5,
  "edi": {
    "vendorEdiCode": "AQ-GOBI-HIST",
    "vendorEdiType": "014/EAN",
    "libEdiCode": "MY-LIB-1",
    "libEdiType": "014/EAN",
    "prorateTax": true,
    "prorateFees": true,
    "ediNamingConvention": "",
    "sendAcctNum": true,
    "supportOrder": true,
    "supportInvoice": true,
    "notes": "",
    "ediFtp": {
      "ftpFormat": "SFTP",
      "serverAddress": "http://127.0.0.1",
      "username": "edi_username",
      "password": "edi_password",
      "ftpMode": "ASCII",
      "ftpConnMode": "Active",
      "ftpPort": 22,
      "orderDirectory": "/path/to/order/directory",
      "invoiceDirectory": "/path/to/invoice/directory",
      "notes": "My FTP notes"
    },
    "ediJob": {
      "scheduleEdi": false,
      "schedulingDate": null,
      "time": null,
      "isMonday": false,
      "isTuesday": false,
      "isWednesday": false,
      "isThursday": false,
      "isFriday": false,
      "isSaturday": false,
      "isSunday": false,
      "sendToEmails": "email1@site.com, email2@site.com",
      "notifyAllEdi": true,
      "notifyInvoiceOnly": true,
      "notifyErrorOnly": false
    }
  },
  "interfaces": [
    "9fc51738-e12a-4049-88dd-eb82b45da292",
    "588b5c42-8634-4af7-bc9b-5e0116ed96b6"
  ],
  "accounts": [
    {
      "name": "History Account",
      "accountNo": "GOBI-HIST-12",
      "description": "This is my account description.",
      "appSystemNo": "FIN-GOBI-HIST-12",
      "paymentMethod": "EFT",
      "accountStatus": "Active",
      "contactInfo": "Some basic contact information note.",
      "libraryCode": "My Library",
      "libraryEdiCode": "MY-LIB-1",
      "notes": "note"
    }
  ],
  "changelogs": [
    {
      "description": "This is a sample note.",
      "timestamp": "2008-05-15T03:53:00-07:00"
    }
  ]
}

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 organization -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"organization not found"

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

GET /organizations-storage/organizations/{id}

Retrieve organization item with given {organizationId}

GET /organizations-storage/organizations/{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 Organization

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": "The record of an organization",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique UUID for this organization",
      "type": ["string", "null"],
      "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}$"
    },
    "name": {
      "description": "The name of this organization",
      "type": "string"
    },
    "code": {
      "description": "The code for this organization",
      "type": "string"
    },
    "description": {
      "description": "The description for this organization",
      "type": "string"
    },
    "status": {
      "description": "The status of this organization",
      "type": "string",
      "enum": [
        "Active",
        "Inactive",
        "Pending"
      ]
    },
    "language": {
      "description": "The language for this organization",
      "type": "string"
    },
    "aliases": {
      "id": "aliases",
      "description": "The list of aliases for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "alias.json"
      }
    },
    "addresses": {
      "id": "addresses",
      "description": "The list of addresses for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "address.json"
      }
    },
    "phoneNumbers": {
      "id": "phoneNumbers",
      "description": "The list of phone numbers for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "phone_number.json"
      }
    },
    "emails": {
      "id": "emailAddresses",
      "description": "The list of emails for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "email.json"
      }
    },
    "urls": {
      "id": "urls",
      "description": "The list of URLs for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "url.json"
      }
    },
    "contacts": {
      "id": "contact",
      "description": "An array of contact record IDs",
      "type": "array",
      "items": {
        "description": "UUID of a contact record",
        "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}$"
      }
    },
    "agreements": {
      "id": "agreement",
      "description": "The the list of agreements for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "agreement.json"
      }
    },
    "erpCode": {
      "description": "The ERP code for this organization",
      "type": "string"
    },
    "paymentMethod": {
      "description": "The payment method for this organization",
      "type": "string"
    },
    "accessProvider": {
      "description": "The access provider for this organization",
      "type": "boolean"
    },
    "governmental": {
      "description": "The setting to mark this organization as governmental",
      "type": "boolean"
    },
    "licensor": {
      "description": "The setting to mark this organization as a licensor",
      "type": "boolean"
    },
    "materialSupplier": {
      "description": "The setting to mark this organization as a material supplier",
      "type": "boolean"
    },
    "vendorCurrencies": {
      "id": "vendorCurrencies",
      "description": "The list of currencies used by this organization",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "claimingInterval": {
      "description": "The claim interval for this organization",
      "type": "integer"
    },
    "discountPercent": {
      "description": "The discount percentage for this organization",
      "type": "number"
    },
    "expectedActivationInterval": {
      "description": "The expected activation interval (in days) for this organization",
      "type": "integer"
    },
    "expectedInvoiceInterval": {
      "description": "The expected invoice interval (in days) for this organization",
      "type": "integer"
    },
    "renewalActivationInterval": {
      "description": "The revewal activation interval (in days) for this organization",
      "type": "integer"
    },
    "subscriptionInterval": {
      "description": "The subscription interval (in days) for this organization",
      "type": "integer"
    },
    "expectedReceiptInterval": {
      "description": "The receipt interval (in days) for this organization",
      "type": "integer"
    },
    "taxId": {
      "description": "The tax ID for this organization",
      "type": "string"
    },
    "liableForVat": {
      "description": "The setting to mark this organization liable to collect VAT",
      "type": "boolean"
    },
    "taxPercentage": {
      "description": "The tax percentage value for this organization",
      "type": "number"
    },
    "edi": {
      "description": "The EDI object for this organization (only applicable when isVendor is true)",
      "type": "object",
      "properties": {
        "vendorEdiCode": {
          "description": "The organization code for this EDI",
          "type": "string"
        },
        "vendorEdiType": {
          "description": "The organization type for this EDI",
          "type": "string",
          "enum": [
            "014/EAN",
            "31B/US-SAN",
            "091/Vendor-assigned",
            "092/Customer-assigned"
          ]
        },
        "libEdiCode": {
          "description": "The library code for this EDI",
          "type": "string"
        },
        "libEdiType": {
          "description": "The library type for this EDI",
          "type": "string",
          "enum": [
            "014/EAN",
            "31B/US-SAN",
            "091/Vendor-assigned",
            "092/Customer-assigned"
          ]
        },
        "prorateTax": {
          "description": "The setting to prorate tax for this EDI",
          "type": "boolean"
        },
        "prorateFees": {
          "description": "The setting to prorate fees for this EDI",
          "type": "boolean"
        },
        "ediNamingConvention": {
          "description": "The naming convention for this EDI",
          "type": "string"
        },
        "sendAcctNum": {
          "description": "The setting to send the account number for this EDI",
          "type": "boolean"
        },
        "supportOrder": {
          "description": "The setting to support order for this EDI",
          "type": "boolean"
        },
        "supportInvoice": {
          "description": "The setting to support invoice for this EDI",
          "type": "boolean"
        },
        "notes": {
          "description": "The notes for this EDI",
          "type": "string"
        },
        "ediFtp": {
          "description": "The FTP object for this EDI",
          "type": "object",
          "properties": {
            "ftpFormat": {
              "description": "The FTP format for this EDI",
              "type": "string",
              "enum": [
                "SFTP",
                "FTP"
              ]
            },
            "serverAddress": {
              "description": "The server address for this EDI",
              "type": ["string", "null"],
              "pattern": "^$|(([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$)"
            },
            "username": {
              "description": "The login username for this EDI",
              "type": "string"
            },
            "password": {
              "description": "The login password for this EDI",
              "type": "string"
            },
            "ftpMode": {
              "description": "The FTP mode for this EDI",
              "type": "string",
              "enum": [
                "ASCII",
                "Binary"
              ]
            },
            "ftpConnMode": {
              "description": "The FTP connection mode for this EDI",
              "type": "string",
              "enum": [
                "Active",
                "Passive"
              ]
            },
            "ftpPort": {
              "description": "The port for this EDI",
              "type": "integer"
            },
            "orderDirectory": {
              "description": "The order directory for this EDI",
              "type": "string"
            },
            "invoiceDirectory": {
              "description": "The invoice directory for this EDI",
              "type": "string"
            },
            "notes": {
              "description": "The notes for this EDI",
              "type": "string"
            }
          }
        },
        "ediJob": {
          "description": "The job object for this EDI",
          "type": "object",
          "properties": {
            "scheduleEdi": {
              "description": "Activate the schedule for this EDI job",
              "type": "boolean"
            },
            "schedulingDate": {
              "description": "The date (MM/DD/YYYY) for this EDI job to start running",
              "type": ["string", "null"],
              "format": "date-time"
            },
            "time": {
              "description": "The time (h:mm A) for this EDI job",
              "type": ["string", "null"],
              "format": "time"
            },
            "isMonday": {
              "description": "The setting to run this EDI job on Mondays",
              "type": "boolean"
            },
            "isTuesday": {
              "description": "The setting to run this EDI job on Tuesdays",
              "type": "boolean"
            },
            "isWednesday": {
              "description": "The setting to run this EDI job on Wednesdays",
              "type": "boolean"
            },
            "isThursday": {
              "description": "The setting to run this EDI job on Thursdays",
              "type": "boolean"
            },
            "isFriday": {
              "description": "The setting to run this EDI job on Fridays",
              "type": "boolean"
            },
            "isSaturday": {
              "description": "The setting to run this EDI job on Saturdays",
              "type": "boolean"
            },
            "isSunday": {
              "description": "The setting to run this EDI job on Sundays",
              "type": "boolean"
            },
            "sendToEmails": {
              "description": "The comma delimited list of email addresses to notify when this EDI job runs",
              "type": "string"
            },
            "notifyAllEdi": {
              "description": "The setting to notify all receivers when this EDI job runs",
              "type": "boolean"
            },
            "notifyInvoiceOnly": {
              "description": "The setting to notify only the invoice receiver when this EDI job runs",
              "type": "boolean"
            },
            "notifyErrorOnly": {
              "description": "The setting to notiry on the error receiver when this EDI job runs",
              "type": "boolean"
            },
            "schedulingNotes": {
              "description": "The schedule notes for this EDI job",
              "type": "string"
            }
          }
        }
      }
    },
    "interfaces": {
      "id": "interfaces",
      "description": "The list of interfaces assigned to this organization",
      "type": "array",
      "items": {
        "description": "UUID of an interface record",
        "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}$"
      }
    },
    "accounts": {
      "id": "accounts",
      "description": "The list of accounts for this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "account.json"
      }
    },
    "isVendor": {
      "id": "isVendor",
      "description": "Used to indicate that this organization is also a vendor",
      "type": "boolean"
    },
    "sanCode": {
      "description": "The SAN code for this organization address",
      "type": "string"
    },
    "changelogs": {
      "id": "changelogs",
      "description": "The list of changes applied to this organization",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "changelog.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "status"
  ]
}

Example:

{
  "id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
  "name": "GOBI",
  "code": "AQ-GOBI",
  "description": "This is Yankee Book Peddler.",
  "status": "Active",
  "language": "en-us",
  "isVendor": true,
  "sanCode": "1234567",
  "aliases": [
    {
      "value": "YBP",
      "description": "AKA"
    },
    {
      "value": "Yankee Book Peddler",
      "description": "Formerly known as"
    }
  ],
  "addresses": [
    {
      "addressLine1": "10 Estes Street",
      "addressLine2": "",
      "city": "Ipswich",
      "stateRegion": "MA",
      "zipCode": "01938",
      "country": "USA",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en"
    }
  ],
  "phoneNumbers": [
    {
      "phoneNumber": "19789999999",
      "categories": [
        "0e3f9680-ab06-4565-af64-609b7364e6eb",
        "996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
      ],
      "language": "en-us"
    }
  ],
  "emails": [
    {
      "value": "noreply@folio.org",
      "description": "Main",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "language": "en-us"
    }
  ],
  "urls": [
    {
      "value": "http://folio.org",
      "description": "corporate",
      "language": "en-us",
      "categories": [
        "112ae2e4-88ae-4fa5-a75b-2379d2035e52",
        "56288fe8-8037-44da-8395-01d2d106dc54"
      ],
      "notes": "note"
    }
  ],
  "contacts": [
    "9a665b22-9fe5-4c95-b4ee-837a5433c95d"
  ],
  "agreements": [
    {
      "name": "History Follower Incentive",
      "discount": 10,
      "referenceUrl": "http://my_sample_agreement.com",
      "notes": ""
    }
  ],
  "erpCode": "AQ-GOBI-HIST",
  "paymentMethod": "EFT",
  "accessProvider": true,
  "governmental": true,
  "licensor": true,
  "materialSupplier": true,
  "vendorCurrencies": [
    "USD",
    "CAD",
    "GBP"
  ],
  "claimingInterval": 30,
  "discountPercent": 10,
  "expectedActivationInterval": 1,
  "expectedInvoiceInterval": 5,
  "renewalActivationInterval": 1,
  "subscriptionInterval": 365,
  "expectedReceiptInterval": 1,
  "liableForVat": false,
  "taxId": "TX-GOBI-HIST",
  "taxPercentage": 5,
  "edi": {
    "vendorEdiCode": "AQ-GOBI-HIST",
    "vendorEdiType": "014/EAN",
    "libEdiCode": "MY-LIB-1",
    "libEdiType": "014/EAN",
    "prorateTax": true,
    "prorateFees": true,
    "ediNamingConvention": "",
    "sendAcctNum": true,
    "supportOrder": true,
    "supportInvoice": true,
    "notes": "",
    "ediFtp": {
      "ftpFormat": "SFTP",
      "serverAddress": "http://127.0.0.1",
      "username": "edi_username",
      "password": "edi_password",
      "ftpMode": "ASCII",
      "ftpConnMode": "Active",
      "ftpPort": 22,
      "orderDirectory": "/path/to/order/directory",
      "invoiceDirectory": "/path/to/invoice/directory",
      "notes": "My FTP notes"
    },
    "ediJob": {
      "scheduleEdi": false,
      "schedulingDate": null,
      "time": null,
      "isMonday": false,
      "isTuesday": false,
      "isWednesday": false,
      "isThursday": false,
      "isFriday": false,
      "isSaturday": false,
      "isSunday": false,
      "sendToEmails": "email1@site.com, email2@site.com",
      "notifyAllEdi": true,
      "notifyInvoiceOnly": true,
      "notifyErrorOnly": false
    }
  },
  "interfaces": [
    "9fc51738-e12a-4049-88dd-eb82b45da292",
    "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
    "290c9e17-1434-5f47-a396-9d4875b3eaf7"
  ],
  "accounts": [
    {
      "name": "History Account",
      "accountNo": "GOBI-HIST-12",
      "description": "This is my account description.",
      "appSystemNo": "FIN-GOBI-HIST-12",
      "paymentMethod": "EFT",
      "accountStatus": "Active",
      "contactInfo": "Some basic contact information note.",
      "libraryCode": "My Library",
      "libraryEdiCode": "MY-LIB-1",
      "notes": "note"
    }
  ],
  "changelogs": [
    {
      "description": "This is a sample note.",
      "timestamp": "2008-05-15T03:53:00-07:00"
    }
  ]
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"organization not found"

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

DELETE /organizations-storage/organizations/{id}

Delete organization item with given {organizationId}

DELETE /organizations-storage/organizations/{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 Organization

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 organization -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"organization not found"

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator