Add Suppliers with Line Restrictions

You can use the Supplier Negotiations REST resource to add suppliers in a draft negotiation. When you add these suppliers, you can control their line access. You can add line access restrictions for suppliers using the Supplier Negotiations resource.

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

  1. You add suppliers along with line access restrictions
  2. You remove line access restriction for a supplier (grant access back)
  3. You revoke line access restriction for a supplier already added to the draft negotiation

Add Suppliers Along With Line Access Restrictions

Let's consider that Clare Jones is inviting two suppliers PennyPack Systems and Green Corp. to the negotiation with access restriction for two lines for each supplier.

Example URL

Use this resource URL format.

POST

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

Example Request

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

Path: /supplierNegotiations/AuctionHeaderId/child/suppliers

{
    "parts": [
        {
            "id": "part1",
            "path": "/supplierNegotiations/300100194925269/child/suppliers",
            "operation": "create",
            "payload": {
                "Supplier": "PennyPack Systems",
                "SupplierSite": "New York",
                "SupplierContact": "Smith, Jim",
                "supplierLineAccessRestrictions": [
                	{
                        "Line": 1
                    },
                    {
                        "Line": 3
                    }
                ]
            }
        },
        {
            "id": "part1",
            "path": "/supplierNegotiations/300100194925269/child/suppliers",
            "operation": "create",
            "payload": {
                "Supplier": "Green Corp.",
                "SupplierSite": "PARIS_HQ",
                "SupplierContact": "Johnson, Marcel",
                "supplierLineAccessRestrictions": [
                	{
                        "Line": 1
                    },
                    {
                        "Line": 2
                    }
                ]
            }
        }
    ]
}

Example Response

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

{
  "parts": [
    {
      "id": "part1",
      "path": "https://servername/fscmRestApi/resources/version/supplierNegotiations/300100194925269/child/suppliers",
      "operation": "create",
      "payload": {
        "AuctionHeaderId": 300100194925269,
        "SupplierInvitationId": 40,
        "SupplierNumber": 300100148050915,
        "Supplier": "PennyPack Systems",
        "SupplierId": 300100148050913,
        "SupplierSite": "New York",
        "SupplierSiteId": 300100148050949,
        "SupplierContact": "Smith, Jim",
        "SupplierContactId": 300100148050934,
        "AdditionalContactEmail": null,
        "RequestedSupplier": null,
        "RequestedSupplierId": null,
        "RequestedSupplierContact": null,
        "RequestedSupplierContactId": null,
        "ResponseCurrency": null,
        "ResponseCurrencyCode": null,
        "ConversionRate": null,
        "PricePrecision": null,
        "NotifyAllSupplierContactsFlag": false,
        "CreatedBy": "CLARE.JONES",
        "CreationDate": "2020-05-22T15:14:01.018+00:00",
        "LastUpdateDate": "2020-05-22T15:14:03.487+00:00",
        "LastUpdatedBy": "CLARE.JONES",
        "supplierLineAccessRestrictions": {
          "items": [
            {
              "AuctionHeaderId": 300100194925269,
              "LineId": 1,
              "SupplierInvitationId": 40,
              "Line": "1",
              "LineDescription": "UHD 4K Smart LED TV",
              "CreatedBy": "CLARE.JONES",
              "CreationDate": "2020-05-22T15:14:02.217+00:00",
              "LastUpdatedBy": "CLARE.JONES",
              "LastUpdateDate": "2020-05-22T15:14:03.437+00:00",
              "links": [...]
             },
            {
              "AuctionHeaderId": 300100194925269,
              "LineId": 2,
              "SupplierInvitationId": 40,
              "Line": "3",
              "LineDescription": "Plain Item",
              "CreatedBy": "CLARE.JONES",
              "CreationDate": "2020-05-22T15:14:02.818+00:00",
              "LastUpdatedBy": "CLARE.JONES",
              "LastUpdateDate": "2020-05-22T15:14:03.437+00:00",
              "links": [...]
            }
          ],
          "count": 2,
          "hasMore": false,
          "limit": 9,
          "offset": 0,
          "links": [...]
        },
        "links": [...]
      }
    },
    {
      "id": "part1",
      "path": "https://servername/fscmRestApi/resources/version/supplierNegotiations/300100194925269/child/suppliers",
      "operation": "create",
      "payload": {
        "AuctionHeaderId": 300100194925269,
        "SupplierInvitationId": 50,
        "SupplierNumber": 557,
        "Supplier": "Green Corp.",
        "SupplierId": 12465,
        "SupplierSite": "PARIS_HQ",
        "SupplierSiteId": 1534,
        "SupplierContact": "Johnson, Marcel",
        "SupplierContactId": 299918,
        "AdditionalContactEmail": null,
        "RequestedSupplier": null,
        "RequestedSupplierId": null,
        "RequestedSupplierContact": null,
        "RequestedSupplierContactId": null,
        "ResponseCurrency": null,
        "ResponseCurrencyCode": null,
        "ConversionRate": null,
        "PricePrecision": null,
        "NotifyAllSupplierContactsFlag": false,
        "CreatedBy": "CLARE.JONES",
        "CreationDate": "2020-05-22T15:14:03.317+00:00",
        "LastUpdateDate": "2020-05-22T15:14:03.490+00:00",
        "LastUpdatedBy": "CLARE.JONES",
        "supplierLineAccessRestrictions": {
          "items": [
            {
              "AuctionHeaderId": 300100194925269,
              "LineId": 1,
              "SupplierInvitationId": 50,
              "Line": "1",
              "LineDescription": "UHD 4K Smart LED TV",
              "CreatedBy": "CLARE.JONES",
              "CreationDate": "2020-05-22T15:14:03.399+00:00",
              "LastUpdatedBy": "CLARE.JONES",
              "LastUpdateDate": "2020-05-22T15:14:03.437+00:00",
              "links": [...]
            },
            {
              "AuctionHeaderId": 300100194925269,
              "LineId": 3,
              "SupplierInvitationId": 50,
              "Line": "2",
              "LineDescription": "FOS Laptop Battery",
              "CreatedBy": "CLARE.JONES",
              "CreationDate": "2020-05-22T15:14:03.420+00:00",
              "LastUpdatedBy": "CLARE.JONES",
              "LastUpdateDate": "2020-05-22T15:14:03.438+00:00",
              "links": [...]
            }
          ],
          "count": 2,
          "hasMore": false,
          "limit": 9,
          "offset": 0,
          "links": [...]
        },
        "links": [...]
      }
    }
  ]
}

Remove Line Access Restriction for a Supplier (Grant Access Back)

Let's consider that Clare Jones has revoked access to Line 1 and Line 3 for PennyPack Systems and now she wants to grant access to both these lines.

Example URL

Use this resource URL format.

POST

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

Example Request

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

Path: /supplierNegotiations/AuctionHeaderId/child/suppliers/{SupplierInvitationId/child/supplierLineAccessRestrictions/LineId

{
    "parts": [
        {
            "id": "part1",
            "path": "/supplierNegotiations/300100194925269/child/suppliers/40/child/supplierLineAccessRestrictions/1",
            "operation":"delete"
		},
        {
            "id": "part2",
            "path": "/supplierNegotiations/300100194925269/child/suppliers/40/child/supplierLineAccessRestrictions/2",
            "operation": "delete"
        }
    ]
}

Example Response

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

{
    "parts": [
        {
            "id": "part1",
            "path": "https://servername/fscmRestApi/resources/version/supplierNegotiations/300100194925269/child/suppliers/40/child/supplierLineAccessRestrictions/1",
            "operation": "delete",
            "payload": null
        },
        {
            "id": "part2",
           "path": "https://servername/fscmRestApi/resources/version/supplierNegotiations/300100194925269/child/suppliers/40/child/supplierLineAccessRestrictions/2",
            "operation": "delete",
            "payload": null
        }
    ]
}

Revoke Line Access Restriction for a Supplier Already Added to the Draft Negotiation

Let's consider Clare Jones has already invited the supplier Green Corp. She would now like to revoke access to Line 1 and Line 3 which are already added to the negotiation.

Example URL

Use this resource URL format.

POST

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

Example Request

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

Path: /supplierNegotiations/AuctionHeaderId/child/suppliers/SupplierInvitationId/child/supplierLineAccessRestrictions

{
    "parts": [
        {
            "id": "part1",
            "path": "/supplierNegotiations/300100194925269/child/suppliers/30/child/supplierLineAccessRestrictions",
            "operation": "create",
            "payload": {
                "Line": "1"
            }
        },
        {
            "id": "part2",
            "path": "/supplierNegotiations/300100194925269/child/suppliers/30/child/supplierLineAccessRestrictions",
            "operation": "create",
            "payload": {
                "Line": "3"
            }
        }
    ]
}

Example Response

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

{
  "parts": [
    {
      "id": "part1",
      "path": "https://servername/fscmRestApi/resources/version/supplierNegotiations/300100194925269/child/suppliers/30/child/supplierLineAccessRestrictions",
      "operation": "create",
      "payload": {
        "AuctionHeaderId": 300100194925269,
        "LineId": 1,
        "SupplierInvitationId": 30,
        "Line": "1",
        "LineDescription": "UHD 4K Smart LED TV",
        "CreatedBy": "CLARE.JONES",
        "CreationDate": "2020-05-22T11:51:47+00:00",
        "LastUpdatedBy": "CLARE.JONES",
        "LastUpdateDate": "2020-05-22T11:51:47.188+00:00",
        "links": [...]
      }
    },
    {
      "id": "part2",
      "path": "https://servername/fscmRestApi/resources/version/supplierNegotiations/300100194925269/child/suppliers/30/child/supplierLineAccessRestrictions",
      "operation": "create",
      "payload": {
        "AuctionHeaderId": 300100194925269,
        "LineId": 2,
        "SupplierInvitationId": 30,
        "Line": "3",
        "LineDescription": "Plain Item",
        "CreatedBy": "CLARE.JONES",
        "CreationDate": "2020-05-22T11:51:47.172+00:00",
        "LastUpdatedBy": "CLARE.JONES",
        "LastUpdateDate": "2020-05-22T11:51:47.188+00:00",
        "links": [...]
      }
    }
  ]
}