Create one data set definition

post

/fscmRestApi/resources/11.13.18.05/spendClassificationDatasetDefinitions

Request

Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : spendClassificationDatasetDefinitions-item-response
Type: object
Show Source
Back to Top

Examples

This example describes how to create one data set definition.

Example cURL Command

Use the following cURL command to submit a request on the REST resource.

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/spendClassificationDatasetDefinitions"

Example Request Body

The following example includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

This example describes how a source table is created by providing the data set name, predefined select clause, predefined from clause, predefined where clause, extended select clause, extended from clause, and extended where clause.

{
    "DatasetName": "TEST5",
    "SeededSelectClause": "'PO_DISTRIBUTIONS_ALL' source_table,\n10 datasource_num_id, \nPOD.po_distribution_id txn_id,\nPOD.po_distribution_id source_txn_id,\t\t\t\t\t\t\t\t\t \n'ORA_POI_ORDERS' spend_txn_type,\nPOH.segment1 txn_num,\nPOL.LINE_NUM,\nPOH.approved_date txn_date,\nPOH.vendor_id supplier_id,\ndecode(POL.matching_basis, 'QUANTITY',POD.quantity_ordered-nvl(POD.quantity_cancelled,0)) line_quantity,\nPOL.unit_price*nvl(POD.rate,1) unit_price,\ndecode(POL.MATCHING_BASIS, 'QUANTITY', (POD.QUANTITY_ORDERED - nvl(POD.QUANTITY_CANCELLED,0))* POL.UNIT_PRICE*nvl(POD.rate,1), 'AMOUNT', ((POD.amount_ordered - nvl(POD.amount_cancelled,0))*nvl(POD.rate,1)))  line_amount,\nPOL.category_id ebs_category_code,\nto_number(null) unspsc_category_code,\nto_number(null) custom_category_code1,\nto_number(null) custom_category_code2,\nto_number(null) custom_category_code3,\nto_number(null) ebs_auto_code,\nto_number(null) unspsc_auto_code,\nto_number(null) custom_auto_code1,\nto_number(null) custom_auto_code2,\nto_number(null) custom_auto_code3,\nPOH.approved_date w_update_dt,\nto_char(POD.po_distribution_id) fact_integration_id,\n'PO_DISTRIBUTIONS_ALL' fact_table,\nPOH.prc_bu_id bu_id,\nto_number(null) PREDICTION_CODE1,\nto_number(null) PREDICTION_MATCH_SCORE1,\nto_number(null) PREDICTION_CODE2,\nto_number(null) PREDICTION_MATCH_SCORE2,\nto_number(null) PREDICTION_CODE3,\nto_number(null) PREDICTION_MATCH_SCORE3",
    "SeededFromClause": "po_distributions_all POD, \npo_headers_all POH, \npo_lines_all POL,\nEGP_SYSTEM_ITEMS_VL ESI,\npoz_suppliers PSU,\nhz_parties HZP, \npoz_supplier_sites_all_m PSS,\nhr_all_organization_units_f_vl HOU,\npo_system_parameters_all PSP",
    "SeededWhereClause": "POH.po_header_id = POL.po_header_id\nand POL.po_line_id = POD.po_line_id\nand POL.item_id = ESI.inventory_item_id(+)\nand ESI.organization_id(+) = POD.destination_organization_id\nand POH.vendor_id = PSU.vendor_id\nand PSU.party_id = HZP.party_id\nand POH.vendor_site_id= PSS.vendor_site_id\nand POH.prc_bu_id = HOU.organization_id\nand POH.prc_bu_id = PSP.prc_bu_id\nand POH.approved_flag = 'Y'\nand trunc(sysdate) between HOU.effective_start_date and HOU.effective_end_date",
    "ExtendedSelectClause": "POL.ITEM_DESCRIPTION ITEM_DESCRIPTION,POH.COMMENTS TXN_DESC,POL.ITEM_DESCRIPTION LINE_DESC,ESI.ITEM_NUMBER ITEM_CODE,HZP.PARTY_NAME SUPPLIER_NAME,PSS.VENDOR_SITE_CODE SUPPLIER_SITE,HOU.NAME OPERATING_UNIT,POL.UOM_CODE UOM,PSP.CURRENCY_CODE CURRENCY,POD.CODE_COMBINATION_ID COST_CENTER,null CLASSIFICATION_ATTRIBUTE1,null CLASSIFICATION_ATTRIBUTE2,null CLASSIFICATION_ATTRIBUTE3,null CLASSIFICATION_ATTRIBUTE4,null CLASSIFICATION_ATTRIBUTE5,null CLASSIFICATION_ATTRIBUTE6,null CLASSIFICATION_ATTRIBUTE7,null CLASSIFICATION_ATTRIBUTE8,null CLASSIFICATION_ATTRIBUTE9,null CLASSIFICATION_ATTRIBUTE10,null CLASSIFICATION_ATTRIBUTE11,null CLASSIFICATION_ATTRIBUTE12,null CLASSIFICATION_ATTRIBUTE13,null CLASSIFICATION_ATTRIBUTE14,null CLASSIFICATION_ATTRIBUTE15,null CLASSIFICATION_ATTRIBUTE16,null CLASSIFICATION_ATTRIBUTE17,null CLASSIFICATION_ATTRIBUTE18,null CLASSIFICATION_ATTRIBUTE19,null CLASSIFICATION_ATTRIBUTE20, null ship_to_location, null natural_account, null natural_account_desc, null proc_cat_hierarchy1, null proc_cat_hierarchy2, null proc_cat_hierarchy3, null proc_cat_hierarchy4, null proc_cat_hierarchy5, null proc_cat_hierarchy6, null proc_cat_hierarchy7, null proc_cat_hierarchy8, null proc_cat_hierarchy9, null proc_cat_hierarchy10, null legal_entity, null line_type, null invoice_type",
    "ExtendedFromClause": null,
    "ExtendedWhereClause": null
}

Example Response Body

The following example includes the contents of the response body in JSON format:

{
    "DatasetName": "TEST5",
    "SeededSelectClause": "'PO_DISTRIBUTIONS_ALL' source_table,\n10 datasource_num_id, \nPOD.po_distribution_id txn_id,\nPOD.po_distribution_id source_txn_id,\t\t\t\t\t\t\t\t\t \n'ORA_POI_ORDERS' spend_txn_type,\nPOH.segment1 txn_num,\nPOL.LINE_NUM,\nPOH.approved_date txn_date,\nPOH.vendor_id supplier_id,\ndecode(POL.matching_basis, 'QUANTITY',POD.quantity_ordered-nvl(POD.quantity_cancelled,0)) line_quantity,\nPOL.unit_price*nvl(POD.rate,1) unit_price,\ndecode(POL.MATCHING_BASIS, 'QUANTITY', (POD.QUANTITY_ORDERED - nvl(POD.QUANTITY_CANCELLED,0))* POL.UNIT_PRICE*nvl(POD.rate,1), 'AMOUNT', ((POD.amount_ordered - nvl(POD.amount_cancelled,0))*nvl(POD.rate,1)))  line_amount,\nPOL.category_id ebs_category_code,\nto_number(null) unspsc_category_code,\nto_number(null) custom_category_code1,\nto_number(null) custom_category_code2,\nto_number(null) custom_category_code3,\nto_number(null) ebs_auto_code,\nto_number(null) unspsc_auto_code,\nto_number(null) custom_auto_code1,\nto_number(null) custom_auto_code2,\nto_number(null) custom_auto_code3,\nPOH.approved_date w_update_dt,\nto_char(POD.po_distribution_id) fact_integration_id,\n'PO_DISTRIBUTIONS_ALL' fact_table,\nPOH.prc_bu_id bu_id,\nto_number(null) PREDICTION_CODE1,\nto_number(null) PREDICTION_MATCH_SCORE1,\nto_number(null) PREDICTION_CODE2,\nto_number(null) PREDICTION_MATCH_SCORE2,\nto_number(null) PREDICTION_CODE3,\nto_number(null) PREDICTION_MATCH_SCORE3",
    "SeededFromClause": "po_distributions_all POD, \npo_headers_all POH, \npo_lines_all POL,\nEGP_SYSTEM_ITEMS_VL ESI,\npoz_suppliers PSU,\nhz_parties HZP, \npoz_supplier_sites_all_m PSS,\nhr_all_organization_units_f_vl HOU,\npo_system_parameters_all PSP",
    "SeededWhereClause": "POH.po_header_id = POL.po_header_id\nand POL.po_line_id = POD.po_line_id\nand POL.item_id = ESI.inventory_item_id(+)\nand ESI.organization_id(+) = POD.destination_organization_id\nand POH.vendor_id = PSU.vendor_id\nand PSU.party_id = HZP.party_id\nand POH.vendor_site_id= PSS.vendor_site_id\nand POH.prc_bu_id = HOU.organization_id\nand POH.prc_bu_id = PSP.prc_bu_id\nand POH.approved_flag = 'Y'\nand trunc(sysdate) between HOU.effective_start_date and HOU.effective_end_date",
    "ExtendedSelectClause": "POL.ITEM_DESCRIPTION ITEM_DESCRIPTION,POH.COMMENTS TXN_DESC,POL.ITEM_DESCRIPTION LINE_DESC,ESI.ITEM_NUMBER ITEM_CODE,HZP.PARTY_NAME SUPPLIER_NAME,PSS.VENDOR_SITE_CODE SUPPLIER_SITE,HOU.NAME OPERATING_UNIT,POL.UOM_CODE UOM,PSP.CURRENCY_CODE CURRENCY,POD.CODE_COMBINATION_ID COST_CENTER,null CLASSIFICATION_ATTRIBUTE1,null CLASSIFICATION_ATTRIBUTE2,null CLASSIFICATION_ATTRIBUTE3,null CLASSIFICATION_ATTRIBUTE4,null CLASSIFICATION_ATTRIBUTE5,null CLASSIFICATION_ATTRIBUTE6,null CLASSIFICATION_ATTRIBUTE7,null CLASSIFICATION_ATTRIBUTE8,null CLASSIFICATION_ATTRIBUTE9,null CLASSIFICATION_ATTRIBUTE10,null CLASSIFICATION_ATTRIBUTE11,null CLASSIFICATION_ATTRIBUTE12,null CLASSIFICATION_ATTRIBUTE13,null CLASSIFICATION_ATTRIBUTE14,null CLASSIFICATION_ATTRIBUTE15,null CLASSIFICATION_ATTRIBUTE16,null CLASSIFICATION_ATTRIBUTE17,null CLASSIFICATION_ATTRIBUTE18,null CLASSIFICATION_ATTRIBUTE19,null CLASSIFICATION_ATTRIBUTE20, null ship_to_location, null natural_account, null natural_account_desc, null proc_cat_hierarchy1, null proc_cat_hierarchy2, null proc_cat_hierarchy3, null proc_cat_hierarchy4, null proc_cat_hierarchy5, null proc_cat_hierarchy6, null proc_cat_hierarchy7, null proc_cat_hierarchy8, null proc_cat_hierarchy9, null proc_cat_hierarchy10, null legal_entity, null line_type, null invoice_type",
    "ExtendedFromClause": null,
    "ExtendedWhereClause": null,
                  "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/spendClassificationDatasetDefinitions/0002000000055445535435000000055445535435",
            "name": "spendClassificationDatasetDefinitions",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000002770400000002737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000017371007E00020000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/spendClassificationDatasetDefinitions/0002000000055445535435000000055445535435",
            "name": "spendClassificationDatasetDefinitions",
            "kind": "item"
        }
    ]

}
Back to Top