Skip to content

Update a purchase offer

View as Markdown
patch /rest/api/purchase_offers/{id}

Updates the Purchase Offer resource.

Partially updates a purchase offer. The body is a JSON Merge Patch document: change the cost, adjust the validity period, or move it to a different status.

Headers

NameTypeRequiredDescription
X-Flowkiwi-Organization-IdstringrequiredThe organization the request acts as. Determines the identity, permissions and ownership applied when reading or modifying data on the instance.

Path parameters

NameTypeRequiredDescription
idstringrequiredPurchase Offer identifier

Request body

PropertyTypeRequiredDescription
statusstring-The status of the offer.
taxExcludedPriceEmbeddedMoneyResource | null-The price set for the offer, excluding tax.
Show taxExcludedPrice fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
discountTaxExcludedPriceEmbeddedMoneyResource | null-The discounted tax-excluded price, when a discount applies.
Show discountTaxExcludedPrice fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
startsAtstring | null-Start date of the offer. Defaults to the current date/time if not provided.
endsAtstring | null-End date of the offer.
countrystring | null-The country resource it belongs to.
taxstring | null-The tax resource it belongs to.
variantstring | null-The variant resource it belongs to.
supplierstring | null-The supplier resource it belongs to.

Response

200 - Purchase Offer resource updated

PropertyTypeRequiredDescription
@contextobject-
@idstringrequired
@typestringrequired
idstring-The unique identifier of the purchase offer.
statusstring-The status of the offer.
taxExcludedPriceEmbeddedMoneyResourcerequiredThe price set for the offer, excluding tax.
Show taxExcludedPrice fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
taxExcludedPricePerUnitEmbeddedPricePerUnitResource | null-The tax-excluded price expressed per measurement reference unit.
Show taxExcludedPricePerUnit fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
unit"ml" | "cl" | "l" | "mg" | "g" | "kg" | "mm" | "cm" | "m" | "m2" | "unit"requiredThe reference unit the amount is expressed per.
valueintegerrequiredThe number of reference units the amount applies to.
priceEmbeddedMoneyResource-The tax-included price, computed from taxExcludedPrice and the referenced Tax rate.
Show price fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
pricePerUnitEmbeddedPricePerUnitResource | null-The tax-included price expressed per measurement reference unit.
Show pricePerUnit fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
unit"ml" | "cl" | "l" | "mg" | "g" | "kg" | "mm" | "cm" | "m" | "m2" | "unit"requiredThe reference unit the amount is expressed per.
valueintegerrequiredThe number of reference units the amount applies to.
discountPriceEmbeddedMoneyResource | null-The discounted tax-included price, when a discount applies.
Show discountPrice fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
discountPricePerUnitEmbeddedPricePerUnitResource | null-The discounted tax-included price per measurement reference unit, when a discount applies.
Show discountPricePerUnit fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
unit"ml" | "cl" | "l" | "mg" | "g" | "kg" | "mm" | "cm" | "m" | "m2" | "unit"requiredThe reference unit the amount is expressed per.
valueintegerrequiredThe number of reference units the amount applies to.
discountTaxExcludedPriceEmbeddedMoneyResource | null-The discounted tax-excluded price, when a discount applies.
Show discountTaxExcludedPrice fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
discountTaxExcludedPricePerUnitEmbeddedPricePerUnitResource | null-The discounted tax-excluded price per measurement reference unit, when a discount applies.
Show discountTaxExcludedPricePerUnit fields
PropertyTypeRequiredDescription
amountstringrequiredThe monetary amount, as a decimal string.
currencystringrequiredThe ISO 4217 currency code (e.g. EUR).
unit"ml" | "cl" | "l" | "mg" | "g" | "kg" | "mm" | "cm" | "m" | "m2" | "unit"requiredThe reference unit the amount is expressed per.
valueintegerrequiredThe number of reference units the amount applies to.
startsAtstring-Start date of the offer. Defaults to the current date/time if not provided.
endsAtstring | null-End date of the offer.
countrystringrequiredThe country resource it belongs to.
taxstringrequiredThe tax resource it belongs to.
variantstringrequiredThe variant resource it belongs to.
supplierstringrequiredThe supplier resource it belongs to.
createdAtstring-The date and time when the resource was created (ISO 8601 format).
updatedAtstring-The date and time when the resource was last modified (ISO 8601 format).

Errors

400 - Invalid input

PropertyTypeRequiredDescription
@contextobject-
@idstringrequired
@typestringrequired
titlestring | null-A short, human-readable summary of the problem.
detailstring | null-A human-readable explanation specific to this occurrence of the problem.
statusnumber | null-
instancestring | null-A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
typestring-A URI reference that identifies the problem type

403 - Access denied. The caller is missing one or more identity permissions required for this operation.

Content-Type: application/problem+json

PropertyTypeRequiredDescription
@contextobject-
@idstringrequired
@typestringrequired
typestring-
titlestring-
statusinteger-
detailstring-
missingPermissionsstring[]-Identity permissions that the caller is missing for this operation. Present only when the 403 is caused by a denied identity:* permission.

404 - Not found

PropertyTypeRequiredDescription
@contextobject-
@idstringrequired
@typestringrequired
titlestring | null-A short, human-readable summary of the problem.
detailstring | null-A human-readable explanation specific to this occurrence of the problem.
statusnumber | null-
instancestring | null-A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
typestring-A URI reference that identifies the problem type

422 - An error occurred

PropertyTypeRequiredDescription
@contextobject-
@idstringrequired
@typestringrequired
statusinteger-
violationsobject[]-
Show violations fields
PropertyTypeRequiredDescription
propertyPathstringrequiredThe property path of the violation
messagestringrequiredThe message associated with the violation
codestring-The code of the violation
hintstring-An extra hint to understand the violation
payloadobject-The serialized payload of the violation
detailstring-
typestring-
titlestring | null-
instancestring | null-