This article is for an API Partner to retrieve necessary information about the disclosing organizations that they have permission to access the questionnaire-response for.
Contents
Summary
Organizations that are linked to an API Partner can be retrieved using the GET request from this endpoint. This request can also retrieve tagging information of a specified organization.
Pre-requisites: Valid subscription key for the respective Disclosure API environment.
Note - Data Sync: To ensure retrieval of accurate data, it is essential to refresh this request each time a disclosing organization adds you to their response. This is also valid for retrieving tagging information of a partner organisation which have updated their information.
Note - Tagging: A specific organization’s tag information can also be retrieved using this endpoint. A valid partner organization ID is required. Tag information can only be extracted for one organization at a time and will be displayed at the end of the retrieved information from this endpoint.
GET Request
URLs
Sandbox: https://api-pre.cdpgreenstar.net/asp/response/partner/organizations
Production: https://api.cdp.net/response/partner/organizations
Headers/Variables
subscription-key (header): For authorized user, the subscription key. The subscription key can be accessed via the Azure API Management Portal.
organization-id (optional header): A valid partner organization ID is required to get tagging details of a specific organization.
Body
NULL
Response
Top Level: Partner Organization (n)
Information regarding the API Partner that has made the request, containing information about associated organizations (and when applicable, their tags).
Field table
Schema
"name": "string",
"link": "string",
"countryName": "string",
"countryAlpha2": "string",
"isProductionReady": boolean,
"organizations": [{...}],
"organizationId":"string",
"tags": [{...}]
Second Level: Organizations (n+1)
Information regarding the individual organizations that have added you as an API Partner in the CDP Disclosure Platform.
Field table
Schema
...
"organizations": [{
"name": "string",
"language": "string",
"country": "string",
"region": "string",
"organizationNo": integer,
"firstAddPartnerUserId": "string",
"isSupplyChain": boolean
}]
...
Second Level: Tags (n+1)
Information regarding the CDP Tags associated to the specified organization.
This array is only populated if a valid organization ID is specified in the request headers. Otherwise, a blank array is returned.
Field table
Schema
...
"tags": [{
"id": "string”
"name": "string",
"isVisible": boolean,
"isTagMatching": boolean,
"groupId": "string”,
"createdOn": "string”,
"updatedOn": "string",
"isDeleted": boolean
}]
...
}
JSON Response Example
Below is an example API response while calling the GET method for this endpoint. The data retrieved are the list of associated organizations. If organization ID is entered, the tagging information of that organization will also be displayed.
"id": "0153F110-DB8F-42E9-981A-9C7BDF0DC2AD",
"name": "ASP Test Partner",
"link": "https://www.cdp.net/en/",
"countryName": "United Kingdom",
"countryAlpha2": "UK",
"isProductionReady": false,
"organizations": [
{
"id": "8fb3a7a2-635a-ef11-bfe3-000d3a455f4b",
"name": "Test Disclosing Org 1",
"language": null,
"country": "United Kingdom of Great Britain and Northern Ireland",
"region": null,
"organizationNo": 2026991,
"firstAddPartnerUserId": null,
"isSupplyChain": false,
},{
"id": "7a39623c-f135-ef11-8409-6045bd9fa79f",
"name": "Test Disclosing Org 2",
"language": null,
"country": "United States of America",
"region": "Missouri",
"organizationNo": 2023667,
"firstAddPartnerUserId": null,
"isSupplyChain": false,
}
],
"organizationsId": "7a39623c-f135-ef11-8409-6045bd9fa79f",
"tags": [
{
"id": "04127d1e-9eb5-e711-90fd-0050569c58ee",
"name": "Water",
"isVisible": true,
"isTagMatching": true,
"groupId": "81226957-9eb5-e711-90fd-0050569c58ee",
"createdOn": "2024-06-11T10:57:38.566Z",
"updatedOn": "2024-09-03T15:41:11.885Z",
"isDeleted": false,
},{
"id": "39f2769a-41db-4a4d-b827-a1dca5d388fc",
"name": "Company",
"isVisible": false,
"isTagMatching": false,
"groupId": "5622d2fa-aaad-44d6-9e34-4943692f3bc1",
"createdOn": "2024-06-11T10:57:38.566Z",
"updatedOn": "2024-09-03T15:41:11.885Z",
"isDeleted": false,
}
]
}
Error Handling
1. Invalid Subscription Key
When an incorrect or invalid subscription key is entered, the following error is displayed:
"name": "Unauthorized",
"link": 401
Note - Invalid Organization ID: If an invalid organization ID is inputted as part of this endpoint, no error message would be displayed.
POST/PUT/DELETE Requests
POST, PUT and DELETE requests are not implemented for this endpoint, preventing changes being made to an API Partner’s approved organization list.
If you have not found the answer you were looking for, please contact your Account Manager who will be able to assist you further.
