githubEdit

Facility discounts endpoints

Create facility discount

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
facilityRefstringRequired

ID of the facility you want to add the discount to. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).

Body

FacilityDiscountForCreation

contextanyOptional

The context of the discount. This is used to determine the conditions under which the discount can be applied.

discountone ofRequired
or
priorityintegerRequired

The priority of the discount. Discounts with the lowest priority value are applied first. Value must be greater than 0 and smaller than 1000.

Example: 1
typestring · enumRequired

Determines the price type this discount can be applied to.

Possible values:
Responses
post
/api/facilities/{facilityRef}/discounts

List facility discounts

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
facilityRefstringRequired

ID of the facility you want to get the discounts for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).

Query parameters
startAfterIdstringOptional

all entities after given Id

sizeintegerOptional

number of facilities to show

Default: 25
Responses
chevron-right
200

The discounts were successfully retrieved. The result is in the body.

application/json
anyOptional

FacilityDiscountPaginatedResult

get
/api/facilities/{facilityRef}/discounts

Get facility discount

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
facilityRefstringRequired

ID of the facility you want to get the discount for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).

facilityDiscountRefstringRequired

ID of the discount you want to get

Responses
chevron-right
200

The discount was successfully retrieved. The result is in the body.

application/json

FacilityDiscount

and
get
/api/facilities/{facilityRef}/discounts/{facilityDiscountRef}

Delete facility discount

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
facilityRefstringRequired

ID of the facility you want to delete the discount from. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).

facilityDiscountRefstringRequired

ID of the discount you want to delete

Responses
chevron-right
200

The discount was successfully deleted. The result is in the body.

No content

delete
/api/facilities/{facilityRef}/discounts/{facilityDiscountRef}

No content

Update facility discount

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
facilityRefstringRequired

ID of the facility you want to update the discount for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).

facilityDiscountRefstringRequired

ID of the discount you want to update

Body

FacilityDiscountForUpdate

contextanyOptional

The context of the discount. This is used to determine the conditions under which the discount can be applied.

discountone ofOptional
or
priorityintegerOptional

The priority of the discount. Discounts with the lowest priority value are applied first. Must be greater than 0 and smaller than 1000.

Example: 1
typestring · enumOptional

Determines the price type this discount can be applied to.

Possible values:
versioninteger · int64Required

The version of the document to be used in optimistic locking mechanisms.

Example: 42
Responses
chevron-right
200

The discount was successfully updated. The result is in the body.

application/json

FacilityDiscount

and
patch
/api/facilities/{facilityRef}/discounts/{facilityDiscountRef}

Last updated