# Add offers in bulk This endpoint can be used to provide external offers to Omnia 2.0. It's a bulk endpoint which accepts an array of individual POST offers requests each based on a "snapshot" - a unique combination of product, domain, and timestamp for a list of offers. Validation rules before storage: 1. The product must exist in the contract. 2. Only snapshots newer than those already stored will be accepted. 3. Each domain must use a consistent currency. 4. Duplicate snapshots in the same request are stored once. 5. Conflicting snapshots for the same product + domain + timestamp are all rejected. 6. Offer IDs must be unique across all offers. 7. The domain field must not be empty. 8. Offer prices must be ≥ 0.01, delivery costs must be ≥ 0. Endpoint: POST /api/2/v/contracts/{contractId}/offers Version: 0.0.7228 Security: BasicAuth, BearerAuth ## Path parameters: - `contractId` (string, required) Unique identifier of the contract Example: "qbcxvb" ## Request fields (application/json): - `productId` (string, required) Omnia's internal product id. - `creationDate` (string, required) ISO 8601 timestamp when the offers have been gathered. Must be more recent than existing snapshots for the same product and domain, otherwise the request will be rejected. - `domain` (string, required) Domain from which the offers originate (e.g., "example.com"). - `offers` (array, required) Non-empty list of offers. - `offers.deliveryCosts` (number, required) The additional charges for delivering the product to the customer's location. - `offers.url` (string, required) The direct link to the product page on the domain where this offer can be found. - `offers.vendorDomainId` (string) Optional identifier representing the vendor on a certain domain. - `offers.price` (number, required) The current listed unit price of the product. - `offers.availability` (boolean) An optional flag indicating whether the product is currently in stock and available for purchase. - `offers.attributes` (array, required) A list of additional offer details. - `offers.attributes.key` (string, required) The attribute name. It's not allowed to be empty. - `offers.attributes.value` (string, required) The corresponding attribute value. - `offers.vendorName` (string, required) The display name of the shop which sells the product. - `offers.retrievalDate` (string) Optional timestamp based on ISO 8601 when this offer information was last fetched from the domain. - `offers.id` (string, required) A unique identifier for the offer. It's crucial that it's unique across all offers independent of the timestamp. If you don't have a unique identifier then please use a UUID. - `offers.productName` (string, required) The name of the product as listed on the domain. - `offers.currency` (string, required) The currency in which the price and delivery costs are expressed. Allowed values are ISO 4217 currency codes like "EUR". - `offers.minDeliveryHours` (integer) Optional minimum time, in hours, it takes for the product to be delivered to the customer. - `offers.maxDeliveryHours` (integer) Optional maximum time, in hours, it takes for the product to be delivered to the customer. ## Response 200 fields (application/json): - `data` (array) Example: [{"data":true},{"errors":[{"code":"string","message":"string"}]}] - `data.errors` (array) - `data.errors.code` (string, required) Machine-readable error code for programmatic error handling. Typically follows a structured format like 'request.invalid' or 'resource.invalid'. Example: "request.invalid" - `data.errors.message` (string, required) Human-readable error message providing details about the issue Example: "The provided email address is not in a valid format" ## Response 400 fields (application/json): - `errors` (array, required) List of errors that occurred during request processing Example: [{"code":"request.invalid","message":"The provided request data is invalid"},{"code":"resource.invalid","message":"The requested resource could not be found"}] - `errors.code` (string, required) Machine-readable error code for programmatic error handling. Typically follows a structured format like 'request.invalid' or 'resource.invalid'. Example: "request.invalid" - `errors.message` (string, required) Human-readable error message providing details about the issue Example: "The provided email address is not in a valid format"