Create demands

post

/fscmRestApi/resources/11.13.18.05/backlogManagementPlans/{BmRunId}/child/demands

Request

Path Parameters
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 : backlogManagementPlans-demands-item-response
Type: object
Show Source
Back to Top

Examples

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.action+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/backlogManagementPlans/-1/child/demands"

Example: Upload Bulk Demand Simulation Attributes Data

This example describes how to bulk upload demand simulation attributes based on DemandId. Similarly, you can also upload using ItemName, OrgCode, or a combination of ItemName and OrgCode. The example includes the contents of the request body in JSON format, which includes the UpdateAsync and UpdateMode attributes. You can use the JSON format to encode [{"DemandId":"3098148,3098152,3098153,3098154,3098151","EccFlag":2,"PullInFlag":2}] for which the Base64 encoded value is W3siRGVtYW5kSWQiOiIzMDk4MTQ4LDMwOTgxNTIsMzA5ODE1MywzMDk4MTU0LDMwOTgxNTEiLAoiRWNjRmxhZyI6MiwKIlB1bGxJbkZsYWciOjJ9XQ==.

Example Request Body

The following example includes the contents of the request body in JSON format. In this example, a file attachment is uploaded to the purchase order header successfully. 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.
{
"UpdateAsync": "W3siRGVtYW5kSWQiOiIzMDk4MTQ4LDMwOTgxNTIsMzA5ODE1MywzMDk4MTU0LDMwOTgxNTEiLAoiRWNjRmxhZyI6MiwKIlB1bGxJbkZsYWciOjJ9XQ==",
"UpdateMode": "batch"
}

Example Response Body

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

{
  "BmRunId": -1,
  "DemandId": -23453,
  "DemandPriority": null,
  "InventoryItemId": -23453,
  "OrganizationId": -23453,
  "OldPromisedDate": null,
  "NewPromisedDate": null,
  "RequestedDate": "2030-02-11",
  "CreatedBy": "BLM_ALL",
  "CreationDate": "2022-06-12T23:06:22+00:00",
  "LastUpdatedBy": "BLM_ALL",
  "LastUpdateDate": "2022-06-12T23:06:30.925+00:00",
  "LastUpdateLogin": "E0DC1B35877C2672E0532D06F10A673D",
  "CustomerId": null,
  "CustomerSiteId": null,
  "DemandClass": null,
  "SourceOrganizationId": null,
  "FirmSalesOrder": null,
  "FirmShipFromOrg": null,
  "FirmShipSetName": null,
  "FirmArrivalSetName": null,
  "EarliestPromisedDate": null,
  "ExpectedShipDate": null,
  "ExpectedArrivalDate": null,
  "ShipMethod": null,
  "ShipSetName": null,
  "ArrivalSetName": null,
  "CarrierId": null,
  "ModeOfTransport": null,
  "ServiceLevel": null,
  "SplitFromDemandId": null,
  "SupplierId": null,
  "SupplierSiteId": null,
  "EccIndicator": null,
  "RequestedDateQuantity": null,
  "PullInIndicator": null,
  "MarkedForRelease": null,
  "OrderRevenue": null,
  "AllowSplitsIndicator": null,
  "ManualOverrideIndicator": null,
  "ExpectedSupplierId": null,
  "ExpectedSupplierSiteId": null,
  "ExpectedShipMethod": null,
  "ExpectedCarrierId": null,
  "ExpectedModeOfTransport": null,
  "ExpectedServiceLevel": null,
  "OverridePriority": null,
  "ReasonCode": null,
  "DemandFulfillmentLeadTime": null,
  "EarliestAcceptableDate": null,
  "LatestAcceptableDate": null,
  "OriginationType": null,
  "ConfiguredItem": null,
  "OrderDateTypeCode": null,
  "OrderNumber": null,
  "PromisedQuantity": null,
  "ReleaseStatus": null,
  "DemandLeadTimeDate": null,
  "SalesOrderNumber": null,
  "SoLineNumber": null,
  "FulfillmentLineNumber": null,
  "OrchOrderNumber": null,
  "OrchOrderLineNumber": null,
  "RootFulfillmentLine": null,
  "ParentFulfillmentLine": null,
  "CustomerPurchOrderScheduleNumber": null,
  "CustomerPurchOrderNumber": null,
  "CustomerPurchOrderLineNumber": null,
  "DemandQuantity": null,
  "InventoryItemName": null,
  "OrganizationName": null,
  "OrganizationCode": null,
  "SupplierName": null,
  "SupplierSiteName": null,
  "CustomerName": null,
  "CustomerSiteName": null,
  "ExpectedSupplierName": null,
  "ExpectedSupplierSiteName": null,
  "SourceOrganizationName": null,
  "SourceOrganizationCode": null,
  "FirmOrganizationName": null,
  "CarrierName": null,
  "ModeOfTransportName": null,
  "ServiceLevelName": null,
  "ExpectedCarrierName": null,
  "ExpectedModeOfTransportName": null,
  "ExpectedServiceLevelName": null,
  "OrderLineStatus": null,
  "ErrorText": null,
  "ESSJobId": 453164,
  "Message": "A scheduled process with process ID 453164 has been submitted. Refer to the scheduled processes log file for the detailed response. (MSC-2806192)",
  "UpdateMode": "batch",
  "links": [
    {
      "rel": "self",
      "href": "https://server/fscmRestApi/resources/version/backlogManagementPlans/-1/child/demands/-23453",
      "name": "demands",
      "kind": "item"
    },
    {
      "rel": "canonical",
      "href": "https://server/fscmRestApi/resources/version/backlogManagementPlans/-1/child/demands/-23453",
      "name": "demands",
      "kind": "item"
    },
    {
      "rel": "parent",
      "href": "https://server/fscmRestApi/resources/version/backlogManagementPlans/-1",
      "name": "backlogManagementPlans",
      "kind": "item"
    },
    {
      "rel": "enclosure",
      "href": "https://server/fscmRestApi/resources/version/backlogManagementPlans/-1/child/demands/-23453/enclosure/UpdateAsync",
      "name": "UpdateAsync",
      "kind": "other"
    }
  ]
}

Sample Bulk Data

The data must be encoded using Base64 and passed in the request payload parameter UpdateAsync.

{
"UpdateAsync": "<Encoded Data>",
"UpdateMode": "batch" 
}

Sample data for bulk upload of demand simulation attributes based on multiple blocks of DemandId

[{"DemandId":"1121408,1121488",
"PullInFlag":1,
"EccFlag":2},

{"DemandId":"1121518,1121530",
"PullInFlag":2,
"EccFlag":2},

{"DemandId":"1186855,1186856",
"PullInFlag":2,
"EccFlag":1}]

Sample data for bulk upload of demand simulation attributes based on ItemName

[{"ItemName":"KB-AS65101,KB-AS65102",
"EccFlag":1,
"PullInFlag":2},

{"ItemName":"BRSS",
"EccFlag":2,
"PullInFlag":2}]

Sample data for bulk upload of demand simulation attributes based on OrgCode

[{"OrgCode":"SCC:SCCOATSMFG2,SCC:SCCMFG2",
"EccFlag":2,
"PullInFlag":2}]

Sample data for bulk upload of demand simulation attributes based on ItemName and OrgCode

[{"ItemName":"AS92888",
"OrgCode":"M1,M2",
"EccFlag":2,
"PullInFlag":2},

{"ItemName":"AS92888",
"OrgCode":"D1",
"EccFlag":1,
"PullInFlag":2}]
Sample data to empty or null the requested Ship-from organization based on OrgCode
[{
"OrgCode":"BLM:BLM_M1,BLM:BLM_M2",
"OrganizationCode":""
}]

Note:

When the requested Ship-from organization is set to null, the requested shipping method is also set to null.
Sample data to update requested Ship-from organization based on ItemName and OrgCode
[{
"OrgCode":"BLM:BLM_M1,BLM:BLM_M2",
"ItemName":"BLM-RT-BLK-UPDT-SH-ITEM2",
"OrganizationCode":"BLM:BLM_M16"
}]

Note:

When the requested Ship-from organization is updated, the requested shipping method is also set to null.
Sample data to empty or null the requested Shipping method based on DemandId
[{
"DemandId":"3813254,3813259",
"CarrierName":"",
"ModeOfTransportName":"",
"ServiceLevelName":"",
}]

Note:

To null the requested Shipping method, you need to null these attributes: Carrier Name, Mode of Transport Name, and Service-Level Name.
Sample data to update the requested Shipping method based on DemandId
[{
"DemandId":"3813254,3813259",
"CarrierName":"DTDC_BLM",
"ModeOfTransportName":"Rail_BLM",
"ServiceLevelName":"PorttoDoor_BLM",
}]

Note:

To update the requested Shipping method, you need to update these attributes: Carrier Name, Mode of Transport Name, and Service-Level Name.
Sample data to update the Locked Status attribute to Yes based on OrgCode
[{
"OrgCode":"BLM:BLM_M1",
"FirmSalesOrder":1
}]

Note:

To update the Locked Status attribute to No, set FirmSalesOrder to 2.
Back to Top