Upload a file
post
/fscmRestApi/resources/11.13.18.05/collaborationCustomerDemandUploads
Request
Header Parameters
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
Attachment: string
(byte)
Value that identifies the base 64 encoded customer demand file.
-
B2BFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the request originated from a business-to-business message. If false, then it didn't. The default value is false. -
B2BUser: string
Maximum Length:
64
User who created the B2B message. -
DocumentId(required): integer
(int64)
Value that uniquely identifies the uploaded customer demand file.
-
DocumentTypeCode: string
Maximum Length:
60
Abbreviation that identifies the type of document used for collaboration. -
DocumentTypeName: string
Maximum Length:
255
Type of document used for collaboration. -
ErrorFlag(required): boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then errors occurred when processing the import data request. If false, then errors didn't occur. This attribute doesn't have a default value. -
Filename(required): string
Maximum Length:
512
Name of the uploaded customer demand file. -
IncrementalFlag(required): boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the data is processed as an incremental change within the editable date range. If false, then the data is processed as a full replace within the editable date range. The default value is false. -
InitiateProcessingFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the data will be processed. If false, then the data won't be processed. The default value is false. -
MessageId: string
Maximum Length:
256
Value that uniquely identifies the B2B message. -
Notes: string
Maximum Length:
512
Notes associated with the upload request. -
PartnerId: integer
(int64)
Value that uniquely identifies the trading partner invoking the B2B message.
-
statusDetails: array
Status Details
Title:
Status Details
The Status Details resource gets the errors associated with a customer demand upload request.
Nested Schema : Status Details
Type:
array
Title:
Status Details
The Status Details resource gets the errors associated with a customer demand upload request.
Show Source
Nested Schema : collaborationCustomerDemandUploads-statusDetails-item-post-request
Type:
Show Source
object
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
Root Schema : collaborationCustomerDemandUploads-item-response
Type:
Show Source
object
-
Attachment: string
(byte)
Value that identifies the base 64 encoded customer demand file.
-
B2BFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the request originated from a business-to-business message. If false, then it didn't. The default value is false. -
B2BUser: string
Maximum Length:
64
User who created the B2B message. -
CreatedBy: string
Read Only:
true
Maximum Length:64
User who created the record. -
CreationDate: string
(date-time)
Read Only:
true
Date and time when the user created the record. -
DocumentId: integer
(int64)
Value that uniquely identifies the uploaded customer demand file.
-
DocumentTypeCode: string
Maximum Length:
60
Abbreviation that identifies the type of document used for collaboration. -
DocumentTypeName: string
Maximum Length:
255
Type of document used for collaboration. -
ErrorFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then errors occurred when processing the import data request. If false, then errors didn't occur. This attribute doesn't have a default value. -
Filename: string
Maximum Length:
512
Name of the uploaded customer demand file. -
ImportRequestId: integer
(int64)
Read Only:
true
Value that uniquely identifies the user's request to import data. -
IncrementalFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the data is processed as an incremental change within the editable date range. If false, then the data is processed as a full replace within the editable date range. The default value is false. -
InitiateProcessingFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the data will be processed. If false, then the data won't be processed. The default value is false. -
LastUpdateDate: string
(date-time)
Read Only:
true
User who most recently updated the record. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
Date and time when the user most recently updated the record. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
LoadProcessId: integer
(int64)
Read Only:
true
Value that uniquely identities the running Load Collaboration Customer Demand scheduled process. -
MessageId: string
Maximum Length:
256
Value that uniquely identifies the B2B message. -
Notes: string
Maximum Length:
512
Notes associated with the upload request. -
PartnerId: integer
(int64)
Value that uniquely identifies the trading partner invoking the B2B message.
-
ProcessId: integer
(int64)
Read Only:
true
Value that uniquely identifies the running Process Collaboration Customer Demand scheduled process. -
PublishedByParty: string
Title:
Meaning
Read Only:true
Maximum Length:80
Type of user who performed the requested action. -
PublishedByPartyCode: string
Read Only:
true
Maximum Length:30
Abbreviation that identifies the type of user who performed the requested action. Values include ORA_VCS_INTEGRATION_SPECIALIST, ORA_VCS_CUSTOMER, ORA_VCS_ENTERPRISE. -
Status: string
Title:
Meaning
Read Only:true
Maximum Length:80
Current state of the upload request. -
StatusCode: string
Read Only:
true
Maximum Length:30
Abbreviation that identifies the current state of the import data upload request. -
statusDetails: array
Status Details
Title:
Status Details
The Status Details resource gets the errors associated with a customer demand upload request.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : Status Details
Type:
array
Title:
Status Details
The Status Details resource gets the errors associated with a customer demand upload request.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : collaborationCustomerDemandUploads-statusDetails-item-response
Type:
Show Source
object
-
ErrorId: integer
(int64)
Read Only:
true
Value that uniquely identifies the error, if any, in the request. -
ImportRequestId: integer
(int64)
Read Only:
true
Value that uniquely identifies the import data source. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
MessageCode: string
Read Only:
true
Maximum Length:30
Abbreviation that identifies the message related to the import request. -
MessageToken: string
Read Only:
true
Maximum Length:30
Value that identifies the first token of the message. -
MessageToken2: string
Read Only:
true
Maximum Length:30
Value that identifies the second token of the message. -
MessageToken3: string
Read Only:
true
Maximum Length:30
Value that identifies the third token of the message. -
MessageTokenValue: string
Read Only:
true
Maximum Length:300
Value of the first token of the message. -
MessageTokenValue2: string
Read Only:
true
Maximum Length:300
Value of the second token of the message. -
MessageTokenValue3: string
Read Only:
true
Maximum Length:300
Value of the third token of the message. -
RowNumber: integer
Read Only:
true
Number that identifies the row in the comma-separated values file if using file import.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Links
- documentTypeCodesLOV
-
The following properties are defined on the LOV link relation:
- Source Attribute: DocumentTypeCode; Target Attribute: DocumentTypeCode
- Display Attribute: DocumentTypeCode, DocumentTypeName
- statusDetails
-
Parameters:
- ImportRequestId:
$request.path.ImportRequestId
The Status Details resource gets the errors associated with a customer demand upload request. - ImportRequestId:
Examples
This example describes how to upload compressed files containing customer demands that are processed by Oracle Supply Chain Collaboration Cloud.
Step 1: Create a customer demand file
- Create a CSV file with the these column headers: Customer Number, Customer Site, Item, Organization, Measure Code, Quantity, Date.
- Compress the CSV file to ZIP format.
- Encode the ZIP file to Base64 format.
Step 2: Create an upload request
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.action+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/collaborationCustomerDemandUploads"
Example Request Body
The following example includes the contents of the request
body in JSON format. In this example, a file attahment 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.
{ "DocumentTypeCode":"VCS_FORECAST", "IncrementalFlag":false, "Attachment":"UEsDBBQAA...", "Notes":"Order Forecast for the next 2 years." }
Example Response Body
The following example includes the contents of the response body in JSON format:
{ "ImportRequestId": 300100549961841, "LoadProcessId": null, "ProcessId": null, "DocumentTypeCode": "VCS_FORECAST", "DocumentTypeName": "Forecast", "Filename": "CustomerDemand_11-19-2021-21-54-37.zip", "DocumentId": 292098, "StatusCode": "IN_PROCESS", "Status": null, "PublishedByPartyCode": "ORA_VCS_ENTERPRISE", "PublishedByParty": null, "Notes": "Order Forecast for the next 2 years.", "CreatedBy": "COLLABPLANNER", "CreationDate": "2021-11-19T21:54:37+00:00", "LastUpdatedBy": "COLLABPLANNER", "LastUpdateDate": "2021-11-19T21:54:38.970+00:00", "ErrorFlag": false, "IncrementalFlag": false, "InitiateProcessingFlag": false, "MessageId": null, "B2BUser": null, "B2BFlag": false, "PartnerId": null, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationCustomerDemandUploads/300100549961841", "name": "collaborationCustomerDemandUploads", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationCustomerDemandUploads/300100549961841", "name": "collaborationCustomerDemandUploads", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/collaborationCustomerDemandUploads/300100549961841/child/statusDetails", "name": "statusDetails", "kind": "collection" }, { "rel": "enclosure", "href": "https://servername/fscmRestApi/resources/version/collaborationCustomerDemandUploads/300100549961841/enclosure/Attachment", "name": "Attachment", "kind": "other" } ] }