Use Cases for Organization
I want to
Request Type Example URL
Retrieve and display details of a particular organization. GET by ID {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization/{ID} NOTE: For an invalid ID, you receive HTTP 404 error.Based on the provided field values, retrieve and display details of organizations. GET with Fields {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization?fields=name,organizationType NOTE: The requested fields are part of the output if they have a value.List all the organizations present in the system. GET List {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization List organizations present in the system based on the filter applied. GET List with Filtering {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization?name=Acme NOTE: The requested fields are part of the output if they have a value.List organizations, limit the number of records to a specified limit, and start the results from the page specified by offset. GET List by limit and offset {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization?offset=4&pageLimit=1&pageinfo=true Create a new organization by providing the required details. POST {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization NOTE: A new organization is created based on the values mentioned for the mandatory fields.Update details of a particular organization. PATCH {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization/{ID} Delete an organization. DELETE {{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization/{ID} NOTE: DELETE requires an Apex extensibility implementation. Without it, the API returns HTTP 400.
GET by ID
Consider you want to retrieve details of a particular organization.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization/{ID}
Sample Response
1 {
2 "id": "001xx000003GkRbAAK",
3 "href": "/connect/comms/partymanagement/v5/organization/001xx000003GkRbAAK",
4 "name": "Acme Corporation",
5 "organizationType": "Partner",
6 "contactMedium": [
7 {
8 "phoneNumber": "+1-555-0300",
9 "@type": "PhoneContactMedium"
10 },
11 {
12 "faxNumber": "+1-555-0301",
13 "@type": "FaxContactMedium"
14 },
15 {
16 "city": "San Francisco",
17 "country": "US",
18 "postCode": "94105",
19 "stateOrProvince": "CA",
20 "street1": "1 Market Street",
21 "@type": "GeographicAddressContactMedium"
22 }
23 ],
24 "@type": "Organization"
25 }
GET with Fields
Consider you want to retrieve organizations and return only these fields in the output.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization?fields=name,organizationType
Sample Response
1 [
2 {
3 "id": "001xx000003GkRbAAK",
4 "href": "/connect/comms/partymanagement/v5/organization/001xx000003GkRbAAK",
5 "name": "Acme Corporation",
6 "organizationType": "Partner",
7 "@type": "Organization"
8 }
9 ]
GET List
Consider there are multiple organizations in the system and you want to list all of them.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization
GET List with Filtering
Consider you want to retrieve organizations with applied filter values.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization?name=Acme
Sample Response
1 [
2 {
3 "id": "001xx000003GkRbAAK",
4 "href": "/connect/comms/partymanagement/v5/organization/001xx000003GkRbAAK",
5 "name": "Acme Corporation",
6 "organizationType": "Partner",
7 "@type": "Organization"
8 }
9 ]
GET List by limit and offset
Consider you want to retrieve a list of organizations, limit the number of records, and start the results from the specified offset.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization?offset=4&pageLimit=1&pageinfo=true
POST
Consider you want to create a new organization. name is mandatory.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization
Sample Request
1 {
2 "@type": "Organization",
3 "name": "Minimal Org"
4 }
Sample Response
1 {
2 "id": "001xx000003H8NWAA0",
3 "href": "/connect/comms/partymanagement/v5/organization/001xx000003H8NWAA0",
4 "name": "Minimal Org",
5 "@type": "Organization"
6 }
PATCH
Consider you want to update details of a particular organization.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization/{ID}
Sample Request
1 {
2 "@type": "Organization",
3 "name": "Acme Corp Updated",
4 "contactMedium": [
5 {
6 "@type": "PhoneContactMedium",
7 "phoneNumber": "+1-555-0400"
8 },
9 {
10 "@type": "GeographicAddressContactMedium",
11 "street1": "789 Pine Road",
12 "city": "Austin",
13 "stateOrProvince": "TX",
14 "postCode": "73301",
15 "country": "US"
16 }
17 ],
18 "organizationParentRelationship": {
19 "organization": {
20 "id": "001xx000003GkTDAA0"
21 }
22 }
23 }
DELETE
Account does not include a status field that supports soft delete out of the box. The DELETE endpoint is provided as an extensibility hook. Without a custom Apex implementation, the API returns HTTP 400.
Sample URL
{{orgendpoint}}/services/data/{{version}}/connect/comms/partymanagement/v5/organization/{ID}
Sample Request
No request body.
Sample Response
With an Apex extensibility implementation: HTTP 204 with no response body.
Without extensibility:
1 [
2 {
3 "errorCode": "BAD_REQUEST",
4 "message": "DELETE operation for organisation requires an extensibility class implementing comms_apex_ext.IOrganizationPartyManagementDELETE. Configure a custom Apex class that provides a soft-delete status field via the customiseMutationPayload hook."
5 }
6 ]