Viewing, Adding, or Deleting Tags for Materials and BOMs by Using the API
This topic describes how you can use the Materials and BOM Tag Management API to add tags to materials or BOMs and to view or delete tags associated with BOMs and materials.
Prerequisites
-
For BOM and material tagging to work, the parameter BOM_V2_ENABLEDmust be enabled.
-
To create an application and request access to use the SAP Ariba APIs relevant to this feature, you must have access to the SAP Ariba Developer Portal. For details refer to Steps to Start Using the SAP Ariba APIs in Help for the SAP Ariba Developer Portal.
-
All queries made to this API must be authenticated using OAuth authentication. For details refer to SAP Ariba Developer Portal Authentication in Help for the SAP Ariba Developer Portal.
Context
-
To view the tags associated with a BOM, run the following REST call:
GET {{runtime_url}}/tags?$filter=bomNumber eq bomNumber and alternateBOMNumber eq alternateBOMNumber and usage eq usage&realm=realmWhere:-
bomNumber is the BOM number of the BOM for which you want to view the tags.
-
alternateBOMNumber is the alternate BOM number of the BOM for which you want to view the tags.
-
usage is the usage value of the BOM for which you want to view the tags.
-
realm is the name of the site to which the query is sent.
-
-
To view the tags associated with a material, run the following REST call:
GET {{runtime_url}}/tags?$filter=materialId eq materialID&realm=realmWhere
-
materialID is the material ID of the item for which you want to view the tags.
-
realm is the name of the site to which the query is sent.
-
-
To adds tags to a BOM or material, run the following REST call:
POST {{runtime_url}}/tags?realm = realm Request body: { "alternateBOMNumber": "string", "bomNumber": "string", "materialId": "string", "tag": "string", "usage": "string" }Where:-
realm contains the name of the site to which the query is sent.
-
alternateBOMNumber contains the alternate BOM number of the BOM to which you want to add tags.
-
bomNumber contains the BOM number of the BOM to which you want to add tags.
-
usage contains the usage value of the BOM to which you want to add tags.
-
materialID contains the material ID of the item to which you want to add tags.
-
tag contains the tag you want to add to the BOM or material. This parameter is mandatory.
-
-
To delete tags associated with a BOM or material, run the following REST call:
DELETE {{runtime_url}}/tags?realm = realm Request body: { "alternateBOMNumber": "string", "bomNumber": "string", "materialId": "string", "tag": "string", "usage": "string" }Where:-
realm contains the name of the site to which the query is sent.
-
alternateBOMNumber contains the alternate BOM number of the BOM from which you want to delete tags.
-
bomNumber contains the BOM number of the BOM from which you want to delete tags.
-
usage contains the usage value of the BOM from which you want to delete tags.
-
materialID contains the material ID of the item from which you want to delete tags.
-
tag contains the tag that you want to delete from a BOM or material. This parameter is mandatory.
-