Delivery Sites (1.0)

Download OpenAPI specification:Download

APIs that allow you to to get, create and maintain delivery sites.

Authentication

XCompleatApiKey

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

Delivery Sites

Delivery Sites

Used to retrieve all delivery sites 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 delivery sites 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-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 delivery sites 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/deliverysites/{tenantId}/{companyId}/{pageNumber}
/api/analysisfields/deliverysites/{tenantId}/{companyId}/{pageNumber}

Response samples

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

Delivery Sites

Used to refresh the delivery sites 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 delivery sites 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 delivery sites 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
DeliverySites
required
Array of objects (DeliverySite)

The list of delivery sites to post into the system

ContinuationToken
string <guid>

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

Responses

200

Ok - delivery sites 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/deliverysites/{tenantId}/{companyId}
/api/analysisfields/deliverysites/{tenantId}/{companyId}

Request samples

Content type
application/json
Example

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

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

Response samples

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

Delivery Sites

Used to add a single delivery site to an existing company, or update a single delivery site. 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 delivery sites 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 delivery sites 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
Code
required
string <= 40 characters

The code assigned to the delivery site record.

Name
required
string <= 200 characters

The descriptive name of the delivery site.

Address1
string <= 200 characters

Address line 1.

Address2
string <= 200 characters

Address line 2.

TownOrCity
string <= 200 characters

Address town or city.

CountyOrState
string <= 200 characters

Address county or state.

Postcode
string <= 10 characters

Postcode / zip code.

Country
string <= 200 characters

Country name.

IsoCode
string <= 2 characters

2-character country code. Recommend use of ISO 3166-1 alpha-2 codes.

Email
string <= 200 characters

Sites primary contact email address.

Telephone
string <= 200 characters

Sites primary contact telephone number.

WebsiteUrl
string <= 200 characters

Sites website url.

ContactName
string <= 200 characters

Sites primary contact name.

Responses

200

Ok - the delivery site 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/deliverysites/{tenantId}/{companyId}
/api/analysisfields/deliverysites/{tenantId}/{companyId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Code": "NOR",
  • "Name": "Norwich",
  • "Address1": "14 Somewhere Avenue",
  • "TownOrCity": "Norwich",
  • "Postcode": "NR1 1AB",
  • "Country": "United Kingdom"
}

Response samples

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

Delivery Sites

Used to remove a specific delivery site.

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

Id of the tenant to post delivery sites 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 delivery sites into. Must be a valid company within the tenant.

code
required
string
Example: NOR

The code of the delivery site 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/deliverysites/{tenantId}/{companyId}/{code}
/api/analysisfields/deliverysites/{tenantId}/{companyId}/{code}

Response samples

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