Post Collaboration Relationships

You can use REST API to create one or more collaboration relationships. You may have your own application with a list of relationships that you want to collaborate on or, you may be publishing order forecasts from Oracle Supply Chain Planning Cloud and want to use the collaboration relationship candidates to retrieve a list of potential collaboration relationships.

Let's discuss these scenarios:

  • Post a new collaboration relationship.

  • Patch an existing relationship with new attributes.

Post a New Collaboration Relationship

For this example, assume you create an application that allows your customer to use a client to connect to your partner application, and then use REST API. Assume your customer wants to create a new collaboration relationship in Supply Chain Collaboration from another application.

Here's a typical application processing flow for the scenarios:

  1. You send a REST API request from the client to the server.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the values for these attributes from the response payload, and then displays them in fields in the client.

    Attribute Description

    RelationshipNumber

    Value that uniquely identifies the relationship.

    ShipFromSupplierName

    Name of the supplier that ships the item.

    ProcurementBu

    Name of the business unit. The application assigns the supplier to this business unit.

    ShipToOrganizationCode

    Name of the organization that receives the item.

    ShipToOrganizationName

    Abbreviation that identifies the organization that receives the item.

    ItemNumber

    Number of the item.

    ShipToOrganizationId

    Value that uniquely identifies the organization in the relationship candidate. This organization receives the shipment. It is a primary key that the application creates when it creates an organization.

    EffectiveStartDate

    Date the relationship becomes active.

    EffectiveEndDate

    Date the relationship becomes inactive.

Example URL

Use this resource URL format to create a new collaboration relationship.

POST

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

Example Request

Here's an example of the request body in JSON format.

{
	"ShipFromSupplierName":"Small, Inc",
	"ShipFromSupplierSiteName":"Atlanta",
	"ProcurementBU":"Vision Operations",
	"ShipToOrganizationCode": "V1",
	"ItemNumber": "CPU",
	"ShipToOrganizationId": 204,
	"EffectiveStartDate":"2017-09-01",
	"EffectiveEndDate":"2018-08-31" 
}

Example Response

Here's an example of the response body in JSON format.

{
  "items" : [ {
    "RelationshipId" : 300100114390448,
    "RelationshipNumber" : 19001,
    "AttributeId" : 300100114390449,
    "ShipFromSupplierId" : 1,
    "ShipFromSupplierName" : "Small, Inc",
    "ShipFromSupplierNumber" : "1000",
    "ShipFromSupplierDUNS" : null,
    "ShipFromSupplierAlternateName" : null,
    "ShipFromSupplierSiteId" : 1,
    "ShipFromSupplierSiteName" : "59",
    "ProcurementBU" : "Vision Operations",
    "ShipToOrganizationId" : 204,
    "ShipToOrganizationCode" : "V1",
    "ShipToOrganizationName" : "Vision Operations",
    "ShipToSupplierId" : null,
    "ShipToSupplierName" : null,
    "ShipToSupplierNumber" : null,
    "ShipToSupplierDUNS" : null,
    "ShipToSupplierAlternateName" : null,
    "ShipToSupplierSiteId" : null,
    "ShipToSupplierSiteName" : null,
    "InventoryItemId" : 300100067746623,
    "ItemNumber" : "CPU",
    "ItemDescription" : "(CPU) Included Item",
    "ItemCategory" : "Uncategorized",
    "EffectiveStartDate" : "2017-09-01",
    "EffectiveEndDate" : "2018-08-31",
    "B2BMessagingConfigured" : "N",
    "ForecastHorizonInDays" : null,
    "CommitHorizonInDays" : null,
    "SlaAction" : null,
    "CommitPeriod" : null,
    "CommitPeriodDays" : null,
    "CommitQuantity" : null,
    "CommitQuantityPercentage" : null,
    "CommitSlaInDays" : null,
    "ViewOrderForecasts" : "N",
    "AdjustOrderForecasts" : "N",
    "AdjustCommits" : "N",
    "CreatedBy" : "SCMOPERATIONS",
    "CreationDate" : "2017-09-01T18:10:19+00:00",
    "LastUpdatedBy" : "SCMOPERATIONS",
    "LastUpdateDate" : "2017-09-01T18:10:22.335+00:00",
    "ObjectVersionNumber" : 1,
    "links" : [ {
      "rel" : "self",
      "href" : "https://servername/fscmRestApi/resources/version/collaborationRelationships/00020000000EACED00057708000110F080B71DB00000000EACED00057708000110F080B71DB1",
      "name" : "collaborationRelationships",
      "kind" : "item",
      "properties" : {
        "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000002770400000002737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000017371007E00020000000178"
      }
    }, {
      "rel" : "canonical",
      "href" : "https://servername/fscmRestApi/resources/version/collaborationRelationships/00020000000EACED00057708000110F080B71DB00000000EACED00057708000110F080B71DB1",
      "name" : "collaborationRelationships",
      "kind" : "item"
    }, {
      "rel" : "child",
      "href" : "https://servername/fscmRestApi/resources/version/collaborationRelationships/00020000000EACED00057708000110F080B71DB00000000EACED00057708000110F080B71DB1/child/collaborationPlanners",
      "name" : "collaborationPlanners",
      "kind" : "collection"
    } ]
  } ],
  "count" : 1,
  "hasMore" : false,
  "limit" : 200,
  "offset" : 0,
  "links" : [ {
    "rel" : "self",
    "href" : "https://servername/fscmRestApi/resources/version/collaborationRelationships",
    "name" : "collaborationRelationships",
    "kind" : "collection"
  } ]
}