Link Business Objects
3 min
you can link different business objects based on relationships for example, you can link a journal to an incident base url https //{tenant url}/api/odata/businessobject/{business object name}('{business object unique key}')/{business object relationship name}('{unique key of the related business object}')/$ref ensure the business object name is suffixed with an "s" link business objects example here is an example to link a journal to an incident url https //{tenant url}/api/odata/businessobject/incidents ('87168fca6f0c46b2b5cdc5226fb7c773')/incidentcontainsjournal ('4f34db8563df450cae5381cda9805b21')/$ref \<font color="#ffffff">method\</font> patch header name authorization jtw token/session key/rest api key status code 200 response payload click to view response payload { "code" "ism 2000", "description" "ok", "message" \[ "successfully created the link" ], "help" "" } unsuccessful responses invalid url scenario trying to create a link when the url is invalid invalid url examples https //{tenant url}/api/odata/businessobject/incident('87168fca6f0c46b2b5cdc5226fb7c773')/incidentcontainsjournal('4f34db8563df450cae5381cda9805b21')/$ref header name authorization sessionkey code ism 4004 description not found message \[ "no service for the resource is registered " ] \<font color="#ffffff">http status code\</font> 404 invalid recid scenario trying to create a link when the recid is invalid example https //{tenant url}/api/odata/businessobject/incidents('87168fca6f0c46b2b5cdc5226fb7c773')/incidentcontainsjournal('1234')/$ref header name authorization sessionkey code ism 4000 description invalid request message \[ "record '1234' cannot be found in the related business object 'journal#" ] \<font color="#ffffff">http status code\</font> 400
