GCXONEDocumentation

Account

On this page
  1. POST /account/
  2. Request body
  3. Responses
  4. GET /account/accountByName
  5. Parameters
  6. Responses
  7. POST /account/bulkUpdateActiveInactive
  8. Request body
  9. Responses
  10. POST /account/filter
  11. Request body
  12. Responses
  13. POST /account/listByAccountId
  14. Request body
  15. Responses
  16. GET /account/{id}
  17. Parameters
  18. Responses
  19. PUT /account/{id}
  20. Parameters
  21. Request body
  22. Responses
  23. DELETE /account/{id}
  24. Parameters
  25. Responses
  26. GET /account/{parentAccountId}/customer
  27. Parameters
  28. Responses
  29. GET /account/{parentAccountId}/sites/information
  30. Parameters
  31. Responses
  32. GET /account/{parentAccountId}/users
  33. Parameters
  34. Responses

Operations on account resources. 11 endpoints, each relative to https://api.nxgen.cloud/api/v1 and authenticated as described under Authentication.

POST /account/

Create New accounts

Request body

Add Account

json
{
  "payload": {
    "id": "string",
    "name": "string (required)",
    "email": "string (required)",
    "firstName": "string",
    "lastName": "string",
    "isActive": "boolean",
    "profileVisible": "boolean",
    "countryCode": "string",
    "phoneNumber": "string",
    "houseBuildingNumber": "string",
    "streetName": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "code": "string",
    "logo": "string",
    "latitude": "string",
    "longitude": "string",
    "plusCode": "string",
    "what3Words": "string",
    "business": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "photos": [
      "string"
    ],
    "devImage": "string",
    "followers": [
      "string"
    ],
    "accountType": [
      "Customer"
    ],
    "websiteUrl": "string",
    "jsonSchema": "object",
    "parentJsonSchemaResult": "object",
    "parentAccountId": "string",
    "parent": "string",
    "serviceProvidersEventProviderId": "string",
    "roles": [
      "string"
    ],
    "geoCordinates": "object"
  }
}

Responses

Status

Description

Body

200

Success

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

GET /account/accountByName

Get account by name

Parameters

Name

In

Type

Required

Description

name

query

string

yes

Responses

Status

Description

Body

200

Success

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

POST /account/bulkUpdateActiveInactive

bulk update sps by parent account id

Request body

Update SPs

json
{
  "parentAccountId": "string"
}

Responses

Status

Description

Body

200

Success

object

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

Example 200 response:

json
{
  "data": [
    {
      "key": "7f01237864567eba89736f825",
      "label": "customer",
      "serviceProviderName": "sp"
    }
  ]
}

POST /account/filter

Gets account list with filtering, sorting and pagination. It allows hierarchical level searching. It can be filtered using specified hierarchy or it uses the logged in user hierarchy. This gives the option to get additional entity fields in the response. Also provides configuration meta data about entity.

Request body

Account filtering and sorting

json
{
  "filters": [
    {
      "columnName": "string (required)",
      "type": "distinctList | date | number | StringConditionFilter (required)",
      "filter": "object (required)"
    }
  ],
  "sortOrder": [
    {
      "columnName": "string",
      "isAscending": "boolean"
    }
  ],
  "primaryColumns": [
    "string"
  ],
  "hierarchyLevel": "string",
  "hierarchyId": "string",
  "nPerPage": "number",
  "pageNumber": "number",
  "isConfigDetailRequired": "boolean",
  "getConfig": "boolean",
  "getChildOrParent": "boolean"
}

Responses

Status

Description

Body

200

Success

object

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

Example 200 response:

json
{
  "config": {
    "columns": [
      {
        "visibility": true,
        "columnName": "commercialName",
        "DisplayName": "Account",
        "isFilterable": true,
        "filterType": "stringCondition",
        "sticky": true,
        "isRightBorder": true,
        "isMandatory": true,
        "isNotDraggable": true
      }
    ],
    "defaultNPerPage": 50,
    "defaultFilterCondition": [],
    "defaultSortingOrder": [
      {
        "columnName": "dateTime",
        "isAscending": false
      }
    ],
    "maxVisibleColumnCount": 6,
    "exportLimitNPerPage": 500
  },
  "dataResult": [
    {
      "name": "app",
      "email": "app@test.com",
      "isActive": "true",
      "phoneNumber": "",
      "streetName": "",
      "city": "",
      "code": "",
      "uniqueId": "da7cf69b4c714f80d8466c714f683a8173cdb",
      "parentAccountId": "acf9b10a2c714f683a8173cdb7f417cf4a4"
    },
    {
      "name": "Customer",
      "email": "customer@test.com",
      "isActive": "true",
      "phoneNumber": "",
      "streetName": "",
      "city": "",
      "code": "",
      "uniqueId": "c714f683a8173cdb58acf9b10a7cf69b",
      "parentAccountId": "acf9b10a2c714f683a8173cdb7f417cf4a4"
    }
  ],
  "totalRecordsCount": 3552,
  "filteredBy": [],
  "sortedBy": [
    {
      "columnName": "dateTime",
      "isAscending": false
    }
  ],
  "dispatchedAll": false,
  "isDefaultProjectionMutated": false,
  "isDefaultFilterMutated": false,
  "isDefaultSortingMutated": false
}

POST /account/listByAccountId

Get customers by parent account id

Request body

Get customers

json
{
  "parentAccountId": "string"
}

Responses

Status

Description

Body

200

Success

object

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

Example 200 response:

json
{
  "data": [
    {
      "key": "7f01237864567eba89736f825",
      "label": "customer",
      "serviceProviderName": "sp"
    }
  ]
}

GET /account/{id}

Get account by Id

Parameters

Name

In

Type

Required

Description

id

path

string

yes

Responses

Status

Description

Body

200

Success

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

PUT /account/{id}

Update an existing accounts

Parameters

Name

In

Type

Required

Description

id

path

string

yes

Request body

To add a update a account, provide the existing Id

json
{
  "payload": {
    "id": "string",
    "uniqueId": "string",
    "parent": "string",
    "parentAccountId": "string",
    "email": "string (required)",
    "isActive": "boolean",
    "persona": {
      "address": {
        "houseBuildingNumber": "string",
        "streetName": "string",
        "city": "string",
        "state": "string",
        "code": "string",
        "country": "string"
      },
      "contact": {
        "countryCode": "string",
        "phoneNumber": "string"
      },
      "profile": {
        "logo": "string",
        "business": [
          ""
        ],
        "photos": [
          ""
        ],
        "tags": [
          ""
        ],
        "followers": [
          ""
        ],
        "s3ImagePath": "string"
      }
    },
    "accountType": [
      "Customer"
    ],
    "name": "string (required)",
    "profileVisible": "boolean",
    "syncStatus": "boolean",
    "jsonSchema": "object",
    "geoCordinates": "object",
    "serviceProvidersEventProviderId": "string"
  }
}

Responses

Status

Description

Body

200

Success

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

DELETE /account/{id}

Delete a account by Id

Parameters

Name

In

Type

Required

Description

id

path

string

yes

Responses

Status

Description

Body

200

Success

204

No Content

400

Invalid input

401

Unauthorized

403

Forbidden

GET /account/{parentAccountId}/customer

Get list of customer by parent id (Customer Id)

Parameters

Name

In

Type

Required

Description

parentAccountId

path

string

yes

Responses

Status

Description

Body

200

Success

204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

GET /account/{parentAccountId}/sites/information

Get list of sites by parent id (Customer Id)

Parameters

Name

In

Type

Required

Description

parentAccountId

path

string

yes

Responses

Status

Description

Body

200

Success

204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

GET /account/{parentAccountId}/users

Get list of user by parent id (Customer Id)

Parameters

Name

In

Type

Required

Description

parentAccountId

path

string

yes

Responses

Status

Description

Body

200

Success

204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

Was this page helpful?

Thank you — your feedback goes to the team that owns this page.