JSON Specifications
This section provides JSON specifications for the following:
Create Integrator
To create an integrator via JSON:
HTTP POST /integrators/ with ‘Content-Type: application/json’
Message:
{
“name”: “Integrator Name”,
“description”: “Integrator for some component”,
“integrator_id”: “578e98111fa261f4867bdf08”, // Integrator companyId or "-"
“target_company_id”: “57c83c25050857ce5d216122”, // Target companyId or "*"
}Response:
{
"is_active": true,
"created_at": "20XX-03-05T12:23:16.393Z",
"created_by": "587fde57a9c32300d6124657",
"updated_at": null,
"updated_by": null,
"name": "Integrator name",
"description": "Integrator for some component",
"integrator_id": "578e98111fa261f4867bdf08",
"target_company_id": "57c83c25050857ce5d216122",
"keys": [],
"id": ObjectId("5a9d36b46bc8f600acca5f17")
}The following defines the response fields:
Field | Description |
|---|---|
description | Integrator description |
id | Integrator document ID |
integrator_id | Company integrator ID |
is_active | Indicates integrator status |
keys | Array of integrator keys |
name | Integrator name |
target_company_id | Company to integrate ID |
Generate Integrator Key
To generate an integrator key via JSON:
HTTP POST /integrators/:integratorId/keys with ‘Content-Type: application/json’
Message:
EMPTY
Response:
{
key_id: 100000000, secret_key: 20000000
}Important
Save the secret_key value from the response. It is only displayed once in the body of the response and is required to retrieve the integrator token.
Get Integrator Key
To get an integrator key via JSON:
HTTP GET /integrators/:integratorId/keys/:keyId with ‘Content-Type: application/json’
Message:
EMPTY
Response:
{
"key_id": "867cb1b5-9415-45ab-9189",
"is_active": true,
"permissions": []
}Manage Integrator Key
To manage an integrator key via JSON:
HTTP PUT /integrators/:integratorId/keys/:keyId with ‘Content-Type: application/json’
Message:
EMPTY
Response:
{
"permissions": [
{
"type" : "action",
"name" : "Permission.Name",
"app_code" : "Application.Code",
"value" : true
}
]
}Important
Only permissions in the ACL permissions for the authorization request token should be added.
Revoke Integrator Key
To revoke an integrator key via JSON:
HTTP DELETE /integrators/:integratorId/keys/:keyId with ‘Content-Type: application/json’
Message:
EMPTY
Response:
{
"is_active": true,
"created_at": "20XX-03-05T12:23:16.393Z",
"created_by": "587fde57a9c32300d6124657",
"updated_at": null,
"updated_by": null,
"name": "Integrator name",
"description": "Integrator for some component",
"integrator_id": "578e98111fa261f4867bdf08",
"target_company_id": "57c83c25050857ce5d216122",
"keys": [],
"id": ObjectId("5a9d36b46bc8f600acca5f17")
}Get Integrator Token
To get the integrator token via JSON, use the following request:
curl --location --request POST '{{portal_backend_endpoint}}/integrator/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"key_id": "the_key_id",
"secret_key": "the_secret_key"
}'For the steps, see Getting an Integrator Token. For more information, see Generate Integrator Key and Get Integrator Key.
The following identifies Portal Backend endpoints:
Stack | Endpoint |
|---|---|
QA |
|
UAT |
|
PROD |
|