{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/3485","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/3485/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/3485/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/3485/events","html_url":"https://github.com/magento/magento2/issues/3485","id":134873312,"number":3485,"title":"Trouble in attaching comments to shipment record created using shipment api","user":{"login":"ruby10","id":12557241,"avatar_url":"https://avatars.githubusercontent.com/u/12557241?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby10","html_url":"https://github.com/ruby10","followers_url":"https://api.github.com/users/ruby10/followers","following_url":"https://api.github.com/users/ruby10/following{/other_user}","gists_url":"https://api.github.com/users/ruby10/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby10/subscriptions","organizations_url":"https://api.github.com/users/ruby10/orgs","repos_url":"https://api.github.com/users/ruby10/repos","events_url":"https://api.github.com/users/ruby10/events{/privacy}","received_events_url":"https://api.github.com/users/ruby10/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/CS","name":"CS","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"NadiyaS","id":11783379,"avatar_url":"https://avatars.githubusercontent.com/u/11783379?v=3","gravatar_id":"","url":"https://api.github.com/users/NadiyaS","html_url":"https://github.com/NadiyaS","followers_url":"https://api.github.com/users/NadiyaS/followers","following_url":"https://api.github.com/users/NadiyaS/following{/other_user}","gists_url":"https://api.github.com/users/NadiyaS/gists{/gist_id}","starred_url":"https://api.github.com/users/NadiyaS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NadiyaS/subscriptions","organizations_url":"https://api.github.com/users/NadiyaS/orgs","repos_url":"https://api.github.com/users/NadiyaS/repos","events_url":"https://api.github.com/users/NadiyaS/events{/privacy}","received_events_url":"https://api.github.com/users/NadiyaS/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-02-19T14:05:52Z","updated_at":"2016-06-22T15:36:52Z","closed_at":null,"body":"While creating shipment records using Magento2.x shipment API \"POST /V1/shipment/\" , it has been made mandatory to add \"parentId\" field inside comments array json with an appropriate value , which refers to \"entityId\" of shipment record we are going to create, but how is it possible to know this before creation, since is an auto-generated field. If we provide \"null\", \"0\" to \"parentId\", or omit this field from request json, it is throwing \"400 Bad Request\" error. Also if i provide some non-zero value for this \"parentId\" field , then provided comment json will be attached to the shipment record having \"entityId\" field with that particular value.\r\nFollowing is the json \r\n{\r\n    \"entity\": {\r\n        \"orderId\" : 45,\r\n        \"items\": [{\r\n                \"orderItemId\" : 87,\r\n                 \"qty\": 1\r\n            }],\r\n            \r\n         \"comments\": [\r\n             {\r\n              \"comment\": \"comment\",\r\n              \"isCustomerNotified\": 0,\r\n              \"isVisibleOnFront\": 0\r\n      }]\r\n            \r\n    }\r\n}"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/227783743","html_url":"https://github.com/magento/magento2/issues/3485#issuecomment-227783743","issue_url":"https://api.github.com/repos/magento/magento2/issues/3485","id":227783743,"user":{"login":"Mulderua","id":12249206,"avatar_url":"https://avatars.githubusercontent.com/u/12249206?v=3","gravatar_id":"","url":"https://api.github.com/users/Mulderua","html_url":"https://github.com/Mulderua","followers_url":"https://api.github.com/users/Mulderua/followers","following_url":"https://api.github.com/users/Mulderua/following{/other_user}","gists_url":"https://api.github.com/users/Mulderua/gists{/gist_id}","starred_url":"https://api.github.com/users/Mulderua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mulderua/subscriptions","organizations_url":"https://api.github.com/users/Mulderua/orgs","repos_url":"https://api.github.com/users/Mulderua/repos","events_url":"https://api.github.com/users/Mulderua/events{/privacy}","received_events_url":"https://api.github.com/users/Mulderua/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T15:36:52Z","updated_at":"2016-06-22T15:36:52Z","body":"Hi @ruby10 , you cannot add comment before you create shipping. "}}
{"actor":{"display_login":"Mulderua"}}