Organisation Management

Create a new Organisation

post

This API is for creation of a new Organisation on the Sunbird Platform.

  • The endpoint for Create a new Organisation is /org/v1/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

X-Authenticated-User-TokenstringRequired

Access token of registered user performing given API request.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Body
all ofOptional
Responses
200
OK. Successful operation. The Organisation Create operation was successfully executed.
application/json
Responseall of
and
post
POST /api/org/v1/create HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 455

{
  "request": {
    "orgName": "Org Name",
    "channel": "Channel",
    "description": "Description",
    "externalId": "ExtId",
    "email": "[email protected]",
    "isSSOEnabled": true,
    "organisationType": "school",
    "orgLocation": [
      {
        "id": "9541f516-4c01-4322-aa06-4062687a0ce5",
        "type": "block"
      },
      {
        "id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
        "type": "district"
      },
      {
        "id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
        "type": "cluster"
      },
      {
        "id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
        "type": "state"
      }
    ],
    "isTenant": true
  }
}
{
  "id": "api.org.create",
  "ver": "v1",
  "ets": 1,
  "params": {
    "resmsgid": null,
    "msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "ts": "2020-11-23 10:03:39:935+0000",
  "result": {
    "organisationId": 131636612466278400,
    "response": "SUCCESS"
  }
}

Read Organisation details

post

This API is for viewing details of an existing Organisation on the Sunbird Platform.

  • The endpoint for Read Organisation details is /org/v1/read
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Body
all ofOptional
Responses
200
OK. Successful operation. The requested operation was successfully executed.
application/json
Responseall of
post
POST /api/org/v1/read HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "request": {
    "organisationId": "0131630445447741440"
  }
}
{
  "result": {
    "id": "api.org.read",
    "ver": "v1",
    "ts": "2020-11-23 10:03:39:935+0000",
    "params": {
      "resmsgid": null,
      "msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
      "err": null,
      "status": "success",
      "errmsg": null
    },
    "responseCode": "OK",
    "result": {
      "dateTime": null,
      "preferredLanguage": null,
      "keys": {},
      "channel\"": "ChannelNew",
      "approvedBy": null,
      "description": "Updated Description",
      "updatedDate": "2020-12-01 10:29:49:496+0000",
      "addressId": "0131630420489011201",
      "provider": "channelnew",
      "orgCode": null,
      "locationId": null,
      "theme": null,
      "id": "0131630445447741440",
      "isApproved": null,
      "communityId": null,
      "slug": "channelnew",
      "email": "[email protected]",
      "isSSOEnabled": false,
      "identifier": "0131630445447741440",
      "thumbnail": null,
      "updatedBy\"": null,
      "orgName": "Org Name",
      "address": {},
      "externalId": "extid",
      "rootOrgId": "0131630445447741440",
      "imgUrl": null,
      "approvedDate": null,
      "homeUrl": null,
      "isDefault": null,
      "createdDate": "2020-12-01 09:52:46:962+0000",
      "createdBy": null,
      "hashTagId": "0131630445447741440",
      "noOfMembers": null,
      "status": 0,
      "orgLocation": [
        {
          "id": "9541f516-4c01-4322-aa06-4062687a0ce5",
          "type": "block"
        },
        {
          "id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
          "type": "district"
        },
        {
          "id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
          "type": "cluster"
        },
        {
          "id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
          "type": "state"
        }
      ],
      "isTenant": true,
      "isSchool": true,
      "organisationType": 2
    }
  }
}

Search for an Organisation

post

This API is for searching for Organisations on the Sunbird Platform.

  • The endpoint for Search for an Organisation is /org/v1/search
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

X-Authenticated-User-TokenstringRequired

Access token of registered user performing given API request.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Body
all ofOptional
Responses
200
OK. Successful operation. The requested operation was successfully executed.
application/json
post
POST /api/org/v1/search HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "request": {
    "filters": {
      "id": "0131630445447741440"
    }
  }
}
{
  "id": "api.org.search",
  "ver": "v1",
  "ts": "2020-11-23 09:16:58:628+0000",
  "params": {
    "resmsgid": null,
    "msgid": "ad7135b8-ef64-44bd-adaa-0b131a657689",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "count": 1,
      "content": [
        {
          "dateTime": null,
          "preferredLanguage": null,
          "keys": {},
          "channel\"": "ChannelNew",
          "approvedBy": null,
          "description": "Updated Description",
          "updatedDate": "2020-12-01 10:29:49:496+0000",
          "addressId": "0131630420489011201",
          "provider": "channelnew",
          "orgCode": null,
          "locationId": null,
          "theme": null,
          "id": "0131630445447741440",
          "isApproved": null,
          "communityId": null,
          "slug": "channelnew",
          "email": "[email protected]",
          "isSSOEnabled": false,
          "identifier": "0131630445447741440",
          "thumbnail": null,
          "updatedBy\"": null,
          "orgName": "Org Name",
          "address": {},
          "externalId": "extid",
          "rootOrgId": "0131630445447741440",
          "imgUrl": null,
          "approvedDate": null,
          "homeUrl": null,
          "isDefault": null,
          "createdDate": "2020-12-01 09:52:46:962+0000",
          "createdBy": null,
          "hashTagId": "0131630445447741440",
          "noOfMembers": null,
          "status": 0,
          "orgLocation": [
            {
              "id": "9541f516-4c01-4322-aa06-4062687a0ce5",
              "type": "block"
            },
            {
              "id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
              "type": "district"
            },
            {
              "id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
              "type": "cluster"
            },
            {
              "id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
              "type": "state"
            }
          ],
          "organisationType": 2,
          "isSchool": true,
          "isTenant": true
        }
      ]
    }
  }
}

Update particulars of an existing Organisation

patch

This API is for updating details of an existing Organisation on the Sunbird Platform.

  • The endpoint for Update particulars of an existing Organisation is /org/v1/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

X-Authenticated-User-TokenstringRequired

Access token of registered user performing given API request.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Body
all ofOptional
Responses
200
OK. Successful operation. The requested operation was successfully executed.
application/json
Responseall of
and
patch
PATCH /api/org/v1/update HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 385

{
  "request": {
    "organisationId": "0131630445447741440,",
    "description": "updated description,",
    "orgName": "Updated Org Name,",
    "orgLocation": [
      {
        "id": "9541f516-4c01-4322-aa06-4062687a0ce5",
        "type": "block"
      },
      {
        "id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
        "type": "district"
      },
      {
        "id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
        "type": "cluster"
      },
      {
        "id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
        "type": "state"
      }
    ]
  }
}
{
  "id": "api.org.status.update",
  "ver": "v1",
  "ets": 1,
  "params": {
    "resmsgid": null,
    "msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "ts": "2020-11-23 10:03:39:935+0000",
  "result": {
    "organisationId": 131636612466278400,
    "response": "SUCCESS"
  }
}

Organisation update status

patch

This API is for updating status of an existing Organisation on the Sunbird Platform.

  • The endpoint for Organisation update status is /org/v1/status/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

X-Authenticated-User-TokenstringRequired

Access token of registered user performing given API request.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Body
all ofOptional
Responses
200
OK. Successful operation. The requested operation was successfully executed.
application/json
Responseall of
and
patch
PATCH /api/org/v1/status/update HTTP/1.1
Host: staging.sunbirded.org
X-Authenticated-User-Token: text
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "request": {
    "filters": {
      "organisationId": "0131630445447741440",
      "status": 0
    }
  }
}
{
  "id": "api.org.status.update",
  "ver": "v1",
  "ets": 1,
  "params": {
    "resmsgid": null,
    "msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "ts": "2020-11-23 10:03:39:935+0000",
  "result": {
    "organisationId": 131636612466278400,
    "response": "SUCCESS"
  }
}

Assign Key to an Organisation

post

This API is for creation/addition of keys to an Organisation

Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

X-Authenticated-User-TokenstringRequired

Access token of registered user performing given API request.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Body
all ofOptional
Responses
200
OK. Successful operation. The Assign key to an Organisation operation was successfully executed.
application/json
Responseall of
and
post
POST /api/org/v1/assign/key HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "request": {
    "id": "0131630445447741440",
    "signKeys": [
      "S1",
      "S2"
    ],
    "encKeys": [
      "E1",
      "E2"
    ]
  }
}
{
  "id": "api.org.assign.key",
  "ver": "v1",
  "ets": 1,
  "params": {
    "resmsgid": null,
    "msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "ts": "2020-11-23 10:03:39:935+0000",
  "result": {
    "response": "SUCCESS"
  }
}

Last updated

Was this helpful?