Chilkat Online Tools

Unicode C++ / Zoho CRM REST APIs / Quotes

Back to Collection Items

void ChilkatSample(void)
    {
    json.UpdateString(L"share[0].user.id",L"{{user_id}}");    json.UpdateBool(L"share[0].share_related_records",true);    json.UpdateString(L"share[0].permission",L"read_only");    json.UpdateString(L"share[1].user.id",L"{{user_id}}");    json.UpdateBool(L"share[1].share_related_records",false);    json.UpdateString(L"share[1].permission",L"full_access");    http.put_AuthToken(L"<access_token>");    json.EmitSb(sbRequestBody);    success = http.HttpSb(L"PUT",L"https://domain.com/crm/v2/Quotes/{{record_id}}/actions/share",sbRequestBody,L"utf-8",L"application/json",resp);
    }

Curl Command

curl -X PUT
	-H "Authorization: Bearer <access_token>"
	-d '{
    "share": [
        {
            "user": {
                "id": "{{user_id}}"
            },
            "share_related_records": true,
            "permission": "read_only"
        },
        {
            "user": {
                "id": "{{user_id}}"
            },
            "share_related_records": false,
            "permission": "full_access"
        }
    ]
}'
https://domain.com/crm/v2/Quotes/{{record_id}}/actions/share

Postman Collection Item JSON

{
  "name": "Quotes",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "PUT",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"share\": [\n        {\n            \"user\": {\n                \"id\": \"{{user_id}}\"\n            },\n            \"share_related_records\": true,\n            \"permission\": \"read_only\"\n        },\n        {\n            \"user\": {\n                \"id\": \"{{user_id}}\"\n            },\n            \"share_related_records\": false,\n            \"permission\": \"full_access\"\n        }\n    ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{api-domain}}/crm/v2/Quotes/{{record_id}}/actions/share",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2",
        "Quotes",
        "{{record_id}}",
        "actions",
        "share"
      ]
    },
    "description": "Update the sharing permissions of the shared record."
  },
  "response": [
  ]
}