Suppliers (1.0)

Download OpenAPI specification:Download

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

Suppliers

Suppliers

Used to retrieve all suppliers within a given company.

Authorizations:
XCompleatApiKey
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

Response samples

Content type
{
  • "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:
XCompleatApiKey
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
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

Request samples

Content type
application/json
Example

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

{
  • "Suppliers": [
    ]
}

Response samples

Content type
application/json
{}

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:
XCompleatApiKey
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

Array of objects

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

Responses

Request samples

Content type
application/json
{
  • "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
{}

Suppliers

Used to remove all suppliers for a company.

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

Id of the tenant to delete suppliers 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 delete suppliers for. 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.

Responses

Response samples

Content type
application/json
{}

Suppliers

Used to remove a specific supplier.

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

Id of the tenant to delete suppliers 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 delete suppliers for. 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

Response samples

Content type
application/json
{}