Account Codes (1.0)

Download OpenAPI specification:Download

APIs that allow you to to get, create and maintain account codes.

Authentication

XCompleatApiKey

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

Account Codes

Account Codes

Used to retrieve all account codes 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 account codes for. Must be a valid company within the tenant.

pageNumber
required
integer >= 1
Example: 1

Page number. The API call will return a page of data (page size is 100 records).

userId
required
string <guid>
Example: 0a722409-9907-4353-afaa-e6bdf5521bb5

Optional user Id (if you are not using this field include a NULL value). Optional, but must be provided if the transaction id is provided. If provided, used to filter records based on those available to the user and transaction only.

transactionId
required
string <guid>
Example: 0a722409-9907-4353-afaa-e6bdf5521bb5

Optional transaction Id (if you are not using this field include a NULL value). Optional, but must be provided if the user id is provided. If provided, used to filter records based on those available to the user and transaction only.

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 account codes 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/analysisfields/accountcodes/{tenantId}/{companyId}/{pageNumber}/{userId}/{transactionId}
/api/analysisfields/accountcodes/{tenantId}/{companyId}/{pageNumber}/{userId}/{transactionId}

Response samples

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

Account Codes

Used to refresh the account codes in a company 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 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.

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
Codes
required
Array of objects

The list of account codes to post into the system

ContinuationToken
string <guid>

Optional continuation token. If provided and is recognised by iCompleat, codes are upserted into the account code list. If not provided or not recognised, then the list provided replaces any account codes for the company.

Responses

200

Ok - codes have been added to the company.

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/analysisfields/accountcodes/{tenantId}/{companyId}
/api/analysisfields/accountcodes/{tenantId}/{companyId}

Request samples

Content type
application/json
Example

This will wipe any account codes for the company, and apply the list provided as a fresh set

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

Response samples

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

Account Codes

Used to add a single account code to an existing company, or update a single account code. A code and name is provided. If the code exists, then it is updated with the new name. If the code does not exist, it 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.

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

The header containing compleat api key.

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

Indicates the version of this API to be used.

Request Body schema: application/json
Code
required
string

The code of the account code to add or update

Name
required
string

The descriptive name of the account code to add/update

Responses

200

Ok - the code 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/analysisfields/accountcodes/{tenantId}/{companyId}
/api/analysisfields/accountcodes/{tenantId}/{companyId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Code": "4417",
  • "Name": "Hardware and peripherals"
}

Response samples

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

Account Codes

Used to remove a specific account code.

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.

code
required
string
Example: 4417

The code of the account code 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 code 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/analysisfields/accountcodes/{tenantId}/{companyId}/{code}
/api/analysisfields/accountcodes/{tenantId}/{companyId}/{code}

Response samples

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