Update Manufacturer Custom Fields Using Manufacturers REST Services
You can use the Manufacturers resource to update manufacturer custom fields.
In this use case Joe, who has the Product Manager role, is updating Manufacturers to change an Application Composer custom field using the REST API. Joe can use the following steps:
- Get the manufacturer, extract the self-link, and review the value of the custom field.
- Use the self-link and update the custom field.
Get Manufacturer
Joe gets the manufacturer Acme_West and check the contents of the custom field Certified using Manufacturers Services.
Example URL
Use this resource URL format.
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/manufacturersmanufacturers?finder=FindByName;OrganizationName=Acme_West"
Example Response
Here's an example of the reponse body in JSON format:
{ "items": [ { "OrganizationName": "Acme_West", "Comments": null, "RegistryId": "CDRM_941597", "DUNSNumber": "12-000", "Status": "A", "CreatedBy": "JoeEngineer", "CreationDate": "2022-06-28T20:12:22+00:00", "IsActiveFlag": null, "IsPrivateFlag": null, "LastUpdatedBy": "JoeEngineer", "LastUpdateDate": "2022-06-28T20:12:45.836+00:00", "ManufacturerId": 300100674179793, "PartyType": "ORGANIZATION", "Address1":"100 Main Street", "Address2": null, "Country": "US", "CountryName": null, "StateName": null, "County": null, "City": "Austin", "State": "Texas", "PostalCode": "38324", "PrimaryPhoneNumber": "(800)555-1212", "PrimaryPhoneExtension": null, "Province": null, "Address3": null, "Address4": null, "AddressElementAttribute1": null, "AddressElementAttribute2": null, "AddressElementAttribute3": null, "AddressElementAttribute4": null, "AddressElementAttribute5": null, "AddressStyle": "POSTAL_ADDR_US", "Building": null, "FloorNumber": null, "HouseType": null, "PostalPlus4Code": null, "Certified_c": "No", "Custom_Text_c": "Default Value", "Custom_Date_c": "2022-06-23", "Custom_List_c": "HIGH", "Custom_Idea_DCL_Id_c": null, "Custom_Idea_DCL_c": null, "links": [ { "rel": "self", "href": "https://server/fscmRestApi/resources/version/manufacturers/00050000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D20000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A21D653C", "name": "manufacturers", "kind": "item", "properties": {"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000057704000000057372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000047371007E0004000000017371007E0004000000047371007E00040000000178"} }, { "rel": "canonical", "href": "https://server/fscmRestApi/resources/version/manufacturers/00050000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D20000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A21D653C", "name": "manufacturers", "kind": "item" } ] }], "count": 1, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://server/fscmRestApi/resources/version/manufacturers", "name": "manufacturers", "kind": "collection" }] }
Update the Value of the Custom Field
Joe updates the value of Acme_West Certified status to Yes using a PATCH operation and the self-link recorded in the GET response.
Example URL
Use this resource URL format.
PATCH
curl -X PATCH -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/manufacturers/00050000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D20000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A21D653C"
Example Request
Here's an example of the request body in JSON format:
{ "Certified_c": "Yes" }
Example Response
Here's an example of the response body in JSON format:
{ "OrganizationName": "Acme_West", "Comments": null, "RegistryId": "CDRM_941597", "DUNSNumber": "12-000", "Status": "A", "CreatedBy": "JoeEngineer", "CreationDate": "2022-06-28T20:12:22+00:00", "IsActiveFlag": null, "IsPrivateFlag": null, "LastUpdatedBy": "JoeEngineer", "LastUpdateDate": "2022-07-01T12:59:32+00:00", "ManufacturerId": 300100674179793, "PartyType": "ORGANIZATION", "Address1":"100 Main Street", "Address2": null, "Country": "US", "CountryName": null, "StateName": null, "County": null, "City": "Austin", "State": "Texas", "PostalCode": "38324", "PrimaryPhoneNumber": "(800)555-1212", "PrimaryPhoneExtension": null, "Province": null, "Address3": null, "Address4": null, "AddressElementAttribute1": null, "AddressElementAttribute2": null, "AddressElementAttribute3": null, "AddressElementAttribute4": null, "AddressElementAttribute5": null, "AddressStyle": "POSTAL_ADDR_US", "Building": null, "FloorNumber": null, "HouseType": null, "PostalPlus4Code": null, "Certified_c": "Yes", "Custom_Text_c": "New text", "Custom_Date_c": "2022-06-23", "Custom_List_c": "HIGH", "Custom_Idea_DCL_Id_c": null, "Custom_Idea_DCL_c": null, "links": [ { "rel": "self", "href": "https://server/fscmRestApi/resources/version/manufacturers/00050000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D20000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A21D653C", "name": "manufacturers", "kind": "item", "properties": {"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000057704000000057372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000047371007E0004000000017371007E0004000000047371007E00040000000178"} }, { "rel": "canonical", "href": "https://server/fscmRestApi/resources/version/manufacturers/00050000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A214D2D20000000EACED00057708000110F0A214D2D10000000EACED00057708000110F0A21D653C", "name": "manufacturers", "kind": "item" } ] }