Custom Fields (1.0)

Download OpenAPI specification:Download

APIs that allow you to to get, create and maintain custom fields.

Authentication

XCompleatApiKey

Security Scheme Type API Key
Header parameter name: x-api-compleat-key

Custom Fields

Custom Fields

Used to retrieve all custom fields within a given company. Note that only active custom fields are returned in the list.

Authorizations:
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to retrieve information for. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: 8d4bb975-eade-42fd-a064-bf448e493c1e

Id of the company to retrieve custom fields for. Must be a valid company within the tenant.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

200

Successful response. A list of (active) custom fields will be returned.

400

Bad request. Incorrect data has been provided.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

get/api/customfields/{tenantId}/{companyId}
/api/customfields/{tenantId}/{companyId}

Response samples

Content type
Copy
Expand all Collapse all
{
  • "CustomFields":
    [
    ],
  • "MetaData":
    {
    }
}

Custom Field

Custom Field

Used to retrieve all details on a specific custom field within a given company.

Authorizations:
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to retrieve information for. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: 8d4bb975-eade-42fd-a064-bf448e493c1e

Id of the company to retrieve custom fields for. Must be a valid company within the tenant.

customFieldId
required
string <guid>
Example: 939e8c95-e1c7-4090-97a7-22435ffb23be

Id of a specific custom field to retrieve information for.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

200

Successful response. Full details on the custom field will be returned.

400

Bad request. Incorrect data has been provided.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

get/api/customfield/{tenantId}/{companyId}/{customFieldId}
/api/customfield/{tenantId}/{companyId}/{customFieldId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Custom Field

Used to refresh the list of options in a custom field with a complete new set of values, or append values to a previous new post.

Authorizations:
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to post custom fields into. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: 8d4bb975-eade-42fd-a064-bf448e493c1e

Id of the company to post custom fields into. Must be a valid company within the tenant.

customFieldId
required
string <guid>
Example: 939e8c95-e1c7-4090-97a7-22435ffb23be

Id of a specific custom field to update list information for.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Request Body schema: application/json
CustomFieldListItems
required
Array of objects (CustomFieldListItem)
ContinuationToken
string <guid>

Optional continuation token. If provided and is recognised by iCompleat, custom fields are upserted into the custom field list. If not provided or not recognised, then the list provided replaces any custom field list item values for the specified custom field and company.

Responses

200

Ok - items have been added to the custom field.

400

Bad request. Incorrect data has been provided.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

post/api/customfield/{tenantId}/{companyId}/{customFieldId}
/api/customfield/{tenantId}/{companyId}/{customFieldId}

Request samples

Content type
application/json
Example

This will wipe any custom field list itemss for the custom field, and apply the list provided as a fresh set

Copy
Expand all Collapse all
{
  • "CustomFieldListItems":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Custom Field

Used to add a single custom field list item to an existing custom field, or update a single custom field list item. A code and name is to be provided. If the code exists, then the name in the existing record is replaced with the new name provided. If the code does not exist, the record is added.

Authorizations:
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to post account codes into. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: 8d4bb975-eade-42fd-a064-bf448e493c1e

Id of the company to post account codes into. Must be a valid company within the tenant.

customFieldId
required
string <guid>
Example: 939e8c95-e1c7-4090-97a7-22435ffb23be

Id of a specific custom field to update list information for.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Request Body schema: application/json
code
required
string [ 1 .. 20 ] characters

A unique code for each custom field list item

name
required
string [ 1 .. 200 ] characters

A descriptive name for each custom field list item

Responses

200

Ok - the custom field list item has been added/updated.

400

Bad request. Incorrect data has been provided.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

patch/api/customfield/{tenantId}/{companyId}/{customFieldId}
/api/customfield/{tenantId}/{companyId}/{customFieldId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Code": "L1",
  • "Name": "Example custom field list item 1"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Custom Field

Used to remove a specific custom field list item.

Authorizations:
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to update the custom field for. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: 8d4bb975-eade-42fd-a064-bf448e493c1e

Id of the company to update the custom field for. Must be a valid company within the tenant.

customFieldId
required
string <guid>
Example: 939e8c95-e1c7-4090-97a7-22435ffb23be

Id of a specific custom field to update list information for.

code
required
string
Example: L1

The code of the custom field list item to delete.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

200

Ok - the list item has been deleted.

400

Bad request. Incorrect data has been provided.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

delete/api/customfields/{tenantId}/{companyId}/{customFieldId}/{code}
/api/customfields/{tenantId}/{companyId}/{customFieldId}/{code}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}