Suppliers (1.0)

Download OpenAPI specification:Download

APIs that allow you to to get, create and maintain suppliers.

Authentication

XCompleatApiKey

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

Suppliers

Suppliers

Used to retrieve all suppliers 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 suppliers 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).

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.

Responses

200

Successful response. A list of suppliers 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/suppliers/{tenantId}/{companyId}/{pageNumber}
/api/suppliers/{tenantId}/{companyId}/{pageNumber}

Response samples

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

Suppliers

Used to refresh the suppliers 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 suppliers 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 suppliers 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
Suppliers
required
Array of objects (Supplier)

The list of suppliers to post into the system

ContinuationToken
string <guid>

Optional continuation token. If provided and is recognised by iCompleat, suppliers are upserted into the supplier list. If not provided or not recognised, then the list provided replaces any suppliers 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/suppliers/{tenantId}/{companyId}
/api/suppliers/{tenantId}/{companyId}

Request samples

Content type
application/json
Example

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

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

Response samples

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

Suppliers

Used to add a single supplier to an existing company, or update a single supplier. At least a code and name is to be provided. If the code exists, then all data in the existing record is replaced with the new data 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.

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
string

The code assigned to the supplier record.

Name
string

Descriptive name of the supplier.

AddressLine1
string

Address line 1

AddressLine2
string

Address line 2

TownOrCity
string

Address line 3 (town or city)

StateOrCounty
string

Address line 4 (state or county)

PostcodeOrZip
string

Postcode or zip code

Country
string

Country name

IsoCode
string

ISO3166-2 country code

Telephone
string

Contact telephone number

Email
string

Contact email address

BankName
string

Name of the company bank account for payments

BankAccountNumber
string

Company bank account number for payments

BankSortCode
string

Company bank sort code for payments

PaymentDueDays
integer >= 0

Standard payment terms (number of days from invoice received, or alternative calculation given by the payment terms type)

PaymentTermsType
string
Default: "NetDays"
Enum: "NetDays" "EndOfMonth" "NextMonth" "NextMonthx2" "SameDayNextMonth" "EndOfMonthPlusDays" "StartOfMonthPlusDays" "DayOfMonth" "CashOnDelivery" "Prepaid"

Standard

AnalysisDefaults
Array of objects

Optional list of default analysis items to set for transactions related to this supplier.

Responses

200

Ok - the supplier 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/suppliers/{tenantId}/{companyId}
/api/suppliers/{tenantId}/{companyId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": "SUPP3",
  • "name": "Example supplier 3 (with full data profile)",
  • "addressLine1": "1A Street",
  • "addressLine2": "Somewhere",
  • "townOrCity": "Somewhereville",
  • "stateOrCounty": "OverThere",
  • "postcodeOrZip": "OV1 1AA",
  • "country": "United Kingdom",
  • "isoCode": "GB",
  • "telephone": "+44 1234 567 890",
  • "email": "somewhere@example.com",
  • "bankName": "Barclays Bank Plc.",
  • "bankAccountNumber": "01-23-45",
  • "bankSortCode": "12345678",
  • "paymentDueDays": "30",
  • "paymentTermsType": "NetDays",
  • "analysisDefaults":
    [
    ]
}

Response samples

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

Suppliers

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 suppliers 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 suppliers into. Must be a valid company within the tenant.

code
required
string
Example: SUP1

The code of the supplier to delete.

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.

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/suppliers/{tenantId}/{companyId}/{code}
/api/suppliers/{tenantId}/{companyId}/{code}

Response samples

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