diff --git a/README.md b/README.md index 8f58c52..2eaf003 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Bol.com Retailer API client for PHP -This is an open source PHP client for the [Bol.com Retailer API](https://api.bol.com/retailer/public/Retailer-API/v10/releasenotes.html) version 10.0 (BETA). +This is an open source PHP client for the [Bol.com Retailer API](https://api.bol.com/retailer/public/Retailer-API/v10/releasenotes.html) version 10.4. ## Installation This project can easily be installed through Composer: @@ -149,6 +149,7 @@ Methods on the Client may throw Exceptions. All Exceptions have the parent class ## Migrate to v10 If you're migrating to v10, please have a look at the official migration guides to find out what has changed: +- [bol.com Retailer API migration guide from v9 to v10](https://api.bol.com/retailer/public/Retailer-API/v10/migrationguide/v9-v10/migrationguide.html) - [bol.com Retailer API migration guide from v8 to v9](https://api.bol.com/retailer/public/Retailer-API/v9/migrationguide/v8-v9/migrationguide.html) - [bol.com Retailer API migration guide from v7 to v8](https://api.bol.com/retailer/public/Retailer-API/v8/migrationguide/v7-v8/migrationguide.html) diff --git a/src/Client.php b/src/Client.php index eb0582b..3a4f8b0 100644 --- a/src/Client.php +++ b/src/Client.php @@ -21,8 +21,8 @@ public function getCommissions(array $commissionQueries): array $url = "retailer/commission"; $options = [ 'body' => Model\BulkCommissionRequest::constructFromArray(['commissionQueries' => $commissionQueries]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\BulkCommissionResponse::class, @@ -55,7 +55,7 @@ public function getCommission(string $ean, float $unitPrice, ?Enum\GetCommission 'unit-price' => $unitPrice, 'condition' => $condition, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\Commission::class, @@ -80,7 +80,7 @@ public function getCatalogProduct(string $ean, ?string $AcceptLanguage = null): { $url = "retailer/content/catalog-products/${ean}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\CatalogProduct::class, @@ -105,8 +105,8 @@ public function getChunkRecommendations(array $productContents): array $url = "retailer/content/chunk-recommendations"; $options = [ 'body' => Model\ChunkRecommendationsRequest::constructFromArray(['productContents' => $productContents]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ChunkRecommendationsResponse::class, @@ -130,8 +130,8 @@ public function postProductContent(Model\CreateProductContentSingleRequest $crea $url = "retailer/content/products"; $options = [ 'body' => $createProductContentSingleRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -154,7 +154,7 @@ public function getUploadReport(string $uploadId): ?Model\UploadReportResponse { $url = "retailer/content/upload-report/${uploadId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\UploadReportResponse::class, @@ -188,7 +188,7 @@ public function getOfferInsights(string $offerId, Enum\GetOfferInsightsPeriod $p 'number-of-periods' => $numberOfPeriods, 'name' => $name, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\OfferInsights::class, @@ -220,7 +220,7 @@ public function getPerformanceIndicators(Enum\GetPerformanceIndicatorsName $name 'year' => $year, 'week' => $week, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\PerformanceIndicators::class, @@ -249,7 +249,7 @@ public function getSalesForecast(string $offerId, int $weeksAhead): Model\SalesF 'offer-id' => $offerId, 'weeks-ahead' => $weeksAhead, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\SalesForecastResponse::class, @@ -283,7 +283,7 @@ public function getSearchTerms(string $searchTerm, Enum\GetSearchTermsPeriod $pe 'number-of-periods' => $numberOfPeriods, 'related-search-terms' => $relatedSearchTerms, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\SearchTerms::class, @@ -319,7 +319,7 @@ public function getInventory(?int $page = 1, array $quantity = [], ?Enum\GetInve 'state' => $state, 'query' => $query, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\InventoryResponse::class, @@ -352,7 +352,7 @@ public function getInvoices(?string $periodStartDate = null, ?string $periodEndD 'period-start-date' => $periodStartDate, 'period-end-date' => $periodEndDate, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => 'string', @@ -377,7 +377,7 @@ public function getInvoice(string $invoiceId): string { $url = "retailer/invoices/${invoiceId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => 'string', @@ -406,7 +406,7 @@ public function getInvoiceSpecification(string $invoiceId, ?int $page = null): ? 'query' => [ 'page' => $page, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => 'string', @@ -432,8 +432,8 @@ public function postOffer(Model\CreateOfferRequest $createOfferRequest): Model\P $url = "retailer/offers"; $options = [ 'body' => $createOfferRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -457,8 +457,8 @@ public function postOfferExport(string $format): Model\ProcessStatus $url = "retailer/offers/export"; $options = [ 'body' => Model\CreateOfferExportRequest::constructFromArray(['format' => $format]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -481,7 +481,7 @@ public function getOfferExport(string $reportId): ?string { $url = "retailer/offers/export/${reportId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+csv', + 'produces' => 'application/vnd.retailer.v10+csv', ]; $responseTypes = [ '200' => 'string', @@ -506,8 +506,8 @@ public function postUnpublishedOfferReport(string $format): Model\ProcessStatus $url = "retailer/offers/unpublished"; $options = [ 'body' => Model\CreateUnpublishedOfferReportRequest::constructFromArray(['format' => $format]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -530,7 +530,7 @@ public function getUnpublishedOfferReport(string $reportId): ?string { $url = "retailer/offers/unpublished/${reportId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+csv', + 'produces' => 'application/vnd.retailer.v10+csv', ]; $responseTypes = [ '200' => 'string', @@ -554,7 +554,7 @@ public function getOffer(string $offerId): ?Model\RetailerOffer { $url = "retailer/offers/${offerId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\RetailerOffer::class, @@ -580,8 +580,8 @@ public function putOffer(string $offerId, Model\UpdateOfferRequest $updateOfferR $url = "retailer/offers/${offerId}"; $options = [ 'body' => $updateOfferRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -604,7 +604,7 @@ public function deleteOffer(string $offerId): Model\ProcessStatus { $url = "retailer/offers/${offerId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -629,8 +629,8 @@ public function updateOfferPrice(string $offerId, Model\Pricing $pricing): Model $url = "retailer/offers/${offerId}/price"; $options = [ 'body' => Model\UpdateOfferPriceRequest::constructFromArray(['pricing' => $pricing]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -655,8 +655,8 @@ public function updateOfferStock(string $offerId, Model\UpdateOfferStockRequest $url = "retailer/offers/${offerId}/stock"; $options = [ 'body' => $updateOfferStockRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -694,7 +694,7 @@ public function getOrders(?int $page = 1, ?Enum\GetOrdersFulfilmentMethod $fulfi 'change-interval-minute' => $changeIntervalMinute, 'latest-change-date' => $latestChangeDate, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ReducedOrders::class, @@ -719,36 +719,8 @@ public function cancelOrderItem(array $orderItems): Model\ProcessStatus $url = "retailer/orders/cancellation"; $options = [ 'body' => Model\CancellationRequest::constructFromArray(['orderItems' => $orderItems]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', - ]; - $responseTypes = [ - '202' => Model\ProcessStatus::class, - ]; - - return $this->request('PUT', $url, $options, $responseTypes); - } - - /** - * Ship a single order item within a customer order by providing shipping information. If you purchased a shipping - * label you should add the shippingLabelId to this message and leave the transport element empty. If you will ship - * the item using your own transporter method you must omit the shippingLabelId entirely and fill in the transport - * element with the fields from GET shipping labels. - * @param Model\ShipmentRequest $shipmentRequest - * @return Model\ProcessStatus - * @throws Exception\ConnectException when an error occurred in the HTTP connection. - * @throws Exception\ResponseException when an unexpected response was received. - * @throws Exception\UnauthorizedException when the request was unauthorized. - * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. - * @throws Exception\Exception when something unexpected went wrong. - */ - public function shipOrderItem(Model\ShipmentRequest $shipmentRequest): Model\ProcessStatus - { - $url = "retailer/orders/shipment"; - $options = [ - 'body' => $shipmentRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -772,7 +744,7 @@ public function getOrder(string $orderId): ?Model\Order { $url = "retailer/orders/${orderId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\Order::class, @@ -798,7 +770,7 @@ public function getProductList(Model\ProductListRequest $productListRequest, ?st $url = "retailer/products/list"; $options = [ 'body' => $productListRequest, - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', 'consumes' => 'application/json', ]; $responseTypes = [ @@ -832,7 +804,7 @@ public function getProductListFilters(?Enum\GetProductListFiltersCountryCode $co 'search-term' => $searchTerm, 'category-id' => $categoryId, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ProductListFiltersResponse::class, @@ -860,7 +832,7 @@ public function getProductAssets(string $ean, ?Enum\GetProductAssetsUsage $usage 'query' => [ 'usage' => $usage, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ProductAssetsResponse::class, @@ -896,7 +868,7 @@ public function getCompetingOffers(string $ean, ?int $page = 1, ?Enum\GetCompeti 'best-offer-only' => $bestOfferOnly, 'condition' => $condition, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\CompetingOffersResponse::class, @@ -926,7 +898,7 @@ public function getProductPlacement(string $ean, ?Enum\GetProductPlacementCountr 'query' => [ 'country-code' => $countryCode, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ProductPlacementResponse::class, @@ -936,6 +908,30 @@ public function getProductPlacement(string $ean, ?Enum\GetProductPlacementCountr return $this->request('GET', $url, $options, $responseTypes); } + /** + * Gets a list of all price star boundaries for a specific EAN. + * @param string $ean The EAN number associated with this product. + * @return Model\PriceStarBoundaries|null + * @throws Exception\ConnectException when an error occurred in the HTTP connection. + * @throws Exception\ResponseException when an unexpected response was received. + * @throws Exception\UnauthorizedException when the request was unauthorized. + * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. + * @throws Exception\Exception when something unexpected went wrong. + */ + public function getPriceStarBoundaries(string $ean): ?Model\PriceStarBoundaries + { + $url = "retailer/products/${ean}/price-star-boundaries"; + $options = [ + 'produces' => 'application/vnd.retailer.v10+json', + ]; + $responseTypes = [ + '200' => Model\PriceStarBoundaries::class, + '404' => 'null', + ]; + + return $this->request('GET', $url, $options, $responseTypes); + } + /** * Get the bol.com specific product identifier and the related EANs. * @param string $ean The EAN number associated with this product. @@ -950,7 +946,7 @@ public function getProductIds(string $ean): ?Model\ProductIdsResponse { $url = "retailer/products/${ean}/product-ids"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ProductIdsResponse::class, @@ -974,7 +970,7 @@ public function getProductRatings(string $ean): array { $url = "retailer/products/${ean}/ratings"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ProductRatingsResponse::class, @@ -1004,7 +1000,7 @@ public function getPromotions(Enum\GetPromotionsPromotionType $promotionType, ?i 'promotion-type' => $promotionType, 'page' => $page, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\Promotions::class, @@ -1027,7 +1023,7 @@ public function getPromotion(string $promotionId): ?Model\Promotion { $url = "retailer/promotions/${promotionId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\Promotion::class, @@ -1041,27 +1037,27 @@ public function getPromotion(string $promotionId): ?Model\Promotion * Gets a paginated list of all products that are present within a promotion. * @param string $promotionId The identifier of the promotion. * @param int|null $page The requested page number with a page size of 50 items. - * @return Model\Products + * @return Model\Product[] * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. * @throws Exception\UnauthorizedException when the request was unauthorized. * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getProducts(string $promotionId, ?int $page = 1): Model\Products + public function getProducts(string $promotionId, ?int $page = 1): array { $url = "retailer/promotions/${promotionId}/products"; $options = [ 'query' => [ 'page' => $page, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\Products::class, ]; - return $this->request('GET', $url, $options, $responseTypes); + return $this->request('GET', $url, $options, $responseTypes)->products; } /** @@ -1091,7 +1087,7 @@ public function getReplenishments(?string $reference = null, ?string $ean = null 'state' => $state, 'page' => $page, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ReplenishmentsResponse::class, @@ -1115,8 +1111,8 @@ public function postReplenishment(Model\CreateReplenishmentRequest $createReplen $url = "retailer/replenishments"; $options = [ 'body' => $createReplenishmentRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1138,7 +1134,7 @@ public function getDeliveryDates(): Model\DeliveryDatesResponse { $url = "retailer/replenishments/delivery-dates"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\DeliveryDatesResponse::class, @@ -1162,8 +1158,8 @@ public function postPickupTimeSlots(Model\PickupTimeSlotsRequest $pickupTimeSlot $url = "retailer/replenishments/pickup-time-slots"; $options = [ 'body' => $pickupTimeSlotsRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\PickupTimeSlotsResponse::class, @@ -1187,8 +1183,8 @@ public function postRequestProductDestinations(array $eans): Model\ProcessStatus $url = "retailer/replenishments/product-destinations"; $options = [ 'body' => Model\RequestProductDestinationsRequest::constructFromArray(['eans' => $eans]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1211,7 +1207,7 @@ public function getProductDestinations(string $productDestinationsId): array { $url = "retailer/replenishments/product-destinations/${productDestinationsId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ProductDestinationsResponse::class, @@ -1237,8 +1233,8 @@ public function postProductLabels(Model\ProductLabelsRequest $productLabelsReque $url = "retailer/replenishments/product-labels"; $options = [ 'body' => $productLabelsRequest, - 'produces' => 'application/vnd.retailer.v9+pdf', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+pdf', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => 'string', @@ -1262,7 +1258,7 @@ public function getReplenishment(string $replenishmentId): ?Model\ReplenishmentR { $url = "retailer/replenishments/${replenishmentId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ReplenishmentResponse::class, @@ -1288,8 +1284,8 @@ public function putReplenishment(string $replenishmentId, Model\UpdateReplenishm $url = "retailer/replenishments/${replenishmentId}"; $options = [ 'body' => $updateReplenishmentRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1316,7 +1312,7 @@ public function getLoadCarrierLabels(string $replenishmentId, ?Enum\GetLoadCarri 'query' => [ 'label-type' => $labelType, ], - 'produces' => 'application/vnd.retailer.v9+pdf', + 'produces' => 'application/vnd.retailer.v10+pdf', ]; $responseTypes = [ '200' => 'string', @@ -1340,7 +1336,7 @@ public function getPickList(string $replenishmentId): ?string { $url = "retailer/replenishments/${replenishmentId}/pick-list"; $options = [ - 'produces' => 'application/vnd.retailer.v9+pdf', + 'produces' => 'application/vnd.retailer.v10+pdf', ]; $responseTypes = [ '200' => 'string', @@ -1364,7 +1360,7 @@ public function getRetailerInformation(string $retailerId): ?Model\RetailerInfor { $url = "retailer/retailers/${retailerId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\RetailerInformationResponse::class, @@ -1397,7 +1393,7 @@ public function getReturns(?int $page = 1, ?bool $handled = null, ?Enum\GetRetur 'handled' => $handled, 'fulfilment-method' => $fulfilmentMethod, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ReturnsResponse::class, @@ -1422,7 +1418,7 @@ public function createReturn(Model\CreateReturnRequest $createReturnRequest): Mo $url = "retailer/returns"; $options = [ 'body' => $createReturnRequest, - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', 'consumes' => 'application/json', ]; $responseTypes = [ @@ -1446,7 +1442,7 @@ public function getReturn(string $returnId): ?Model\ReturnObject { $url = "retailer/returns/${returnId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ReturnObject::class, @@ -1473,8 +1469,8 @@ public function handleReturn(int $rmaId, Model\ReturnRequest $returnRequest): Mo $url = "retailer/returns/${rmaId}"; $options = [ 'body' => $returnRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1507,7 +1503,7 @@ public function getShipments(?int $page = 1, ?Enum\GetShipmentsFulfilmentMethod 'fulfilment-method' => $fulfilmentMethod, 'order-id' => $orderId, ], - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\ShipmentsResponse::class, @@ -1516,6 +1512,100 @@ public function getShipments(?int $page = 1, ?Enum\GetShipmentsFulfilmentMethod return $this->request('GET', $url, $options, $responseTypes)->shipments; } + /** + * Ship multiple single order items within a customer order by providing shipping information. If you purchased a + * shipping label you should add the shippingLabelId to this message and leave the transport element empty. If you + * will ship the item using your own transporter method you must omit the shippingLabelId entirely and fill in the + * transport element with the fields from GET shipping labels. + * @param Model\ShipmentRequest $shipmentRequest + * @return Model\ProcessStatus + * @throws Exception\ConnectException when an error occurred in the HTTP connection. + * @throws Exception\ResponseException when an unexpected response was received. + * @throws Exception\UnauthorizedException when the request was unauthorized. + * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. + * @throws Exception\Exception when something unexpected went wrong. + */ + public function createShipment(Model\ShipmentRequest $shipmentRequest): Model\ProcessStatus + { + $url = "retailer/shipments"; + $options = [ + 'body' => $shipmentRequest, + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', + ]; + $responseTypes = [ + '202' => Model\ProcessStatus::class, + ]; + + return $this->request('POST', $url, $options, $responseTypes); + } + + /** + * Gets a list of paginated invoice requests initiated by customers. + * @param string|null $shipmentId The id of the shipment. + * @param int|null $page The requested page number with a page size of 50 items. + * @param Enum\GetInvoiceRequestsState|null $state To filter on invoice request state. You can filter on all invoice + * requests regardless their statuses, open invoice requests requiring your action and invoice requests uploaded + * with possible errors. + * @return Model\InvoiceRequests[] + * @throws Exception\ConnectException when an error occurred in the HTTP connection. + * @throws Exception\ResponseException when an unexpected response was received. + * @throws Exception\UnauthorizedException when the request was unauthorized. + * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. + * @throws Exception\Exception when something unexpected went wrong. + */ + public function getInvoiceRequests(?string $shipmentId = null, ?int $page = 1, ?Enum\GetInvoiceRequestsState $state = null): array + { + $url = "retailer/shipments/invoices/requests"; + $options = [ + 'query' => [ + 'shipment-id' => $shipmentId, + 'page' => $page, + 'state' => $state, + ], + 'produces' => 'application/vnd.retailer.v10+json', + ]; + $responseTypes = [ + '200' => Model\InvoiceRequestsResponse::class, + '404' => 'null', + ]; + + $result = $this->request('GET', $url, $options, $responseTypes); + return $result === null ? [] : $result->invoiceRequests; + } + + /** + * Uploads an invoice associated with shipment id. + * @param string $shipmentId The id of the shipment associated with the invoice. + * @param string $invoice + * @return Model\ProcessStatus|null + * @throws Exception\ConnectException when an error occurred in the HTTP connection. + * @throws Exception\ResponseException when an unexpected response was received. + * @throws Exception\UnauthorizedException when the request was unauthorized. + * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. + * @throws Exception\Exception when something unexpected went wrong. + */ + public function uploadInvoice(string $shipmentId, string $invoice): ?Model\ProcessStatus + { + $url = "retailer/shipments/invoices/${shipmentId}"; + $options = [ + 'multipart' => [ + [ + 'name' => 'invoice', + 'contents' => \GuzzleHttp\Psr7\Utils::tryFopen($invoice, 'r'), + ], + ], + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'multipart/form-data', + ]; + $responseTypes = [ + '202' => Model\ProcessStatus::class, + '404' => 'null', + ]; + + return $this->request('POST', $url, $options, $responseTypes); + } + /** * Retrieve a single shipment by its corresponding id. * @param string $shipmentId The id of the shipment. @@ -1530,7 +1620,7 @@ public function getShipment(string $shipmentId): ?Model\Shipment { $url = "retailer/shipments/${shipmentId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\Shipment::class, @@ -1555,8 +1645,8 @@ public function createShippingLabel(Model\ShippingLabelRequest $shippingLabelReq $url = "retailer/shipping-labels"; $options = [ 'body' => $shippingLabelRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1581,8 +1671,8 @@ public function getDeliveryOptions(array $orderItems): array $url = "retailer/shipping-labels/delivery-options"; $options = [ 'body' => Model\DeliveryOptionsRequest::constructFromArray(['orderItems' => $orderItems]), - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\DeliveryOptionsResponse::class, @@ -1609,7 +1699,7 @@ public function getShippingLabel(string $shippingLabelId): ?string { $url = "retailer/shipping-labels/${shippingLabelId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+pdf', + 'produces' => 'application/vnd.retailer.v10+pdf', ]; $responseTypes = [ '200' => 'string', @@ -1810,104 +1900,14 @@ public function addTransportInformationByTransportId(string $transportId, Model\ $url = "retailer/transports/${transportId}"; $options = [ 'body' => $changeTransportRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', - ]; - $responseTypes = [ - '202' => Model\ProcessStatus::class, - ]; - - return $this->request('PUT', $url, $options, $responseTypes); - } - - /** - * Gets a list of all price star boundaries for a specific EAN. - * @param string $ean The EAN number associated with this product. - * @return Model\PriceStarBoundaries|null - * @throws Exception\ConnectException when an error occurred in the HTTP connection. - * @throws Exception\ResponseException when an unexpected response was received. - * @throws Exception\UnauthorizedException when the request was unauthorized. - * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. - * @throws Exception\Exception when something unexpected went wrong. - */ - public function getPriceStarBoundaries(string $ean): ?Model\PriceStarBoundaries - { - $url = "retailer/insights/price-star-boundaries/${ean}"; - $options = [ 'produces' => 'application/vnd.retailer.v10+json', - ]; - $responseTypes = [ - '200' => Model\PriceStarBoundaries::class, - '404' => 'null', - ]; - - return $this->request('GET', $url, $options, $responseTypes); - } - - /** - * Gets a list of paginated invoice requests initiated by customers. - * @param string|null $shipmentId The id of the shipment. - * @param int|null $page The requested page number with a page size of 50 items. - * @param Enum\GetInvoiceRequestsState|null $state To filter on invoice request state. You can filter on all invoice - * requests regardless their statuses, open invoice requests requiring your action and invoice requests uploaded - * with possible errors. - * @return Model\InvoiceRequests[] - * @throws Exception\ConnectException when an error occurred in the HTTP connection. - * @throws Exception\ResponseException when an unexpected response was received. - * @throws Exception\UnauthorizedException when the request was unauthorized. - * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. - * @throws Exception\Exception when something unexpected went wrong. - */ - public function getInvoiceRequests(?string $shipmentId = null, ?int $page = 1, ?Enum\GetInvoiceRequestsState $state = null): array - { - $url = "retailer/shipments/invoices/requests"; - $options = [ - 'query' => [ - 'shipment-id' => $shipmentId, - 'page' => $page, - 'state' => $state, - ], - 'produces' => 'application/vnd.retailer.v10+json', - ]; - $responseTypes = [ - '200' => Model\InvoiceRequestsResponse::class, - '404' => 'null', - ]; - - $result = $this->request('GET', $url, $options, $responseTypes); - return $result === null ? [] : $result->invoiceRequests; - } - - /** - * Uploads an invoice associated with shipment id. - * @param string $shipmentId The id of the shipment associated with the invoice. - * @param string $invoice - * @return Model\ProcessStatus|null - * @throws Exception\ConnectException when an error occurred in the HTTP connection. - * @throws Exception\ResponseException when an unexpected response was received. - * @throws Exception\UnauthorizedException when the request was unauthorized. - * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. - * @throws Exception\Exception when something unexpected went wrong. - */ - public function uploadInvoice(string $shipmentId, string $invoice): ?Model\ProcessStatus - { - $url = "retailer/shipments/invoices/${shipmentId}"; - $options = [ - 'multipart' => [ - [ - 'name' => 'invoice', - 'contents' => \GuzzleHttp\Psr7\Utils::tryFopen($invoice, 'r'), - ], - ], - 'produces' => 'application/vnd.retailer.v10+json', - 'consumes' => 'multipart/form-data', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, - '404' => 'null', ]; - return $this->request('POST', $url, $options, $responseTypes); + return $this->request('PUT', $url, $options, $responseTypes); } /** diff --git a/src/Enum/ChangeTransportRequestTransporterCode.php b/src/Enum/ChangeTransportRequestTransporterCode.php index 12aee7c..2af1454 100644 --- a/src/Enum/ChangeTransportRequestTransporterCode.php +++ b/src/Enum/ChangeTransportRequestTransporterCode.php @@ -5,32 +5,34 @@ // This class is auto generated by OpenApi\ModelGenerator enum ChangeTransportRequestTransporterCode: string { - case BRIEFPOST = 'BRIEFPOST'; - case UPS = 'UPS'; - case TNT = 'TNT'; - case TNT_EXTRA = 'TNT-EXTRA'; - case TNT_BRIEF = 'TNT_BRIEF'; - case TNT_EXPRESS = 'TNT-EXPRESS'; - case DYL = 'DYL'; - case DPD_NL = 'DPD-NL'; - case DPD_BE = 'DPD-BE'; + case AMPERE = 'AMPERE'; case BPOST_BE = 'BPOST_BE'; case BPOST_BRIEF = 'BPOST_BRIEF'; + case BRIEFPOST = 'BRIEFPOST'; + case BUDBEE = 'BUDBEE'; + case COURIER = 'COURIER'; + case CYCLOON = 'CYCLOON'; + case DHL = 'DHL'; + case DHL_GLOBAL_MAIL = 'DHL-GLOBAL-MAIL'; + case DHL_SD = 'DHL-SD'; case DHLFORYOU = 'DHLFORYOU'; - case GLS = 'GLS'; - case FEDEX_NL = 'FEDEX_NL'; + case DHL_DE = 'DHL_DE'; + case DPD_BE = 'DPD-BE'; + case DPD_NL = 'DPD-NL'; + case DYL = 'DYL'; case FEDEX_BE = 'FEDEX_BE'; + case FEDEX_NL = 'FEDEX_NL'; + case GLS = 'GLS'; case OTHER = 'OTHER'; - case DHL = 'DHL'; - case DHL_DE = 'DHL_DE'; - case DHL_GLOBAL_MAIL = 'DHL-GLOBAL-MAIL'; - case TSN = 'TSN'; - case FIEGE = 'FIEGE'; - case TRANSMISSION = 'TRANSMISSION'; - case PARCEL_NL = 'PARCEL-NL'; - case LOGOIX = 'LOGOIX'; case PACKS = 'PACKS'; - case COURIER = 'COURIER'; + case PARCEL_NL = 'PARCEL-NL'; + case PES = 'PES'; + case TNT = 'TNT'; + case TNT_EXPRESS = 'TNT-EXPRESS'; + case TNT_EXTRA = 'TNT-EXTRA'; + case TNT_BRIEF = 'TNT_BRIEF'; + case TRANSMISSION = 'TRANSMISSION'; case TRUNKRS = 'TRUNKRS'; - case CYCLOON = 'CYCLOON'; + case TSN = 'TSN'; + case UPS = 'UPS'; } diff --git a/src/Enum/GetProcessStatusEntityIdEventType.php b/src/Enum/GetProcessStatusEntityIdEventType.php index f7aaad1..6706205 100644 --- a/src/Enum/GetProcessStatusEntityIdEventType.php +++ b/src/Enum/GetProcessStatusEntityIdEventType.php @@ -6,6 +6,7 @@ enum GetProcessStatusEntityIdEventType: string { case CONFIRM_SHIPMENT = 'CONFIRM_SHIPMENT'; + case CREATE_SHIPMENT = 'CREATE_SHIPMENT'; case CANCEL_ORDER = 'CANCEL_ORDER'; case CHANGE_TRANSPORT = 'CHANGE_TRANSPORT'; case HANDLE_RETURN_ITEM = 'HANDLE_RETURN_ITEM'; diff --git a/src/Enum/InvoiceRequestsBillingDetailsSalutation.php b/src/Enum/InvoiceRequestsBillingDetailsSalutation.php new file mode 100644 index 0000000..81e8246 --- /dev/null +++ b/src/Enum/InvoiceRequestsBillingDetailsSalutation.php @@ -0,0 +1,11 @@ + [ 'model' => null, 'enum' => null, 'array' => false ], 'houseNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], 'houseNumberExtension' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'extraAddressInformation' => [ 'model' => null, 'enum' => null, 'array' => false ], 'zipCode' => [ 'model' => null, 'enum' => null, 'array' => false ], 'city' => [ 'model' => null, 'enum' => null, 'array' => false ], 'countryCode' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'email' => [ 'model' => null, 'enum' => null, 'array' => false ], 'company' => [ 'model' => null, 'enum' => null, 'array' => false ], 'vatNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], 'kvkNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'orderReference' => [ 'model' => null, 'enum' => null, 'array' => false ], ]; } @@ -62,6 +65,11 @@ public function getModelDefinition(): array */ public $houseNumberExtension; + /** + * @var string Additional information related to the address that helps in delivering the package. + */ + public $extraAddressInformation; + /** * @var string The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders. */ @@ -77,6 +85,11 @@ public function getModelDefinition(): array */ public $countryCode; + /** + * @var string A scrambled email address that can be used to contact the customer. + */ + public $email; + /** * @var string The company name. */ @@ -88,8 +101,13 @@ public function getModelDefinition(): array public $vatNumber; /** - * @var string The Kamer van Koophandel (KvK) number for organizations situated in the Netherlands or + * @var string The Kamer van Koophandel (kvk) number for organizations situated in the Netherlands or * ondernemingsnummer for organizations situated in Belgium. */ public $kvkNumber; + + /** + * @var string The order reference specified by the customer when ordering a product. + */ + public $orderReference; } diff --git a/src/Model/DeliveryOptionsRequest.php b/src/Model/DeliveryOptionsRequest.php index 0e9b7ac..f8a9341 100644 --- a/src/Model/DeliveryOptionsRequest.php +++ b/src/Model/DeliveryOptionsRequest.php @@ -25,35 +25,4 @@ public function getModelDefinition(): array * @var DeliveryOptionsRequestOrderItem[] Order items for which the delivery options are requested. */ public $orderItems = []; - - /** - * Returns an array with the orderItemIds from orderItems. - * @return string[] OrderItemIds from orderItems. - */ - public function getOrderItemIds(): array - { - return array_map(function ($model) { - return $model->orderItemId; - }, $this->orderItems); - } - - /** - * Sets orderItems by an array of orderItemIds. - * @param string[] $orderItemIds OrderItemIds for orderItems. - */ - public function setOrderItemIds(array $orderItemIds): void - { - $this->orderItems = array_map(function ($orderItemId) { - return DeliveryOptionsRequestOrderItem::constructFromArray(['orderItemId' => $orderItemId]); - }, $orderItemIds); - } - - /** - * Adds a new DeliveryOptionsRequestOrderItem to orderItems by orderItemId. - * @param string $orderItemId OrderItemId for the DeliveryOptionsRequestOrderItem to add. - */ - public function addOrderItemId(string $orderItemId): void - { - $this->orderItems[] = DeliveryOptionsRequestOrderItem::constructFromArray(['orderItemId' => $orderItemId]); - } } diff --git a/src/Model/DeliveryOptionsRequestOrderItem.php b/src/Model/DeliveryOptionsRequestOrderItem.php index a5c5278..06f06de 100644 --- a/src/Model/DeliveryOptionsRequestOrderItem.php +++ b/src/Model/DeliveryOptionsRequestOrderItem.php @@ -18,6 +18,7 @@ public function getModelDefinition(): array { return [ 'orderItemId' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'quantity' => [ 'model' => null, 'enum' => null, 'array' => false ], ]; } @@ -25,4 +26,10 @@ public function getModelDefinition(): array * @var string The id for the order item (1 order can have multiple order items). */ public $orderItemId; + + /** + * @var int The quantity of the order item for which the shipping label creation is requested for. If omitted, will + * be interpreted as the full quantity that is still open for this order item. + */ + public $quantity; } diff --git a/src/Model/InvoiceRequests.php b/src/Model/InvoiceRequests.php index 8e8d527..34aa59b 100644 --- a/src/Model/InvoiceRequests.php +++ b/src/Model/InvoiceRequests.php @@ -20,8 +20,8 @@ public function getModelDefinition(): array 'shipmentId' => [ 'model' => null, 'enum' => null, 'array' => false ], 'orderId' => [ 'model' => null, 'enum' => null, 'array' => false ], 'customerAccountNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'billingDetails' => [ 'model' => BillingDetails::class, 'enum' => null, 'array' => false ], - 'products' => [ 'model' => Products::class, 'enum' => null, 'array' => true ], + 'billingDetails' => [ 'model' => InvoiceRequestsBillingDetails::class, 'enum' => null, 'array' => false ], + 'products' => [ 'model' => InvoiceRequestsProducts::class, 'enum' => null, 'array' => true ], 'status' => [ 'model' => null, 'enum' => null, 'array' => false ], 'statusTransitions' => [ 'model' => StatusTransitions::class, 'enum' => null, 'array' => true ], ]; @@ -43,13 +43,13 @@ public function getModelDefinition(): array public $customerAccountNumber; /** - * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this - * shipment. + * @var InvoiceRequestsBillingDetails The details of the customer that is responsible for the financial fulfillment + * of this shipment. */ public $billingDetails; /** - * @var Products[] + * @var InvoiceRequestsProducts[] */ public $products = []; diff --git a/src/Model/InvoiceRequestsBillingDetails.php b/src/Model/InvoiceRequestsBillingDetails.php new file mode 100644 index 0000000..53a88cd --- /dev/null +++ b/src/Model/InvoiceRequestsBillingDetails.php @@ -0,0 +1,95 @@ + [ 'model' => null, 'enum' => Enum\InvoiceRequestsBillingDetailsSalutation::class, 'array' => false ], + 'firstName' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'surname' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'streetName' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'houseNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'houseNumberExtension' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'zipCode' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'city' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'countryCode' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'company' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'vatNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'kvkNumber' => [ 'model' => null, 'enum' => null, 'array' => false ], + ]; + } + + /** + * @var Enum\InvoiceRequestsBillingDetailsSalutation The salutation of the customer. + */ + public $salutation; + + /** + * @var string The first name of the customer. + */ + public $firstName; + + /** + * @var string The surname of the customer. + */ + public $surname; + + /** + * @var string The street name. + */ + public $streetName; + + /** + * @var string The house number. + */ + public $houseNumber; + + /** + * @var string The extension on the house number. + */ + public $houseNumberExtension; + + /** + * @var string The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders. + */ + public $zipCode; + + /** + * @var string The name of the city. + */ + public $city; + + /** + * @var string The country code. + */ + public $countryCode; + + /** + * @var string The company name. + */ + public $company; + + /** + * @var string The Value Added Tax (VAT) / BTW number for business sellers situated in the Netherlands. + */ + public $vatNumber; + + /** + * @var string The Kamer van Koophandel (KvK) number for organizations situated in the Netherlands or + * ondernemingsnummer for organizations situated in Belgium. + */ + public $kvkNumber; +} diff --git a/src/Model/InvoiceRequestsProducts.php b/src/Model/InvoiceRequestsProducts.php new file mode 100644 index 0000000..0033914 --- /dev/null +++ b/src/Model/InvoiceRequestsProducts.php @@ -0,0 +1,40 @@ + [ 'model' => null, 'enum' => null, 'array' => false ], + 'quantity' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'unitPrice' => [ 'model' => null, 'enum' => null, 'array' => false ], + ]; + } + + /** + * @var string The description of the ordered product. + */ + public $description; + + /** + * @var int Amount of the product being ordered. + */ + public $quantity; + + /** + * @var float The selling price to the customer of a single unit including VAT. + */ + public $unitPrice; +} diff --git a/src/Model/Link.php b/src/Model/Link.php index c044044..b5f729d 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -19,22 +19,58 @@ public function getModelDefinition(): array return [ 'rel' => [ 'model' => null, 'enum' => null, 'array' => false ], 'href' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'method' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'hreflang' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'media' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'title' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'type' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'deprecation' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'profile' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'name' => [ 'model' => null, 'enum' => null, 'array' => false ], ]; } /** - * @var string The link relation. + * @var string */ public $rel; /** - * @var string The URI for the resource linked to. + * @var string */ public $href; /** - * @var string The HTTP method to use when accessing the link. + * @var string */ - public $method; + public $hreflang; + + /** + * @var string + */ + public $media; + + /** + * @var string + */ + public $title; + + /** + * @var string + */ + public $type; + + /** + * @var string + */ + public $deprecation; + + /** + * @var string + */ + public $profile; + + /** + * @var string + */ + public $name; } diff --git a/src/Model/Offer.php b/src/Model/Offer.php index 6adaab6..f0ce03c 100644 --- a/src/Model/Offer.php +++ b/src/Model/Offer.php @@ -79,7 +79,7 @@ public function getModelDefinition(): array /** * @var string The date at which package can be delivered to customer latest. In case of pre-orders where a specific - * delivery date is not available, a placeholder date will be used. + * delivery date is not available, this field will not be present. */ public $maxDeliveryDate; } diff --git a/src/Model/Order.php b/src/Model/Order.php index 4293969..56f41c0 100644 --- a/src/Model/Order.php +++ b/src/Model/Order.php @@ -48,8 +48,7 @@ public function getModelDefinition(): array public $shipmentDetails; /** - * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this - * shipment. + * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this order. */ public $billingDetails; diff --git a/src/Model/OrderItem.php b/src/Model/OrderItem.php index ab12c4f..14eb414 100644 --- a/src/Model/OrderItem.php +++ b/src/Model/OrderItem.php @@ -18,6 +18,7 @@ public function getModelDefinition(): array { return [ 'orderItemId' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'quantity' => [ 'model' => null, 'enum' => null, 'array' => false ], ]; } @@ -25,4 +26,10 @@ public function getModelDefinition(): array * @var string The order item being confirmed. */ public $orderItemId; + + /** + * @var int The quantity of the order items to ship. If omitted, will be interpreted as the full quantity that is + * still open for this order item. + */ + public $quantity; } diff --git a/src/Model/Problem.php b/src/Model/Problem.php index ef4d73f..57e6592 100644 --- a/src/Model/Problem.php +++ b/src/Model/Problem.php @@ -17,36 +17,36 @@ class Problem extends AbstractModel public function getModelDefinition(): array { return [ + 'detail' => [ 'model' => null, 'enum' => null, 'array' => false ], 'instance' => [ 'model' => null, 'enum' => null, 'array' => false ], 'type' => [ 'model' => null, 'enum' => null, 'array' => false ], 'host' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'causedBy' => [ 'model' => Problem::class, 'enum' => null, 'array' => false ], 'title' => [ 'model' => null, 'enum' => null, 'array' => false ], 'status' => [ 'model' => null, 'enum' => null, 'array' => false ], 'violations' => [ 'model' => Violation::class, 'enum' => null, 'array' => true ], - 'detail' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'causedBy' => [ 'model' => Problem::class, 'enum' => null, 'array' => false ], ]; } /** * @var string */ - public $instance; + public $detail; /** * @var string */ - public $type; + public $instance; /** * @var string */ - public $host; + public $type; /** - * @var Problem Describes a problem that occurred interacting with the API. + * @var string */ - public $causedBy; + public $host; /** * @var string @@ -64,7 +64,7 @@ public function getModelDefinition(): array public $violations = []; /** - * @var string + * @var Problem Describes a problem that occurred interacting with the API. */ - public $detail; + public $causedBy; } diff --git a/src/Model/Products.php b/src/Model/Products.php index e767d0e..3a3accc 100644 --- a/src/Model/Products.php +++ b/src/Model/Products.php @@ -17,24 +17,12 @@ class Products extends AbstractModel public function getModelDefinition(): array { return [ - 'description' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'quantity' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'unitPrice' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'products' => [ 'model' => Product::class, 'enum' => null, 'array' => true ], ]; } /** - * @var string The description of the ordered product. + * @var Product[] */ - public $description; - - /** - * @var int Amount of the product being ordered. - */ - public $quantity; - - /** - * @var float The selling price to the customer of a single unit including VAT. - */ - public $unitPrice; + public $products = []; } diff --git a/src/Model/Shipment.php b/src/Model/Shipment.php index eda0058..71daccb 100644 --- a/src/Model/Shipment.php +++ b/src/Model/Shipment.php @@ -61,8 +61,7 @@ public function getModelDefinition(): array public $shipmentDetails; /** - * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this - * shipment. + * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this order. */ public $billingDetails; diff --git a/src/Model/ShipmentRequest.php b/src/Model/ShipmentRequest.php index 1f8fdcb..15d147a 100644 --- a/src/Model/ShipmentRequest.php +++ b/src/Model/ShipmentRequest.php @@ -25,7 +25,7 @@ public function getModelDefinition(): array } /** - * @var OrderItem[] Single element list with the order item to ship. + * @var OrderItem[] List of order items to ship. */ public $orderItems = []; @@ -44,35 +44,4 @@ public function getModelDefinition(): array * @var TransportInstruction */ public $transport; - - /** - * Returns an array with the orderItemIds from orderItems. - * @return string[] OrderItemIds from orderItems. - */ - public function getOrderItemIds(): array - { - return array_map(function ($model) { - return $model->orderItemId; - }, $this->orderItems); - } - - /** - * Sets orderItems by an array of orderItemIds. - * @param string[] $orderItemIds OrderItemIds for orderItems. - */ - public function setOrderItemIds(array $orderItemIds): void - { - $this->orderItems = array_map(function ($orderItemId) { - return OrderItem::constructFromArray(['orderItemId' => $orderItemId]); - }, $orderItemIds); - } - - /** - * Adds a new OrderItem to orderItems by orderItemId. - * @param string $orderItemId OrderItemId for the OrderItem to add. - */ - public function addOrderItemId(string $orderItemId): void - { - $this->orderItems[] = OrderItem::constructFromArray(['orderItemId' => $orderItemId]); - } } diff --git a/src/Model/ShippingLabelRequest.php b/src/Model/ShippingLabelRequest.php index 0996e18..616e830 100644 --- a/src/Model/ShippingLabelRequest.php +++ b/src/Model/ShippingLabelRequest.php @@ -31,35 +31,4 @@ public function getModelDefinition(): array * @var string Shipping label offer id for which you request a shipping label. */ public $shippingLabelOfferId; - - /** - * Returns an array with the orderItemIds from orderItems. - * @return string[] OrderItemIds from orderItems. - */ - public function getOrderItemIds(): array - { - return array_map(function ($model) { - return $model->orderItemId; - }, $this->orderItems); - } - - /** - * Sets orderItems by an array of orderItemIds. - * @param string[] $orderItemIds OrderItemIds for orderItems. - */ - public function setOrderItemIds(array $orderItemIds): void - { - $this->orderItems = array_map(function ($orderItemId) { - return DeliveryOptionsRequestOrderItem::constructFromArray(['orderItemId' => $orderItemId]); - }, $orderItemIds); - } - - /** - * Adds a new DeliveryOptionsRequestOrderItem to orderItems by orderItemId. - * @param string $orderItemId OrderItemId for the DeliveryOptionsRequestOrderItem to add. - */ - public function addOrderItemId(string $orderItemId): void - { - $this->orderItems[] = DeliveryOptionsRequestOrderItem::constructFromArray(['orderItemId' => $orderItemId]); - } } diff --git a/src/OpenApi/ClientGenerator.php b/src/OpenApi/ClientGenerator.php index f9fb676..d19ac05 100644 --- a/src/OpenApi/ClientGenerator.php +++ b/src/OpenApi/ClientGenerator.php @@ -31,10 +31,7 @@ class ClientGenerator public function __construct() { $retailer = (new SwaggerSpecs())->load(__DIR__ . '/retailer.json') - ->merge((new SwaggerSpecs())->load(__DIR__ . '/retailer-v10.json')) - ->merge((new SwaggerSpecs())->load(__DIR__ . '/shared.json')) - ->merge((new SwaggerSpecs())->load(__DIR__ . '/shared-v10.json')); - + ->merge((new SwaggerSpecs())->load(__DIR__ . '/shared.json')); $this->specs = $retailer->getSpecs(); } diff --git a/src/OpenApi/ModelGenerator.php b/src/OpenApi/ModelGenerator.php index c7c7dca..79f8626 100644 --- a/src/OpenApi/ModelGenerator.php +++ b/src/OpenApi/ModelGenerator.php @@ -26,9 +26,7 @@ class ModelGenerator public function __construct() { $retailer = (new SwaggerSpecs())->load(__DIR__ . '/retailer.json') - ->merge((new SwaggerSpecs())->load(__DIR__ . '/retailer-v10.json')) - ->merge((new SwaggerSpecs())->load(__DIR__ . '/shared.json')) - ->merge((new SwaggerSpecs())->load(__DIR__ . '/shared-v10.json')); + ->merge((new SwaggerSpecs())->load(__DIR__ . '/shared.json')); $this->specs = $retailer->getSpecs(); } diff --git a/src/OpenApi/retailer-v10.json b/src/OpenApi/retailer-v10.json deleted file mode 100644 index 4cfabea..0000000 --- a/src/OpenApi/retailer-v10.json +++ /dev/null @@ -1,1101 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "v10 - Retailer API", - "description": "The bol.com API for retailers.", - "version": "10.x" - }, - "servers": [ - { - "url": "https://api.bol.com" - } - ], - "security": [ - { - "OAuth2": [] - } - ], - "tags": [ - { - "name": "Insights (BETA)", - "description": "Insights resource" - }, - { - "name": "Shipments (BETA)", - "description": "Shipment resource" - }, - { - "name": "Subscriptions (BETA)", - "description": "Push notification subscriptions resource" - } - ], - "paths": { - "/retailer/insights/price-star-boundaries/{ean}": { - "get": { - "tags": [ - "Insights (BETA)" - ], - "summary": "Get price star boundaries by EAN", - "description": "Gets a list of all price star boundaries for a specific EAN.", - "operationId": "get-price-star-boundaries", - "parameters": [ - { - "name": "ean", - "in": "path", - "description": "The EAN number associated with this product.", - "required": true, - "schema": { - "type": "string" - }, - "example": "0000007740404" - } - ], - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/PriceStarBoundaries" - } - }, - "application/vnd.retailer.v8+json": { - "schema": { - "$ref": "#/components/schemas/PriceStarBoundaries" - } - }, - "application/vnd.retailer.v9+json": { - "schema": { - "$ref": "#/components/schemas/PriceStarBoundaries" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.retailer.v8+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.retailer.v9+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "404": { - "description": "Not found: The requested item could not be found.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.retailer.v8+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.retailer.v9+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/retailer/shipments/invoices/requests": { - "get": { - "tags": [ - "Shipments (BETA)" - ], - "summary": "Get a list of invoice requests", - "description": "Gets a list of paginated invoice requests initiated by customers.", - "operationId": "get-invoice-requests", - "parameters": [ - { - "name": "shipment-id", - "in": "query", - "description": "The id of the shipment.", - "required": false, - "schema": { - "type": "string" - }, - "example": 541757635 - }, - { - "name": "page", - "in": "query", - "description": "The requested page number with a page size of 50 items.", - "required": false, - "schema": { - "minimum": 1, - "type": "integer", - "format": "int32", - "default": 1 - }, - "example": 1 - }, - { - "name": "state", - "in": "query", - "description": "To filter on invoice request state. You can filter on all invoice requests regardless their statuses, open invoice requests requiring your action and invoice requests uploaded with possible errors.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "OPEN", - "UPLOAD_ERROR", - "ALL" - ] - }, - "example": "OPEN" - } - ], - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/InvoiceRequestsResponse" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "404": { - "description": "Not found: The requested item could not be found.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/retailer/shipments/invoices/{shipment-id}": { - "post": { - "tags": [ - "Shipments (BETA)" - ], - "summary": "Upload an invoice for shipment id", - "description": "Uploads an invoice associated with shipment id.", - "operationId": "upload-invoice", - "parameters": [ - { - "name": "shipment-id", - "in": "path", - "description": "The id of the shipment associated with the invoice.", - "required": true, - "schema": { - "type": "string" - }, - "example": 541757635 - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "invoice" - ], - "type": "object", - "properties": { - "invoice": { - "type": "string", - "description": "The invoice file.", - "format": "binary" - } - } - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Accepted: Successfully scheduled the request for processing.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "404": { - "description": "Not found: The requested item could not be found.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "415": { - "description": "Unsupported Media Type: Content-Type header contains invalid value, allowed value is multipart/form-data.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/retailer/subscriptions": { - "get": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Retrieve Event Notification Subscriptions", - "description": "Retrieves all event notification subscriptions for a given retailer. Each subscription may have different types of events and a destination, which could either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", - "operationId": "get-push-notification-subscriptions", - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionsResponse" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - }, - "post": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Create Event Notification Subscription", - "description": "Creates a new event notification subscription for a retailer. The subscription can be set up for one or more types of events and the destination can either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", - "operationId": "post-push-notification-subscription", - "requestBody": { - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionRequest" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Accepted: Successfully scheduled the request for processing.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/retailer/subscriptions/signature-keys": { - "get": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Retrieve public keys for push notification signature validation.", - "description": "Retrieve a list of public keys that should be used to validate the signature header for push notifications received from bol.com.", - "operationId": "get-subscription-keys", - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/KeySetResponse" - } - } - } - } - } - } - }, - "/retailer/subscriptions/test/{subscription-id}": { - "post": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Send test push notification for subscriptions", - "description": "Send a test push notification to all subscriptions for the provided event.", - "operationId": "post-test-push-notification", - "parameters": [ - { - "name": "subscription-id", - "in": "path", - "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", - "required": true, - "schema": { - "type": "string" - }, - "example": 1234 - } - ], - "responses": { - "202": { - "description": "Accepted: Successfully scheduled the request for processing.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/retailer/subscriptions/{subscription-id}": { - "get": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Retrieve Specific Event Notification Subscription", - "description": "Fetches the details of a specific event notification subscription for a retailer. The details include the types of events and the destination, which can either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", - "operationId": "get-push-notification-subscription", - "parameters": [ - { - "name": "subscription-id", - "in": "path", - "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", - "required": true, - "schema": { - "type": "string" - }, - "example": 1234 - } - ], - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionResponse" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "404": { - "description": "Not found: The requested item could not be found.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - }, - "put": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Update Event Notification Subscription", - "description": "Updates the details of a specific event notification subscription for a retailer. The updates can be made to the types of events and/or the destination, which can either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", - "operationId": "put-push-notification-subscription", - "parameters": [ - { - "name": "subscription-id", - "in": "path", - "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", - "required": true, - "schema": { - "type": "string" - }, - "example": 1234 - } - ], - "requestBody": { - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionRequest" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Accepted: Successfully scheduled the request for processing.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Subscriptions (BETA)" - ], - "summary": "Remove Event Notification Subscription", - "description": "Deletes a specific event notification subscription associated with a retailer.", - "operationId": "delete-push-notification-subscription", - "parameters": [ - { - "name": "subscription-id", - "in": "path", - "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", - "required": true, - "schema": { - "type": "string" - }, - "example": 1234 - } - ], - "responses": { - "202": { - "description": "Accepted: Successfully scheduled the request for processing.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Link": { - "required": [ - "href", - "method", - "rel" - ], - "type": "object", - "properties": { - "rel": { - "type": "string", - "description": "The link relation.", - "example": "self" - }, - "href": { - "type": "string", - "description": "The URI for the resource linked to.", - "example": "https://api.bol.com/shared/process-status/1234567" - }, - "method": { - "type": "string", - "description": "The HTTP method to use when accessing the link.", - "example": "GET" - } - }, - "description": "Lists available actions applicable to this endpoint." - }, - "ProcessStatus": { - "required": [ - "createTimestamp", - "description", - "eventType", - "links", - "status" - ], - "type": "object", - "properties": { - "processStatusId": { - "type": "string", - "description": "The process status id.", - "example": "1234567" - }, - "entityId": { - "type": "string", - "description": "The id of the object being processed. For example, in case of a shipment process id, you will receive the id of the order item being processed.", - "example": "987654321" - }, - "eventType": { - "type": "string", - "description": "Name of the requested action that is being processed.", - "example": "CONFIRM_SHIPMENT" - }, - "description": { - "type": "string", - "description": "Describes the action that is being processed.", - "example": "Example process status description for processing 987654321." - }, - "status": { - "type": "string", - "description": "Status of the action being processed.", - "example": "SUCCESS", - "enum": [ - "PENDING", - "SUCCESS", - "FAILURE", - "TIMEOUT" - ] - }, - "errorMessage": { - "type": "string", - "description": "Shows error message if applicable.", - "example": "Example process status error message." - }, - "createTimestamp": { - "type": "string", - "description": "Time of creation of the response.", - "format": "date-time", - "example": "2018-11-14T09:34:41+01:00" - }, - "links": { - "type": "array", - "description": "Lists available actions applicable to this endpoint.", - "items": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "Problem": { - "required": [ - "detail", - "status", - "title", - "type", - "violations" - ], - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type URI for this problem. Fixed value: https://api.bol.com/problems.", - "format": "uri", - "example": "https://api.bol.com/problems" - }, - "title": { - "type": "string", - "description": "Title describing the nature of the problem.", - "example": "Error validating request. Consult the bol.com API documentation for more information." - }, - "status": { - "type": "integer", - "description": "HTTP status returned from the endpoint causing the problem.", - "format": "int32" - }, - "detail": { - "type": "string", - "description": "Detailed error message describing in additional detail what caused the service to return this problem.", - "example": "Bad request" - }, - "host": { - "type": "string", - "description": "Host identifier describing the server instance that reported the problem.", - "example": "Instance-001" - }, - "instance": { - "type": "string", - "description": "Full URI path of the resource that reported the problem.", - "format": "uri", - "example": "https://api.bol.com//retailer/resource" - }, - "violations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Violation" - } - } - }, - "description": "Describes a problem that occurred interacting with the API." - }, - "Violation": { - "required": [ - "name", - "reason" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Describes the origin of the error, for instance a field or query parameter validation error.", - "example": "exampleValue" - }, - "reason": { - "type": "string", - "description": "Detailed description of the validation error that caused the problem.", - "example": "Request contains invalid value(s): 'INVALID', allowed values: ALLOWED_VALUE1, ALLOWED_VALUE2." - } - }, - "description": "Describes a violation that occurred interacting with the API." - }, - "SubscriptionRequest": { - "required": [ - "resources", - "subscriptionType", - "url" - ], - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "Array of event types for which the subscription is set. Note that some event types are only available for certain subscription types.", - "items": { - "type": "string", - "description": "Array of event types for which the subscription is set. Note that some event types are only available for certain subscription types.", - "enum": [ - "PROCESS_STATUS", - "SHIPMENT", - "OFFER", - "PRICE_STAR_BOUNDARY", - "COMPETING_OFFER" - ] - } - }, - "url": { - "type": "string", - "description": "The destination for event notifications. For WEBHOOK subscription types, this is the URL where messages are posted to. For GCP_PUBSUB, this is the topic name.", - "example": "https://www.bol.com/webhook" - }, - "subscriptionType": { - "type": "string", - "description": "The type of subscription. It indicates the platform where the events will be subscribed to. Be aware that certain event types are only available for specific types.", - "example": "WEBHOOK", - "enum": [ - "WEBHOOK", - "GCP_PUBSUB" - ] - } - } - }, - "SubscriptionResponse": { - "required": [ - "id", - "resources", - "subscriptionType", - "url" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", - "example": "1234" - }, - "resources": { - "type": "array", - "items": { - "type": "string", - "description": "Array of event types for which the subscription is set. Note that some event types are only available for certain subscription types.", - "enum": [ - "TEST", - "PROCESS_STATUS", - "SHIPMENT", - "OFFER", - "PRICE_STAR_BOUNDARY", - "COMPETING_OFFER" - ] - } - }, - "url": { - "type": "string", - "description": "The destination for event notifications. For WEBHOOK subscription types, this is the URL where messages are posted to. For GCP_PUBSUB, this is the topic name.", - "example": "https://www.bol.com/webhook" - }, - "subscriptionType": { - "type": "string", - "description": "The type of subscription. It indicates the platform where the events will be subscribed to. Be aware that certain event types are only available for specific types.", - "example": "WEBHOOK", - "enum": [ - "WEBHOOK", - "GCP_PUBSUB" - ] - } - } - }, - "SubscriptionsResponse": { - "required": [ - "subscriptions" - ], - "type": "object", - "properties": { - "subscriptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriptionResponse" - } - } - } - }, - "KeySet": { - "required": [ - "id", - "publicKey", - "type" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Key identifier. Maps to the keyId value in the signature header of the push request.", - "example": "0" - }, - "type": { - "type": "string", - "description": "Key encryption type.", - "example": "RSA", - "enum": [ - "RSA" - ] - }, - "publicKey": { - "type": "string", - "description": "The Base64 encoded public key to use when verifying the signature.", - "example": "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCDO7X3OGEqB6LU2ZQdznuYJX1KhCiJUB0+IwW9UjcgbU2Y/LzUIgGPT33s/+OqqMQOtXp2RV4JM6Zv5/YUZgZAqEIkvvrIYvJB8tXv73VQS2r4Ssy3Y/frJsqy8a3sDOoFeJygHYE6kVf3sOCdo4CO6PFUe7ZwsOSS2/7fNWAaMhY6tEuZwkA7ZLoSd3UHTdeKlV1TH5I3yFClMo1FwABsWzj9DhvEb6Q36j+QLJZAj0xvusJUsOjcSgyXRzVBFtwwNILzs9BO+GWRI4li+rjhaST2pNtvGfnQB5TUOO7Yegk/ucSiV1cFzy95gWQV2F0c9P1vBctETrYKxQBklBbjAgMBAAECggEAGISLVoi9/nA2x7VuqrLs/FvksItIV38UN4urgtddXT2OhcqSLL+9styTFjgofLXTCzx0iKwlCWsQ6U9Y9i6pdGL7GIplqBJ0WEXaGl2OeVXdwk2XOZv/sXsp24yzhapT/nmuKWvZvOtyl9//1vO5DPoQPExwpVUnHxji4SjDr6DuKVNDwh9Z4mVsdfdYVeLYGJ356IGWhTu/JDie4byl8B75UgbmyvfJRjQkoLpVZuhu+jkmhogpoSl6NtaKA+iFlGT9JLtGVHDn15kdEHb+dtzTzyJH40KGjQ7OiZcmA8GFft6zrNlOpyziH7fICtt0//7fR348/Z+XIYUFqfadQQKBgQDeVnqAlkt2Uab/1OjX9O8CRWqdoFLpUGDiHhkaXEylJtm1osFHGiyOi1eEQOy//lnJWKUp7c0b8D/QioP7kI38ES1mBx1KDzFgob4p/U+4R+z24SV/Q3CT6vHbfbe1XxWvE4SOdh4p7+Kuhxz1n6P0TWltvsTbpCJ9GM4wi2Z26QKBgQCXGiObkJI4Wv6RGxq76BHEDZdrLWppXh1+FYfyUaq6bfcSF86yAIRlleEJUh1v9KDw2DCX0rhO3BW0juEl5qz5RohLIxuak+2RbX6IQrVPwtCCeGQzKIRPktht+fi+eSaa5XNMLXURTzjVUdxzFwqDKp+7YQWL8DJ6qEfJGGYX6wKBgBXM8PIOypNtaiyHmdUjBRR57fxKrhaGdRl2zgtRpYpEBvDSZpUsMdZAP3KOUyh4LiGZ+Yfk80mcAwXVrx9Ji0J+BK+OXwbV+od5FIZVei2dj9SdOuoBmNZIITLeXtb/3cZu6X52gnqmNNncEbDb2F2qAX5rSC4pJ+CQQBduc7uRAoGAHzjxfqWi8S4sSAOXxJgxg5djYGwj/t3JrlH4o2OoqZkrYnu05CcjNHKB65EiKq3sM5gYgmayWukzOvoDH/fIakHey9fXTluezVwYt0NBf9e7ihoiakfG/0JSonbypTkXdw5OgsEp3YfHMJ0XtlhefbgDBY8IvF/HrnyzSKRYBD0CgYBlq6nIEZOIqngHdtskT8JOZBcniVPGjUjSiNcYQXfeMwKINUqDGC/YmpPgBOhO93ozeQTCBeeMD8nlbkTHPu7BxCCfpKj6/PPMfxmyFQyDg9ZjjHOIhUMddRw+mSq0zS212JbIr3O4eEtrXPqWfq5phxyE3dRvaX3A3wiEQN9WRA==" - } - } - }, - "KeySetResponse": { - "required": [ - "signatureKeys" - ], - "type": "object", - "properties": { - "signatureKeys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/KeySet" - } - } - } - }, - "BillingDetails": { - "required": [ - "salutation" - ], - "type": "object", - "properties": { - "salutation": { - "type": "string", - "description": "The salutation of the customer.", - "example": "MALE", - "enum": [ - "MALE", - "FEMALE", - "UNKNOWN" - ] - }, - "firstName": { - "type": "string", - "description": "The first name of the customer.", - "example": "Billie" - }, - "surname": { - "type": "string", - "description": "The surname of the customer.", - "example": "Jansen" - }, - "streetName": { - "type": "string", - "description": "The street name.", - "example": "Dorpstraat" - }, - "houseNumber": { - "type": "string", - "description": "The house number.", - "example": "1" - }, - "houseNumberExtension": { - "type": "string", - "description": "The extension on the house number.", - "example": "B" - }, - "zipCode": { - "type": "string", - "description": "The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders.", - "example": "1111ZZ" - }, - "city": { - "type": "string", - "description": "The name of the city.", - "example": "Utrecht" - }, - "countryCode": { - "type": "string", - "description": "The country code.", - "example": "NL" - }, - "company": { - "type": "string", - "description": "The company name.", - "example": "bol.com" - }, - "vatNumber": { - "type": "string", - "description": "The Value Added Tax (VAT) / BTW number for business sellers situated in the Netherlands.", - "example": "NL999999999B99" - }, - "kvkNumber": { - "type": "string", - "description": "The Kamer van Koophandel (KvK) number for organizations situated in the Netherlands or ondernemingsnummer for organizations situated in Belgium.", - "example": "99887766" - } - }, - "description": "The details of the customer that is responsible for the financial fulfillment of this shipment." - }, - "InvoiceRequests": { - "required": [ - "shipmentId", - "status", - "statusTransitions" - ], - "type": "object", - "properties": { - "shipmentId": { - "type": "string", - "description": "The id of the shipment associated with this invoice request.", - "example": "987654" - }, - "orderId": { - "type": "string", - "description": "The id of the order associated with this shipment.", - "example": "4691862037" - }, - "customerAccountNumber": { - "type": "string", - "description": "The account of the customer within bol.com associated with this shipment.", - "example": "3004850316" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Products" - } - }, - "status": { - "type": "string", - "description": "The current status of the invoice request.", - "example": "INVOICE_REQUESTED" - }, - "statusTransitions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatusTransitions" - } - } - } - }, - "InvoiceRequestsResponse": { - "required": [ - "invoiceRequests" - ], - "type": "object", - "properties": { - "invoiceRequests": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoiceRequests" - } - } - } - }, - "Products": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "The description of the ordered product.", - "example": "Eucerin Hyaluron-filler" - }, - "quantity": { - "type": "integer", - "description": "Amount of the product being ordered.", - "format": "int32" - }, - "unitPrice": { - "type": "number", - "description": "The selling price to the customer of a single unit including VAT.", - "example": 10 - } - } - }, - "StatusTransitions": { - "required": [ - "status", - "statusDateTime" - ], - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Indicates the status of this invoice request.", - "example": "INVOICE_REQUESTED", - "enum": [ - "INVOICE_REQUESTED", - "INVOICE_UPLOADED", - "INVOICE_INCORRECT", - "INVOICE_VIRUS_DETECTED", - "FINISHED" - ] - }, - "statusDateTime": { - "type": "string", - "description": "The date and time in ISO 8601 format that indicates when this status was updated for this invoice request.", - "format": "date-time", - "example": "2020-12-09T12:34:56+01:00" - } - } - }, - "PriceStarBoundaries": { - "required": [ - "lastModifiedDateTime", - "priceStarBoundaryLevels" - ], - "type": "object", - "properties": { - "lastModifiedDateTime": { - "type": "string", - "description": "The date and time in ISO 8601 format when boundaries updated for the last time.", - "format": "date-time", - "example": "2022-01-07T03:18:38.228164+01:00" - }, - "priceStarBoundaryLevels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PriceStarBoundaryLevels" - } - } - } - }, - "PriceStarBoundaryLevels": { - "required": [ - "boundaryPrice", - "level" - ], - "type": "object", - "properties": { - "level": { - "type": "integer", - "description": "The level of the price star boundary.", - "format": "int32", - "example": 5 - }, - "boundaryPrice": { - "type": "number", - "description": "The boundary price of the corresponding level.", - "example": 41 - } - } - } - }, - "securitySchemes": { - "OAuth2": { - "type": "http", - "description": "JWT-based access to api.bol.com", - "in": "header", - "scheme": "bearer" - } - } - } -} diff --git a/src/OpenApi/retailer.json b/src/OpenApi/retailer.json index cd5bbdc..2e934d1 100644 --- a/src/OpenApi/retailer.json +++ b/src/OpenApi/retailer.json @@ -1,9 +1,18 @@ { "openapi": "3.0.1", "info": { - "title": "v9 - Retailer API", - "description": "The bol.com API for retailers.", - "version": "9.x" + "title": "v10 - Retailer API", + "description": "The bol.com API for retailers.\n\n# Authentication\nOur API requires authentication via OAuth2. The detailed steps to authenticate are explained [here](https://api.bol.com/retailer/public/Retailer-API/authentication.html) \n\n# Demo scenarios\nOur API specification includes examples of the responses you can expect. For more information as well as more examples, we refer you to the following resources: \n- [Demo environment](https://api.bol.com/retailer/public/Retailer-API/demo/demo.html)\n- [Demo scenarios](https://api.bol.com/retailer/public/Retailer-API/demo/v10-index.html)\n", + "termsOfService": "https://api.bol.com/retailer/public/Retailer-API/legal/terms-of-service.html", + "contact": { + "name": "developers.bol.com", + "url": "https://developers.bol.com" + }, + "version": "10.x", + "x-logo": { + "url": "https://api.bol.com/retailer/public/Retailer-API/_images/bolcom_logo.png", + "altText": "bol.com logo" + } }, "servers": [ { @@ -92,7 +101,7 @@ "operationId": "get-commissions", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/BulkCommissionRequest" } @@ -104,7 +113,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/BulkCommissionResponse" } @@ -114,7 +123,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -124,7 +133,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -175,6 +184,8 @@ "description": "The price of the product with a period as a decimal separator. The price should always have two decimals precision.", "required": true, "schema": { + "maximum": 9999, + "minimum": 0, "type": "number" }, "example": 59 @@ -184,7 +195,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Commission" } @@ -194,7 +205,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -204,7 +215,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -254,7 +265,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CatalogProduct" } @@ -264,7 +275,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -274,7 +285,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -284,7 +295,7 @@ "406": { "description": "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -304,7 +315,7 @@ "operationId": "get-chunk-recommendations", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ChunkRecommendationsRequest" } @@ -316,7 +327,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ChunkRecommendationsResponse" } @@ -326,7 +337,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -346,7 +357,7 @@ "operationId": "post-product-content", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CreateProductContentSingleRequest" } @@ -358,7 +369,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -368,7 +379,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -401,7 +412,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/UploadReportResponse" } @@ -411,7 +422,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -481,7 +492,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/OfferInsights" } @@ -491,7 +502,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -552,7 +563,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/PerformanceIndicators" } @@ -562,7 +573,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -596,6 +607,8 @@ "description": "The number of weeks into the future, starting from today.", "required": true, "schema": { + "maximum": 12, + "minimum": 1, "type": "integer", "format": "int32" } @@ -605,7 +618,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/SalesForecastResponse" } @@ -615,7 +628,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -682,7 +695,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/SearchTerms" } @@ -692,7 +705,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -780,7 +793,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/InventoryResponse" } @@ -790,7 +803,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -814,7 +827,7 @@ "in": "query", "description": "Period start date in ISO 8601 standard.", "required": false, - "schema": { + "schema": { "type": "string" }, "example": "2019-03-01" @@ -834,7 +847,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "type": "string", "format": "byte" @@ -845,7 +858,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -878,13 +891,13 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "type": "string", "format": "byte" } }, - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "type": "string", "format": "byte" @@ -895,12 +908,12 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } }, - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -944,13 +957,13 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "type": "string", "format": "byte" } }, - "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet": { + "application/vnd.retailer.v10+openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "byte" @@ -961,12 +974,12 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } }, - "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet": { + "application/vnd.retailer.v10+openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -976,12 +989,12 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } }, - "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet": { + "application/vnd.retailer.v10+openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1001,7 +1014,7 @@ "operationId": "post-offer", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CreateOfferRequest" } @@ -1013,7 +1026,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1023,7 +1036,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1043,7 +1056,7 @@ "operationId": "post-offer-export", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CreateOfferExportRequest" } @@ -1055,7 +1068,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1065,7 +1078,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1101,7 +1114,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+csv": { + "application/vnd.retailer.v10+csv": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1111,7 +1124,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+csv": { + "application/vnd.retailer.v10+csv": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1131,7 +1144,7 @@ "operationId": "post-unpublished-offer-report", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CreateUnpublishedOfferReportRequest" } @@ -1143,7 +1156,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1153,7 +1166,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1189,7 +1202,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+csv": { + "application/vnd.retailer.v10+csv": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1199,7 +1212,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+csv": { + "application/vnd.retailer.v10+csv": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1232,7 +1245,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/RetailerOffer" } @@ -1242,7 +1255,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1271,7 +1284,7 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/UpdateOfferRequest" } @@ -1283,7 +1296,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1293,7 +1306,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1324,7 +1337,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1334,7 +1347,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1365,7 +1378,7 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/UpdateOfferPriceRequest" } @@ -1377,7 +1390,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1387,7 +1400,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1418,7 +1431,7 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/UpdateOfferStockRequest" } @@ -1430,7 +1443,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1440,7 +1453,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1524,7 +1537,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ReducedOrders" } @@ -1544,7 +1557,7 @@ "operationId": "cancel-order-item", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CancellationRequest" } @@ -1556,49 +1569,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v9+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/retailer/orders/shipment": { - "put": { - "tags": [ - "Orders" - ], - "summary": "Ship order item", - "description": "Ship a single order item within a customer order by providing shipping information. If you purchased a shipping label you should add the shippingLabelId to this message and leave the transport element empty. If you will ship the item using your own transporter method you must omit the shippingLabelId entirely and fill in the transport element with the fields from GET shipping labels.", - "operationId": "ship-order-item", - "requestBody": { - "content": { - "application/vnd.retailer.v9+json": { - "schema": { - "$ref": "#/components/schemas/ShipmentRequest" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Accepted: Successfully scheduled the request for processing.", - "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -1608,7 +1579,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1641,7 +1612,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Order" } @@ -1651,7 +1622,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1701,7 +1672,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductListResponse" } @@ -1711,7 +1682,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1721,7 +1692,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1731,7 +1702,7 @@ "406": { "description": "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1817,7 +1788,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductListFiltersResponse" } @@ -1827,7 +1798,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1837,7 +1808,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1847,7 +1818,7 @@ "406": { "description": "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1896,7 +1867,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductAssetsResponse" } @@ -1906,7 +1877,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1916,7 +1887,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -1951,6 +1922,7 @@ "description": "The requested page number with a page size of 50 items.", "required": false, "schema": { + "maximum": 200, "minimum": 1, "type": "integer", "format": "int32", @@ -2007,7 +1979,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CompetingOffersResponse" } @@ -2017,7 +1989,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2027,7 +1999,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2090,7 +2062,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductPlacementResponse" } @@ -2100,7 +2072,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2110,7 +2082,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2120,7 +2092,61 @@ "406": { "description": "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/{ean}/price-star-boundaries": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get price star boundaries by EAN", + "description": "Gets a list of all price star boundaries for a specific EAN.", + "operationId": "get-price-star-boundaries", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this product.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/PriceStarBoundaries" + } + } + } + }, + "400": { + "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2154,7 +2180,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductIdsResponse" } @@ -2164,7 +2190,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2174,7 +2200,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2208,7 +2234,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductRatingsResponse" } @@ -2218,7 +2244,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2228,7 +2254,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2278,7 +2304,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Promotions" } @@ -2288,7 +2314,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2321,7 +2347,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Promotion" } @@ -2331,7 +2357,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2341,7 +2367,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2387,7 +2413,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Products" } @@ -2397,7 +2423,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2487,7 +2513,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ReplenishmentsResponse" } @@ -2497,7 +2523,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2515,7 +2541,7 @@ "operationId": "post-replenishment", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/CreateReplenishmentRequest" } @@ -2527,7 +2553,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -2537,7 +2563,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2559,7 +2585,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/DeliveryDatesResponse" } @@ -2569,7 +2595,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2589,7 +2615,7 @@ "operationId": "post-pickup-time-slots", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/PickupTimeSlotsRequest" } @@ -2601,7 +2627,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/PickupTimeSlotsResponse" } @@ -2611,7 +2637,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2631,7 +2657,7 @@ "operationId": "post-request-product-destinations", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/RequestProductDestinationsRequest" } @@ -2643,7 +2669,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -2653,7 +2679,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2687,7 +2713,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductDestinationsResponse" } @@ -2697,7 +2723,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2707,7 +2733,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2727,7 +2753,7 @@ "operationId": "post-product-labels", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProductLabelsRequest" } @@ -2739,7 +2765,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "type": "string", "format": "byte" @@ -2750,7 +2776,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2760,7 +2786,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2794,7 +2820,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ReplenishmentResponse" } @@ -2804,7 +2830,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2814,7 +2840,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2844,7 +2870,7 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/UpdateReplenishmentRequest" } @@ -2856,7 +2882,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -2866,7 +2892,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2914,7 +2940,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "type": "string", "format": "byte" @@ -2925,7 +2951,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2935,7 +2961,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2969,7 +2995,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "type": "string", "format": "byte" @@ -2980,7 +3006,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -2990,7 +3016,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3024,7 +3050,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/RetailerInformationResponse" } @@ -3034,7 +3060,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3044,7 +3070,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3102,7 +3128,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ReturnsResponse" } @@ -3112,7 +3138,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3142,7 +3168,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3152,7 +3178,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3185,7 +3211,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Return" } @@ -3195,7 +3221,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3227,7 +3253,7 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ReturnRequest" } @@ -3239,7 +3265,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3249,7 +3275,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3306,7 +3332,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ShipmentsResponse" } @@ -3316,7 +3342,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/problem" } @@ -3324,6 +3350,212 @@ } } } + }, + "post": { + "tags": [ + "Shipments" + ], + "summary": "Create a shipment", + "description": "Ship multiple single order items within a customer order by providing shipping information. If you purchased a shipping label you should add the shippingLabelId to this message and leave the transport element empty. If you will ship the item using your own transporter method you must omit the shippingLabelId entirely and fill in the transport element with the fields from GET shipping labels.", + "operationId": "create-shipment", + "requestBody": { + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/ShipmentRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Accepted: Successfully scheduled the request for processing.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/ProcessStatus" + } + } + } + }, + "400": { + "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/shipments/invoices/requests": { + "get": { + "tags": [ + "Shipments" + ], + "summary": "Get a list of invoice requests", + "description": "Gets a list of paginated invoice requests initiated by customers.", + "operationId": "get-invoice-requests", + "parameters": [ + { + "name": "shipment-id", + "in": "query", + "description": "The id of the shipment.", + "required": false, + "schema": { + "type": "string" + }, + "example": 541757635 + }, + { + "name": "page", + "in": "query", + "description": "The requested page number with a page size of 50 items.", + "required": false, + "schema": { + "minimum": 1, + "type": "integer", + "format": "int32", + "default": 1 + }, + "example": 1 + }, + { + "name": "state", + "in": "query", + "description": "To filter on invoice request state. You can filter on all invoice requests regardless their statuses, open invoice requests requiring your action and invoice requests uploaded with possible errors.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "OPEN", + "UPLOAD_ERROR", + "ALL" + ] + }, + "example": "OPEN" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/InvoiceRequestsResponse" + } + } + } + }, + "400": { + "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/shipments/invoices/{shipment-id}": { + "post": { + "tags": [ + "Shipments" + ], + "summary": "Upload an invoice for shipment id", + "description": "Uploads an invoice associated with shipment id.", + "operationId": "upload-invoice", + "parameters": [ + { + "name": "shipment-id", + "in": "path", + "description": "The id of the shipment associated with the invoice.", + "required": true, + "schema": { + "type": "string" + }, + "example": 541757635 + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "invoice" + ], + "type": "object", + "properties": { + "invoice": { + "type": "string", + "description": "The invoice file.", + "format": "binary" + } + } + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Accepted: Successfully scheduled the request for processing.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/ProcessStatus" + } + } + } + }, + "400": { + "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "415": { + "description": "Unsupported Media Type: Content-Type header contains invalid value, allowed value is multipart/form-data.", + "content": { + "application/vnd.retailer.v10+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } } }, "/retailer/shipments/{shipment-id}": { @@ -3349,7 +3581,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Shipment" } @@ -3359,7 +3591,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/problem" } @@ -3379,7 +3611,7 @@ "operationId": "post-shipping-label", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ShippingLabelRequest" } @@ -3391,7 +3623,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3401,7 +3633,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3421,7 +3653,7 @@ "operationId": "get-delivery-options", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/DeliveryOptionsRequest" } @@ -3433,7 +3665,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/DeliveryOptionsResponse" } @@ -3443,7 +3675,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3453,7 +3685,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3503,7 +3735,7 @@ } }, "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "type": "string", "format": "byte" @@ -3514,7 +3746,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3524,7 +3756,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+pdf": { + "application/vnd.retailer.v10+pdf": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3539,14 +3771,14 @@ "tags": [ "Subscriptions" ], - "summary": "Get push notification subscriptions", - "description": "Retrieve a list of all configured and active push notification subscriptions.", + "summary": "Retrieve Event Notification Subscriptions (BETA)", + "description": "Retrieves all event notification subscriptions for a given retailer. Each subscription may have different types of events and a destination, which could either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", "operationId": "get-push-notification-subscriptions", "responses": { "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/SubscriptionsResponse" } @@ -3556,7 +3788,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3569,14 +3801,14 @@ "tags": [ "Subscriptions" ], - "summary": "Create push notification subscription", - "description": "Create a push notification subscription for one (or more) of the available resources. The configured URL has to support https scheme.", + "summary": "Create Event Notification Subscription (BETA)", + "description": "Creates a new event notification subscription for a retailer. The subscription can be set up for one or more types of events and the destination can either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", "operationId": "post-push-notification-subscription", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { - "$ref": "#/components/schemas/CreateSubscriptionRequest" + "$ref": "#/components/schemas/SubscriptionRequest" } } }, @@ -3586,7 +3818,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3596,7 +3828,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3611,14 +3843,14 @@ "tags": [ "Subscriptions" ], - "summary": "Retrieve public keys for push notification signature validation.", + "summary": "Retrieve public keys for push notification signature validation. (BETA)", "description": "Retrieve a list of public keys that should be used to validate the signature header for push notifications received from bol.com.", "operationId": "get-subscription-keys", "responses": { "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/KeySetResponse" } @@ -3633,14 +3865,14 @@ "tags": [ "Subscriptions" ], - "summary": "Send test push notification for subscriptions", + "summary": "Send test push notification for subscriptions (BETA)", "description": "Send a test push notification to all subscriptions for the provided event.", "operationId": "post-test-push-notification", "parameters": [ { "name": "subscription-id", "in": "path", - "description": "A unique identifier for the subscription.", + "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", "required": true, "schema": { "type": "string" @@ -3652,7 +3884,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3662,7 +3894,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3677,14 +3909,14 @@ "tags": [ "Subscriptions" ], - "summary": "Get push notification subscription by id", - "description": "Retrieve a configured and active push notification subscription with the provided id.", + "summary": "Retrieve Specific Event Notification Subscription (BETA)", + "description": "Fetches the details of a specific event notification subscription for a retailer. The details include the types of events and the destination, which can either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", "operationId": "get-push-notification-subscription", "parameters": [ { "name": "subscription-id", "in": "path", - "description": "A unique identifier for the subscription.", + "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", "required": true, "schema": { "type": "string" @@ -3696,7 +3928,7 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } @@ -3706,7 +3938,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3716,7 +3948,7 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3729,14 +3961,14 @@ "tags": [ "Subscriptions" ], - "summary": "Update push notification subscription", - "description": "Update an existing push notification subscription with the supplied id. The configured URL has to support https scheme.", + "summary": "Update Event Notification Subscription (BETA)", + "description": "Updates the details of a specific event notification subscription for a retailer. The updates can be made to the types of events and/or the destination, which can either be a URL (for WEBHOOK) or a topic name (for GCP_PUBSUB).", "operationId": "put-push-notification-subscription", "parameters": [ { "name": "subscription-id", "in": "path", - "description": "A unique identifier for the subscription.", + "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", "required": true, "schema": { "type": "string" @@ -3746,9 +3978,9 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriptionRequest" + "$ref": "#/components/schemas/SubscriptionRequest" } } }, @@ -3758,7 +3990,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3768,7 +4000,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3781,14 +4013,14 @@ "tags": [ "Subscriptions" ], - "summary": "Delete push notification subscription", - "description": "Delete a push notification subscription with the provided id.", + "summary": "Remove Event Notification Subscription (BETA)", + "description": "Deletes a specific event notification subscription associated with a retailer.", "operationId": "delete-push-notification-subscription", "parameters": [ { "name": "subscription-id", "in": "path", - "description": "A unique identifier for the subscription.", + "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", "required": true, "schema": { "type": "string" @@ -3800,7 +4032,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3810,7 +4042,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3841,7 +4073,7 @@ ], "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ChangeTransportRequest" } @@ -3853,7 +4085,7 @@ "202": { "description": "Accepted: Successfully scheduled the request for processing.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -3863,7 +4095,7 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -3957,34 +4189,36 @@ "type": "string", "example": "TNT", "enum": [ + "AMPERE", + "BPOST_BE", + "BPOST_BRIEF", "BRIEFPOST", - "UPS", - "TNT", - "TNT-EXTRA", - "TNT_BRIEF", - "TNT-EXPRESS", - "DYL", - "DPD-NL", - "DPD-BE", - "BPOST_BE", - "BPOST_BRIEF", + "BUDBEE", + "COURIER", + "CYCLOON", + "DHL", + "DHL-GLOBAL-MAIL", + "DHL-SD", "DHLFORYOU", - "GLS", - "FEDEX_NL", + "DHL_DE", + "DPD-BE", + "DPD-NL", + "DYL", "FEDEX_BE", + "FEDEX_NL", + "GLS", "OTHER", - "DHL", - "DHL_DE", - "DHL-GLOBAL-MAIL", - "TSN", - "FIEGE", - "TRANSMISSION", - "PARCEL-NL", - "LOGOIX", "PACKS", - "COURIER", + "PARCEL-NL", + "PES", + "TNT", + "TNT-EXPRESS", + "TNT-EXTRA", + "TNT_BRIEF", + "TRANSMISSION", "TRUNKRS", - "CYCLOON" + "TSN", + "UPS" ] }, "trackAndTrace": { @@ -3996,30 +4230,36 @@ "description": "The change transport requested by the user." }, "Link": { - "required": [ - "href", - "method", - "rel" - ], "type": "object", "properties": { "rel": { - "type": "string", - "description": "The link relation.", - "example": "self" + "type": "string" }, "href": { - "type": "string", - "description": "The URI for the resource linked to.", - "example": "https://api.bol.com/shared/process-status/1234567" + "type": "string" }, - "method": { - "type": "string", - "description": "The HTTP method to use when accessing the link.", - "example": "GET" + "hreflang": { + "type": "string" + }, + "media": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "deprecation": { + "type": "string" + }, + "profile": { + "type": "string" + }, + "name": { + "type": "string" } - }, - "description": "Lists available actions applicable to this endpoint." + } }, "ProcessStatus": { "required": [ @@ -4082,31 +4322,42 @@ } } }, - "UpdateSubscriptionRequest": { + "SubscriptionRequest": { "required": [ "resources", + "subscriptionType", "url" ], "type": "object", "properties": { "resources": { "type": "array", - "description": "Type of event.", + "description": "Array of event types for which the subscription is set. Note that some event types are only available for certain subscription types.", "items": { "type": "string", - "description": "Type of event.", + "description": "Array of event types for which the subscription is set. Note that some event types are only available for certain subscription types.", "enum": [ "PROCESS_STATUS", "SHIPMENT", - "OFFER" + "OFFER", + "PRICE_STAR_BOUNDARY", + "COMPETING_OFFER" ] } }, "url": { - "pattern": "^https.*", "type": "string", - "description": "URL to receive this WebHook notification.", + "description": "The destination for event notifications. For WEBHOOK subscription types, this is the URL where messages are posted to. For GCP_PUBSUB, this is the topic name.", "example": "https://www.bol.com/webhook" + }, + "subscriptionType": { + "type": "string", + "description": "The type of subscription. It indicates the platform where the events will be subscribed to. Be aware that certain event types are only available for specific types.", + "example": "WEBHOOK", + "enum": [ + "WEBHOOK", + "GCP_PUBSUB" + ] } } }, @@ -4131,6 +4382,8 @@ ] }, "quantityReturned": { + "maximum": 9999, + "minimum": 1, "type": "integer", "description": "The quantity of items returned.", "format": "int32", @@ -4180,6 +4433,8 @@ "$ref": "#/components/schemas/UpdateDeliveryInfo" }, "numberOfLoadCarriers": { + "maximum": 66, + "minimum": 1, "type": "integer", "description": "The number of parcels in this replenishment. Note: if you are using the bol.com pickup service, the maximum number is 20.", "format": "int32", @@ -4195,70 +4450,6 @@ } } }, - "OrderItem": { - "required": [ - "orderItemId" - ], - "type": "object", - "properties": { - "orderItemId": { - "type": "string", - "description": "The order item being confirmed.", - "example": "2012345678" - } - }, - "description": "Single element list with the order item to ship." - }, - "ShipmentRequest": { - "required": [ - "orderItems" - ], - "type": "object", - "properties": { - "orderItems": { - "maxItems": 1, - "minItems": 1, - "type": "array", - "description": "Single element list with the order item to ship.", - "items": { - "$ref": "#/components/schemas/OrderItem" - } - }, - "shipmentReference": { - "maxLength": 90, - "minLength": 0, - "type": "string", - "description": "A user-defined reference that you can provide to add to the shipment. Can be used for own administration purposes. Only 'null' or non-empty strings accepted.", - "example": "B321SR" - }, - "shippingLabelId": { - "type": "string", - "description": "The identifier of the purchased shipping label.", - "example": "d4c50077-0c19-435f-9bee-1b30b9f4ba1a" - }, - "transport": { - "$ref": "#/components/schemas/TransportInstruction" - } - } - }, - "TransportInstruction": { - "required": [ - "transporterCode" - ], - "type": "object", - "properties": { - "transporterCode": { - "type": "string", - "description": "Specify the transporter that will carry out the shipment.", - "example": "TNT" - }, - "trackAndTrace": { - "type": "string", - "description": "The track and trace code that is associated with this transport.", - "example": "3SBOL0987654321" - } - } - }, "CancellationRequest": { "required": [ "orderItems" @@ -4392,6 +4583,8 @@ "type": "object", "properties": { "amount": { + "maximum": 999, + "minimum": 0, "type": "integer", "description": "The amount of stock available for the specified product present in the retailers warehouse. Note: this should not be the FBB stock! Defaults to 0.", "format": "int32", @@ -4412,12 +4605,16 @@ "type": "object", "properties": { "quantity": { + "maximum": 24, + "minimum": 1, "type": "integer", "description": "The minimum quantity a customer must order in order to receive discount. The element with value 1 must at least be present. In case of using more elements, the respective quantities must be in increasing order.", "format": "int32", "example": 1 }, "unitPrice": { + "maximum": 9999, + "minimum": 1, "type": "number", "description": "The price per single unit including VAT in case the customer orders at least the quantity provided. When using more than 1 price, the respective prices must be in decreasing order using 2 decimal precision and dot separated.", "example": 9.99 @@ -4453,34 +4650,6 @@ } } }, - "CreateSubscriptionRequest": { - "required": [ - "resources", - "url" - ], - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "Type of event.", - "items": { - "type": "string", - "description": "Type of event.", - "enum": [ - "PROCESS_STATUS", - "SHIPMENT", - "OFFER" - ] - } - }, - "url": { - "pattern": "^https.*", - "type": "string", - "description": "URL to receive this WebHook notification.", - "example": "https://www.bol.com/webhook" - } - } - }, "DeliveryOptionsRequestOrderItem": { "required": [ "orderItemId" @@ -4491,6 +4660,12 @@ "type": "string", "description": "The id for the order item (1 order can have multiple order items).", "example": "2012345678" + }, + "quantity": { + "type": "integer", + "description": "The quantity of the order item for which the shipping label creation is requested for. If omitted, will be interpreted as the full quantity that is still open for this order item.", + "format": "int32", + "example": 1 } }, "description": "Order items for which the delivery options are requested." @@ -4671,6 +4846,76 @@ } } }, + "OrderItem": { + "required": [ + "orderItemId" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "The order item being confirmed.", + "example": "2012345678" + }, + "quantity": { + "type": "integer", + "description": "The quantity of the order items to ship. If omitted, will be interpreted as the full quantity that is still open for this order item.", + "format": "int32", + "example": 1 + } + }, + "description": "List of order items to ship." + }, + "ShipmentRequest": { + "required": [ + "orderItems" + ], + "type": "object", + "properties": { + "orderItems": { + "maxItems": 100, + "minItems": 1, + "type": "array", + "description": "List of order items to ship.", + "items": { + "$ref": "#/components/schemas/OrderItem" + } + }, + "shipmentReference": { + "maxLength": 90, + "minLength": 0, + "type": "string", + "description": "A user-defined reference that you can provide to add to the shipment. Can be used for own administration purposes. Only 'null' or non-empty strings accepted.", + "example": "B321SR" + }, + "shippingLabelId": { + "type": "string", + "description": "The identifier of the purchased shipping label.", + "example": "d4c50077-0c19-435f-9bee-1b30b9f4ba1a" + }, + "transport": { + "$ref": "#/components/schemas/TransportInstruction" + } + } + }, + "TransportInstruction": { + "required": [ + "transporterCode" + ], + "type": "object", + "properties": { + "transporterCode": { + "type": "string", + "description": "Specify the transporter that will carry out the shipment.", + "example": "TNT" + }, + "trackAndTrace": { + "type": "string", + "description": "The track and trace code that is associated with this transport.", + "example": "3SBOL0987654321" + } + } + }, "CreateReturnRequest": { "required": [ "handlingResult", @@ -4685,6 +4930,8 @@ "example": "2012345678" }, "quantityReturned": { + "maximum": 9999, + "minimum": 1, "type": "integer", "description": "The quantity of items returned.", "format": "int32", @@ -4831,6 +5078,8 @@ "example": "0000007740404" }, "quantity": { + "maximum": 9999, + "minimum": 1, "type": "integer", "description": "The number of announced items.", "format": "int32", @@ -4861,6 +5110,8 @@ "example": false }, "numberOfLoadCarriers": { + "maximum": 66, + "minimum": 1, "type": "integer", "description": "The number of parcels in this replenishment. Note: if you are using the bol.com pickup service, the maximum number is 20.", "format": "int32", @@ -4892,6 +5143,8 @@ "example": "0000007740404" }, "quantity": { + "maximum": 9999, + "minimum": 1, "type": "integer", "description": "The number of products to generate labels for.", "format": "int32", @@ -5013,6 +5266,8 @@ "$ref": "#/components/schemas/PickupTimeSlotsAddress" }, "numberOfLoadCarriers": { + "maximum": 50, + "minimum": 1, "type": "integer", "description": "The number of load carriers in this shipment.", "format": "int32", @@ -5154,6 +5409,7 @@ ] }, "page": { + "maximum": 200, "minimum": 1, "type": "integer", "description": "The requested page number with a page size of 50 items.", @@ -5319,6 +5575,8 @@ "type": "object", "properties": { "amount": { + "maximum": 999, + "minimum": 0, "type": "integer", "description": "The amount of stock available for the specified product present in the retailers warehouse. Note: this should not be the FBB stock! Defaults to 0.", "format": "int32", @@ -5384,6 +5642,8 @@ "FRONT" ], "items": { + "maxLength": 2, + "minLength": 1, "type": "string", "description": "The label(s) of the asset.", "example": "[\"FRONT\"]" @@ -5744,32 +6004,44 @@ "required": [ "id", "resources", + "subscriptionType", "url" ], "type": "object", "properties": { "id": { "type": "string", - "description": "A unique identifier for the subscription.", + "description": "The unique identifier assigned to each event notification subscription. This ID is used for tracking and managing each subscription.", "example": "1234" }, "resources": { "type": "array", "items": { "type": "string", - "description": "Type of event.", + "description": "Array of event types for which the subscription is set. Note that some event types are only available for certain subscription types.", "enum": [ "TEST", "PROCESS_STATUS", "SHIPMENT", - "OFFER" + "OFFER", + "PRICE_STAR_BOUNDARY", + "COMPETING_OFFER" ] } }, "url": { "type": "string", - "description": "URL to receive this WebHook notification.", + "description": "The destination for event notifications. For WEBHOOK subscription types, this is the URL where messages are posted to. For GCP_PUBSUB, this is the topic name.", "example": "https://www.bol.com/webhook" + }, + "subscriptionType": { + "type": "string", + "description": "The type of subscription. It indicates the platform where the events will be subscribed to. Be aware that certain event types are only available for specific types.", + "example": "WEBHOOK", + "enum": [ + "WEBHOOK", + "GCP_PUBSUB" + ] } } }, @@ -5811,7 +6083,7 @@ "publicKey": { "type": "string", "description": "The Base64 encoded public key to use when verifying the signature.", - "example": "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCDO7X3OGEqB6LU2ZQdznuYJX1KhCiJUB0+IwW9UjcgbU2Y/LzUIgGPT33s/+OqqMQOtXp2RV4JM6Zv5/YUZgZAqEIkvvrIYvJB8tXv73VQS2r4Ssy3Y/frJsqy8a3sDOoFeJygHYE6kVf3sOCdo4CO6PFUe7ZwsOSS2/7fNWAaMhY6tEuZwkA7ZLoSd3UHTdeKlV1TH5I3yFClMo1FwABsWzj9DhvEb6Q36j+QLJZAj0xvusJUsOjcSgyXRzVBFtwwNILzs9BO+GWRI4li+rjhaST2pNtvGfnQB5TUOO7Yegk/ucSiV1cFzy95gWQV2F0c9P1vBctETrYKxQBklBbjAgMBAAECggEAGISLVoi9/nA2x7VuqrLs/FvksItIV38UN4urgtddXT2OhcqSLL+9styTFjgofLXTCzx0iKwlCWsQ6U9Y9i6pdGL7GIplqBJ0WEXaGl2OeVXdwk2XOZv/sXsp24yzhapT/nmuKWvZvOtyl9//1vO5DPoQPExwpVUnHxji4SjDr6DuKVNDwh9Z4mVsdfdYVeLYGJ356IGWhTu/JDie4byl8B75UgbmyvfJRjQkoLpVZuhu+jkmhogpoSl6NtaKA+iFlGT9JLtGVHDn15kdEHb+dtzTzyJH40KGjQ7OiZcmA8GFft6zrNlOpyziH7fICtt0//7fR348/Z+XIYUFqfadQQKBgQDeVnqAlkt2Uab/1OjX9O8CRWqdoFLpUGDiHhkaXEylJtm1osFHGiyOi1eEQOy//lnJWKUp7c0b8D/QioP7kI38ES1mBx1KDzFgob4p/U+4R+z24SV/Q3CT6vHbfbe1XxWvE4SOdh4p7+Kuhxz1n6P0TWltvsTbpCJ9GM4wi2Z26QKBgQCXGiObkJI4Wv6RGxq76BHEDZdrLWppXh1+FYfyUaq6bfcSF86yAIRlleEJUh1v9KDw2DCX0rhO3BW0juEl5qz5RohLIxuak+2RbX6IQrVPwtCCeGQzKIRPktht+fi+eSaa5XNMLXURTzjVUdxzFwqDKp+7YQWL8DJ6qEfJGGYX6wKBgBXM8PIOypNtaiyHmdUjBRR57fxKrhaGdRl2zgtRpYpEBvDSZpUsMdZAP3KOUyh4LiGZ+Yfk80mcAwXVrx9Ji0J+BK+OXwbV+od5FIZVei2dj9SdOuoBmNZIITLeXtb/3cZu6X52gnqmNNncEbDb2F2qAX5rSC4pJ+CQQBduc7uRAoGAHzjxfqWi8S4sSAOXxJgxg5djYGwj/t3JrlH4o2OoqZkrYnu05CcjNHKB65EiKq3sM5gYgmayWukzOvoDH/fIakHey9fXTluezVwYt0NBf9e7ihoiakfG/0JSonbypTkXdw5OgsEp3YfHMJ0XtlhefbgDBY8IvF/HrnyzSKRYBD0CgYBlq6nIEZOIqngHdtskT8JOZBcniVPGjUjSiNcYQXfeMwKINUqDGC/YmpPgBOhO93ozeQTCBeeMD8nlbkTHPu7BxCCfpKj6/PPMfxmyFQyDg9ZjjHOIhUMddRw+mSq0zS212JbIr3O4eEtrXPqWfq5phxyE3dRvaX3A3wiEQN9WRA==" + "example": "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCDO7X3OGEqB6LU2ZQdznuYJX1KhCiJUB0+IwW9UjcgbU2Y/LzUIgGPT33s/+OqqMQOtXp2RV4JM6Zv5/YUZgZAqEIkvvrIYvJB8tXv73VQS2r4Ssy3Y/frJsqy8a3sDOoFeJygHYE6kVf3sOCdo4CO6PFUe7ZwsOSS2/7fNWAaMhY6tEuZwkA7ZLoSd3UHTdeKlV1TH5I3yFClMo1FwABsWzj9DhvEb6Q36j+QLJZAj0xvusJUsOjcSgyXRzVBFtwwNILzs9BO+GWRI4li+rjhaST2pNtvGfnQB5TUOO7Yegk/ucSiV1cFzy95gWQV2F0c9P1vBctETrYKxQBklBbjAgMBAAECggEAGISLVoi9/nA2x7VuqrLs/FvksItIV38UN4urgtddXT2OhcqSLL+9styTFjgofLXTCzx0iKwlCWsQ6U9Y9i6pdGL7GIplqBJ0WEXaGl2OeVXdwk2XOZv/sXsp24yzhapT/nmuKWvZvOtyl9//1vO5DPoQPExwpVUnHxji4SjDr6DuKVNDwh9Z4mVsdfdYVeLYGJ356IGWhTu/JDie4byl8B75UgbmyvfJRjQkoLpVZuhu+jkmhogpoSl6NtaKA+iFlGT9JLtGVHDn15kdEHb+dtzTzyJH40KGjQ7OiZcmA8GFft6zrNlOpyziH7fICtt0//7fR348/Z+XIYUFqfadQQKBgQDeVnqAlkt2Uab/1OjX9O8CRWqdoFLpUGDiHhkaXEylJtm1osFHGiyOi1eEQOy//lnJWKUp7c0b8D/QioP7kI38ES1mBx1KDzFgob4p/U+4R+z24SV/Q3CT6vHbfbe1XxWvE4SOdh4p7+Kuhxz1n6P0TWltvsTbpCJ9GM4wi2Z26QKBgQCXGiObkJI4Wv6RGxq76BHEDZdrLWppXh1+FYfyUaq6bfcSF86yAIRlleEJUh1v10KDw2DCX0rhO3BW0juEl5qz5RohLIxuak+2RbX6IQrVPwtCCeGQzKIRPktht+fi+eSaa5XNMLXURTzjVUdxzFwqDKp+7YQWL8DJ6qEfJGGYX6wKBgBXM8PIOypNtaiyHmdUjBRR57fxKrhaGdRl2zgtRpYpEBvDSZpUsMdZAP3KOUyh4LiGZ+Yfk80mcAwXVrx9Ji0J+BK+OXwbV+od5FIZVei2dj9SdOuoBmNZIITLeXtb/3cZu6X52gnqmNNncEbDb2F2qAX5rSC4pJ+CQQBduc7uRAoGAHzjxfqWi8S4sSAOXxJgxg5djYGwj/t3JrlH4o2OoqZkrYnu05CcjNHKB65EiKq3sM5gYgmayWukzOvoDH/fIakHey9fXTluezVwYt0NBf9e7ihoiakfG/0JSonbypTkXdw5OgsEp3YfHMJ0XtlhefbgDBY8IvF/HrnyzSKRYBD0CgYBlq6nIEZOIqngHdtskT8JOZBcniVPGjUjSiNcYQXfeMwKINUqDGC/YmpPgBOhO93ozeQTCBeeMD8nlbkTHPu7BxCCfpKj6/PPMfxmyFQyDg9ZjjHOIhUMddRw+mSq0zS212JbIr3O4eEtrXPqWfq5phxyE3dRvaX3A3wiEQN9WRA==" } } }, @@ -5832,6 +6104,9 @@ "problem": { "type": "object", "properties": { + "detail": { + "type": "string" + }, "instance": { "type": "string", "format": "uri" @@ -5843,9 +6118,6 @@ "host": { "type": "string" }, - "causedBy": { - "$ref": "#/components/schemas/problem" - }, "title": { "type": "string" }, @@ -5859,8 +6131,8 @@ "$ref": "#/components/schemas/violation" } }, - "detail": { - "type": "string" + "causedBy": { + "$ref": "#/components/schemas/problem" } } }, @@ -6407,7 +6679,8 @@ "DELIVERED_AT_CUSTOMER", "PICKED_UP_AT_PICK_UP_POINT", "AT_PICK_UP_POINT", - "RETURNED_TO_SENDER" + "RETURNED_TO_SENDER", + "INBOUND_COLLECT" ] }, "eventDateTime": { @@ -6418,6 +6691,186 @@ } } }, + "InvoiceRequests": { + "required": [ + "shipmentId", + "status", + "statusTransitions" + ], + "type": "object", + "properties": { + "shipmentId": { + "type": "string", + "description": "The id of the shipment associated with this invoice request.", + "example": "987654" + }, + "orderId": { + "type": "string", + "description": "The id of the order associated with this shipment.", + "example": "4691862037" + }, + "customerAccountNumber": { + "type": "string", + "description": "The account of the customer within bol.com associated with this shipment.", + "example": "3004850316" + }, + "billingDetails": { + "$ref": "#/components/schemas/InvoiceRequestsBillingDetails" + }, + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoiceRequestsProducts" + } + }, + "status": { + "type": "string", + "description": "The current status of the invoice request.", + "example": "INVOICE_REQUESTED" + }, + "statusTransitions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusTransitions" + } + } + } + }, + "InvoiceRequestsBillingDetails": { + "required": [ + "salutation" + ], + "type": "object", + "properties": { + "salutation": { + "type": "string", + "description": "The salutation of the customer.", + "example": "MALE", + "enum": [ + "MALE", + "FEMALE", + "UNKNOWN" + ] + }, + "firstName": { + "type": "string", + "description": "The first name of the customer.", + "example": "Billie" + }, + "surname": { + "type": "string", + "description": "The surname of the customer.", + "example": "Jansen" + }, + "streetName": { + "type": "string", + "description": "The street name.", + "example": "Dorpstraat" + }, + "houseNumber": { + "type": "string", + "description": "The house number.", + "example": "1" + }, + "houseNumberExtension": { + "type": "string", + "description": "The extension on the house number.", + "example": "B" + }, + "zipCode": { + "type": "string", + "description": "The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders.", + "example": "1111ZZ" + }, + "city": { + "type": "string", + "description": "The name of the city.", + "example": "Utrecht" + }, + "countryCode": { + "type": "string", + "description": "The country code.", + "example": "NL" + }, + "company": { + "type": "string", + "description": "The company name.", + "example": "bol.com" + }, + "vatNumber": { + "type": "string", + "description": "The Value Added Tax (VAT) / BTW number for business sellers situated in the Netherlands.", + "example": "NL999999999B99" + }, + "kvkNumber": { + "type": "string", + "description": "The Kamer van Koophandel (KvK) number for organizations situated in the Netherlands or ondernemingsnummer for organizations situated in Belgium.", + "example": "99887766" + } + }, + "description": "The details of the customer that is responsible for the financial fulfillment of this shipment." + }, + "InvoiceRequestsProducts": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "The description of the ordered product.", + "example": "Eucerin Hyaluron-filler" + }, + "quantity": { + "type": "integer", + "description": "Amount of the product being ordered.", + "format": "int32" + }, + "unitPrice": { + "type": "number", + "description": "The selling price to the customer of a single unit including VAT.", + "example": 10 + } + } + }, + "InvoiceRequestsResponse": { + "required": [ + "invoiceRequests" + ], + "type": "object", + "properties": { + "invoiceRequests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoiceRequests" + } + } + } + }, + "StatusTransitions": { + "required": [ + "status", + "statusDateTime" + ], + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Indicates the status of this invoice request.", + "example": "INVOICE_REQUESTED", + "enum": [ + "INVOICE_REQUESTED", + "INVOICE_UPLOADED", + "INVOICE_INCORRECT", + "INVOICE_VIRUS_DETECTED", + "FINISHED" + ] + }, + "statusDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format that indicates when this status was updated for this invoice request.", + "format": "date-time", + "example": "2020-12-09T12:34:56+01:00" + } + } + }, "ReducedReturn": { "required": [ "fulfilmentMethod", @@ -6810,30 +7263,40 @@ "type": "object", "properties": { "retailerRating": { + "maximum": 10, + "minimum": 1, "type": "number", "description": "General rating of the retailer.", "format": "double", "example": 9.1 }, "productInformationRating": { + "maximum": 10, + "minimum": 1, "type": "number", "description": "Product rating of the retailer.", "format": "double", "example": 9.6 }, "deliveryTimeRating": { + "maximum": 10, + "minimum": 1, "type": "number", "description": "Delivery rating of the retailer.", "format": "double", "example": 9.4 }, "shippingRating": { + "maximum": 10, + "minimum": 1, "type": "number", "description": "Shipping rating of the retailer.", "format": "double", "example": 9.4 }, "serviceRating": { + "maximum": 10, + "minimum": 1, "type": "number", "description": "Service rating of the retailer.", "format": "double", @@ -6859,6 +7322,8 @@ "example": 14 }, "approvalPercentage": { + "maximum": 10, + "minimum": 0, "type": "integer", "description": "The percentage of the amount of customer that rated the retailer either neutral or positive during the rating method period.", "format": "int32", @@ -7843,6 +8308,47 @@ } } }, + "PriceStarBoundaries": { + "required": [ + "lastModifiedDateTime", + "priceStarBoundaryLevels" + ], + "type": "object", + "properties": { + "lastModifiedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when boundaries updated for the last time.", + "format": "date-time", + "example": "2022-01-07T03:18:38.228164+01:00" + }, + "priceStarBoundaryLevels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceStarBoundaryLevels" + } + } + } + }, + "PriceStarBoundaryLevels": { + "required": [ + "boundaryPrice", + "level" + ], + "type": "object", + "properties": { + "level": { + "type": "integer", + "description": "The level of the price star boundary.", + "format": "int32", + "example": 5 + }, + "boundaryPrice": { + "type": "number", + "description": "The boundary price of the corresponding level.", + "example": 41 + } + } + }, "Category": { "required": [ "categoryId", @@ -7922,7 +8428,6 @@ "bestOffer", "countryCode", "fulfilmentMethod", - "maxDeliveryDate", "offerId", "price", "retailerId" @@ -7977,7 +8482,7 @@ }, "maxDeliveryDate": { "type": "string", - "description": "The date at which package can be delivered to customer latest. In case of pre-orders where a specific delivery date is not available, a placeholder date will be used.", + "description": "The date at which package can be delivered to customer latest. In case of pre-orders where a specific delivery date is not available, this field will not be present.", "format": "date", "example": "2022-10-21" } diff --git a/src/OpenApi/shared-v10.json b/src/OpenApi/shared-v10.json deleted file mode 100644 index e466376..0000000 --- a/src/OpenApi/shared-v10.json +++ /dev/null @@ -1,462 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "v10 - Shared API", - "description": "The bol.com API shared logic.", - "version": "10.x" - }, - "servers": [ - { - "url": "https://api.bol.com" - } - ], - "security": [ - { - "OAuth2": [] - } - ], - "tags": [ - { - "name": "Process Status", - "description": "Process status resources" - } - ], - "paths": { - "/shared/process-status": { - "get": { - "tags": [ - "Process Status" - ], - "summary": "Get the status of an asynchronous process by entity id and event type for a retailer", - "description": "Retrieve a list of process statuses, which shows information regarding previously executed PUT/POST/DELETE requests in descending order. You need to supply an entity id and event type. Please note: process status instances are only retained for a limited period of time after completion. Outside of this period, deleted process statuses will no longer be returned. Please handle this accordingly, by stopping any active polling for these statuses.", - "operationId": "get-process-status-entity-id", - "parameters": [ - { - "name": "entity-id", - "in": "query", - "description": "The entity id is not unique, so you will need to provide an event type. For example, an entity id can be an order item id, transport id, return number, replenishment id, campaign id, and keyword id.", - "required": true, - "schema": { - "type": "string" - }, - "example": 987654321 - }, - { - "name": "event-type", - "in": "query", - "description": "The event type can only be used in combination with the entity id.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CONFIRM_SHIPMENT", - "CANCEL_ORDER", - "CHANGE_TRANSPORT", - "HANDLE_RETURN_ITEM", - "CREATE_RETURN_ITEM", - "CREATE_INBOUND", - "DELETE_OFFER", - "CREATE_OFFER", - "UPDATE_OFFER", - "UPDATE_OFFER_STOCK", - "UPDATE_OFFER_PRICE", - "CREATE_OFFER_EXPORT", - "UNPUBLISHED_OFFER_REPORT", - "CREATE_PRODUCT_CONTENT", - "CREATE_SUBSCRIPTION", - "UPDATE_SUBSCRIPTION", - "DELETE_SUBSCRIPTION", - "SEND_SUBSCRIPTION_TST_MSG", - "CREATE_SHIPPING_LABEL", - "CREATE_REPLENISHMENT", - "UPDATE_REPLENISHMENT", - "CREATE_CAMPAIGN", - "UPDATE_CAMPAIGN", - "CREATE_AD_GROUP", - "UPDATE_AD_GROUP", - "CREATE_TARGET_PRODUCT", - "UPDATE_TARGET_PRODUCT", - "CREATE_NEGATIVE_KEYWORD", - "DELETE_NEGATIVE_KEYWORD", - "CREATE_KEYWORD", - "UPDATE_KEYWORD", - "DELETE_KEYWORD", - "REQUEST_PRODUCT_DESTINATIONS", - "CREATE_SOV_SEARCH_TERM_REPORT", - "CREATE_SOV_CATEGORY_REPORT", - "UPLOAD_INVOICE", - "CREATE_CAMPAIGN_PERFORMANCE_REPORT" - ] - }, - "example": "CONFIRM_SHIPMENT" - }, - { - "name": "page", - "in": "query", - "description": "The requested page number with a page size of 50 items.", - "required": false, - "schema": { - "minimum": 1, - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatusResponse" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatusResponse" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - }, - "post": { - "tags": [ - "Process Status" - ], - "summary": "Get the status of multiple asynchronous processes by an array of process status ids for a retailer", - "description": "Retrieve a list of process statuses, which shows information regarding previously executed PUT/POST/DELETE requests. No more than 1000 process status id's can be sent in a single request. Please note: process status instances are only retained for a limited period of time after completion. Outside of this period, deleted process statuses will no longer be returned. Please handle this accordingly, by stopping any active polling for these statuses.", - "operationId": "get-process-status-bulk", - "requestBody": { - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/BulkProcessStatusRequest" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/BulkProcessStatusRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatusResponse" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatusResponse" - } - } - } - }, - "400": { - "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - }, - "/shared/process-status/{process-status-id}": { - "get": { - "tags": [ - "Process Status" - ], - "summary": "Get the status of an asynchronous process by process status id", - "description": "Retrieve a specific process status, which shows information regarding a previously executed PUT/POST/DELETE request. All PUT/POST/DELETE requests on the other endpoints will supply a process status id in the related response. You can use this id to retrieve a status by using the endpoint below. Please note: process status instances are only retained for a limited period of time after completion. Outside of this period, a 404 will be returned for missing process statuses. Please handle this accordingly, by stopping any active polling for these statuses.", - "operationId": "get-process-status", - "parameters": [ - { - "name": "process-status-id", - "in": "path", - "description": "The id of the process status being requested. This id is supplied in every response to a PUT/POST/DELETE request on the other endpoints.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok: Successfully processed the request.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - }, - "404": { - "description": "Not found: The requested item could not be found.", - "content": { - "application/vnd.retailer.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - }, - "application/vnd.advertiser.v10+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Problem": { - "required": [ - "detail", - "status", - "title", - "type", - "violations" - ], - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type URI for this problem. Fixed value: https://api.bol.com/problems.", - "format": "uri", - "example": "https://api.bol.com/problems" - }, - "title": { - "type": "string", - "description": "Title describing the nature of the problem.", - "example": "Error validating request. Consult the bol.com API documentation for more information." - }, - "status": { - "type": "integer", - "description": "HTTP status returned from the endpoint causing the problem.", - "format": "int32" - }, - "detail": { - "type": "string", - "description": "Detailed error message describing in additional detail what caused the service to return this problem.", - "example": "Bad request" - }, - "host": { - "type": "string", - "description": "Host identifier describing the server instance that reported the problem.", - "example": "Instance-001" - }, - "instance": { - "type": "string", - "description": "Full URI path of the resource that reported the problem.", - "format": "uri", - "example": "https://api.bol.com//retailer/resource" - }, - "violations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Violation" - } - } - }, - "description": "Describes a problem that occurred interacting with the API." - }, - "Violation": { - "required": [ - "name", - "reason" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Describes the origin of the error, for instance a field or query parameter validation error.", - "example": "exampleValue" - }, - "reason": { - "type": "string", - "description": "Detailed description of the validation error that caused the problem.", - "example": "Request contains invalid value(s): 'INVALID', allowed values: ALLOWED_VALUE1, ALLOWED_VALUE2." - } - }, - "description": "Describes a violation that occurred interacting with the API." - }, - "BulkProcessStatusRequest": { - "required": [ - "processStatusQueries" - ], - "type": "object", - "properties": { - "processStatusQueries": { - "maxItems": 1000, - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/components/schemas/ProcessStatusId" - } - } - } - }, - "ProcessStatusId": { - "required": [ - "processStatusId" - ], - "type": "object", - "properties": { - "processStatusId": { - "type": "string", - "description": "The process status id.", - "example": "1234567" - } - } - }, - "Link": { - "required": [ - "href", - "method", - "rel" - ], - "type": "object", - "properties": { - "rel": { - "type": "string", - "description": "The link relation.", - "example": "self" - }, - "href": { - "type": "string", - "description": "The URI for the resource linked to.", - "example": "https://api.bol.com/shared/process-status/1234567" - }, - "method": { - "type": "string", - "description": "The HTTP method to use when accessing the link.", - "example": "GET" - } - }, - "description": "Lists available actions applicable to this endpoint." - }, - "ProcessStatus": { - "required": [ - "createTimestamp", - "description", - "eventType", - "links", - "status" - ], - "type": "object", - "properties": { - "processStatusId": { - "type": "string", - "description": "The process status id.", - "example": "1234567" - }, - "entityId": { - "type": "string", - "description": "The id of the object being processed. For example, in case of a shipment process id, you will receive the id of the order item being processed.", - "example": "987654321" - }, - "eventType": { - "type": "string", - "description": "Name of the requested action that is being processed.", - "example": "CONFIRM_SHIPMENT" - }, - "description": { - "type": "string", - "description": "Describes the action that is being processed.", - "example": "Example process status description for processing 987654321." - }, - "status": { - "type": "string", - "description": "Status of the action being processed.", - "example": "SUCCESS", - "enum": [ - "PENDING", - "SUCCESS", - "FAILURE", - "TIMEOUT" - ] - }, - "errorMessage": { - "type": "string", - "description": "Shows error message if applicable.", - "example": "Example process status error message." - }, - "createTimestamp": { - "type": "string", - "description": "Time of creation of the response.", - "format": "date-time", - "example": "2018-11-14T09:34:41+01:00" - }, - "links": { - "type": "array", - "description": "Lists available actions applicable to this endpoint.", - "items": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "ProcessStatusResponse": { - "required": [ - "processStatuses" - ], - "type": "object", - "properties": { - "processStatuses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - } - } - }, - "securitySchemes": { - "OAuth2": { - "type": "http", - "description": "JWT-based access to api.bol.com", - "in": "header", - "scheme": "bearer" - } - } - } -} diff --git a/src/OpenApi/shared.json b/src/OpenApi/shared.json index ada5aea..0ed6132 100644 --- a/src/OpenApi/shared.json +++ b/src/OpenApi/shared.json @@ -1,9 +1,18 @@ { "openapi": "3.0.1", "info": { - "title": "v9 - Shared API", - "description": "The bol.com API shared logic.", - "version": "9.x" + "title": "v10 - Shared API", + "description": "The bol.com API shared logic.\n\n# Authentication\nOur API requires authentication via OAuth2. The detailed steps to authenticate are explained [here](https://api.bol.com/retailer/public/Retailer-API/authentication.html) \n\n# Demo scenarios\nOur API specification includes examples of the responses you can expect. For more information as well as more examples, we refer you to the following resources: \n- [Demo environment](https://api.bol.com/retailer/public/Retailer-API/demo/demo.html)\n- [Demo scenarios](https://api.bol.com/retailer/public/Retailer-API/demo/v10-index.html)\n", + "termsOfService": "https://api.bol.com/retailer/public/Retailer-API/legal/terms-of-service.html", + "contact": { + "name": "developers.bol.com", + "url": "https://developers.bol.com" + }, + "version": "10.x", + "x-logo": { + "url": "https://api.bol.com/retailer/public/Retailer-API/_images/bolcom_logo.png", + "altText": "bol.com logo" + } }, "servers": [ { @@ -18,7 +27,7 @@ "tags": [ { "name": "Process Status", - "description": "Process status resource" + "description": "Process status resources" } ], "paths": { @@ -50,6 +59,7 @@ "type": "string", "enum": [ "CONFIRM_SHIPMENT", + "CREATE_SHIPMENT", "CANCEL_ORDER", "CHANGE_TRANSPORT", "HANDLE_RETURN_ITEM", @@ -107,12 +117,12 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatusResponse" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatusResponse" } @@ -122,12 +132,12 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -145,12 +155,12 @@ "operationId": "get-process-status-bulk", "requestBody": { "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/BulkProcessStatusRequest" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/BulkProcessStatusRequest" } @@ -162,12 +172,12 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatusResponse" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatusResponse" } @@ -177,12 +187,12 @@ "400": { "description": "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -215,12 +225,12 @@ "200": { "description": "Ok: Successfully processed the request.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/ProcessStatus" } @@ -230,12 +240,12 @@ "404": { "description": "Not found: The requested item could not be found.", "content": { - "application/vnd.retailer.v9+json": { + "application/vnd.retailer.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } }, - "application/vnd.advertiser.v9+json": { + "application/vnd.advertiser.v10+json": { "schema": { "$ref": "#/components/schemas/Problem" } @@ -349,30 +359,36 @@ } }, "Link": { - "required": [ - "href", - "method", - "rel" - ], "type": "object", "properties": { "rel": { - "type": "string", - "description": "The link relation.", - "example": "self" + "type": "string" }, "href": { - "type": "string", - "description": "The URI for the resource linked to.", - "example": "https://api.bol.com/shared/process-status/1234567" + "type": "string" }, - "method": { - "type": "string", - "description": "The HTTP method to use when accessing the link.", - "example": "GET" + "hreflang": { + "type": "string" + }, + "media": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "deprecation": { + "type": "string" + }, + "profile": { + "type": "string" + }, + "name": { + "type": "string" } - }, - "description": "Lists available actions applicable to this endpoint." + } }, "ProcessStatus": { "required": [