https://github.com/folio-org/mod-gobi
GOBI® (Global Online Bibliographic Information) is the leading web-based acquisitions tool for finding, ordering and managing e-books and print books for libraries. This module allows GOBI initiated orders to be fulfilled by FOLIO.
Acquisition methods APIs
Get list of acquisition methods
GET /gobi/orders/custom-mappings
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
["value", "Purchase At Vendor System", "="]
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
Returns a list of custom-mapping items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of the order mapping view",
"type": "object",
"properties": {
"orderMappingsViews": {
"description": "Collection of the order mapping view",
"type": "array",
"id": "orderMappingsViews",
"items": {
"type": "object",
"$ref": "order_mappings_view.json"
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"orderMappingsViews",
"totalRecords"
]
}
Example:
{
"orderType": "ListedPrintMonograph",
"mappings": [
{
"field": "ACQUISITION_METHOD",
"dataSource": {
"default": "Purchase At Vendor System"
}
},
{
"field": "APPROVED",
"dataSource": {
"default": "true",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "COLLECTION",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "CONTRIBUTOR",
"dataSource": {
"from": "//datafield[@tag='100']/*",
"combinator": "concat"
}
},
{
"field": "CONTRIBUTOR_NAME_TYPE",
"dataSource": {
"default": "Personal name",
"translation": "lookupContributorNameTypeId",
"translateDefault": true
}
},
{
"field": "CURRENCY",
"dataSource": {
"from": "//ListPrice/Currency",
"default": "USD"
}
},
{
"field": "FUND_ID",
"dataSource": {
"from": "//FundCode",
"translation": "lookupFundId"
}
},
{
"field": "FUND_CODE",
"dataSource": {
"from": "//FundCode"
}
},
{
"field": "FUND_PERCENTAGE",
"dataSource": {
"default": "100",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "VENDOR_INSTRUCTIONS",
"dataSource": {
"from": "//OrderNotes",
"default" : "N/A"
}
},
{
"field": "LIST_UNIT_PRICE",
"dataSource": {
"from": "//ListPrice/Amount",
"default": "0",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "LOCATION",
"dataSource": {
"from": "//Location",
"default": "*",
"translation": "lookupLocationId",
"translateDefault": true
}
},
{
"field": "MANUAL_PO",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "ORDER_TYPE",
"dataSource": {
"default": "One-Time"
}
},
{
"field": "PO_LINE_ORDER_FORMAT",
"dataSource": {
"default": "Physical Resource"
}
},
{
"field": "PO_LINE_PAYMENT_STATUS",
"dataSource": {
"default": "Awaiting Payment"
}
},
{
"field": "PO_LINE_RECEIPT_STATUS",
"dataSource": {
"default": "Awaiting Receipt"
}
},
{
"field": "PRODUCT_ID",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "truncateISBNQualifier"
}
},
{
"field": "PRODUCT_ID_TYPE",
"dataSource": {
"default": "ISBN",
"translation": "lookupProductIdType",
"translateDefault": true
}
},
{
"field": "PRODUCT_QUALIFIER",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='q']",
"defaultMapping": {
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "separateISBNQualifier"
}
}
}
},
{
"field": "PUBLICATION_DATE",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='c']"
}
},
{
"field": "PUBLISHER",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='b']"
}
},
{
"field": "QUANTITY_PHYSICAL",
"dataSource": {
"from": "//Quantity",
"default": "1",
"translation": "toInteger"
}
},
{
"field": "SOURCE",
"dataSource": {
"default": "API"
}
},
{
"field": "TITLE",
"dataSource": {
"from": "//datafield[@tag='245']/*",
"combinator": "concat"
}
},
{
"field": "VENDOR",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "MATERIAL_SUPPLIER",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "VENDOR_ACCOUNT",
"dataSource": {
"from": "//SubAccount",
"default": "0"
}
},
{
"field": "VENDOR_REF_NO",
"dataSource": {
"from": "//YBPOrderKey"
}
},
{
"field": "VENDOR_REF_NO_TYPE",
"dataSource": {
"default": "Vendor order reference number"
}
},
{
"field": "WORKFLOW_STATUS",
"dataSource": {
"default": "Open"
}
},
{
"field": "SUPPRESS_INSTANCE_FROM_DISCOVERY",
"dataSource": {
"from": "//SuppressInstanceFromDiscovery"
}
},
{
"field": "LINKED_PACKAGE",
"dataSource": {
"from": "//LocalData[Description='LocalData1']/Value",
"translation": "lookupLinkedPackage"
}
},
{
"field": "SUFFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData4']/Value",
"translation": "lookupSuffix"
}
},
{
"field": "PREFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData5']/Value",
"translation": "lookupPrefix"
}
},
{
"field": "EXCHANGE_RATE",
"dataSource": {
"from": "//LocalData[Description='LocalData6']/Value"
}
},
{
"field": "URL",
"dataSource": {
"from": "//LocalData[Description='LocalData7']/Value"
}
}
]
}
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 custom-mappings -- 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 custom-mappings -- 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 custom-mapping item.
POST /gobi/orders/custom-mappings
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Set of order mappings",
"type": "object",
"properties": {
"orderType": {
"type": "string",
"description": "The type of the GOBI order",
"enum": [
"ListedElectronicMonograph",
"ListedElectronicSerial",
"ListedPrintMonograph",
"ListedPrintSerial",
"UnlistedPrintMonograph",
"UnlistedPrintSerial"
]
},
"mappings": {
"description": "Collection of the order mappings",
"type": "array",
"items": {
"type": "object",
"$ref": "mapping.json"
}
}
},
"additionalProperties": false,
"required": [
"orderType",
"mappings"
]
}
Example:
{
"orderType": "ListedPrintMonograph",
"mappings": [
{
"field": "ACQUISITION_METHOD",
"dataSource": {
"default": "Purchase At Vendor System"
}
},
{
"field": "APPROVED",
"dataSource": {
"default": "true",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "COLLECTION",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "CONTRIBUTOR",
"dataSource": {
"from": "//datafield[@tag='100']/*",
"combinator": "concat"
}
},
{
"field": "CONTRIBUTOR_NAME_TYPE",
"dataSource": {
"default": "Personal name",
"translation": "lookupContributorNameTypeId",
"translateDefault": true
}
},
{
"field": "CURRENCY",
"dataSource": {
"from": "//ListPrice/Currency",
"default": "USD"
}
},
{
"field": "FUND_ID",
"dataSource": {
"from": "//FundCode",
"translation": "lookupFundId"
}
},
{
"field": "FUND_CODE",
"dataSource": {
"from": "//FundCode"
}
},
{
"field": "FUND_PERCENTAGE",
"dataSource": {
"default": "100",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "VENDOR_INSTRUCTIONS",
"dataSource": {
"from": "//OrderNotes",
"default" : "N/A"
}
},
{
"field": "LIST_UNIT_PRICE",
"dataSource": {
"from": "//ListPrice/Amount",
"default": "0",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "LOCATION",
"dataSource": {
"from": "//Location",
"default": "*",
"translation": "lookupLocationId",
"translateDefault": true
}
},
{
"field": "MANUAL_PO",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "ORDER_TYPE",
"dataSource": {
"default": "One-Time"
}
},
{
"field": "PO_LINE_ORDER_FORMAT",
"dataSource": {
"default": "Physical Resource"
}
},
{
"field": "PO_LINE_PAYMENT_STATUS",
"dataSource": {
"default": "Awaiting Payment"
}
},
{
"field": "PO_LINE_RECEIPT_STATUS",
"dataSource": {
"default": "Awaiting Receipt"
}
},
{
"field": "PRODUCT_ID",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "truncateISBNQualifier"
}
},
{
"field": "PRODUCT_ID_TYPE",
"dataSource": {
"default": "ISBN",
"translation": "lookupProductIdType",
"translateDefault": true
}
},
{
"field": "PRODUCT_QUALIFIER",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='q']",
"defaultMapping": {
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "separateISBNQualifier"
}
}
}
},
{
"field": "PUBLICATION_DATE",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='c']"
}
},
{
"field": "PUBLISHER",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='b']"
}
},
{
"field": "QUANTITY_PHYSICAL",
"dataSource": {
"from": "//Quantity",
"default": "1",
"translation": "toInteger"
}
},
{
"field": "SOURCE",
"dataSource": {
"default": "API"
}
},
{
"field": "TITLE",
"dataSource": {
"from": "//datafield[@tag='245']/*",
"combinator": "concat"
}
},
{
"field": "VENDOR",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "MATERIAL_SUPPLIER",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "VENDOR_ACCOUNT",
"dataSource": {
"from": "//SubAccount",
"default": "0"
}
},
{
"field": "VENDOR_REF_NO",
"dataSource": {
"from": "//YBPOrderKey"
}
},
{
"field": "VENDOR_REF_NO_TYPE",
"dataSource": {
"default": "Vendor order reference number"
}
},
{
"field": "WORKFLOW_STATUS",
"dataSource": {
"default": "Open"
}
},
{
"field": "SUPPRESS_INSTANCE_FROM_DISCOVERY",
"dataSource": {
"from": "//SuppressInstanceFromDiscovery"
}
},
{
"field": "LINKED_PACKAGE",
"dataSource": {
"from": "//LocalData[Description='LocalData1']/Value",
"translation": "lookupLinkedPackage"
}
},
{
"field": "SUFFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData4']/Value",
"translation": "lookupSuffix"
}
},
{
"field": "PREFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData5']/Value",
"translation": "lookupPrefix"
}
},
{
"field": "EXCHANGE_RATE",
"dataSource": {
"from": "//LocalData[Description='LocalData6']/Value"
}
},
{
"field": "URL",
"dataSource": {
"from": "//LocalData[Description='LocalData7']/Value"
}
}
]
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created custom-mapping item
Media type: application/json
Type: any
Example:
{
"orderType": "ListedPrintMonograph",
"mappings": [
{
"field": "ACQUISITION_METHOD",
"dataSource": {
"default": "Purchase At Vendor System"
}
},
{
"field": "APPROVED",
"dataSource": {
"default": "true",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "COLLECTION",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "CONTRIBUTOR",
"dataSource": {
"from": "//datafield[@tag='100']/*",
"combinator": "concat"
}
},
{
"field": "CONTRIBUTOR_NAME_TYPE",
"dataSource": {
"default": "Personal name",
"translation": "lookupContributorNameTypeId",
"translateDefault": true
}
},
{
"field": "CURRENCY",
"dataSource": {
"from": "//ListPrice/Currency",
"default": "USD"
}
},
{
"field": "FUND_ID",
"dataSource": {
"from": "//FundCode",
"translation": "lookupFundId"
}
},
{
"field": "FUND_CODE",
"dataSource": {
"from": "//FundCode"
}
},
{
"field": "FUND_PERCENTAGE",
"dataSource": {
"default": "100",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "VENDOR_INSTRUCTIONS",
"dataSource": {
"from": "//OrderNotes",
"default" : "N/A"
}
},
{
"field": "LIST_UNIT_PRICE",
"dataSource": {
"from": "//ListPrice/Amount",
"default": "0",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "LOCATION",
"dataSource": {
"from": "//Location",
"default": "*",
"translation": "lookupLocationId",
"translateDefault": true
}
},
{
"field": "MANUAL_PO",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "ORDER_TYPE",
"dataSource": {
"default": "One-Time"
}
},
{
"field": "PO_LINE_ORDER_FORMAT",
"dataSource": {
"default": "Physical Resource"
}
},
{
"field": "PO_LINE_PAYMENT_STATUS",
"dataSource": {
"default": "Awaiting Payment"
}
},
{
"field": "PO_LINE_RECEIPT_STATUS",
"dataSource": {
"default": "Awaiting Receipt"
}
},
{
"field": "PRODUCT_ID",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "truncateISBNQualifier"
}
},
{
"field": "PRODUCT_ID_TYPE",
"dataSource": {
"default": "ISBN",
"translation": "lookupProductIdType",
"translateDefault": true
}
},
{
"field": "PRODUCT_QUALIFIER",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='q']",
"defaultMapping": {
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "separateISBNQualifier"
}
}
}
},
{
"field": "PUBLICATION_DATE",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='c']"
}
},
{
"field": "PUBLISHER",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='b']"
}
},
{
"field": "QUANTITY_PHYSICAL",
"dataSource": {
"from": "//Quantity",
"default": "1",
"translation": "toInteger"
}
},
{
"field": "SOURCE",
"dataSource": {
"default": "API"
}
},
{
"field": "TITLE",
"dataSource": {
"from": "//datafield[@tag='245']/*",
"combinator": "concat"
}
},
{
"field": "VENDOR",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "MATERIAL_SUPPLIER",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "VENDOR_ACCOUNT",
"dataSource": {
"from": "//SubAccount",
"default": "0"
}
},
{
"field": "VENDOR_REF_NO",
"dataSource": {
"from": "//YBPOrderKey"
}
},
{
"field": "VENDOR_REF_NO_TYPE",
"dataSource": {
"default": "Vendor order reference number"
}
},
{
"field": "WORKFLOW_STATUS",
"dataSource": {
"default": "Open"
}
},
{
"field": "SUPPRESS_INSTANCE_FROM_DISCOVERY",
"dataSource": {
"from": "//SuppressInstanceFromDiscovery"
}
},
{
"field": "LINKED_PACKAGE",
"dataSource": {
"from": "//LocalData[Description='LocalData1']/Value",
"translation": "lookupLinkedPackage"
}
},
{
"field": "SUFFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData4']/Value",
"translation": "lookupSuffix"
}
},
{
"field": "PREFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData5']/Value",
"translation": "lookupPrefix"
}
},
{
"field": "EXCHANGE_RATE",
"dataSource": {
"from": "//LocalData[Description='LocalData6']/Value"
}
},
{
"field": "URL",
"dataSource": {
"from": "//LocalData[Description='LocalData7']/Value"
}
}
]
}
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 custom-mapping -- 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 custom-mappings -- 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 custom-mapping item with given {custom-mappingId}
GET /gobi/orders/custom-mappings/{orderType}
The order type
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Set of order mappings",
"type": "object",
"properties": {
"orderType": {
"type": "string",
"description": "The type of the GOBI order",
"enum": [
"ListedElectronicMonograph",
"ListedElectronicSerial",
"ListedPrintMonograph",
"ListedPrintSerial",
"UnlistedPrintMonograph",
"UnlistedPrintSerial"
]
},
"mappings": {
"description": "Collection of the order mappings",
"type": "array",
"items": {
"type": "object",
"$ref": "mapping.json"
}
}
},
"additionalProperties": false,
"required": [
"orderType",
"mappings"
]
}
Example:
{
"orderType": "ListedPrintMonograph",
"mappings": [
{
"field": "ACQUISITION_METHOD",
"dataSource": {
"default": "Purchase At Vendor System"
}
},
{
"field": "APPROVED",
"dataSource": {
"default": "true",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "COLLECTION",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "CONTRIBUTOR",
"dataSource": {
"from": "//datafield[@tag='100']/*",
"combinator": "concat"
}
},
{
"field": "CONTRIBUTOR_NAME_TYPE",
"dataSource": {
"default": "Personal name",
"translation": "lookupContributorNameTypeId",
"translateDefault": true
}
},
{
"field": "CURRENCY",
"dataSource": {
"from": "//ListPrice/Currency",
"default": "USD"
}
},
{
"field": "FUND_ID",
"dataSource": {
"from": "//FundCode",
"translation": "lookupFundId"
}
},
{
"field": "FUND_CODE",
"dataSource": {
"from": "//FundCode"
}
},
{
"field": "FUND_PERCENTAGE",
"dataSource": {
"default": "100",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "VENDOR_INSTRUCTIONS",
"dataSource": {
"from": "//OrderNotes",
"default" : "N/A"
}
},
{
"field": "LIST_UNIT_PRICE",
"dataSource": {
"from": "//ListPrice/Amount",
"default": "0",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "LOCATION",
"dataSource": {
"from": "//Location",
"default": "*",
"translation": "lookupLocationId",
"translateDefault": true
}
},
{
"field": "MANUAL_PO",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "ORDER_TYPE",
"dataSource": {
"default": "One-Time"
}
},
{
"field": "PO_LINE_ORDER_FORMAT",
"dataSource": {
"default": "Physical Resource"
}
},
{
"field": "PO_LINE_PAYMENT_STATUS",
"dataSource": {
"default": "Awaiting Payment"
}
},
{
"field": "PO_LINE_RECEIPT_STATUS",
"dataSource": {
"default": "Awaiting Receipt"
}
},
{
"field": "PRODUCT_ID",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "truncateISBNQualifier"
}
},
{
"field": "PRODUCT_ID_TYPE",
"dataSource": {
"default": "ISBN",
"translation": "lookupProductIdType",
"translateDefault": true
}
},
{
"field": "PRODUCT_QUALIFIER",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='q']",
"defaultMapping": {
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "separateISBNQualifier"
}
}
}
},
{
"field": "PUBLICATION_DATE",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='c']"
}
},
{
"field": "PUBLISHER",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='b']"
}
},
{
"field": "QUANTITY_PHYSICAL",
"dataSource": {
"from": "//Quantity",
"default": "1",
"translation": "toInteger"
}
},
{
"field": "SOURCE",
"dataSource": {
"default": "API"
}
},
{
"field": "TITLE",
"dataSource": {
"from": "//datafield[@tag='245']/*",
"combinator": "concat"
}
},
{
"field": "VENDOR",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "MATERIAL_SUPPLIER",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "VENDOR_ACCOUNT",
"dataSource": {
"from": "//SubAccount",
"default": "0"
}
},
{
"field": "VENDOR_REF_NO",
"dataSource": {
"from": "//YBPOrderKey"
}
},
{
"field": "VENDOR_REF_NO_TYPE",
"dataSource": {
"default": "Vendor order reference number"
}
},
{
"field": "WORKFLOW_STATUS",
"dataSource": {
"default": "Open"
}
},
{
"field": "SUPPRESS_INSTANCE_FROM_DISCOVERY",
"dataSource": {
"from": "//SuppressInstanceFromDiscovery"
}
},
{
"field": "LINKED_PACKAGE",
"dataSource": {
"from": "//LocalData[Description='LocalData1']/Value",
"translation": "lookupLinkedPackage"
}
},
{
"field": "SUFFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData4']/Value",
"translation": "lookupSuffix"
}
},
{
"field": "PREFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData5']/Value",
"translation": "lookupPrefix"
}
},
{
"field": "EXCHANGE_RATE",
"dataSource": {
"from": "//LocalData[Description='LocalData6']/Value"
}
},
{
"field": "URL",
"dataSource": {
"from": "//LocalData[Description='LocalData7']/Value"
}
}
]
}
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:
"custom-mapping 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 custom-mapping item with given {custom-mappingId}
DELETE /gobi/orders/custom-mappings/{orderType}
The order type
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 custom-mapping -- 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:
"custom-mapping 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 custom-mapping item with given {custom-mappingId}
PUT /gobi/orders/custom-mappings/{orderType}
The order type
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Set of order mappings",
"type": "object",
"properties": {
"orderType": {
"type": "string",
"description": "The type of the GOBI order",
"enum": [
"ListedElectronicMonograph",
"ListedElectronicSerial",
"ListedPrintMonograph",
"ListedPrintSerial",
"UnlistedPrintMonograph",
"UnlistedPrintSerial"
]
},
"mappings": {
"description": "Collection of the order mappings",
"type": "array",
"items": {
"type": "object",
"$ref": "mapping.json"
}
}
},
"additionalProperties": false,
"required": [
"orderType",
"mappings"
]
}
Example:
{
"orderType": "ListedPrintMonograph",
"mappings": [
{
"field": "ACQUISITION_METHOD",
"dataSource": {
"default": "Purchase At Vendor System"
}
},
{
"field": "APPROVED",
"dataSource": {
"default": "true",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "COLLECTION",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "CONTRIBUTOR",
"dataSource": {
"from": "//datafield[@tag='100']/*",
"combinator": "concat"
}
},
{
"field": "CONTRIBUTOR_NAME_TYPE",
"dataSource": {
"default": "Personal name",
"translation": "lookupContributorNameTypeId",
"translateDefault": true
}
},
{
"field": "CURRENCY",
"dataSource": {
"from": "//ListPrice/Currency",
"default": "USD"
}
},
{
"field": "FUND_ID",
"dataSource": {
"from": "//FundCode",
"translation": "lookupFundId"
}
},
{
"field": "FUND_CODE",
"dataSource": {
"from": "//FundCode"
}
},
{
"field": "FUND_PERCENTAGE",
"dataSource": {
"default": "100",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "VENDOR_INSTRUCTIONS",
"dataSource": {
"from": "//OrderNotes",
"default" : "N/A"
}
},
{
"field": "LIST_UNIT_PRICE",
"dataSource": {
"from": "//ListPrice/Amount",
"default": "0",
"translation": "toDouble",
"translateDefault": true
}
},
{
"field": "LOCATION",
"dataSource": {
"from": "//Location",
"default": "*",
"translation": "lookupLocationId",
"translateDefault": true
}
},
{
"field": "MANUAL_PO",
"dataSource": {
"default": "false",
"translation": "toBoolean",
"translateDefault": true
}
},
{
"field": "ORDER_TYPE",
"dataSource": {
"default": "One-Time"
}
},
{
"field": "PO_LINE_ORDER_FORMAT",
"dataSource": {
"default": "Physical Resource"
}
},
{
"field": "PO_LINE_PAYMENT_STATUS",
"dataSource": {
"default": "Awaiting Payment"
}
},
{
"field": "PO_LINE_RECEIPT_STATUS",
"dataSource": {
"default": "Awaiting Receipt"
}
},
{
"field": "PRODUCT_ID",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "truncateISBNQualifier"
}
},
{
"field": "PRODUCT_ID_TYPE",
"dataSource": {
"default": "ISBN",
"translation": "lookupProductIdType",
"translateDefault": true
}
},
{
"field": "PRODUCT_QUALIFIER",
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='q']",
"defaultMapping": {
"dataSource": {
"from": "//datafield[@tag='020']/subfield[@code='a']",
"translation": "separateISBNQualifier"
}
}
}
},
{
"field": "PUBLICATION_DATE",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='c']"
}
},
{
"field": "PUBLISHER",
"dataSource": {
"from": "//datafield[@tag='260']/subfield[@code='b']"
}
},
{
"field": "QUANTITY_PHYSICAL",
"dataSource": {
"from": "//Quantity",
"default": "1",
"translation": "toInteger"
}
},
{
"field": "SOURCE",
"dataSource": {
"default": "API"
}
},
{
"field": "TITLE",
"dataSource": {
"from": "//datafield[@tag='245']/*",
"combinator": "concat"
}
},
{
"field": "VENDOR",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "MATERIAL_SUPPLIER",
"dataSource": {
"default": "GOBI",
"translation": "lookupOrganization",
"translateDefault": true
}
},
{
"field": "VENDOR_ACCOUNT",
"dataSource": {
"from": "//SubAccount",
"default": "0"
}
},
{
"field": "VENDOR_REF_NO",
"dataSource": {
"from": "//YBPOrderKey"
}
},
{
"field": "VENDOR_REF_NO_TYPE",
"dataSource": {
"default": "Vendor order reference number"
}
},
{
"field": "WORKFLOW_STATUS",
"dataSource": {
"default": "Open"
}
},
{
"field": "SUPPRESS_INSTANCE_FROM_DISCOVERY",
"dataSource": {
"from": "//SuppressInstanceFromDiscovery"
}
},
{
"field": "LINKED_PACKAGE",
"dataSource": {
"from": "//LocalData[Description='LocalData1']/Value",
"translation": "lookupLinkedPackage"
}
},
{
"field": "SUFFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData4']/Value",
"translation": "lookupSuffix"
}
},
{
"field": "PREFIX",
"dataSource": {
"from": "//LocalData[Description='LocalData5']/Value",
"translation": "lookupPrefix"
}
},
{
"field": "EXCHANGE_RATE",
"dataSource": {
"from": "//LocalData[Description='LocalData6']/Value"
}
},
{
"field": "URL",
"dataSource": {
"from": "//LocalData[Description='LocalData7']/Value"
}
}
]
}
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 custom-mapping -- 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:
"custom-mapping 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