From 08a3fced48dfdb8cbd83c55f37b9dd52843bfae4 Mon Sep 17 00:00:00 2001 From: "WoutervanderLoop.nl" Date: Tue, 22 Aug 2023 13:30:06 +0200 Subject: [PATCH 1/3] New OpenAPI v3 json files --- src/OpenApi/retailer-v10.json | 1557 ++- src/OpenApi/retailer.json | 17113 ++++++++++++++++++-------------- src/OpenApi/shared-v10.json | 734 +- src/OpenApi/shared.json | 734 +- 4 files changed, 11677 insertions(+), 8461 deletions(-) diff --git a/src/OpenApi/retailer-v10.json b/src/OpenApi/retailer-v10.json index 8620f71..4cfabea 100644 --- a/src/OpenApi/retailer-v10.json +++ b/src/OpenApi/retailer-v10.json @@ -1,494 +1,1101 @@ { - "swagger" : "2.0", - "host": "api.bol.com", - "schemes": ["https"], - "info" : { - "description" : "The bol.com API for retailers.", - "version" : "10.x", - "title" : "v10 - Retailer API" - }, - "tags" : [ { - "name" : "Insights (BETA)" - }, { - "name" : "Shipments (BETA)" - } ], - "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", - "produces" : [ "application/vnd.retailer.v10+json", "application/vnd.retailer.v8+json", "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/PriceStarBoundaries" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/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", - "produces" : [ "application/vnd.retailer.v10+json" ], - "parameters" : [ { - "name" : "shipment-id", - "in" : "query", - "description" : "The id of the shipment.", - "required" : false, - "type" : "string", - "x-example" : "541757635" - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32", - "x-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, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "OPEN", "UPLOAD_ERROR", "ALL" ], - "default" : "ALL" - }, - "collectionFormat" : "multi", - "default" : "ALL", - "x-example" : "OPEN" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/InvoiceRequestsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/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", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/vnd.retailer.v10+json" ], - "parameters" : [ { - "name" : "invoice", - "in" : "formData", - "description" : "The invoice file.", - "required" : true, - "type" : "file" - }, { - "name" : "shipment-id", - "in" : "path", - "description" : "The id of the shipment associated with the invoice.", - "required" : true, - "type" : "string", - "x-example" : "541757635" - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "415" : { - "description" : "Unsupported Media Type: Content-Type header contains invalid value, allowed value is multipart/form-data.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - } - }, - "definitions" : { - "BillingDetails" : { - "type" : "object", - "properties" : { - "salutation" : { - "type" : "string", - "example" : "MALE", - "description" : "The salutation of the customer.", - "enum" : [ "MALE", "FEMALE", "UNKNOWN" ] - }, - "firstName" : { - "type" : "string", - "example" : "Billie", - "description" : "The first name of the customer." - }, - "surname" : { - "type" : "string", - "example" : "Jansen", - "description" : "The surname of the customer." - }, - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name." - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension on the house number." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders." - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The name of the city." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country code." - }, - "company" : { - "type" : "string", - "example" : "bol.com", - "description" : "The company name." - }, - "vatNumber" : { - "type" : "string", - "example" : "NL999999999B99", - "description" : "The Value Added Tax (VAT) / BTW number for business sellers situated in the Netherlands." - }, - "kvkNumber" : { - "type" : "string", - "example" : "99887766", - "description" : "The Kamer van Koophandel (KvK) number for organizations situated in the Netherlands or ondernemingsnummer for organizations situated in Belgium." - } - } - }, - "InvoiceRequests" : { - "type" : "object", - "required" : [ "shipmentId", "status", "statusTransitions" ], - "properties" : { - "shipmentId" : { - "type" : "string", - "example" : "987654", - "description" : "The id of the shipment associated with this invoice request." - }, - "orderId" : { - "type" : "string", - "example" : "4691862037", - "description" : "The id of the order associated with this shipment." - }, - "customerAccountNumber" : { - "type" : "string", - "example" : "3004850316", - "description" : "The account of the customer within bol.com associated with this shipment." - }, - "billingDetails" : { - "description" : "The details of the customer that is responsible for the financial fulfillment of this shipment.", - "$ref" : "#/definitions/BillingDetails" - }, - "products" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Products" - } - }, - "status" : { - "type" : "string", - "example" : "INVOICE_REQUESTED", - "description" : "The current status of the invoice request." - }, - "statusTransitions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/StatusTransitions" - } - } - } + "openapi": "3.0.1", + "info": { + "title": "v10 - Retailer API", + "description": "The bol.com API for retailers.", + "version": "10.x" }, - "InvoiceRequestsResponse" : { - "type" : "object", - "required" : [ "invoiceRequests" ], - "properties" : { - "invoiceRequests" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/InvoiceRequests" - } + "servers": [ + { + "url": "https://api.bol.com" } - } - }, - "Link" : { - "type" : "object", - "required" : [ "href", "method", "rel" ], - "properties" : { - "rel" : { - "type" : "string", - "example" : "self", - "description" : "The link relation." - }, - "href" : { - "type" : "string", - "example" : "https://api.bol.com/shared/process-status/1234567", - "description" : "The URI for the resource linked to." - }, - "method" : { - "type" : "string", - "example" : "GET", - "description" : "The HTTP method to use when accessing the link." + ], + "security": [ + { + "OAuth2": [] } - } - }, - "PriceStarBoundaries" : { - "type" : "object", - "required" : [ "lastModifiedDateTime", "priceStarBoundaryLevels" ], - "properties" : { - "lastModifiedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2022-01-07T03:18:38.228164+01:00", - "description" : "The date and time in ISO 8601 format when boundaries updated for the last time." + ], + "tags": [ + { + "name": "Insights (BETA)", + "description": "Insights resource" }, - "priceStarBoundaryLevels" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/PriceStarBoundaryLevels" - } - } - } - }, - "PriceStarBoundaryLevels" : { - "type" : "object", - "required" : [ "boundaryPrice", "level" ], - "properties" : { - "level" : { - "type" : "integer", - "format" : "int32", - "example" : 5, - "description" : "The level of the price star boundary." + { + "name": "Shipments (BETA)", + "description": "Shipment resource" }, - "boundaryPrice" : { - "type" : "number", - "example" : 41.0, - "description" : "The boundary price of the corresponding level." + { + "name": "Subscriptions (BETA)", + "description": "Push notification subscriptions resource" } - } - }, - "Problem" : { - "type" : "object", - "required" : [ "violations" ], - "properties" : { - "type" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com/problems", - "description" : "Type URI for this problem. Fixed value: https://api.bol.com/problems." - }, - "title" : { - "type" : "string", - "example" : "Error validating request. Consult the bol.com API documentation for more information.", - "description" : "Title describing the nature of the problem." - }, - "status" : { - "type" : "integer", - "format" : "int32", - "example" : "40X", - "description" : "HTTP status returned from the endpoint causing the problem." - }, - "detail" : { - "type" : "string", - "example" : "Bad request", - "description" : "Detailed error message describing in additional detail what caused the service to return this problem." - }, - "host" : { - "type" : "string", - "example" : "Instance-001", - "description" : "Host identifier describing the server instance that reported the problem." - }, - "instance" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com//retailer/resource", - "description" : "Full URI path of the resource that reported the problem." - }, - "violations" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Violation" - } - } - }, - "description" : "Describes a problem that occurred interacting with the API." - }, - "ProcessStatus" : { - "type" : "object", - "required" : [ "createTimestamp", "description", "eventType", "links", "status" ], - "properties" : { - "processStatusId" : { - "type" : "string", - "example" : "1234567", - "description" : "The process status id." - }, - "entityId" : { - "type" : "string", - "example" : "987654321", - "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." - }, - "eventType" : { - "type" : "string", - "example" : "CONFIRM_SHIPMENT", - "description" : "Name of the requested action that is being processed." - }, - "description" : { - "type" : "string", - "example" : "Example process status description for processing 987654321.", - "description" : "Describes the action that is being processed." - }, - "status" : { - "type" : "string", - "example" : "SUCCESS", - "description" : "Status of the action being processed.", - "enum" : [ "PENDING", "SUCCESS", "FAILURE", "TIMEOUT" ] + ], + "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" + } + } + } + } + } + } }, - "errorMessage" : { - "type" : "string", - "example" : "Example process status error message.", - "description" : "Shows error message if applicable." + "/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" + } + } + } + } + } + } }, - "createTimestamp" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-11-14T09:34:41+01:00", - "description" : "Time of creation of the response." + "/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" + } + } + } + } + } + } }, - "links" : { - "type" : "array", - "description" : "Lists available actions applicable to this endpoint.", - "items" : { - "$ref" : "#/definitions/Link" - } - } - } - }, - "Products" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string", - "example" : "Eucerin Hyaluron-filler", - "description" : "The description of the ordered product." + "/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" + } + } + } + } + } + } }, - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : "2.", - "description" : "Amount of the product being ordered." + "/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" + } + } + } + } + } + } }, - "unitPrice" : { - "type" : "number", - "example" : 10.0, - "description" : "The selling price to the customer of a single unit including VAT." - } - } - }, - "StatusTransitions" : { - "type" : "object", - "required" : [ "status", "statusDateTime" ], - "properties" : { - "status" : { - "type" : "string", - "example" : "INVOICE_REQUESTED", - "description" : "Indicates the status of this invoice request.", - "enum" : [ "INVOICE_REQUESTED", "INVOICE_UPLOADED", "INVOICE_INCORRECT", "INVOICE_VIRUS_DETECTED", "FINISHED" ] + "/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" + } + } + } + } + } + } }, - "statusDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2020-12-09T12:34:56+01:00", - "description" : "The date and time in ISO 8601 format that indicates when this status was updated for this invoice request." + "/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" + } + } + } + } + } + } } - } }, - "Violation" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "exampleValue", - "description" : "Describes the origin of the error, for instance a field or query parameter validation error." + "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 + } + } + } }, - "reason" : { - "type" : "string", - "example" : "Request contains invalid value(s): 'INVALID', allowed values: ALLOWED_VALUE1, ALLOWED_VALUE2.", - "description" : "Detailed description of the validation error that caused the problem." + "securitySchemes": { + "OAuth2": { + "type": "http", + "description": "JWT-based access to api.bol.com", + "in": "header", + "scheme": "bearer" + } } - }, - "description" : "Describes a violation that occurred interacting with the API." } - } } diff --git a/src/OpenApi/retailer.json b/src/OpenApi/retailer.json index d2b0048..cd5bbdc 100644 --- a/src/OpenApi/retailer.json +++ b/src/OpenApi/retailer.json @@ -1,7424 +1,9697 @@ { - "swagger" : "2.0", - "host": "api.bol.com", - "schemes": ["https"], - "info" : { - "description" : "The bol.com API for retailers.", - "version" : "9.x", - "title" : "v9 - Retailer API" - }, - "tags" : [ { - "name" : "Commissions" - }, { - "name" : "Insights" - }, { - "name" : "Inventory" - }, { - "name" : "Invoices" - }, { - "name" : "Offers" - }, { - "name" : "Orders" - }, { - "name" : "Product Content" - }, { - "name" : "Products" - }, { - "name" : "Promotions" - }, { - "name" : "Replenishments" - }, { - "name" : "Retailers" - }, { - "name" : "Returns" - }, { - "name" : "Shipments" - }, { - "name" : "Shipping Labels" - }, { - "name" : "Subscriptions" - }, { - "name" : "Transports" - } ], - "paths" : { - "/retailer/commission" : { - "post" : { - "tags" : [ "Commissions" ], - "summary" : "Get all commissions and reductions by EAN in bulk", - "description" : "Gets all commissions and possible reductions by EAN, price, and optionally condition.", - "operationId" : "get-commissions", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/BulkCommissionRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/BulkCommissionResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/commission/{ean}" : { - "get" : { - "tags" : [ "Commissions" ], - "summary" : "Get all commissions and reductions by EAN per single EAN", - "description" : "Commissions can be filtered by condition, which defaults to NEW. We will calculate the commission amount from the EAN and price.", - "operationId" : "get-commission", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - }, { - "name" : "condition", - "in" : "query", - "description" : "The condition of the offer.", - "required" : false, - "type" : "string", - "default" : "NEW", - "enum" : [ "NEW", "AS_NEW", "GOOD", "REASONABLE", "MODERATE" ] - }, { - "name" : "unit-price", - "in" : "query", - "description" : "The price of the product with a period as a decimal separator. The price should always have two decimals precision.", - "required" : true, - "type" : "number", - "x-example" : 59.0 - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Commission" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/content/catalog-products/{ean}" : { - "get" : { - "tags" : [ "Product Content" ], - "summary" : "Get catalog product details by EAN", - "description" : "Gets the details of a catalog product by means of its EAN.", - "operationId" : "get-catalog-product", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - }, { - "name" : "Accept-Language", - "in" : "header", - "description" : "The language in which the catalog product details will be retrieved.", - "required" : false, - "type" : "string", - "default" : "nl", - "x-example" : "nl", - "enum" : [ "nl", "nl-BE", "fr", "fr-BE" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/CatalogProduct" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "406" : { - "description" : "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/content/chunk-recommendations" : { - "post" : { - "tags" : [ "Product Content" ], - "summary" : "Get chunk recommendations", - "description" : "Gets a selected number of recommendations for a product.", - "operationId" : "get-chunk-recommendations", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ChunkRecommendationsRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ChunkRecommendationsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/content/products" : { - "post" : { - "tags" : [ "Product Content" ], - "summary" : "Create content for a product", - "description" : "Create content for an existing product.", - "operationId" : "post-product-content", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateProductContentSingleRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/content/upload-report/{upload-id}" : { - "get" : { - "tags" : [ "Product Content" ], - "summary" : "Get an upload report by upload id", - "description" : "Gets the upload report of the product content submitted by upload id.", - "operationId" : "get-upload-report", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "upload-id", - "in" : "path", - "description" : "The identifier of the upload report.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/UploadReportResponse" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/insights/offer" : { - "get" : { - "tags" : [ "Insights" ], - "summary" : "Get offer insights", - "description" : "Get the product visits and the buy box percentage for an offer during a given period.", - "operationId" : "get-offer-insights", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "query", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - }, { - "name" : "period", - "in" : "query", - "description" : "The time unit in which the offer insights are grouped.", - "required" : true, - "type" : "string", - "enum" : [ "DAY", "WEEK", "MONTH" ] - }, { - "name" : "number-of-periods", - "in" : "query", - "description" : "The number of periods for which the offer insights are requested back in time. The maximum available periods are 24 for MONTH, 104 for WEEK, and 730 for DAY.", - "required" : true, - "type" : "integer", - "format" : "int32" - }, { - "name" : "name", - "in" : "query", - "description" : "The name of the requested offer insight.", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "PRODUCT_VISITS", "BUY_BOX_PERCENTAGE" ] - }, - "collectionFormat" : "multi" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/OfferInsights" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/insights/performance/indicator" : { - "get" : { - "tags" : [ "Insights" ], - "summary" : "Get performance indicators", - "description" : "Gets the measurements for your performance indicators per week.", - "operationId" : "get-performance-indicators", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "name", - "in" : "query", - "description" : "The type of the performance indicator", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "CANCELLATIONS", "FULFILMENT", "PHONE_AVAILABILITY", "RESPONSE_TIME", "CASE_ITEM_RATIO", "TRACK_AND_TRACE", "RETURNS", "REVIEWS" ] - }, - "collectionFormat" : "multi" - }, { - "name" : "year", - "in" : "query", - "description" : "Year number in the ISO-8601 standard.", - "required" : true, - "type" : "string" - }, { - "name" : "week", - "in" : "query", - "description" : "Week number in the ISO-8601 standard. If you would like to get the relative scores from the current week, please provide the current week number here. Be advised that measurements can change heavily over the course of the week.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/PerformanceIndicators" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/insights/sales-forecast" : { - "get" : { - "tags" : [ "Insights" ], - "summary" : "Get sales forecast", - "description" : "Get sales forecast to estimate the sales expectations on the total bol.com platform for the requested number of weeks ahead.", - "operationId" : "get-sales-forecast", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "query", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - }, { - "name" : "weeks-ahead", - "in" : "query", - "description" : "The number of weeks into the future, starting from today.", - "required" : true, - "type" : "integer", - "format" : "int32" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/SalesForecastResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/insights/search-terms" : { - "get" : { - "tags" : [ "Insights" ], - "summary" : "Get search terms", - "description" : "Retrieves the search volume for a specified search term and period. The search volume allows you to see what bol.com customers are searching for. Based on the search volume per search term you can optimize your product content, or spot opportunities to extend your assortment, or analyzing trends for inventory management.", - "operationId" : "get-search-terms", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "search-term", - "in" : "query", - "description" : "The search term for which you want to request the search volume.", - "required" : true, - "type" : "string" - }, { - "name" : "period", - "in" : "query", - "description" : "The time unit in which the offer insights are grouped.", - "required" : true, - "type" : "string", - "enum" : [ "DAY", "WEEK", "MONTH" ] - }, { - "name" : "number-of-periods", - "in" : "query", - "description" : "The number of periods for which the offer insights are requested back in time.", - "required" : true, - "type" : "integer", - "format" : "int32" - }, { - "name" : "related-search-terms", - "in" : "query", - "description" : "Indicates whether or not you want to retrieve the related search terms.", - "required" : false, - "type" : "boolean", - "default" : false - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/SearchTerms" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/inventory" : { - "get" : { - "tags" : [ "Inventory" ], - "summary" : "Get LVB/FBB inventory", - "description" : "The inventory endpoint is a specific LVB/FBB endpoint. It provides a paginated list containing your fulfilment by bol.com inventory. This endpoint does not provide information about your own stock.", - "operationId" : "get-inventory", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32", - "x-example" : 1 - }, { - "name" : "quantity", - "in" : "query", - "description" : "Filter inventory by providing a range of quantity (min-range)-(max-range). Note that if no state query is submitted in the same request, then the quantity will be filtered on regularStock by default.", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi", - "x-example" : "0-10,20-30" - }, { - "name" : "stock", - "in" : "query", - "description" : "Filter inventory by stock level.", - "required" : false, - "type" : "string", - "x-example" : "SUFFICIENT", - "enum" : [ "SUFFICIENT", "INSUFFICIENT" ] - }, { - "name" : "state", - "in" : "query", - "description" : "Filter inventory by stock type.", - "required" : false, - "type" : "string", - "x-example" : "REGULAR", - "enum" : [ "REGULAR", "GRADED" ] - }, { - "name" : "query", - "in" : "query", - "description" : "Filter inventory by EAN or product title.", - "required" : false, - "type" : "string", - "x-example" : "0000007740404" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/InventoryResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/invoices" : { - "get" : { - "tags" : [ "Invoices" ], - "summary" : "Get all invoices", - "description" : "Gets a list of invoices, by default from the past 4 weeks. The optional period-start-date and period-end-date-date parameters can be used together to retrieve invoices from a specific date range in the past, the period can be no longer than 31 days. Invoices and their specifications can be downloaded separately in different media formats with the ‘GET an invoice by id’ and the ‘GET an invoice specification by id’ calls. The available media types differ per invoice and are listed per invoice within the response. Note: the media types listed in the response must be given in our standard API format.", - "operationId" : "get-invoices", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "period-start-date", - "in" : "query", - "description" : "Period start date in ISO 8601 standard.", - "required" : false, - "type" : "string", - "x-example" : "2019-03-01" - }, { - "name" : "period-end-date", - "in" : "query", - "description" : "Period end date in ISO 8601 standard.", - "required" : false, - "type" : "string", - "x-example" : "2019-03-31" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/invoices/{invoice-id}" : { - "get" : { - "tags" : [ "Invoices" ], - "summary" : "Get an invoice by invoice id", - "description" : "Gets an invoice by invoice id. The available media types differ per invoice and are listed within the response from the ‘GET all invoices’ call. Note: the media types listed in the response must be given in our standard API format.", - "operationId" : "get-invoice", - "produces" : [ "application/vnd.retailer.v9+json", "application/vnd.retailer.v9+pdf" ], - "parameters" : [ { - "name" : "invoice-id", - "in" : "path", - "description" : "The id of the invoice", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } + "openapi": "3.0.1", + "info": { + "title": "v9 - Retailer API", + "description": "The bol.com API for retailers.", + "version": "9.x" + }, + "servers": [ + { + "url": "https://api.bol.com" + } + ], + "security": [ + { + "OAuth2": [] + } + ], + "tags": [ + { + "name": "Commissions", + "description": "Commissions resource" + }, + { + "name": "Insights", + "description": "Insights resource" + }, + { + "name": "Inventory", + "description": "Inventory resource" + }, + { + "name": "Invoices", + "description": "Invoice resource" + }, + { + "name": "Offers", + "description": "Offer resource" + }, + { + "name": "Orders", + "description": "Order resource" + }, + { + "name": "Product Content", + "description": "Product content resource" + }, + { + "name": "Products", + "description": "Products resource" + }, + { + "name": "Promotions", + "description": "Promotions resource" + }, + { + "name": "Replenishments", + "description": "Replenishments resource" + }, + { + "name": "Retailers", + "description": "Retailers resource" + }, + { + "name": "Returns", + "description": "Return resource" + }, + { + "name": "Shipments", + "description": "Shipment resource" + }, + { + "name": "Shipping Labels", + "description": "Shipping labels resource" + }, + { + "name": "Subscriptions", + "description": "Push notification subscriptions resource" + }, + { + "name": "Transports", + "description": "Transport resource" + } + ], + "paths": { + "/retailer/commission": { + "post": { + "tags": [ + "Commissions" + ], + "summary": "Get all commissions and reductions by EAN in bulk", + "description": "Gets all commissions and possible reductions by EAN, price, and optionally condition.", + "operationId": "get-commissions", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/BulkCommissionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/BulkCommissionResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/commission/{ean}": { + "get": { + "tags": [ + "Commissions" + ], + "summary": "Get all commissions and reductions by EAN per single EAN", + "description": "Commissions can be filtered by condition, which defaults to NEW. We will calculate the commission amount from the EAN and price.", + "operationId": "get-commission", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this product.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + }, + { + "name": "condition", + "in": "query", + "description": "The condition of the offer.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "NEW", + "AS_NEW", + "GOOD", + "REASONABLE", + "MODERATE" + ] + } + }, + { + "name": "unit-price", + "in": "query", + "description": "The price of the product with a period as a decimal separator. The price should always have two decimals precision.", + "required": true, + "schema": { + "type": "number" + }, + "example": 59 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Commission" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/content/catalog-products/{ean}": { + "get": { + "tags": [ + "Product Content" + ], + "summary": "Get catalog product details by EAN", + "description": "Gets the details of a catalog product by means of its EAN.", + "operationId": "get-catalog-product", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this product.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + }, + { + "name": "Accept-Language", + "in": "header", + "description": "The language in which the catalog product details will be retrieved.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "nl", + "nl-BE", + "fr", + "fr-BE" + ] + }, + "example": "nl" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CatalogProduct" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/content/chunk-recommendations": { + "post": { + "tags": [ + "Product Content" + ], + "summary": "Get chunk recommendations", + "description": "Gets a selected number of recommendations for a product.", + "operationId": "get-chunk-recommendations", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ChunkRecommendationsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ChunkRecommendationsResponse" + } + } + } + }, + "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/content/products": { + "post": { + "tags": [ + "Product Content" + ], + "summary": "Create content for a product", + "description": "Create content for an existing product.", + "operationId": "post-product-content", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CreateProductContentSingleRequest" + } + } + }, + "required": true + }, + "responses": { + "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/content/upload-report/{upload-id}": { + "get": { + "tags": [ + "Product Content" + ], + "summary": "Get an upload report by upload id", + "description": "Gets the upload report of the product content submitted by upload id.", + "operationId": "get-upload-report", + "parameters": [ + { + "name": "upload-id", + "in": "path", + "description": "The identifier of the upload report.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/UploadReportResponse" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/insights/offer": { + "get": { + "tags": [ + "Insights" + ], + "summary": "Get offer insights", + "description": "Get the product visits and the buy box percentage for an offer during a given period.", + "operationId": "get-offer-insights", + "parameters": [ + { + "name": "offer-id", + "in": "query", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "period", + "in": "query", + "description": "The time unit in which the offer insights are grouped.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "DAY", + "WEEK", + "MONTH" + ] + } + }, + { + "name": "number-of-periods", + "in": "query", + "description": "The number of periods for which the offer insights are requested back in time. The maximum available periods are 24 for MONTH, 104 for WEEK, and 730 for DAY.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of the requested offer insight.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "PRODUCT_VISITS", + "BUY_BOX_PERCENTAGE" + ] + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/OfferInsights" + } + } + } + }, + "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/insights/performance/indicator": { + "get": { + "tags": [ + "Insights" + ], + "summary": "Get performance indicators", + "description": "Gets the measurements for your performance indicators per week.", + "operationId": "get-performance-indicators", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The type of the performance indicator", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CANCELLATIONS", + "FULFILMENT", + "PHONE_AVAILABILITY", + "RESPONSE_TIME", + "CASE_ITEM_RATIO", + "TRACK_AND_TRACE", + "RETURNS", + "REVIEWS" + ] + } + }, + { + "name": "year", + "in": "query", + "description": "Year number in the ISO-8601 standard.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "week", + "in": "query", + "description": "Week number in the ISO-8601 standard. If you would like to get the relative scores from the current week, please provide the current week number here. Be advised that measurements can change heavily over the course of the week.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/PerformanceIndicators" + } + } + } + }, + "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/insights/sales-forecast": { + "get": { + "tags": [ + "Insights" + ], + "summary": "Get sales forecast", + "description": "Get sales forecast to estimate the sales expectations on the total bol.com platform for the requested number of weeks ahead.", + "operationId": "get-sales-forecast", + "parameters": [ + { + "name": "offer-id", + "in": "query", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "weeks-ahead", + "in": "query", + "description": "The number of weeks into the future, starting from today.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/SalesForecastResponse" + } + } + } + }, + "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/insights/search-terms": { + "get": { + "tags": [ + "Insights" + ], + "summary": "Get search terms", + "description": "Retrieves the search volume for a specified search term and period. The search volume allows you to see what bol.com customers are searching for. Based on the search volume per search term you can optimize your product content, or spot opportunities to extend your assortment, or analyzing trends for inventory management.", + "operationId": "get-search-terms", + "parameters": [ + { + "name": "search-term", + "in": "query", + "description": "The search term for which you want to request the search volume.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "period", + "in": "query", + "description": "The time unit in which the offer insights are grouped.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "DAY", + "WEEK", + "MONTH" + ] + } + }, + { + "name": "number-of-periods", + "in": "query", + "description": "The number of periods for which the offer insights are requested back in time.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "related-search-terms", + "in": "query", + "description": "Indicates whether or not you want to retrieve the related search terms.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/SearchTerms" + } + } + } + }, + "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/inventory": { + "get": { + "tags": [ + "Inventory" + ], + "summary": "Get LVB/FBB inventory", + "description": "The inventory endpoint is a specific LVB/FBB endpoint. It provides a paginated list containing your fulfilment by bol.com inventory. This endpoint does not provide information about your own stock.", + "operationId": "get-inventory", + "parameters": [ + { + "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": "quantity", + "in": "query", + "description": "Filter inventory by providing a range of quantity (min-range)-(max-range). Note that if no state query is submitted in the same request, then the quantity will be filtered on regularStock by default.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": "0-10,20-30" + }, + { + "name": "stock", + "in": "query", + "description": "Filter inventory by stock level.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SUFFICIENT", + "INSUFFICIENT" + ] + }, + "example": "SUFFICIENT" + }, + { + "name": "state", + "in": "query", + "description": "Filter inventory by stock type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "REGULAR", + "GRADED" + ] + }, + "example": "REGULAR" + }, + { + "name": "query", + "in": "query", + "description": "Filter inventory by EAN or product title.", + "required": false, + "schema": { + "type": "string" + }, + "example": "0000007740404" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/InventoryResponse" + } + } + } + }, + "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/invoices": { + "get": { + "tags": [ + "Invoices" + ], + "summary": "Get all invoices", + "description": "Gets a list of invoices, by default from the past 4 weeks. The optional period-start-date and period-end-date-date parameters can be used together to retrieve invoices from a specific date range in the past, the period can be no longer than 31 days. Invoices and their specifications can be downloaded separately in different media formats with the ‘GET an invoice by id’ and the ‘GET an invoice specification by id’ calls. The available media types differ per invoice and are listed per invoice within the response. Note: the media types listed in the response must be given in our standard API format.", + "operationId": "get-invoices", + "parameters": [ + { + "name": "period-start-date", + "in": "query", + "description": "Period start date in ISO 8601 standard.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2019-03-01" + }, + { + "name": "period-end-date", + "in": "query", + "description": "Period end date in ISO 8601 standard.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2019-03-31" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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/invoices/{invoice-id}": { + "get": { + "tags": [ + "Invoices" + ], + "summary": "Get an invoice by invoice id", + "description": "Gets an invoice by invoice id. The available media types differ per invoice and are listed within the response from the ‘GET all invoices’ call. Note: the media types listed in the response must be given in our standard API format.", + "operationId": "get-invoice", + "parameters": [ + { + "name": "invoice-id", + "in": "path", + "description": "The id of the invoice", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "type": "string", + "format": "byte" + } + }, + "application/vnd.retailer.v9+pdf": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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" + } + }, + "application/vnd.retailer.v9+pdf": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/invoices/{invoice-id}/specification": { + "get": { + "tags": [ + "Invoices" + ], + "summary": "Get an invoice specification by invoice id", + "description": "Gets an invoice specification for an invoice with a paginated list of its transactions. The available media types differ per invoice specification and are listed within the response from the ‘GET all invoices’ call. Note, the media types listed in the response must be given in our standard API format.", + "operationId": "get-invoice-specification", + "parameters": [ + { + "name": "invoice-id", + "in": "path", + "description": "The identifier of the invoice.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The requested page number with a maximum of 25,000 lines.", + "required": false, + "schema": { + "minimum": 1, + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "type": "string", + "format": "byte" + } + }, + "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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" + } + }, + "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + }, + "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/offers": { + "post": { + "tags": [ + "Offers" + ], + "summary": "Create a new offer", + "description": "Creates a new offer, and adds it to the catalog. After creation, status information can be retrieved to review if the offer is valid and published to the shop.", + "operationId": "post-offer", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CreateOfferRequest" + } + } + }, + "required": true + }, + "responses": { + "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/offers/export": { + "post": { + "tags": [ + "Offers" + ], + "summary": "Request an offer export file", + "description": "Request an offer export file containing all offers.", + "operationId": "post-offer-export", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CreateOfferExportRequest" + } + } + }, + "required": true + }, + "responses": { + "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/offers/export/{report-id}": { + "get": { + "tags": [ + "Offers" + ], + "summary": "Retrieve an offer export file by report id", + "description": "Retrieve an offer export file containing all offers.", + "operationId": "get-offer-export", + "parameters": [ + { + "name": "report-id", + "in": "path", + "description": "Unique identifier for an offer export file.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request." + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+csv": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/offers/unpublished": { + "post": { + "tags": [ + "Offers" + ], + "summary": "Request an unpublished offer report", + "description": "Request an unpublished offer report containing all unpublished offers and reasons.", + "operationId": "post-unpublished-offer-report", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CreateUnpublishedOfferReportRequest" + } + } + }, + "required": true + }, + "responses": { + "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/offers/unpublished/{report-id}": { + "get": { + "tags": [ + "Offers" + ], + "summary": "Retrieve an unpublished offer report by report id", + "description": "Retrieve an unpublished offer report containing all unpublished offers and reasons.", + "operationId": "get-unpublished-offer-report", + "parameters": [ + { + "name": "report-id", + "in": "path", + "description": "Unique identifier for unpublished offer report.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request." + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+csv": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/offers/{offer-id}": { + "get": { + "tags": [ + "Offers" + ], + "summary": "Retrieve an offer by its offer id", + "description": "Retrieve an offer by using the offer id provided to you when creating or listing your offers.", + "operationId": "get-offer", + "parameters": [ + { + "name": "offer-id", + "in": "path", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/RetailerOffer" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + }, + "put": { + "tags": [ + "Offers" + ], + "summary": "Update an offer", + "description": "Use this endpoint to send an offer update. This endpoint returns a process status.", + "operationId": "put-offer", + "parameters": [ + { + "name": "offer-id", + "in": "path", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/UpdateOfferRequest" + } + } + }, + "required": true + }, + "responses": { + "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" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Offers" + ], + "summary": "Delete offer by id", + "description": "Delete an offer by id.", + "operationId": "delete-offer", + "parameters": [ + { + "name": "offer-id", + "in": "path", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "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/offers/{offer-id}/price": { + "put": { + "tags": [ + "Offers" + ], + "summary": "Update price(s) for offer by id", + "description": "Update price(s) for offer by id.", + "operationId": "update-offer-price", + "parameters": [ + { + "name": "offer-id", + "in": "path", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/UpdateOfferPriceRequest" + } + } + }, + "required": true + }, + "responses": { + "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/offers/{offer-id}/stock": { + "put": { + "tags": [ + "Offers" + ], + "summary": "Update stock for offer by id", + "description": "Update stock for offer by id.", + "operationId": "update-offer-stock", + "parameters": [ + { + "name": "offer-id", + "in": "path", + "description": "Unique identifier for an offer.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/UpdateOfferStockRequest" + } + } + }, + "required": true + }, + "responses": { + "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": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Get a list of orders", + "description": "Gets a paginated list of all orders for a retailer.", + "operationId": "get-orders", + "parameters": [ + { + "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 + } + }, + { + "name": "fulfilment-method", + "in": "query", + "description": "Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB). In order to retrieve both FBR and FBB orders, ALL can be used as a parameter.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FBR", + "FBB", + "ALL" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "To filter on order status. You can filter on either all orders independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "OPEN", + "SHIPPED", + "ALL" + ] + } + }, + { + "name": "change-interval-minute", + "in": "query", + "description": "To filter on the period in minutes during which the latest change was performed on an order item.", + "required": false, + "schema": { + "maximum": 60, + "type": "integer", + "format": "int32" + } + }, + { + "name": "latest-change-date", + "in": "query", + "description": "To filter on the date on which the latest change was performed on an order item. Up to 3 months of history is supported.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ReducedOrders" + } + } + } + } + } + } + }, + "/retailer/orders/cancellation": { + "put": { + "tags": [ + "Orders" + ], + "summary": "Cancel an order item by an order item id", + "description": "This endpoint can be used to either confirm a cancellation request by the customer or to cancel an order item you yourself are unable to fulfil.", + "operationId": "cancel-order-item", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CancellationRequest" + } + } + }, + "required": true + }, + "responses": { + "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": { + "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/{order-id}": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Get an order by order id", + "description": "Gets an order by order id. The order can be partially shipped or cancelled, and the message contains the quantity shipped or cancelled items. The unitPrice takes account of volume discounts.", + "operationId": "get-order", + "parameters": [ + { + "name": "order-id", + "in": "path", + "description": "The id of the order to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/list": { + "post": { + "tags": [ + "Products" + ], + "summary": "Get product list", + "description": "Gets the list of products based on category, search term or filters.", + "operationId": "get-product-list", + "parameters": [ + { + "name": "Accept-Language", + "in": "header", + "description": "The language in which the product list will be retrieved.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "nl", + "nl-BE", + "nl-NL", + "fr-BE" + ] + }, + "example": "nl" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductListResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/list-filters": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get product list filters", + "description": "Gets the list of possible filters for products based on category or search term.", + "operationId": "get-product-list-filters", + "parameters": [ + { + "name": "country-code", + "in": "query", + "description": "The country for which the filters will be retrieved.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "NL", + "BE" + ] + }, + "example": "NL" + }, + { + "name": "search-term", + "in": "query", + "description": "The search-term to get the associated categories and filters for.", + "required": false, + "schema": { + "maxLength": 50, + "minLength": 0, + "type": "string" + }, + "example": "pen" + }, + { + "name": "category-id", + "in": "query", + "description": "The category to get the associated filters for.", + "required": false, + "schema": { + "maxLength": 11, + "minLength": 0, + "type": "string" + }, + "example": 10505 + }, + { + "name": "Accept-Language", + "in": "header", + "description": "The language in which the product list filters will be retrieved.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "nl", + "nl-BE", + "nl-NL", + "fr-BE" + ] + }, + "example": "nl" + }, + { + "name": "productListFiltersRequest", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/ProductListFiltersRequest" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductListFiltersResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/{ean}/assets": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get product assets", + "description": "Gets the list of asset available for the product by EAN.", + "operationId": "get-product-assets", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this product.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + }, + { + "name": "usage", + "in": "query", + "description": "Type of the asset being used for.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "PRIMARY", + "ADDITIONAL", + "IMAGE" + ] + }, + "example": "ADDITIONAL" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductAssetsResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/{ean}/offers": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get a list of competing offers by EAN", + "description": "Use this endpoint to get a list of offers available in the webshop. The list includes offers for all retailers.", + "operationId": "get-competing-offers", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this product.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + }, + { + "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": "country-code", + "in": "query", + "description": "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "NL", + "BE" + ] + }, + "example": "NL" + }, + { + "name": "best-offer-only", + "in": "query", + "description": "Indicator to request the best offer within the country for the requested EAN.", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "example": true + }, + { + "name": "condition", + "in": "query", + "description": "The condition of the offered product.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ALL", + "BAD", + "MODERATE", + "REASONABLE", + "GOOD", + "AS_NEW", + "NEW" + ] + }, + "example": "NEW" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CompetingOffersResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/{ean}/placement": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get product placement", + "description": "Gets the list of categories and the URL where the product is placed in the webshop.", + "operationId": "get-product-placement", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this product.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + }, + { + "name": "country-code", + "in": "query", + "description": "The country of the product placed on the webshop.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "NL", + "BE" + ] + }, + "example": "NL" + }, + { + "name": "Accept-Language", + "in": "header", + "description": "The language in which the product categories and URL will be retrieved.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "nl", + "nl-BE", + "fr-BE" + ] + }, + "example": "nl" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductPlacementResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/{ean}/product-ids": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get product ids by EAN", + "description": "Get the bol.com specific product identifier and the related EANs.", + "operationId": "get-product-ids", + "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.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductIdsResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/products/{ean}/ratings": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get product ratings", + "description": "Gets a list of ratings for the products associated with the provided EAN.", + "operationId": "get-product-ratings", + "parameters": [ + { + "name": "ean", + "in": "path", + "description": "The EAN number associated with this rating.", + "required": true, + "schema": { + "type": "string" + }, + "example": "0000007740404" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductRatingsResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/promotions": { + "get": { + "tags": [ + "Promotions" + ], + "summary": "Get a list of promotions", + "description": "Gets a paginated list of all promotions for a retailer.", + "operationId": "get-promotions", + "parameters": [ + { + "name": "promotion-type", + "in": "query", + "description": "The type(s) of promotion to be retrieved.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "AWARENESS", + "PRICE_OFF" + ] + } + }, + { + "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 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Promotions" + } + } + } + }, + "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/promotions/{promotion-id}": { + "get": { + "tags": [ + "Promotions" + ], + "summary": "Get a promotion by promotion id", + "description": "Gets the details of a promotion.", + "operationId": "get-promotion", + "parameters": [ + { + "name": "promotion-id", + "in": "path", + "description": "The identifier of the promotion.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Promotion" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/promotions/{promotion-id}/products": { + "get": { + "tags": [ + "Promotions" + ], + "summary": "Get a list of products", + "description": "Gets a paginated list of all products that are present within a promotion.", + "operationId": "get-products", + "parameters": [ + { + "name": "promotion-id", + "in": "path", + "description": "The identifier of the promotion.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Products" + } + } + } + }, + "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/replenishments": { + "get": { + "tags": [ + "Replenishments" + ], + "summary": "Get replenishments", + "description": "Gets a list of replenishments.", + "operationId": "get-replenishments", + "parameters": [ + { + "name": "reference", + "in": "query", + "description": "Custom user defined reference to identify the replenishment.", + "required": false, + "schema": { + "type": "string" + }, + "example": "REFERENCE1" + }, + { + "name": "ean", + "in": "query", + "description": "The EAN number associated with this product.", + "required": false, + "schema": { + "type": "string" + }, + "example": "0000007740404" + }, + { + "name": "start-date", + "in": "query", + "description": "The creation start date to find the replenishment. In ISO 8601 format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2021-01-01" + }, + { + "name": "end-date", + "in": "query", + "description": "The end date of the range to find the replenishment. In ISO 8601 format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2021-01-02" + }, + { + "name": "state", + "in": "query", + "description": "The current state(s) of the replenishment.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": "ANNOUNCED" + }, + { + "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 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ReplenishmentsResponse" + } + } + } + }, + "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" + } + } + } + } + } + }, + "post": { + "tags": [ + "Replenishments" + ], + "summary": "Create a replenishment", + "description": "Creates a replenishment.", + "operationId": "post-replenishment", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CreateReplenishmentRequest" + } + } + }, + "required": true + }, + "responses": { + "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/replenishments/delivery-dates": { + "get": { + "tags": [ + "Replenishments" + ], + "summary": "Get delivery dates", + "description": "Retrieve a list of available delivery dates for a replenishment.", + "operationId": "get-delivery-dates", + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/DeliveryDatesResponse" + } + } + } + }, + "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/replenishments/pickup-time-slots": { + "post": { + "tags": [ + "Replenishments" + ], + "summary": "Post pickup time slots", + "description": "Retrieve pickup time slots.", + "operationId": "post-pickup-time-slots", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/PickupTimeSlotsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/PickupTimeSlotsResponse" + } + } + } + }, + "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/replenishments/product-destinations": { + "post": { + "tags": [ + "Replenishments" + ], + "summary": "Request product destinations", + "description": "Requests a list of product destinations by EANs.", + "operationId": "post-request-product-destinations", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/RequestProductDestinationsRequest" + } + } + }, + "required": true + }, + "responses": { + "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/replenishments/product-destinations/{product-destinations-id}": { + "get": { + "tags": [ + "Replenishments" + ], + "summary": "Get product destinations by product destinations id", + "description": "Gets the product destinations for one or more products by product destinations id.", + "operationId": "get-product-destinations", + "parameters": [ + { + "name": "product-destinations-id", + "in": "path", + "description": "The identifier of the product destinations requested.", + "required": true, + "schema": { + "type": "string" + }, + "example": "9483fc7e-faf3-4814-864e-dee412044c27" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductDestinationsResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/replenishments/product-labels": { + "post": { + "tags": [ + "Replenishments" + ], + "summary": "Post product labels", + "description": "Retrieve product labels.", + "operationId": "post-product-labels", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProductLabelsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/replenishments/{replenishment-id}": { + "get": { + "tags": [ + "Replenishments" + ], + "summary": "Get a replenishment by replenishment id", + "description": "Gets a replenishment by replenishment id.", + "operationId": "get-replenishment", + "parameters": [ + { + "name": "replenishment-id", + "in": "path", + "description": "The unique identifier of the replenishment.", + "required": true, + "schema": { + "type": "string" + }, + "example": 2312078154 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ReplenishmentResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + }, + "put": { + "tags": [ + "Replenishments" + ], + "summary": "Update a replenishment by replenishment id", + "description": "Updates a replenishment.", + "operationId": "put-replenishment", + "parameters": [ + { + "name": "replenishment-id", + "in": "path", + "description": "The unique identifier of the replenishment.", + "required": true, + "schema": { + "type": "string" + }, + "example": 2312078154 + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/UpdateReplenishmentRequest" + } + } + }, + "required": true + }, + "responses": { + "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/replenishments/{replenishment-id}/load-carrier-labels": { + "get": { + "tags": [ + "Replenishments" + ], + "summary": "Get load carrier labels", + "description": "Retrieve the load carrier labels.", + "operationId": "get-load-carrier-labels", + "parameters": [ + { + "name": "replenishment-id", + "in": "path", + "description": "The unique identifier of the replenishment.", + "required": true, + "schema": { + "type": "string" + }, + "example": 2312078154 + }, + { + "name": "label-type", + "in": "query", + "description": "The type of label which you want to print.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "WAREHOUSE", + "TRANSPORT" + ] + }, + "example": "WAREHOUSE" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/replenishments/{replenishment-id}/pick-list": { + "get": { + "tags": [ + "Replenishments" + ], + "summary": "Get pick list", + "description": "Retrieve the pick list.", + "operationId": "get-pick-list", + "parameters": [ + { + "name": "replenishment-id", + "in": "path", + "description": "The unique identifier of the replenishment.", + "required": true, + "schema": { + "type": "string" + }, + "example": 2312078154 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/retailers/{retailer-id}": { + "get": { + "tags": [ + "Retailers" + ], + "summary": "Get retailer information by retailer id", + "description": "Gets retailer information of a single retailer.", + "operationId": "get-retailer-information", + "parameters": [ + { + "name": "retailer-id", + "in": "path", + "description": "The Id of the retailer which information belongs to.", + "required": true, + "schema": { + "type": "string" + }, + "example": 1055479 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/RetailerInformationResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/returns": { + "get": { + "tags": [ + "Returns" + ], + "summary": "Get returns", + "description": "Get a paginated list of multi-item returns. Handled returns are sorted by date in descending order, while unhandled returns are sorted by date in ascending order.", + "operationId": "get-returns", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The page to get with a page size of 50.", + "required": false, + "schema": { + "minimum": 1, + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "handled", + "in": "query", + "description": "The status of the returns you wish to see, shows either handled or unhandled returns.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "fulfilment-method", + "in": "query", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FBR", + "FBB" + ] + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ReturnsResponse" + } + } + } + }, + "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" + } + } + } + } + } + }, + "post": { + "tags": [ + "Returns" + ], + "summary": "Create a return", + "description": "Create a return, and automatically handle it with the provided handling result. When successfully created, the resulting return id is provided in the process status.", + "operationId": "create-return", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReturnRequest" + } + } + }, + "required": true + }, + "responses": { + "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/returns/{return-id}": { + "get": { + "tags": [ + "Returns" + ], + "summary": "Get a return by return id", + "description": "Retrieve a return based on the return id.", + "operationId": "get-return", + "parameters": [ + { + "name": "return-id", + "in": "path", + "description": "Unique identifier for a return.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Return" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/returns/{rma-id}": { + "put": { + "tags": [ + "Returns" + ], + "summary": "Handle a return by rma id", + "description": "Allows the user to handle a return. This can be to either handle an open return, or change the handlingResult of an already handled return. Please refer to the Returns documentation for further details.", + "operationId": "handle-return", + "parameters": [ + { + "name": "rma-id", + "in": "path", + "description": "The RMA (Return Merchandise Authorization) identifier of the return.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ReturnRequest" + } + } + }, + "required": true + }, + "responses": { + "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/shipments": { + "get": { + "tags": [ + "Shipments" + ], + "summary": "Get shipment list", + "description": "A paginated list to retrieve all your shipments up to 3 months old. The shipments will be sorted by date in descending order.", + "operationId": "get-shipments", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The page to get with a page size of 50.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "fulfilment-method", + "in": "query", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FBR", + "FBB" + ] + } + }, + { + "name": "order-id", + "in": "query", + "description": "The id of the order. Only valid without fulfilment-method. The default fulfilment-method is ignored.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ShipmentsResponse" + } + } + } + }, + "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/shipments/{shipment-id}": { + "get": { + "tags": [ + "Shipments" + ], + "summary": "Get a shipment by shipment id", + "description": "Retrieve a single shipment by its corresponding id.", + "operationId": "get-shipment", + "parameters": [ + { + "name": "shipment-id", + "in": "path", + "description": "The id of the shipment.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Shipment" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/problem" + } + } + } + } + } + } + }, + "/retailer/shipping-labels": { + "post": { + "tags": [ + "Shipping Labels" + ], + "summary": "Create a shipping label", + "description": "Create a shipping label with a shipping label offer id retrieved from get delivery options.", + "operationId": "post-shipping-label", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ShippingLabelRequest" + } + } + }, + "required": true + }, + "responses": { + "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/shipping-labels/delivery-options": { + "post": { + "tags": [ + "Shipping Labels" + ], + "summary": "Get delivery options", + "description": "Retrieves all available delivery options based on the supplied configuration of order items that has to be shipped.", + "operationId": "get-delivery-options", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/DeliveryOptionsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/DeliveryOptionsResponse" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/shipping-labels/{shipping-label-id}": { + "get": { + "tags": [ + "Shipping Labels" + ], + "summary": "Get a shipping label", + "description": "Retrieves a shipping label by shipping label id. Metadata for the shipping label is added as headers in the response. If you are only interested in the metadata, you can do a HEAD request to retrieve only the headers without the label data.", + "operationId": "get-shipping-label", + "parameters": [ + { + "name": "shipping-label-id", + "in": "path", + "description": "The shipping label id.", + "required": true, + "schema": { + "type": "string" + }, + "example": "6ff736b5-cdd0-4150-8c67-78269ee986f5" + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "headers": { + "X-Track-And-Trace-Code": { + "description": "Track and trace code for the retrieved label.", + "style": "simple", + "schema": { + "type": "string" + } + }, + "X-Transporter-Code": { + "description": "Transporter code for the retrieved label.", + "style": "simple", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+pdf": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/retailer/subscriptions": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Get push notification subscriptions", + "description": "Retrieve a list of all configured and active push notification subscriptions.", + "operationId": "get-push-notification-subscriptions", + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+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.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + }, + "post": { + "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.", + "operationId": "post-push-notification-subscription", + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionRequest" + } + } + }, + "required": true + }, + "responses": { + "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/subscriptions/signature-keys": { + "get": { + "tags": [ + "Subscriptions" + ], + "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.v9+json": { + "schema": { + "$ref": "#/components/schemas/KeySetResponse" + } + } + } + } + } + } + }, + "/retailer/subscriptions/test/{subscription-id}": { + "post": { + "tags": [ + "Subscriptions" + ], + "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": "A unique identifier for the subscription.", + "required": true, + "schema": { + "type": "string" + }, + "example": 1234 + } + ], + "responses": { + "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/subscriptions/{subscription-id}": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Get push notification subscription by id", + "description": "Retrieve a configured and active push notification subscription with the provided id.", + "operationId": "get-push-notification-subscription", + "parameters": [ + { + "name": "subscription-id", + "in": "path", + "description": "A unique identifier for the subscription.", + "required": true, + "schema": { + "type": "string" + }, + "example": 1234 + } + ], + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+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.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + }, + "put": { + "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.", + "operationId": "put-push-notification-subscription", + "parameters": [ + { + "name": "subscription-id", + "in": "path", + "description": "A unique identifier for the subscription.", + "required": true, + "schema": { + "type": "string" + }, + "example": 1234 + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionRequest" + } + } + }, + "required": true + }, + "responses": { + "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" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Subscriptions" + ], + "summary": "Delete push notification subscription", + "description": "Delete a push notification subscription with the provided id.", + "operationId": "delete-push-notification-subscription", + "parameters": [ + { + "name": "subscription-id", + "in": "path", + "description": "A unique identifier for the subscription.", + "required": true, + "schema": { + "type": "string" + }, + "example": 1234 + } + ], + "responses": { + "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/transports/{transport-id}": { + "put": { + "tags": [ + "Transports" + ], + "summary": "Add transport information by transport id", + "description": "Add information to an existing transport. The transport id is part of the shipment. You can retrieve the transport id through the GET shipment list request.", + "operationId": "add-transport-information-by-transport-id", + "parameters": [ + { + "name": "transport-id", + "in": "path", + "description": "The transport id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ChangeTransportRequest" + } + } + }, + "required": true + }, + "responses": { + "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" + } + } + } + } + } + } + } + }, + "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." + }, + "ChangeTransportRequest": { + "required": [ + "trackAndTrace" + ], + "type": "object", + "properties": { + "transporterCode": { + "type": "string", + "example": "TNT", + "enum": [ + "BRIEFPOST", + "UPS", + "TNT", + "TNT-EXTRA", + "TNT_BRIEF", + "TNT-EXPRESS", + "DYL", + "DPD-NL", + "DPD-BE", + "BPOST_BE", + "BPOST_BRIEF", + "DHLFORYOU", + "GLS", + "FEDEX_NL", + "FEDEX_BE", + "OTHER", + "DHL", + "DHL_DE", + "DHL-GLOBAL-MAIL", + "TSN", + "FIEGE", + "TRANSMISSION", + "PARCEL-NL", + "LOGOIX", + "PACKS", + "COURIER", + "TRUNKRS", + "CYCLOON" + ] + }, + "trackAndTrace": { + "type": "string", + "description": "The track and trace code that is associated with this transport.", + "example": "3SBOL0987654321" + } + }, + "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" + }, + "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" + } + } + } + }, + "UpdateSubscriptionRequest": { + "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" + } + } + }, + "ReturnRequest": { + "required": [ + "handlingResult", + "quantityReturned" + ], + "type": "object", + "properties": { + "handlingResult": { + "type": "string", + "description": "The handling result requested by the retailer.", + "example": "RETURN_RECEIVED", + "enum": [ + "RETURN_RECEIVED", + "EXCHANGE_PRODUCT", + "RETURN_DOES_NOT_MEET_CONDITIONS", + "REPAIR_PRODUCT", + "CUSTOMER_KEEPS_PRODUCT_PAID", + "STILL_APPROVED" + ] + }, + "quantityReturned": { + "type": "integer", + "description": "The quantity of items returned.", + "format": "int32", + "example": 1 + } + }, + "description": "The handling result requested by the retailer." + }, + "UpdateDeliveryInfo": { + "required": [ + "expectedDeliveryDate" + ], + "type": "object", + "properties": { + "expectedDeliveryDate": { + "type": "string", + "description": "The expected delivery date of the shipment at the bol.com warehouse. In ISO 8601 format.", + "example": "2021-01-01" + } + } + }, + "UpdateLoadCarrier": { + "required": [ + "sscc" + ], + "type": "object", + "properties": { + "sscc": { + "type": "string", + "description": "The Serial Shipping Container Code (SSCC) for this load carrier.", + "example": "020001200000007000" + } + } + }, + "UpdateReplenishmentRequest": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "Update the state of the replenishment to cancel the replenishment.", + "example": "CANCELLED", + "enum": [ + "CANCELLED" + ] + }, + "deliveryInfo": { + "$ref": "#/components/schemas/UpdateDeliveryInfo" + }, + "numberOfLoadCarriers": { + "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", + "example": 10 + }, + "loadCarriers": { + "maxItems": 66, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateLoadCarrier" + } + } + } + }, + "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" + ], + "type": "object", + "properties": { + "orderItems": { + "maxItems": 1, + "minItems": 1, + "type": "array", + "description": "List of order items to cancel. Order item id's must belong to the same order.", + "items": { + "$ref": "#/components/schemas/OrderItemCancellation" + } + } + }, + "description": "Container for the order items that have to be cancelled." + }, + "OrderItemCancellation": { + "required": [ + "orderItemId", + "reasonCode" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "The id for the order item. One order can have multiple order items, but the list can only take one item.", + "example": "2012345678" + }, + "reasonCode": { + "type": "string", + "description": "The code representing the reason for cancellation of this item.", + "example": "BAD_CONDITION", + "enum": [ + "OUT_OF_STOCK", + "REQUESTED_BY_CUSTOMER", + "BAD_CONDITION", + "HIGHER_SHIPCOST", + "INCORRECT_PRICE", + "NOT_AVAIL_IN_TIME", + "NO_BOL_GUARANTEE", + "ORDERED_TWICE", + "RETAIN_ITEM", + "TECH_ISSUE", + "UNFINDABLE_ITEM", + "OTHER" + ] + } + }, + "description": "List of order items to cancel. Order item id's must belong to the same order." + }, + "Fulfilment": { + "required": [ + "method" + ], + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBR", + "enum": [ + "FBR", + "FBB" + ] + }, + "deliveryCode": { + "type": "string", + "description": "The delivery promise that applies to this offer. This value will only be used in combination with fulfilmentMethod 'FBR'.", + "enum": [ + "24uurs-23", + "24uurs-22", + "24uurs-21", + "24uurs-20", + "24uurs-19", + "24uurs-18", + "24uurs-17", + "24uurs-16", + "24uurs-15", + "24uurs-14", + "24uurs-13", + "24uurs-12", + "1-2d", + "2-3d", + "3-5d", + "4-8d", + "1-8d", + "MijnLeverbelofte", + "VVB" + ] + } + } + }, + "UpdateOfferRequest": { + "required": [ + "fulfilment", + "onHoldByRetailer" + ], + "type": "object", + "properties": { + "reference": { + "maxLength": 20, + "minLength": 0, + "type": "string", + "description": "A user-defined reference that helps you identify this particular offer when receiving data from us. This element can optionally be left empty and has a maximum amount of 20 characters.", + "example": "REF12345" + }, + "onHoldByRetailer": { + "type": "boolean", + "description": "Indicates whether or not you want to put this offer for sale on the bol.com website. Defaults to false.", + "example": false + }, + "unknownProductTitle": { + "maxLength": 500, + "minLength": 0, + "type": "string", + "description": "In case the item is not known to bol.com you can use this field to identify this particular product. Note: in case the product is known to bol.com, the unknown product title will not be stored.", + "example": "Unknown Product Title" + }, + "fulfilment": { + "$ref": "#/components/schemas/Fulfilment" + } + } + }, + "UpdateOfferStockRequest": { + "required": [ + "amount", + "managedByRetailer" + ], + "type": "object", + "properties": { + "amount": { + "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", + "example": 6 + }, + "managedByRetailer": { + "type": "boolean", + "description": "Configures whether the retailer manages the stock levels or that bol.com should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account.", + "example": false + } + } + }, + "BundlePrice": { + "required": [ + "quantity", + "unitPrice" + ], + "type": "object", + "properties": { + "quantity": { + "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": { + "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 + } + }, + "description": "A set of prices (containing a quantity and selling price) that apply to this offer." + }, + "Pricing": { + "required": [ + "bundlePrices" + ], + "type": "object", + "properties": { + "bundlePrices": { + "maxItems": 4, + "minItems": 1, + "type": "array", + "description": "A set of prices (containing a quantity and selling price) that apply to this offer.", + "items": { + "$ref": "#/components/schemas/BundlePrice" + } + } + } + }, + "UpdateOfferPriceRequest": { + "required": [ + "pricing" + ], + "type": "object", + "properties": { + "pricing": { + "$ref": "#/components/schemas/Pricing" + } + } + }, + "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" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "The id for the order item (1 order can have multiple order items).", + "example": "2012345678" + } + }, + "description": "Order items for which the delivery options are requested." + }, + "ShippingLabelRequest": { + "required": [ + "orderItems", + "shippingLabelOfferId" + ], + "type": "object", + "properties": { + "orderItems": { + "type": "array", + "description": "Order items for which the delivery options are requested.", + "items": { + "$ref": "#/components/schemas/DeliveryOptionsRequestOrderItem" + } + }, + "shippingLabelOfferId": { + "type": "string", + "description": "Shipping label offer id for which you request a shipping label.", + "example": "027b79fa-5743-40f0-94c7-0eac761af611" + } + }, + "description": "The configuration of order items to get delivery options for." + }, + "DeliveryOptionsRequest": { + "required": [ + "orderItems" + ], + "type": "object", + "properties": { + "orderItems": { + "type": "array", + "description": "Order items for which the delivery options are requested.", + "items": { + "$ref": "#/components/schemas/DeliveryOptionsRequestOrderItem" + } + } + }, + "description": "The configuration of order items to get delivery options for." + }, + "DeliveryOption": { + "required": [ + "labelDisplayName", + "labelPrice", + "labelType", + "packageRestrictions", + "recommended", + "shippingLabelOfferId", + "transporterCode" + ], + "type": "object", + "properties": { + "shippingLabelOfferId": { + "type": "string", + "description": "Unique identifier for the shipping label offer.", + "example": "027b79fa-5743-40f0-94c7-0eac761af611" + }, + "recommended": { + "type": "boolean", + "description": "Indicates whether this delivery option is recommended to be the best option to ship your order item(s) with.", + "example": true + }, + "validUntilDate": { + "type": "string", + "description": "The date until the delivery option (incl total price) is valid.", + "format": "date", + "example": "2020-01-12" + }, + "transporterCode": { + "type": "string", + "description": "A code representing the transporter which is being used for transportation.", + "example": "TNT" + }, + "labelType": { + "type": "string", + "description": "The type of the label, representing the way an item is being transported. MAILBOX is a mailbox package with delivery scan. MAILBOX_LIGHT is a mailbox package without delivery scan. PARCEL is a normal package.", + "example": "PARCEL", + "enum": [ + "PARCEL", + "MAILBOX", + "MAILBOX_LIGHT" + ] + }, + "labelDisplayName": { + "type": "string", + "description": "The display name of the shipping label.", + "example": "PostNL & bol.com - Pakket" + }, + "labelPrice": { + "$ref": "#/components/schemas/LabelPrice" + }, + "packageRestrictions": { + "$ref": "#/components/schemas/PackageRestrictions" + }, + "handoverDetails": { + "$ref": "#/components/schemas/HandoverDetails" + } + }, + "description": "A delivery option shows how and the costs of a transport for a shippable configuration" + }, + "DeliveryOptionsResponse": { + "required": [ + "deliveryOptions" + ], + "type": "object", + "properties": { + "deliveryOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryOption" + } + } + }, + "description": "The possible delivery options based on a shippable configuration" + }, + "HandoverDetails": { + "type": "object", + "properties": { + "meetsCustomerExpectation": { + "type": "boolean", + "description": "Indicates if you can use this label without receiving a strike if you handover before the latestHandoverDateTime. If this field is 'false' you can still buy and use this label but it will have negative consequences on your performance score because the order will be delivered too early or too late.", + "example": true + }, + "earliestHandoverDateTime": { + "type": "string", + "description": "The date and time at which the parcel can be earliest at the transporter to make sure your parcel is delivered on time.", + "format": "date-time", + "example": "2018-04-19T00:00:00+02:00" + }, + "latestHandoverDateTime": { + "type": "string", + "description": "The date and time at which the parcel must ultimately be at the transporter to make sure your parcel is delivered on time. If you handover after this date you will receive a strike because you order will be delivered too late.", + "format": "date-time", + "example": "2018-04-19T19:00:00+02:00" + }, + "collectionMethod": { + "type": "string", + "description": "The type of collection for this parcel.", + "example": "DROP_OFF", + "enum": [ + "DROP_OFF", + "PICK_UP" + ] + } + } + }, + "LabelPrice": { + "required": [ + "totalPrice" + ], + "type": "object", + "properties": { + "totalPrice": { + "type": "number", + "description": "The price that is charged for this delivery option, excluding VAT.", + "example": 2.88 + } + } + }, + "PackageRestrictions": { + "required": [ + "maxDimensions", + "maxWeight" + ], + "type": "object", + "properties": { + "maxWeight": { + "type": "string", + "description": "The weight of a package.", + "example": "10 kg" + }, + "maxDimensions": { + "type": "string", + "description": "The dimensions of a package.", + "example": "10 x 10 x 10 cm" + } + } + }, + "CreateReturnRequest": { + "required": [ + "handlingResult", + "orderItemId", + "quantityReturned" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "The id for the order item. One order can have multiple order items, but the list can only take one item.", + "example": "2012345678" + }, + "quantityReturned": { + "type": "integer", + "description": "The quantity of items returned.", + "format": "int32", + "example": 1 + }, + "handlingResult": { + "type": "string", + "description": "The handling result requested by the retailer.", + "example": "RETURN_RECEIVED", + "enum": [ + "RETURN_RECEIVED", + "EXCHANGE_PRODUCT", + "RETURN_DOES_NOT_MEET_CONDITIONS", + "REPAIR_PRODUCT", + "CUSTOMER_KEEPS_PRODUCT_PAID" + ] + } + } + }, + "CreateAddress": { + "required": [ + "attentionOf", + "city", + "countryCode", + "houseNumber", + "streetName", + "zipCode" + ], + "type": "object", + "properties": { + "streetName": { + "type": "string", + "description": "The street name of the pickup address.", + "example": "Dorpstraat" + }, + "houseNumber": { + "type": "string", + "description": "The house number of the pickup address.", + "example": "1" + }, + "zipCode": { + "type": "string", + "description": "The zip code in '1234AB' format for NL and '0000' for BE addresses.", + "example": "1111ZZ" + }, + "houseNumberExtension": { + "type": "string", + "description": "The extension of the house number.", + "example": "B" + }, + "city": { + "type": "string", + "description": "The city of the pickup address.", + "example": "Utrecht" + }, + "countryCode": { + "type": "string", + "description": "The ISO 3166-2 country code.", + "example": "NL" + }, + "attentionOf": { + "type": "string", + "description": "Name of the person responsible for this replenishment.", + "example": "Billie Bol" + } + } + }, + "CreateDeliveryInfo": { + "required": [ + "expectedDeliveryDate", + "transporterCode" + ], + "type": "object", + "properties": { + "expectedDeliveryDate": { + "type": "string", + "description": "The expected delivery date of the shipment at the bol.com warehouse. In ISO 8601 format.", + "example": "2021-01-01" + }, + "transporterCode": { + "type": "string", + "description": "The transporter code that correlates to the transport used for this replenishment.", + "example": "POSTNL", + "enum": [ + "POSTNL", + "DHL", + "DPD", + "GLS", + "UPS", + "OTHER" + ] + } + } + }, + "CreatePickupAppointment": { + "required": [ + "address", + "pickupTimeSlot" + ], + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/CreateAddress" + }, + "pickupTimeSlot": { + "$ref": "#/components/schemas/CreatePickupTimeSlot" + }, + "commentToTransporter": { + "type": "string", + "description": "A comment to the transporter regarding the pickup appointment.", + "example": "Eerste verdieping." + } + } + }, + "CreatePickupTimeSlot": { + "required": [ + "fromDateTime", + "untilDateTime" + ], + "type": "object", + "properties": { + "fromDateTime": { + "type": "string", + "description": "The selected start date and time for the replenishment pickup appointment. In ISO 8601 format.", + "example": "2021-01-01T09:00:00+01:00" + }, + "untilDateTime": { + "type": "string", + "description": "The selected end date and time for the replenishment pickup appointment. In ISO 8601 format.", + "example": "2021-01-01T10:00:00+01:00" + } + } + }, + "CreateReplenishmentLine": { + "required": [ + "ean", + "quantity" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "quantity": { + "type": "integer", + "description": "The number of announced items.", + "format": "int32", + "example": 1 + } + } + }, + "CreateReplenishmentRequest": { + "required": [ + "labelingByBol", + "lines", + "numberOfLoadCarriers", + "reference" + ], + "type": "object", + "properties": { + "reference": { + "type": "string", + "description": "Custom user reference for this replenishment. Must contain at least 1 digit and only upper case characters allowed.", + "example": "REFERENCE1" + }, + "deliveryInfo": { + "$ref": "#/components/schemas/CreateDeliveryInfo" + }, + "labelingByBol": { + "type": "boolean", + "description": "Indicates whether the replenishment will be labeled by bol.com.", + "example": false + }, + "numberOfLoadCarriers": { + "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", + "example": 10 + }, + "pickupAppointment": { + "$ref": "#/components/schemas/CreatePickupAppointment" + }, + "lines": { + "maxItems": 9999, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateReplenishmentLine" + } + } + } + }, + "ProductLabelsProduct": { + "required": [ + "ean", + "quantity" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "quantity": { + "type": "integer", + "description": "The number of products to generate labels for.", + "format": "int32", + "example": 1 + } + } + }, + "ProductLabelsRequest": { + "required": [ + "labelFormat", + "products" + ], + "type": "object", + "properties": { + "labelFormat": { + "type": "string", + "description": "The printer format to create labels for.", + "example": "AVERY_J8159", + "enum": [ + "AVERY_J8159", + "AVERY_J8160", + "AVERY_3474", + "DYMO_99012", + "BROTHER_DK11208D", + "ZEBRA_Z_PERFORM_1000T" + ] + }, + "products": { + "maxItems": 250, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductLabelsProduct" + } + } + } + }, + "Ean": { + "required": [ + "ean" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "The EAN number associated with this product." + } + } + }, + "RequestProductDestinationsRequest": { + "required": [ + "eans" + ], + "type": "object", + "properties": { + "eans": { + "maxItems": 50, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/Ean" + } + } + } + }, + "PickupTimeSlotsAddress": { + "required": [ + "city", + "countryCode", + "houseNumber", + "streetName", + "zipCode" + ], + "type": "object", + "properties": { + "streetName": { + "type": "string", + "description": "The street name of the pickup address.", + "example": "Dorpstraat" + }, + "houseNumber": { + "type": "string", + "description": "The house number of the pickup address.", + "example": "1" + }, + "houseNumberExtension": { + "type": "string", + "description": "The extension of the house number.", + "example": "B" + }, + "zipCode": { + "maxLength": 8, + "minLength": 1, + "type": "string", + "description": "The zip code in '1234AB' format for NL and '0000' for BE addresses.", + "example": "1111ZZ" + }, + "city": { + "type": "string", + "description": "The city of the pickup address.", + "example": "Utrecht" + }, + "countryCode": { + "type": "string", + "description": "The ISO 3166-2 country code.", + "example": "NL" + } + } + }, + "PickupTimeSlotsRequest": { + "required": [ + "address", + "numberOfLoadCarriers" + ], + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/PickupTimeSlotsAddress" + }, + "numberOfLoadCarriers": { + "type": "integer", + "description": "The number of load carriers in this shipment.", + "format": "int32", + "example": 1 + } + } + }, + "PickupTimeSlot": { + "required": [ + "fromDateTime", + "untilDateTime" + ], + "type": "object", + "properties": { + "fromDateTime": { + "type": "string", + "description": "The available start date and time for the pickup appointment. In ISO 8601 format.", + "format": "date-time", + "example": "2021-01-01T09:00:00+01:00" + }, + "untilDateTime": { + "type": "string", + "description": "The available end date and time for the pickup appointment. In ISO 8601 format.", + "format": "date-time", + "example": "2021-01-01T10:00:00+01:00" + } + } + }, + "PickupTimeSlotsResponse": { + "type": "object", + "properties": { + "timeSlots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PickupTimeSlot" + } + } + } + }, + "ProductListFilterRange": { + "required": [ + "max", + "min", + "rangeId" + ], + "type": "object", + "properties": { + "rangeId": { + "maxLength": 11, + "minLength": 1, + "type": "string", + "description": "The id of the range filter the products can be found within.", + "example": "PRICE" + }, + "min": { + "type": "number", + "description": "The minimum value for the range that can be used to filter the products." + }, + "max": { + "type": "number", + "description": "The maximum value for the range that can be used to filter the products." + } + }, + "description": "The list of range filters to get associated products for." + }, + "ProductListFilterValue": { + "required": [ + "filterValueId" + ], + "type": "object", + "properties": { + "filterValueId": { + "type": "string", + "description": "The unique identifier of the filter value.", + "example": "30639" + } + }, + "description": "The list of filter values in this filter." + }, + "ProductListRequest": { + "required": [ + "page" + ], + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "The country for which the products will be retrieved.", + "example": "NL", + "default": "NL", + "enum": [ + "NL", + "BE" + ] + }, + "searchTerm": { + "maxLength": 50, + "minLength": 1, + "type": "string", + "description": "The search term to get the associated products for.", + "example": "laptop" + }, + "categoryId": { + "maxLength": 11, + "minLength": 1, + "type": "string", + "description": "The category to get the associated products for.", + "example": "4770" + }, + "filterRanges": { + "maxItems": 10, + "minItems": 0, + "type": "array", + "description": "The list of range filters to get associated products for.", + "items": { + "$ref": "#/components/schemas/ProductListFilterRange" + } + }, + "filterValues": { + "maxItems": 10, + "minItems": 0, + "type": "array", + "description": "The list of filter values in this filter.", + "items": { + "$ref": "#/components/schemas/ProductListFilterValue" + } + }, + "sort": { + "type": "string", + "description": "Determines the order of the products.", + "enum": [ + "RELEVANCE", + "POPULARITY", + "PRICE_ASC", + "PRICE_DESC", + "RELEASE_DATE", + "RATING", + "WISHLIST" + ] + }, + "page": { + "minimum": 1, + "type": "integer", + "description": "The requested page number with a page size of 50 items.", + "format": "int32", + "default": 1 + } + } + }, + "ProductListProduct": { + "required": [ + "eans", + "title" + ], + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the product.", + "example": "Product title" + }, + "eans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductListProductEan" + } + } + }, + "description": "The list of products that is associated with the given search term or category and filters." + }, + "ProductListProductEan": { + "required": [ + "ean" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + } + } + }, + "ProductListResponse": { + "required": [ + "products", + "sort" + ], + "type": "object", + "properties": { + "products": { + "type": "array", + "description": "The list of products that is associated with the given search term or category and filters.", + "items": { + "$ref": "#/components/schemas/ProductListProduct" + } + }, + "sort": { + "type": "string", + "description": "Determines the order of the products.", + "example": "RELEVANCE", + "enum": [ + "RELEVANCE", + "POPULARITY", + "PRICE_ASC", + "PRICE_DESC", + "RELEASE_DATE", + "RATING", + "WISHLIST" + ] + } + } + }, + "Condition": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The condition of the offered product.", + "example": "AS_NEW", + "enum": [ + "NEW", + "AS_NEW", + "GOOD", + "REASONABLE", + "MODERATE" + ] + }, + "category": { + "type": "string", + "description": "The category of the condition. If not given NEW or SECONDHAND is derived from NAME.", + "example": "SECONDHAND", + "enum": [ + "NEW", + "SECONDHAND" + ] + }, + "comment": { + "maxLength": 2000, + "minLength": 0, + "type": "string", + "description": "The description of the condition of the product. Only allowed if name is not NEW and may not contain e-mail addresses.", + "example": "Heeft een koffie vlek op de kaft." + } + } + }, + "CreateOfferRequest": { + "required": [ + "condition", + "ean", + "fulfilment", + "onHoldByRetailer", + "pricing", + "stock" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product. Note: in case an ISBN is provided, the ISBN will be replaced with the actual EAN belonging to this ISBN.", + "example": "0000007740404" + }, + "condition": { + "$ref": "#/components/schemas/Condition" + }, + "reference": { + "maxLength": 20, + "minLength": 0, + "type": "string", + "description": "A user-defined reference that helps you identify this particular offer when receiving data from us. This element can optionally be left empty and has a maximum amount of 20 characters.", + "example": "REF12345" + }, + "onHoldByRetailer": { + "type": "boolean", + "description": "Indicates whether or not you want to put this offer for sale on the bol.com website. Defaults to false.", + "example": false + }, + "unknownProductTitle": { + "maxLength": 500, + "minLength": 0, + "type": "string", + "description": "In case the item is not known to bol.com you can use this field to identify this particular product. Note: in case the product is known to bol.com, the unknown product title will not be stored.", + "example": "Unknown Product Title" + }, + "pricing": { + "$ref": "#/components/schemas/Pricing" + }, + "stock": { + "$ref": "#/components/schemas/StockCreate" + }, + "fulfilment": { + "$ref": "#/components/schemas/Fulfilment" + } + } + }, + "StockCreate": { + "required": [ + "amount", + "managedByRetailer" + ], + "type": "object", + "properties": { + "amount": { + "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", + "example": 6 + }, + "managedByRetailer": { + "type": "boolean", + "description": "Configures whether the retailer manages the stock levels or that bol.com should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account.", + "example": false + } + } + }, + "CreateUnpublishedOfferReportRequest": { + "required": [ + "format" + ], + "type": "object", + "properties": { + "format": { + "type": "string", + "description": "The file format in which to return the export.", + "example": "CSV", + "enum": [ + "CSV" + ] + } + } + }, + "CreateOfferExportRequest": { + "required": [ + "format" + ], + "type": "object", + "properties": { + "format": { + "type": "string", + "description": "The file format in which to return the export.", + "example": "CSV", + "enum": [ + "CSV" + ] + } + } + }, + "Asset": { + "required": [ + "labels", + "url" + ], + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL of the asset.", + "example": "http://example.com" + }, + "labels": { + "maxItems": 2, + "minItems": 1, + "type": "array", + "description": "The label(s) of the asset.", + "example": [ + "FRONT" + ], + "items": { + "type": "string", + "description": "The label(s) of the asset.", + "example": "[\"FRONT\"]" + } + } + } + }, + "Attribute": { + "required": [ + "id", + "values" + ], + "type": "object", + "properties": { + "id": { + "maxLength": 100, + "minLength": 1, + "type": "string", + "description": "The identifier of the attribute for which the value has changed.", + "example": "Width" + }, + "values": { + "maxItems": 300, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/AttributeValue" + } + } + }, + "description": "A list of attributes." + }, + "AttributeValue": { + "required": [ + "unitId", + "value" + ], + "type": "object", + "properties": { + "value": { + "maxLength": 10000, + "minLength": 1, + "type": "string", + "description": "The value of the attribute.", + "example": "14.5" + }, + "unitId": { + "type": "string", + "description": "The unit identifier of the attribute.", + "example": "mm" + } + } + }, + "CreateProductContentSingleRequest": { + "required": [ + "attributes", + "language" + ], + "type": "object", + "properties": { + "language": { + "type": "string", + "description": "The language in which content is submitted.", + "example": "nl", + "enum": [ + "nl", + "nl-BE", + "fr", + "fr-BE" + ] + }, + "attributes": { + "maxItems": 150, + "minItems": 1, + "type": "array", + "description": "A list of attributes.", + "items": { + "$ref": "#/components/schemas/Attribute" + } + }, + "assets": { + "maxItems": 30, + "minItems": 0, + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } + } + } + }, + "ChunkRecommendationsAttribute": { + "required": [ + "id", + "values" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier of the attribute.", + "example": "Name" + }, + "values": { + "maxItems": 1, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/ChunkRecommendationsValue" + } + } + } + }, + "ChunkRecommendationsAttributes": { + "required": [ + "attributes" + ], + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChunkRecommendationsAttribute" + } + } + } + }, + "ChunkRecommendationsRequest": { + "required": [ + "productContents" + ], + "type": "object", + "properties": { + "productContents": { + "maxItems": 1, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/ChunkRecommendationsAttributes" + } + } + } + }, + "ChunkRecommendationsValue": { + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "maxLength": 10000, + "minLength": 1, + "type": "string", + "description": "The value of the attribute.", + "example": "Bananas" + } + } + }, + "ChunkRecommendationsPrediction": { + "required": [ + "chunkId", + "probability" + ], + "type": "object", + "properties": { + "chunkId": { + "type": "string", + "description": "The identifier of the predicted GPC/Product Classification.", + "example": "80007268" + }, + "probability": { + "type": "number", + "description": "The probability of the predicted chunk as a ratio, with eleven decimals of precision.", + "format": "double", + "example": 0.120168649 + } + } + }, + "ChunkRecommendationsPredictions": { + "required": [ + "predictions" + ], + "type": "object", + "properties": { + "predictions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChunkRecommendationsPrediction" + } + } + } + }, + "ChunkRecommendationsResponse": { + "required": [ + "recommendations" + ], + "type": "object", + "properties": { + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChunkRecommendationsPredictions" + } + } + } + }, + "BulkCommissionQuery": { + "required": [ + "ean", + "unitPrice" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "condition": { + "type": "string", + "description": "The condition of the offer.", + "example": "NEW", + "enum": [ + "NEW", + "AS_NEW", + "GOOD", + "REASONABLE", + "MODERATE" + ] + }, + "unitPrice": { + "maximum": 9999, + "minimum": 0, + "type": "number", + "description": "The price of the product with a period as a decimal separator. The price should always have two decimals precision.", + "example": 59 + } + } + }, + "BulkCommissionRequest": { + "required": [ + "commissionQueries" + ], + "type": "object", + "properties": { + "commissionQueries": { + "maxItems": 100, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkCommissionQuery" + } + } + } + }, + "BulkCommissionResponse": { + "required": [ + "commissions" + ], + "type": "object", + "properties": { + "commissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Commission" + } + } + } + }, + "Commission": { + "required": [ + "condition", + "ean", + "fixedAmount", + "percentage", + "reductions", + "totalCost", + "unitPrice" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "condition": { + "type": "string", + "description": "The condition of the offer.", + "example": "NEW" + }, + "unitPrice": { + "type": "number", + "description": "The intended selling price per single unit up to 2 decimals precision, including VAT.", + "example": 59 + }, + "fixedAmount": { + "type": "number", + "description": "A fixed commission fee, including VAT.", + "example": 0.99 + }, + "percentage": { + "type": "number", + "description": "A percentage of commission, based on the intended selling price per unit, including VAT.", + "example": 15 + }, + "totalCost": { + "type": "number", + "description": "The total commission for selling this product at bol.com. The price includes VAT for Dutch sellers, and excludes VAT for Belgium sellers.", + "example": 6.85 + }, + "totalCostWithoutReduction": { + "type": "number", + "description": "The total commission for selling this product at bol.com without reductions including VAT.", + "example": 9.84 + }, + "reductions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reduction" + } + } + } + }, + "Reduction": { + "required": [ + "costReduction", + "endDate", + "maximumPrice", + "startDate" + ], + "type": "object", + "properties": { + "maximumPrice": { + "type": "number", + "description": "Maximum offer price that can be used to benefit from a commission reduction, including VAT.", + "example": 60 + }, + "costReduction": { + "type": "number", + "description": "A reduction to the commission if the maximum price criteria is met, including VAT.", + "example": 2.99 + }, + "startDate": { + "type": "string", + "description": "The start date from which the commission reduction is valid, in ISO 8601 format.", + "format": "date", + "example": "2018-01-01" + }, + "endDate": { + "type": "string", + "description": "The end date from which the commission reduction is not valid anymore, in ISO 8601 format.", + "format": "date", + "example": "2018-01-30" + } + } + }, + "SubscriptionResponse": { + "required": [ + "id", + "resources", + "url" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the subscription.", + "example": "1234" + }, + "resources": { + "type": "array", + "items": { + "type": "string", + "description": "Type of event.", + "enum": [ + "TEST", + "PROCESS_STATUS", + "SHIPMENT", + "OFFER" + ] + } + }, + "url": { + "type": "string", + "description": "URL to receive this WebHook notification.", + "example": "https://www.bol.com/webhook" + } + } + }, + "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" + } + } + } + }, + "problem": { + "type": "object", + "properties": { + "instance": { + "type": "string", + "format": "uri" + }, + "type": { + "type": "string", + "format": "uri" + }, + "host": { + "type": "string" + }, + "causedBy": { + "$ref": "#/components/schemas/problem" + }, + "title": { + "type": "string" + }, + "status": { + "type": "integer", + "format": "int32" + }, + "violations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/violation" + } + }, + "detail": { + "type": "string" + } + } + }, + "violation": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + } + }, + "ReducedShipment": { + "required": [ + "order", + "shipmentId", + "shipmentItems", + "shipmentReference", + "transport" + ], + "type": "object", + "properties": { + "shipmentId": { + "type": "string", + "description": "A unique identifier for this shipment.", + "example": "541757635" + }, + "shipmentDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the order item was shipped.", + "format": "date-time", + "example": "2018-04-17T10:55:37+02:00" + }, + "shipmentReference": { + "type": "string", + "description": "Reference supplied by the user when this item was shipped.", + "example": "BOLCOM001" + }, + "order": { + "$ref": "#/components/schemas/ReducedShipmentOrder" + }, + "shipmentItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedShipmentItem" + } + }, + "transport": { + "$ref": "#/components/schemas/ReducedTransport" + } + } + }, + "ReducedShipmentItem": { + "required": [ + "ean", + "orderItemId" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "A unique identifier for the item of the order that was shipped in this shipment.", + "example": "1234567891" + }, + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + } + } + }, + "ReducedShipmentOrder": { + "required": [ + "orderId" + ], + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "A unique identifier for the order this shipment is related to.", + "example": "4123456789" + }, + "orderPlacedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the order was placed.", + "format": "date-time", + "example": "2018-04-17T10:55:37+02:00" + } + } + }, + "ReducedTransport": { + "required": [ + "transportId" + ], + "type": "object", + "properties": { + "transportId": { + "type": "string", + "description": "The transport id.", + "example": "312778947" + } + } + }, + "ShipmentsResponse": { + "required": [ + "shipments" + ], + "type": "object", + "properties": { + "shipments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedShipment" + } + } + } + }, + "BillingDetails": { + "required": [ + "city", + "countryCode", + "email", + "firstName", + "houseNumber", + "salutation", + "streetName", + "surname", + "zipCode" + ], + "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" + }, + "extraAddressInformation": { + "type": "string", + "description": "Additional information related to the address that helps in delivering the package.", + "example": "Apartment" + }, + "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" + }, + "email": { + "type": "string", + "description": "A scrambled email address that can be used to contact the customer.", + "example": "billie@verkopen.bol.com" + }, + "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" + }, + "orderReference": { + "type": "string", + "description": "The order reference specified by the customer when ordering a product.", + "example": "MijnReferentie" + } + }, + "description": "The details of the customer that is responsible for the financial fulfillment of this order." + }, + "OrderOffer": { + "type": "object", + "properties": { + "offerId": { + "type": "string", + "description": "Unique identifier for an offer.", + "example": "6ff736b5-cdd0-4150-8c67-78269ee986f5" + }, + "reference": { + "type": "string", + "description": "A user-defined reference tied to the offer upon creating the offer.", + "example": "BOLCOM00123" + } + } + }, + "OrderProduct": { + "required": [ + "ean", + "title" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "title": { + "type": "string", + "description": "Title of the product as shown on the webshop.", + "example": "Product Title" + } + } + }, + "Shipment": { + "required": [ + "order", + "shipmentId", + "shipmentItems", + "shipmentReference" + ], + "type": "object", + "properties": { + "shipmentId": { + "type": "string", + "description": "A unique identifier for this shipment.", + "example": "541757635" + }, + "shipmentDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the order item was shipped.", + "format": "date-time", + "example": "2018-04-17T10:55:37+02:00" + }, + "shipmentReference": { + "type": "string", + "description": "Reference supplied by the user when this item was shipped.", + "example": "BOLCOM001" + }, + "pickupPoint": { + "type": "boolean", + "description": "Indicates whether this order is shipped to a Pick Up Point.", + "example": true + }, + "order": { + "$ref": "#/components/schemas/ShipmentOrder" + }, + "shipmentDetails": { + "$ref": "#/components/schemas/ShipmentDetails" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "shipmentItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShipmentItem" + } + }, + "transport": { + "$ref": "#/components/schemas/ShipmentTransport" + } + } + }, + "ShipmentDetails": { + "required": [ + "city", + "countryCode", + "firstName", + "houseNumber", + "salutation", + "streetName", + "surname", + "zipCode" + ], + "type": "object", + "properties": { + "pickupPointName": { + "type": "string", + "description": "The name of Pick Up Point location this order needs to be shipped to.", + "example": "Albert Heijn: UTRECHT" + }, + "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" + }, + "extraAddressInformation": { + "type": "string", + "description": "Additional information related to the address that helps in delivering the package.", + "example": "Apartment" + }, + "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" + }, + "email": { + "type": "string", + "description": "A scrambled email address that can be used to contact the customer.", + "example": "billie@verkopen.bol.com" + }, + "company": { + "type": "string", + "description": "The company name.", + "example": "bol.com" + }, + "deliveryPhoneNumber": { + "type": "string", + "description": "The delivery phone number of the customer. Filled in case the order requires an appointment for delivering the goods.", + "example": "012123456" + }, + "language": { + "type": "string", + "description": "The language of the customer in case of contact.", + "example": "nl", + "enum": [ + "nl", + "nl-BE", + "fr", + "fr-BE" + ] + } + }, + "description": "The address details where this order needs to be shipped to. This can be the customers' own address, a (company) business address or a Pick Up Point address." + }, + "ShipmentFulfilment": { + "required": [ + "method" + ], + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBR", + "enum": [ + "FBR", + "FBB" + ] + }, + "distributionParty": { + "type": "string", + "description": "The party that manages the distribution, either bol.com or the retailer itself.", + "example": "RETAILER", + "enum": [ + "RETAILER", + "BOL" + ] + }, + "latestDeliveryDate": { + "type": "string", + "description": "The ultimate delivery date at which this order must be delivered at the customer's shipping address. This field is empty in case the exactDeliveryDate is filled.", + "format": "date", + "example": "2017-02-10" + } + } + }, + "ShipmentItem": { + "required": [ + "orderItemId", + "quantity", + "unitPrice" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "A unique identifier for the item of the order that was shipped in this shipment.", + "example": "1234567891" + }, + "fulfilment": { + "$ref": "#/components/schemas/ShipmentFulfilment" + }, + "offer": { + "$ref": "#/components/schemas/OrderOffer" + }, + "product": { + "$ref": "#/components/schemas/OrderProduct" + }, + "quantity": { + "type": "integer", + "description": "Amount of the product being ordered.", + "format": "int32", + "example": 10 + }, + "unitPrice": { + "type": "number", + "description": "The selling price to the customer of a single unit including VAT.", + "example": 12.99 + }, + "commission": { + "type": "number", + "description": "The commission.", + "example": 5 + } + } + }, + "ShipmentOrder": { + "required": [ + "orderId" + ], + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "A unique identifier for the order this shipment is related to.", + "example": "4123456789" + }, + "orderPlacedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the order was placed.", + "format": "date-time", + "example": "2018-04-17T10:55:37+02:00" + } + } + }, + "ShipmentTransport": { + "required": [ + "trackAndTrace" + ], + "type": "object", + "properties": { + "transportId": { + "type": "string", + "description": "The transport id.", + "example": "312778947" + }, + "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" + }, + "shippingLabelId": { + "type": "string", + "description": "The shipping label id.", + "example": "123456789" + }, + "transportEvents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransportEvent" + } + } + } + }, + "TransportEvent": { + "required": [ + "eventCode", + "eventDateTime" + ], + "type": "object", + "properties": { + "eventCode": { + "type": "string", + "description": "The transport event code indicates the location of the parcel within the distribution process.", + "example": "AT_TRANSPORTER", + "enum": [ + "PRE_ANNOUNCED", + "AT_TRANSPORTER", + "IN_TRANSIT", + "DELIVERED_AT_NEIGHBOURS", + "DELIVERED_AT_CUSTOMER", + "PICKED_UP_AT_PICK_UP_POINT", + "AT_PICK_UP_POINT", + "RETURNED_TO_SENDER" + ] + }, + "eventDateTime": { + "type": "string", + "description": "The date time of the transport event.", + "format": "date-time", + "example": "2021-07-28T17:21:07+02:00" + } + } + }, + "ReducedReturn": { + "required": [ + "fulfilmentMethod", + "registrationDateTime", + "returnId", + "returnItems" + ], + "type": "object", + "properties": { + "returnId": { + "type": "string", + "description": "Unique identifier for a return.", + "example": "1" + }, + "registrationDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when this return was registered.", + "format": "date-time", + "example": "2016-11-14T11:06:48.423+01:00" + }, + "fulfilmentMethod": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBR" + }, + "returnItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedReturnItem" + } + } + } + }, + "ReducedReturnItem": { + "required": [ + "ean", + "expectedQuantity", + "handled", + "orderId", + "processingResults", + "returnReason", + "rmaId" + ], + "type": "object", + "properties": { + "rmaId": { + "type": "string", + "description": "The RMA (Return Merchandise Authorization) identifier of the return.", + "example": "31234567" + }, + "orderId": { + "type": "string", + "description": "The id of the customer order this return item is in.", + "example": "4012345678" + }, + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "9789076174082" + }, + "expectedQuantity": { + "type": "integer", + "description": "The quantity that is expected to be returned by the customer. Note: this can be greater than 1 in case the customer ordered a quantity greater than 1 of the same product in the same customer order.", + "format": "int32", + "example": 1 + }, + "returnReason": { + "$ref": "#/components/schemas/ReturnReason" + }, + "handled": { + "type": "boolean", + "description": "Indicates if this return item has been handled (by the retailer).", + "example": true + }, + "processingResults": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReturnProcessingResult" + } + } + } + }, + "ReturnProcessingResult": { + "required": [ + "handlingResult", + "processingDateTime", + "processingResult", + "quantity" + ], + "type": "object", + "properties": { + "quantity": { + "type": "integer", + "description": "The processed quantity.", + "format": "int32", + "example": 1 + }, + "processingResult": { + "type": "string", + "description": "The processing result of the return.", + "example": "ACCEPTED" + }, + "handlingResult": { + "type": "string", + "description": "The handling result requested by the retailer.", + "example": "RETURN_RECEIVED" + }, + "processingDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the return was processed.", + "format": "date-time", + "example": "2018-04-17T10:55:37+02:00" + } + } + }, + "ReturnReason": { + "required": [ + "customerComments", + "mainReason" + ], + "type": "object", + "properties": { + "mainReason": { + "type": "string", + "description": "The main reason describing why the customer returned this product.", + "example": "Niet naar verwachting" + }, + "detailedReason": { + "type": "string", + "description": "The sub reason describing why the customer returned this product in more detail.", + "example": "Niet naar verwachting" + }, + "customerComments": { + "type": "string", + "description": "Additional details from the customer as to why this item was returned.", + "example": "Lorem Ipsum" + } + }, + "description": "The reason why the customer returned this product." + }, + "ReturnsResponse": { + "required": [ + "returns" + ], + "type": "object", + "properties": { + "returns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedReturn" + } + } + } + }, + "CustomerDetails": { + "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" + }, + "extraAddressInformation": { + "type": "string", + "description": "Additional information related to the address that helps in delivering the package.", + "example": "Apartment" + }, + "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" + }, + "email": { + "type": "string", + "description": "A scrambled email address that can be used to contact the customer.", + "example": "billie@verkopen.bol.com" + }, + "deliveryPhoneNumber": { + "type": "string", + "description": "The delivery phone number of the customer. Filled in case the order requires an appointment for delivering the goods.", + "example": "012123456" + }, + "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" + } + }, + "description": "Information related to the customer." + }, + "Return": { + "required": [ + "fulfilmentMethod", + "registrationDateTime", + "returnId", + "returnItems" + ], + "type": "object", + "properties": { + "returnId": { + "type": "string", + "description": "Unique identifier for a return.", + "example": "1" + }, + "registrationDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when this return was registered.", + "format": "date-time", + "example": "2016-11-14T11:06:48.423+01:00" + }, + "fulfilmentMethod": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBR" + }, + "returnItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReturnItem" + } + } + } + }, + "ReturnItem": { + "required": [ + "customerDetails", + "ean", + "expectedQuantity", + "handled", + "orderId", + "processingResults", + "returnReason", + "rmaId", + "title" + ], + "type": "object", + "properties": { + "rmaId": { + "type": "string", + "description": "The RMA (Return Merchandise Authorization) identifier of the return.", + "example": "31234567" + }, + "orderId": { + "type": "string", + "description": "The id of the customer order this return item is in.", + "example": "4012345678" + }, + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "9789076174082" + }, + "title": { + "type": "string", + "description": "The product title.", + "example": "Harry Potter en de steen der wijzen" + }, + "expectedQuantity": { + "type": "integer", + "description": "The quantity that is expected to be returned by the customer. Note: this can be greater than 1 in case the customer ordered a quantity greater than 1 of the same product in the same customer order.", + "format": "int32", + "example": 1 + }, + "returnReason": { + "$ref": "#/components/schemas/ReturnReason" + }, + "trackAndTrace": { + "type": "string", + "description": "The track and trace code that is associated with this transport.", + "example": "3SBOL0987654321" + }, + "transporterName": { + "type": "string", + "description": "The name of the transporter.", + "example": "PostNL" + }, + "handled": { + "type": "boolean", + "description": "Indicates if this return item has been handled (by the retailer).", + "example": true + }, + "processingResults": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReturnProcessingResult" + } + }, + "customerDetails": { + "$ref": "#/components/schemas/CustomerDetails" + } + } + }, + "RetailerInformationResponse": { + "required": [ + "displayName", + "registrationDate", + "retailerId" + ], + "type": "object", + "properties": { + "retailerId": { + "type": "string", + "description": "The Id of the retailer which information belongs to.", + "example": "1055479" + }, + "displayName": { + "type": "string", + "description": "The name of the retailer visible on bol.com", + "example": "015E1DDD2EEB34009A616820E5429C" + }, + "registrationDate": { + "type": "string", + "description": "A date representing the registration date for the retailer within bol.com", + "example": "2015-06-17" + }, + "topRetailer": { + "type": "boolean", + "description": "Indication of retailer's being the top seller.", + "example": false + }, + "ratingMethod": { + "type": "string", + "description": "An identifier that identifies if the rating is calculated over the past three months or on all reviews for the retailer.", + "example": "THREE_MONTHS", + "enum": [ + "ALL_REVIEWS", + "THREE_MONTHS" + ] + }, + "retailerRating": { + "$ref": "#/components/schemas/RetailerRating" + }, + "retailerReview": { + "$ref": "#/components/schemas/RetailerReview" + } + } + }, + "RetailerRating": { + "required": [ + "retailerRating" + ], + "type": "object", + "properties": { + "retailerRating": { + "type": "number", + "description": "General rating of the retailer.", + "format": "double", + "example": 9.1 + }, + "productInformationRating": { + "type": "number", + "description": "Product rating of the retailer.", + "format": "double", + "example": 9.6 + }, + "deliveryTimeRating": { + "type": "number", + "description": "Delivery rating of the retailer.", + "format": "double", + "example": 9.4 + }, + "shippingRating": { + "type": "number", + "description": "Shipping rating of the retailer.", + "format": "double", + "example": 9.4 + }, + "serviceRating": { + "type": "number", + "description": "Service rating of the retailer.", + "format": "double", + "example": 9.4 + } + }, + "description": "Rating on different aspects all being one decimal precision." + }, + "RetailerReview": { + "required": [ + "negativeReviewCount", + "neutralReviewCount", + "positiveReviewCount", + "totalReviewCount" + ], + "type": "object", + "properties": { + "totalReviewCount": { + "minimum": 0, + "type": "integer", + "description": "The total amount of customer review during that rating method period.", + "format": "int32", + "example": 14 + }, + "approvalPercentage": { + "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", + "example": 100 + }, + "positiveReviewCount": { + "minimum": 0, + "type": "integer", + "description": "The amount of positive customer reviews during that rating method period.", + "format": "int32", + "example": 13 + }, + "neutralReviewCount": { + "minimum": 0, + "type": "integer", + "description": "The amount of neutral customer reviews during that rating method period.", + "format": "int32", + "example": 1 + }, + "negativeReviewCount": { + "minimum": 0, + "type": "integer", + "description": "The amount of negative customer reviews during that rating method period.", + "format": "int32", + "example": 0 + } + } + }, + "ReducedInvalidReplenishmentLine": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of invalid replenishment line, in case the BSKU and/or EAN cannot be determined for this replenishment line.", + "example": "UNKNOWN_FBB_PRODUCT", + "enum": [ + "UNKNOWN_FBB_PRODUCT", + "UNKNOWN_EAN_INVENTORY_RELATION" + ] + } + } + }, + "ReducedReplenishment": { + "required": [ + "creationDateTime", + "invalidLines", + "lines", + "reference", + "replenishmentId" + ], + "type": "object", + "properties": { + "replenishmentId": { + "type": "string", + "description": "The unique identifier of the replenishment.", + "example": "2312078154" + }, + "reference": { + "type": "string", + "description": "Custom user defined reference to identify the replenishment.", + "example": "REFERENCE1" + }, + "creationDateTime": { + "type": "string", + "description": "The date and time when this replenishment was created. In ISO 8601 format.", + "format": "date-time", + "example": "2020-09-09T16:44:03+02:00" + }, + "lines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedReplenishmentLines" + } + }, + "invalidLines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedInvalidReplenishmentLine" + } + } + } + }, + "ReducedReplenishmentLines": { + "required": [ + "ean" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + } + } + }, + "ReplenishmentsResponse": { + "required": [ + "replenishments" + ], + "type": "object", + "properties": { + "replenishments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedReplenishment" + } + } + } + }, + "Address": { + "required": [ + "attentionOf", + "city", + "countryCode", + "houseNumber", + "houseNumberExtension", + "streetName", + "zipCode" + ], + "type": "object", + "properties": { + "streetName": { + "type": "string", + "description": "The street name of the pickup location.", + "example": "Dorpstraat" + }, + "houseNumber": { + "type": "string", + "description": "The house number of the pickup location.", + "example": "1" + }, + "houseNumberExtension": { + "type": "string", + "description": "The extension of the house number of the pickup location.", + "example": "B" + }, + "zipCode": { + "type": "string", + "description": "The zip code in '1234AB' format for NL and '0000' for BE addresses.", + "example": "1111ZZ" + }, + "city": { + "type": "string", + "description": "The city of the pickup address.", + "example": "Utrecht" + }, + "countryCode": { + "type": "string", + "description": "The ISO 3166-2 country code.", + "example": "NL" + }, + "attentionOf": { + "type": "string", + "description": "Name of the person responsible for this replenishment.", + "example": "Jan Jansen" + } + } + }, + "DeliveryInformation": { + "required": [ + "destinationWarehouse", + "expectedDeliveryDate", + "transporterCode" + ], + "type": "object", + "properties": { + "expectedDeliveryDate": { + "type": "string", + "description": "The expected delivery date of the shipment at the bol.com warehouse in ISO 8601 format.", + "format": "date", + "example": "2021-01-02" + }, + "transporterCode": { + "type": "string", + "description": "The transporter that will pickup this replenishment.", + "example": "POSTNL", + "enum": [ + "POSTNL", + "DHL", + "DPD", + "GLS", + "UPS", + "OTHER" + ] + }, + "destinationWarehouse": { + "$ref": "#/components/schemas/DestinationWarehouse" + } + } + }, + "DestinationWarehouse": { + "required": [ + "attentionOf", + "city", + "countryCode", + "houseNumber", + "houseNumberExtension", + "streetName", + "zipCode" + ], + "type": "object", + "properties": { + "streetName": { + "type": "string", + "description": "The street name of the pickup address.", + "example": "Industrieweg" + }, + "houseNumber": { + "type": "string", + "description": "The house number of the pickup address.", + "example": "1" + }, + "houseNumberExtension": { + "type": "string", + "description": "The extension of the house number.", + "example": "B" + }, + "zipCode": { + "type": "string", + "description": "The zip code in '1234AB' format for NL and '0000' for BE addresses.", + "example": "1111ZZ" + }, + "city": { + "type": "string", + "description": "The city of the pickup address.", + "example": "Waalwijk" + }, + "countryCode": { + "type": "string", + "description": "The ISO 3166-2 country code.", + "example": "NL" + }, + "attentionOf": { + "type": "string", + "description": "Name of the person responsible for this replenishment.", + "example": "t.a.v. bol.com" + } + } + }, + "InvalidReplenishmentLine": { + "required": [ + "quantityAnnounced", + "quantityInProgress", + "quantityReceived", + "quantityWithGradedState", + "quantityWithRegularState", + "type" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of invalid replenishment line, in case the BSKU and/or EAN cannot be determined for this replenishment line.", + "example": "UNKNOWN_FBB_PRODUCT", + "enum": [ + "UNKNOWN_FBB_PRODUCT", + "UNKNOWN_EAN_INVENTORY_RELATION" + ] + }, + "quantityAnnounced": { + "type": "integer", + "description": "The amount of announced quantity for this replenishment line.", + "format": "int32", + "example": 1 + }, + "quantityReceived": { + "type": "integer", + "description": "The amount of received quantity for this replenishment line.", + "format": "int32", + "example": 0 + }, + "quantityInProgress": { + "type": "integer", + "description": "The amount of quantity that is still in progress at the warehouse for this replenishment line.", + "format": "int32", + "example": 0 + }, + "quantityWithGradedState": { + "type": "integer", + "description": "The quantity within this shipment line that has a graded (unsalable) state.", + "format": "int32", + "example": 0 + }, + "quantityWithRegularState": { + "type": "integer", + "description": "The quantity within this shipment line that has a regular (salable) state.", + "format": "int32", + "example": 0 + } + } + }, + "LoadCarrier": { + "required": [ + "transportState", + "transportStateUpdateDateTime" + ], + "type": "object", + "properties": { + "sscc": { + "type": "string", + "description": "The Serial Shipping Container Code (SSCC) for this load carrier.", + "example": "020001200000007000" + }, + "transportLabelTrackAndTrace": { + "type": "string", + "description": "The track and trace code for this load carrier.", + "example": "3SJTXX216692157" + }, + "transportState": { + "type": "string", + "description": "The current state of the transport for this load carrier.", + "example": "ANNOUNCED", + "enum": [ + "ANNOUNCED", + "PICKED_UP", + "UNDERWAY", + "DELAYED", + "ARRIVED", + "ERROR" + ] + }, + "transportStateUpdateDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the latest update for this transport was received.", + "format": "date-time", + "example": "2021-01-02T09:00:00+01:00" + } + } + }, + "PickupAppointment": { + "required": [ + "address", + "pickupTimeSlot" + ], + "type": "object", + "properties": { + "commentToTransporter": { + "type": "string", + "description": "A comment to the transporter regarding the pickup appointment.", + "example": "Eerste verdieping." + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "pickupTimeSlot": { + "$ref": "#/components/schemas/ReplenishmentPickupTimeSlot" + }, + "pickupDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when this replenishment was picked up by the transporter.", + "format": "date-time", + "example": "2021-01-01T09:00:00+01:00" + }, + "cancellationReason": { + "type": "string", + "description": "In case of a pickup cancellation this field indicates the reason for cancelling this pickup.", + "example": "NOT_AT_HOME", + "enum": [ + "UNKNOWN_ADDRESS", + "NOT_READY", + "NO_LABEL", + "WRONG_PACKAGE", + "NOT_AT_HOME", + "OTHER_REASON", + "REQUEST_FROM_RETAILER" + ] + } + } + }, + "ReplenishmentLine": { + "required": [ + "ean", + "lineState", + "quantityAnnounced", + "quantityInProgress", + "quantityReceived", + "quantityWithGradedState", + "quantityWithRegularState" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "lineState": { + "type": "string", + "description": "The state of the line indicating whether this line was announced within this replenishment.", + "example": "ANNOUNCED", + "enum": [ + "ANNOUNCED", + "UNANNOUNCED", + "UNKNOWN" + ] + }, + "quantityAnnounced": { + "type": "integer", + "description": "The amount of announced quantity for this replenishment line.", + "format": "int32", + "example": 1 + }, + "quantityReceived": { + "type": "integer", + "description": "The amount of received quantity for this replenishment line.", + "format": "int32", + "example": 0 + }, + "quantityInProgress": { + "type": "integer", + "description": "The amount of quantity that is still in progress at the warehouse for this replenishment line.", + "format": "int32", + "example": 0 + }, + "quantityWithGradedState": { + "type": "integer", + "description": "The quantity within this shipment line that has a graded (unsalable) state.", + "format": "int32", + "example": 0 + }, + "quantityWithRegularState": { + "type": "integer", + "description": "The quantity within this shipment line that has a regular (salable) state.", + "format": "int32", + "example": 0 + } + } + }, + "ReplenishmentPickupTimeSlot": { + "required": [ + "fromDateTime", + "untilDateTime" + ], + "type": "object", + "properties": { + "fromDateTime": { + "type": "string", + "description": "The selected start date and time for the replenishment pickup appointment. In ISO 8601 format.", + "format": "date-time", + "example": "2021-01-01T09:00:00+01:00" + }, + "untilDateTime": { + "type": "string", + "description": "The selected end date and time for the replenishment pickup appointment. In ISO 8601 format.", + "format": "date-time", + "example": "2021-01-01T10:00:00+01:00" + } + } + }, + "ReplenishmentResponse": { + "required": [ + "creationDateTime", + "deliveryInformation", + "invalidLines", + "labelingByBol", + "lines", + "loadCarriers", + "reference", + "replenishmentId", + "state", + "stateTransitions" + ], + "type": "object", + "properties": { + "replenishmentId": { + "type": "string", + "description": "The unique identifier of the replenishment.", + "example": "2312078154" + }, + "creationDateTime": { + "type": "string", + "description": "The date and time when this replenishment was created. In ISO 8601 format.", + "format": "date-time", + "example": "2021-01-01T08:00:00+01:00" + }, + "reference": { + "type": "string", + "description": "Custom user defined reference to identify the replenishment.", + "example": "REFERENCE1" + }, + "labelingByBol": { + "type": "boolean", + "description": "Indicates whether the replenishment will be labeled by bol.com or not.", + "example": false + }, + "state": { + "type": "string", + "description": "Indicates the state of this replenishment order.", + "example": "ANNOUNCED", + "enum": [ + "ANNOUNCED", + "IN_TRANSIT", + "ARRIVED_AT_WH", + "IN_PROGRESS_AT_WH", + "CANCELLED", + "DONE" + ] + }, + "deliveryInformation": { + "$ref": "#/components/schemas/DeliveryInformation" + }, + "pickupAppointment": { + "$ref": "#/components/schemas/PickupAppointment" + }, + "numberOfLoadCarriers": { + "type": "integer", + "description": "The number of load carriers in this shipment.", + "format": "int32", + "example": 1 + }, + "loadCarriers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoadCarrier" + } + }, + "lines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplenishmentLine" + } + }, + "invalidLines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvalidReplenishmentLine" + } + }, + "stateTransitions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StateTransition" + } + } + } + }, + "StateTransition": { + "required": [ + "state", + "stateDateTime" + ], + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "Indicates the state of this replenishment order.", + "example": "ANNOUNCED", + "enum": [ + "DRAFT", + "ANNOUNCED", + "IN_TRANSIT", + "ARRIVED_AT_WH", + "IN_PROGRESS_AT_WH", + "CANCELLED", + "DONE" + ] + }, + "stateDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format that indicates when this states was updated for this replenishment.", + "format": "date-time", + "example": "2021-01-02T09:00:00+01:00" + } + } + }, + "ProductDestination": { + "required": [ + "destinationWarehouse", + "eans" + ], + "type": "object", + "properties": { + "destinationWarehouse": { + "$ref": "#/components/schemas/ProductDestinationWarehouse" + }, + "eans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ean" + } + } + } + }, + "ProductDestinationAddress": { + "required": [ + "attentionOf", + "city", + "countryCode", + "houseNumber", + "streetName", + "zipCode" + ], + "type": "object", + "properties": { + "streetName": { + "type": "string", + "description": "The street name of the bol.com warehouse address.", + "example": "Industrieweg" + }, + "houseNumber": { + "type": "integer", + "description": "The house number of the bol.com warehouse address.", + "format": "int32", + "example": 1 + }, + "zipCode": { + "type": "string", + "description": "The zipcode of the bol.com warehouse address.", + "example": "1111ZZ" + }, + "city": { + "type": "string", + "description": "The city of the bol.com warehouse address.", + "example": "Waalwijk" + }, + "countryCode": { + "type": "string", + "description": "The ISO 3166-2 country code of the bol.com warehouse address.", + "example": "NL" + }, + "attentionOf": { + "type": "string", + "description": "Name of the person responsible for this replenishment.", + "example": "t.a.v. bol.com" + }, + "houseNumberExtension": { + "type": "string", + "description": "The house number extension of the bol.com warehouse address.", + "example": "B" + } + } + }, + "ProductDestinationWarehouse": { + "required": [ + "address" + ], + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/ProductDestinationAddress" + } + } + }, + "ProductDestinationsResponse": { + "required": [ + "productDestinations" + ], + "type": "object", + "properties": { + "productDestinations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductDestination" + } + } + } + }, + "DeliveryDatesResponse": { + "required": [ + "deliveryDates" + ], + "type": "object", + "properties": { + "deliveryDates": { + "type": "array", + "description": "Allowed delivery dates for shipments to the bol.com warehouse in ISO 8601 format.", + "example": "2021-01-02", + "items": { + "type": "string", + "description": "Allowed delivery dates for shipments to the bol.com warehouse in ISO 8601 format.", + "example": "2021-01-02" + } + } + } + }, + "Campaign": { + "required": [ + "name", + "startDateTime" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the campaign under which the promotion had been created.", + "example": "Campaign name" + }, + "startDateTime": { + "type": "string", + "description": "The starting date and time of the campaign.", + "format": "date-time", + "example": "2021-03-29T00:00:00+02:00" + }, + "endDateTime": { + "type": "string", + "description": "The ending date and time of the campaign.", + "format": "date-time", + "example": "2021-05-10T00:00:00+02:00" + } + } + }, + "PromotionCountryCode": { + "required": [ + "countryCode" + ], + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "The country code of the country in which the promotion is active.", + "example": "NL", + "enum": [ + "NL", + "BE" + ] + } + } + }, + "Promotions": { + "type": "object", + "properties": { + "promotions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedPromotion" + } + } + }, + "description": "Container for multiple promotions." + }, + "ReducedPromotion": { + "required": [ + "countries", + "endDateTime", + "promotionId", + "promotionType", + "retailerSpecificPromotion", + "startDateTime", + "title" + ], + "type": "object", + "properties": { + "promotionId": { + "type": "string", + "description": "The identifier of the promotion.", + "example": "1234" + }, + "title": { + "type": "string", + "description": "The title of the promotion.", + "example": "Promotion title" + }, + "startDateTime": { + "type": "string", + "description": "The starting date and time of the promotion.", + "format": "date-time", + "example": "2021-03-29T00:00:00+02:00" + }, + "endDateTime": { + "type": "string", + "description": "The ending date and time of the promotion.", + "format": "date-time", + "example": "2021-05-10T00:00:00+02:00" + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromotionCountryCode" + } + }, + "promotionType": { + "type": "string", + "description": "The type of the promotion.", + "example": "AWARENESS", + "enum": [ + "AWARENESS", + "PRICE_OFF" + ] + }, + "retailerSpecificPromotion": { + "type": "boolean", + "description": "Indicates whether the promotion is retailer specific or open to the platform.", + "example": false + }, + "campaign": { + "$ref": "#/components/schemas/Campaign" + } + }, + "description": "A single promotion." + }, + "Promotion": { + "required": [ + "countries", + "endDateTime", + "promotionId", + "promotionType", + "retailerSpecificPromotion", + "startDateTime", + "title" + ], + "type": "object", + "properties": { + "promotionId": { + "type": "string", + "description": "The identifier of the promotion.", + "example": "1234" + }, + "title": { + "type": "string", + "description": "The title of the promotion.", + "example": "Promotion title" + }, + "startDateTime": { + "type": "string", + "description": "The starting date and time of the promotion.", + "format": "date-time", + "example": "2021-03-29T00:00:00+02:00" + }, + "endDateTime": { + "type": "string", + "description": "The ending date and time of the promotion.", + "format": "date-time", + "example": "2021-05-10T00:00:00+02:00" + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromotionCountryCode" + } + }, + "promotionType": { + "type": "string", + "description": "The type of the promotion.", + "example": "AWARENESS", + "enum": [ + "AWARENESS", + "PRICE_OFF" + ] + }, + "retailerSpecificPromotion": { + "type": "boolean", + "description": "Indicates whether the promotion is retailer specific or open to the platform.", + "example": false + }, + "campaign": { + "$ref": "#/components/schemas/Campaign" + } + }, + "description": "A single promotion." + }, + "Product": { + "required": [ + "ean" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "relevanceScores": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelevanceScore" + } + }, + "maximumPrice": { + "type": "number", + "description": "The maximum price a product can have in order to be part of the promotion.", + "example": 21.5 + } + }, + "description": "A single product." + }, + "Products": { + "required": [ + "products" + ], + "type": "object", + "properties": { + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Product" + } + } + }, + "description": "Container for multiple products." + }, + "RelevanceScore": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "The country for which the relevance score has been calculated against.", + "example": "NL", + "enum": [ + "NL", + "BE" + ] + }, + "relevanceScore": { + "type": "integer", + "description": "The calculated relevance score for the product.", + "format": "int32", + "example": 72, + "enum": [ + null + ] + } + }, + "description": "The relevance score of a product in a promotion." + }, + "ProductRatingsRating": { + "required": [ + "rating" + ], + "type": "object", + "properties": { + "rating": { + "type": "integer", + "description": "Scale of the rating provided by the customer.", + "format": "int32", + "example": 4 + }, + "count": { + "type": "integer", + "description": "The number of ratings for the corresponding scale.", + "format": "int32", + "example": 30 + } + } + }, + "ProductRatingsResponse": { + "required": [ + "ratings" + ], + "type": "object", + "properties": { + "ratings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductRatingsRating" + } + } + } + }, + "ProductIdsEan": { + "required": [ + "ean" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + } + } + }, + "ProductIdsResponse": { + "required": [ + "bolProductId", + "eans" + ], + "type": "object", + "properties": { + "bolProductId": { + "type": "string", + "description": "Identifier of the product. This id is specific to bol.com webshop.", + "example": "9200000045327288" + }, + "eans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductIdsEan" + } + } + } + }, + "Category": { + "required": [ + "categoryId", + "categoryName" + ], + "type": "object", + "properties": { + "categoryId": { + "type": "string", + "description": "The id of the parent category which the product belongs to.", + "example": "13155" + }, + "categoryName": { + "type": "string", + "description": "The name of the parent category which the product belongs to.", + "example": "Klussen" + }, + "subcategories": { + "type": "array", + "description": "The subcategories which the product belongs to.", + "items": { + "$ref": "#/components/schemas/SubCategory" + } + } + } + }, + "ProductPlacementResponse": { + "required": [ + "categories", + "url" + ], + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL of the product on the webshop." + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Category" + } + } + } + }, + "SubCategory": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the subcategory which the product belongs to." + }, + "name": { + "type": "string", + "description": "The name of the subcategory which the product belongs to." + } + }, + "description": "The subcategories which the product belongs to." + }, + "CompetingOffersResponse": { + "required": [ + "offers" + ], + "type": "object", + "properties": { + "offers": { + "type": "array", + "description": "List of offers.", + "items": { + "$ref": "#/components/schemas/Offer" + } + } + } + }, + "Offer": { + "required": [ + "bestOffer", + "countryCode", + "fulfilmentMethod", + "maxDeliveryDate", + "offerId", + "price", + "retailerId" + ], + "type": "object", + "properties": { + "offerId": { + "type": "string", + "description": "Unique identifier for an offer.", + "example": "228b6d06-2067-4cef-8447-c21d0c233e61" + }, + "retailerId": { + "type": "string", + "description": "The ID of the retailer which the offer belongs to.", + "example": "0" + }, + "countryCode": { + "type": "string", + "description": "The country code.", + "example": "NL" + }, + "bestOffer": { + "type": "boolean", + "description": "Indicator if the offer is the best offer within the country for the requested EAN.", + "example": true + }, + "price": { + "type": "number", + "description": "The selling price to the customer of a single unit including VAT unless there is a discount. The price should always have two decimals precision.", + "example": 41.5 + }, + "fulfilmentMethod": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBB" + }, + "condition": { + "type": "string", + "description": "The condition of the offered product.", + "example": "NEW" + }, + "ultimateOrderTime": { + "type": "string", + "description": "The time in ISO 8601 format when the ultimate order time on the day in order to comply to the maxDeliveryDate as a promise.", + "example": "23:59" + }, + "minDeliveryDate": { + "type": "string", + "description": "The date at which package can be delivered to customer earliest.", + "format": "date", + "example": "2022-10-20" + }, + "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.", + "format": "date", + "example": "2022-10-21" + } + }, + "description": "List of offers." + }, + "ProductAssets": { + "required": [ + "order", + "usage", + "variants" + ], + "type": "object", + "properties": { + "usage": { + "type": "string", + "description": "Type of the asset being used for.", + "example": "ADDITIONAL", + "enum": [ + "PRIMARY", + "ADDITIONAL", + "IMAGE" + ] + }, + "order": { + "type": "integer", + "description": "The intended order of the product images.", + "format": "int32", + "example": 0 + }, + "variants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductAssetsVariants" + } + } + } + }, + "ProductAssetsResponse": { + "required": [ + "assets" + ], + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductAssets" + } + } + } + }, + "ProductAssetsVariants": { + "required": [ + "height", + "mimeType", + "size", + "url", + "width" + ], + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "The name of the size of the asset, if the asset is an image.", + "example": "small", + "enum": [ + "small", + "medium" + ] + }, + "width": { + "type": "integer", + "description": "The width of the asset in pixels.", + "format": "int32", + "example": 250 + }, + "height": { + "type": "integer", + "description": "The height of the asset in pixels.", + "format": "int32", + "example": 200 + }, + "mimeType": { + "type": "string", + "description": "The mime type of the asset.", + "example": "image/jpeg", + "enum": [ + "image/jpeg", + "application/pdf", + "application/x-mpegurl", + "video/mp4" + ] + }, + "url": { + "type": "string", + "description": "The URL of the attribute." + } + } + }, + "ProductListFiltersRequest": { + "type": "object", + "properties": { + "search-term": { + "type": "string", + "writeOnly": true + }, + "category-id": { + "type": "string", + "writeOnly": true + }, + "search": { + "type": "string" + }, + "category": { + "type": "string" + } + } + }, + "Categories": { + "required": [ + "categoryName", + "categoryValues" + ], + "type": "object", + "properties": { + "categoryName": { + "type": "string", + "description": "The name of the categories.", + "example": "Categorieën" + }, + "categoryValues": { + "type": "array", + "description": "The list of available categories.", + "items": { + "$ref": "#/components/schemas/CategoryValues" + } + } + }, + "description": "The list of categories that are available to further narrow down search results, for the given search term and category." + }, + "CategoryValues": { + "type": "object", + "properties": { + "categoryValueId": { + "type": "string", + "description": "The id of the category. This id can be used in other endpoints, like Get product list.", + "example": "7934" + }, + "categoryValueName": { + "type": "string", + "description": "The name of the category.", + "example": "Speelgoed" + } + }, + "description": "The list of available categories." + }, + "FilterRanges": { + "required": [ + "max", + "min", + "rangeId", + "rangeName", + "unit" + ], + "type": "object", + "properties": { + "rangeId": { + "type": "string", + "description": "The id of the range filter product can be found under.", + "example": "PRICE" + }, + "rangeName": { + "type": "string", + "description": "The name of the range filter product can be found under.", + "example": "Prijs" + }, + "min": { + "type": "number", + "description": "The minimum value for the range that can be used to filter results.", + "example": 0.99 + }, + "max": { + "type": "number", + "description": "The maximum value for the range that can be used to filter results.", + "example": 4599 + }, + "unit": { + "type": "string", + "description": "The unit that applies to the min and max range values.", + "example": "EUR" + } + }, + "description": "The list of range filters that is associated with the given search term or category." + }, + "FilterValues": { + "required": [ + "filterValueId" + ], + "type": "object", + "properties": { + "filterValueId": { + "type": "string", + "description": "The unique identifier of the filter value.", + "example": "4279587082" + }, + "filterValueName": { + "type": "string", + "description": "The name of the filter value.", + "example": "LEGO Star Wars" + } + }, + "description": "The list of filter values in this filter." + }, + "Filters": { + "required": [ + "filterName", + "filterValues" + ], + "type": "object", + "properties": { + "filterName": { + "type": "string", + "description": "The name of the filter.", + "example": "Serie" + }, + "filterValues": { + "type": "array", + "description": "The list of filter values in this filter.", + "items": { + "$ref": "#/components/schemas/FilterValues" + } + } + }, + "description": "The list of filters that is associated with the given search term or category." + }, + "ProductListFiltersResponse": { + "required": [ + "categoryData", + "filterRanges", + "filters" + ], + "type": "object", + "properties": { + "categoryData": { + "$ref": "#/components/schemas/Categories" + }, + "filterRanges": { + "type": "array", + "description": "The list of range filters that is associated with the given search term or category.", + "items": { + "$ref": "#/components/schemas/FilterRanges" + } + }, + "filters": { + "type": "array", + "description": "The list of filters that is associated with the given search term or category.", + "items": { + "$ref": "#/components/schemas/Filters" + } + } + } + }, + "ReducedOrder": { + "required": [ + "orderId", + "orderItems", + "orderPlacedDateTime" + ], + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The identifier of the order.", + "example": "A2K8290LP8" + }, + "orderPlacedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the order was placed.", + "format": "date-time", + "example": "2017-02-09T12:39:48+01:00" + }, + "orderItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedOrderItem" + } + } + }, + "description": "An order." + }, + "ReducedOrderItem": { + "required": [ + "cancellationRequest", + "ean", + "fulfilmentMethod", + "fulfilmentStatus", + "latestChangedDateTime", + "orderItemId", + "quantity", + "quantityCancelled", + "quantityShipped" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "The id for the order item. One order can have multiple order items, but the list can only take one item.", + "example": "2012345678" + }, + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "fulfilmentMethod": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBR" + }, + "fulfilmentStatus": { + "type": "string", + "description": "To filter on order status. You can filter on either all orders independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders.", + "example": "OPEN" + }, + "quantity": { + "type": "integer", + "description": "Amount of ordered products for this order item id.", + "format": "int32", + "example": 10 + }, + "quantityShipped": { + "type": "integer", + "description": "Amount of shipped products for this order item id.", + "format": "int32", + "example": 10 + }, + "quantityCancelled": { + "type": "integer", + "description": "Amount of cancelled products for this order item id.", + "format": "int32", + "example": 0 + }, + "cancellationRequest": { + "type": "boolean", + "description": "Indicates whether the order was cancelled on request of the customer before the retailer has shipped it.", + "example": false + }, + "latestChangedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the orderItem was last changed.", + "format": "date-time", + "example": "2017-02-09T12:39:48+01:00" + } + }, + "description": "An order item." + }, + "ReducedOrders": { + "required": [ + "orders" + ], + "type": "object", + "properties": { + "orders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReducedOrder" + } + } + }, + "description": "Container for many orders." + }, + "AdditionalService": { + "required": [ + "serviceType" + ], + "type": "object", + "properties": { + "serviceType": { + "type": "string", + "description": "An additional service type that the customer selected when purchasing this order item.", + "example": "PLACEMENT_AND_INSTALLATION" + } + } + }, + "Order": { + "required": [ + "orderId", + "orderItems", + "pickupPoint", + "shipmentDetails" + ], + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The identifier of the order.", + "example": "A2K8290LP8" + }, + "pickupPoint": { + "type": "boolean", + "description": "Indicates whether this order is shipped to a Pick Up Point.", + "example": true + }, + "orderPlacedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the order was placed.", + "format": "date-time", + "example": "2017-02-09T12:39:48+01:00" + }, + "shipmentDetails": { + "$ref": "#/components/schemas/ShipmentDetails" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "orderItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderOrderItem" + } + } + }, + "description": "An order." + }, + "OrderFulfilment": { + "required": [ + "method", + "timeFrameType" + ], + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", + "example": "FBR" + }, + "distributionParty": { + "type": "string", + "description": "The party that manages the distribution, either bol.com or the retailer itself.", + "example": "RETAILER", + "enum": [ + "RETAILER", + "BOL" + ] + }, + "latestDeliveryDate": { + "type": "string", + "description": "The ultimate delivery date at which this order must be delivered at the customer's shipping address. This field is empty in case the exactDeliveryDate is filled.", + "format": "date", + "example": "2017-02-10" + }, + "exactDeliveryDate": { + "type": "string", + "description": "The exact delivery date at which this order must be delivered at the customer's shipping address. This field is only filled when the customer chose an exact date for delivery. This field is empty in case the latestDeliveryDate is filled.", + "format": "date", + "example": "2017-02-13" + }, + "expiryDate": { + "type": "string", + "description": "The date this order item will automatically expire and thereby cancelling this order item from the order.", + "format": "date", + "example": "2017-02-13" + }, + "timeFrameType": { + "type": "string", + "description": "Delivery option selected by the customer.", + "example": "REGULAR", + "enum": [ + "REGULAR", + "EVENING", + "APPOINTMENT", + "SAMEDAY", + "SUNDAY" + ] + } + } + }, + "OrderOrderItem": { + "required": [ + "cancellationRequest", + "commission", + "latestChangedDateTime", + "orderItemId", + "quantity", + "quantityCancelled", + "quantityShipped", + "unitPrice" + ], + "type": "object", + "properties": { + "orderItemId": { + "type": "string", + "description": "The id for the order item. One order can have multiple order items, but the list can only take one item.", + "example": "2012345678" + }, + "cancellationRequest": { + "type": "boolean", + "description": "Indicates whether the order was cancelled on request of the customer before the retailer has shipped it.", + "example": false + }, + "fulfilment": { + "$ref": "#/components/schemas/OrderFulfilment" + }, + "offer": { + "$ref": "#/components/schemas/OrderOffer" + }, + "product": { + "$ref": "#/components/schemas/OrderProduct" + }, + "quantity": { + "type": "integer", + "description": "Amount of ordered products for this order item id.", + "format": "int32", + "example": 10 + }, + "quantityShipped": { + "type": "integer", + "description": "Amount of shipped products for this order item id.", + "format": "int32", + "example": 10 + }, + "quantityCancelled": { + "type": "integer", + "description": "Amount of cancelled products for this order item id.", + "format": "int32", + "example": 0 + }, + "unitPrice": { + "type": "number", + "description": "The selling price to the customer of a single unit including VAT.", + "example": 12.99 + }, + "commission": { + "type": "number", + "description": "The commission for all quantities of this order item.", + "example": 5.18 + }, + "additionalServices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdditionalService" + } + }, + "latestChangedDateTime": { + "type": "string", + "description": "The date and time in ISO 8601 format when the orderItem was last changed.", + "format": "date-time", + "example": "2017-02-09T13:39:48+01:00" + } + }, + "description": "Order item details from an order." + }, + "NotPublishableReason": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error code signalling that the offer is invalid.", + "example": "4003" + }, + "description": { + "type": "string", + "description": "Error message describing the reason the offer is invalid.", + "example": "The seller is on holiday." + } + } + }, + "OffersCountryCode": { + "required": [ + "countryCode" + ], + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format.", + "example": "NL" + } + } + }, + "RetailerOffer": { + "required": [ + "condition", + "ean", + "fulfilment", + "notPublishableReasons", + "offerId", + "onHoldByRetailer", + "pricing", + "stock", + "store" + ], + "type": "object", + "properties": { + "offerId": { + "type": "string", + "description": "Unique identifier for an offer.", + "example": "6ff736b5-cdd0-4150-8c67-78269ee986f5" + }, + "ean": { + "type": "string", + "description": "The EAN number associated with this product. Note: in case an ISBN is provided, the ISBN will be replaced with the actual EAN belonging to this ISBN.", + "example": "0000007740404" + }, + "reference": { + "type": "string", + "description": "A user-defined reference that helps you identify this particular offer when receiving data from us. This element can optionally be left empty and has a maximum amount of 20 characters.", + "example": "REF12345" + }, + "onHoldByRetailer": { + "type": "boolean", + "description": "Indicates whether or not you want to put this offer for sale on the bol.com website. Defaults to false.", + "example": false + }, + "unknownProductTitle": { + "type": "string", + "description": "In case the item is not known to bol.com you can use this field to identify this particular product. Note: in case the product is known to bol.com, the unknown product title will not be stored.", + "example": "Unknown Product Title" + }, + "pricing": { + "$ref": "#/components/schemas/Pricing" + }, + "stock": { + "$ref": "#/components/schemas/Stock" + }, + "fulfilment": { + "$ref": "#/components/schemas/Fulfilment" + }, + "store": { + "$ref": "#/components/schemas/Store" + }, + "condition": { + "$ref": "#/components/schemas/Condition" + }, + "notPublishableReasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotPublishableReason" + } + } + } + }, + "Stock": { + "required": [ + "managedByRetailer" + ], + "type": "object", + "properties": { + "amount": { + "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", + "example": 6 + }, + "correctedStock": { + "type": "integer", + "description": "The amount of order items in stock minus handled order items and minus open order items. As compared to the stock you sent us. When this reaches 0, your offer will not be for sale on the shop.", + "format": "int32", + "example": 5 + }, + "managedByRetailer": { + "type": "boolean", + "description": "Configures whether the retailer manages the stock levels or that bol.com should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account.", + "example": false + } + } + }, + "Store": { + "required": [ + "visible" + ], + "type": "object", + "properties": { + "productTitle": { + "type": "string", + "description": "The product title for the product associated with this offer.", + "example": "Product Title" + }, + "visible": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OffersCountryCode" + } + } + } + }, + "Inventory": { + "required": [ + "bsku", + "ean", + "gradedStock", + "regularStock", + "title" + ], + "type": "object", + "properties": { + "ean": { + "type": "string", + "description": "The EAN number associated with this product.", + "example": "0000007740404" + }, + "bsku": { + "type": "string", + "description": "The BSKU number associated with this product.", + "example": "2950002126612" + }, + "gradedStock": { + "type": "integer", + "description": "The stock that is not available for sale anymore.", + "format": "int32", + "example": 10 + }, + "regularStock": { + "type": "integer", + "description": "The stock that is available for sale.", + "format": "int32", + "example": 10 + }, + "title": { + "type": "string", + "description": "The product title.", + "example": "Product Title" + } + } + }, + "InventoryResponse": { + "required": [ + "inventory" + ], + "type": "object", + "properties": { + "inventory": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory" + } + } + } + }, + "RelatedSearchTerm": { + "required": [ + "searchTerm", + "total" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "The number of customer visits on the search page.", + "format": "int32", + "example": 100 + }, + "searchTerm": { + "type": "string", + "description": "The search term for which you requested the search volume.", + "example": "book" + } + } + }, + "SearchTerm": { + "required": [ + "countries", + "periods", + "searchTerm", + "total", + "type" + ], + "type": "object", + "properties": { + "searchTerm": { + "type": "string", + "description": "The search term for which you requested the search volume.", + "example": "book" + }, + "type": { + "type": "string", + "description": "Interpretation of the data that applies to this measurement.", + "example": "count" + }, + "total": { + "type": "integer", + "description": "The number of customer visits on the search page.", + "format": "int32", + "example": 100 + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchTermsCountry" + } + }, + "periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TotalPeriod" + } + }, + "relatedSearchTerms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedSearchTerm" + } + } + } + }, + "SearchTerms": { + "type": "object", + "properties": { + "searchTerms": { + "$ref": "#/components/schemas/SearchTerm" + } + } + }, + "SearchTermsCountry": { + "required": [ + "countryCode", + "value" + ], + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "Countries in which this offer is currently on sale in the webshop in ISO-3166-1 format.", + "example": "NL" + }, + "value": { + "type": "integer", + "description": "The number of customer visits on the search page.", + "format": "int32", + "example": 100 + } + } + }, + "SearchTermsPeriod": { + "type": "object", + "properties": { + "day": { + "type": "string", + "description": "Day number in the ISO-8601 standard.", + "example": "19" + }, + "week": { + "type": "string", + "description": "Week number in the ISO-8601 standard.", + "example": "41" + }, + "month": { + "type": "string", + "description": "Month number in the ISO-8601 standard.", + "example": "11" + }, + "year": { + "type": "string", + "description": "Year number in the ISO-8601 standard.", + "example": "2020" + } + } + }, + "TotalPeriod": { + "required": [ + "countries", + "period", + "total" + ], + "type": "object", + "properties": { + "period": { + "$ref": "#/components/schemas/SearchTermsPeriod" + }, + "total": { + "type": "integer", + "description": "The number of customer visits on the search page.", + "format": "int32", + "example": 100 + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchTermsCountry" + } + } + } + }, + "Countries": { + "required": [ + "maximum", + "minimum" + ], + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format.", + "example": "NL" + }, + "minimum": { + "type": "number", + "description": "Minimum number of estimated sales expectations on the bol.com platform.", + "format": "double", + "example": 10.5 + }, + "maximum": { + "type": "number", + "description": "Maximum number of estimated sales expectations on the bol.com platform.", + "format": "double", + "example": 20.5 + } + } + }, + "SalesForecastPeriod": { + "required": [ + "countries", + "total", + "weeksAhead" + ], + "type": "object", + "properties": { + "weeksAhead": { + "type": "integer", + "description": "The number of weeks into the future, starting from today.", + "format": "int32", + "example": 2 + }, + "total": { + "$ref": "#/components/schemas/Total" + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Countries" + } + } + } + }, + "SalesForecastResponse": { + "required": [ + "countries", + "name", + "periods", + "total", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Indicator name.", + "example": "SALES_FORECAST" + }, + "type": { + "type": "string", + "description": "Interpretation of the data that applies to this measurement.", + "example": "DECIMAL" + }, + "total": { + "$ref": "#/components/schemas/Total" + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Countries" + } + }, + "periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SalesForecastPeriod" + } + } + } + }, + "Total": { + "required": [ + "maximum", + "minimum" + ], + "type": "object", + "properties": { + "minimum": { + "type": "number", + "description": "Minimum number of estimated sales expectations on the bol.com platform.", + "format": "double", + "example": 10.5 + }, + "maximum": { + "type": "number", + "description": "Maximum number of estimated sales expectations on the bol.com platform.", + "format": "double", + "example": 20.5 + } + } + }, + "Details": { + "required": [ + "norm", + "period" + ], + "type": "object", + "properties": { + "period": { + "$ref": "#/components/schemas/PerformanceIndicatorPeriod" + }, + "score": { + "$ref": "#/components/schemas/Score" + }, + "norm": { + "$ref": "#/components/schemas/Norm" + } + }, + "description": "Details of the indicator." + }, + "Norm": { + "required": [ + "condition", + "value" + ], + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Condition norm for this indicator.", + "example": "<=", + "enum": [ + "<=", + ">=" + ] + }, + "value": { + "type": "number", + "description": "Service norm for this indicator.", + "format": "float", + "example": 0.6 + } + }, + "description": "Service norm for this indicator." + }, + "PerformanceIndicator": { + "required": [ + "details", + "name", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Indicator name.", + "example": "CANCELLATIONS", + "enum": [ + "CANCELLATIONS", + "FULFILMENT", + "PHONE_AVAILABILITY", + "RESPONSE_TIME", + "CASE_ITEM_RATIO", + "TRACK_AND_TRACE", + "RETURNS", + "REVIEWS" + ] + }, + "type": { + "type": "string", + "description": "Interpretation of the data that applies to this measurement.", + "example": "PERCENTAGE", + "enum": [ + "PERCENTAGE", + "AVERAGE" + ] + }, + "details": { + "$ref": "#/components/schemas/Details" + } + } + }, + "PerformanceIndicatorPeriod": { + "required": [ + "week", + "year" + ], + "type": "object", + "properties": { + "week": { + "type": "string", + "description": "Week number in the ISO-8601 standard.", + "example": "05" + }, + "year": { + "type": "string", + "description": "Year number in the ISO-8601 standard.", + "example": "2019" + } + }, + "description": "The period for which the performance is measured." + }, + "PerformanceIndicators": { + "required": [ + "performanceIndicators" + ], + "type": "object", + "properties": { + "performanceIndicators": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PerformanceIndicator" + } + } + } + }, + "Score": { + "required": [ + "conforms", + "denominator", + "distanceToNorm", + "numerator", + "value" + ], + "type": "object", + "properties": { + "conforms": { + "type": "boolean", + "description": "Indicates whether the score conforms to the bol.com service norm or not.", + "example": true + }, + "numerator": { + "type": "integer", + "description": "The top part of the fraction (above the line). This usually is the smaller number compared to the denominator.", + "format": "int32", + "example": 5 + }, + "denominator": { + "type": "integer", + "description": "The lower part of the fraction (below the line). This usually is the larger number compared to the the numerator.", + "format": "int32", + "example": 10 + }, + "value": { + "type": "number", + "description": "The score for this measurement (denominator divided by the numerator).", + "format": "float", + "example": 0.5 + }, + "distanceToNorm": { + "type": "number", + "description": "The difference between the score and the bol.com service norm.", + "format": "float", + "example": 0.1 + } + }, + "description": "The score for this measurement. In case there are no scores for an indicator, this element is omitted from the response." + }, + "OfferInsight": { + "required": [ + "countries", + "name", + "periods", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the requested offer insight.", + "example": "BUY_BOX_PERCENTAGE" + }, + "type": { + "type": "string", + "description": "Interpretation of the data that applies to this measurement.", + "example": "percentage" + }, + "total": { + "type": "number", + "description": "Total number of customer visits on the product page when the offer had the buy box over the requested period (excluding the current day).", + "format": "double", + "example": 50 + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfferInsightsCountry" + } + }, + "periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Periods" + } + } + } + }, + "OfferInsights": { + "required": [ + "offerInsights" + ], + "type": "object", + "properties": { + "offerInsights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfferInsight" + } + } + }, + "description": "Offer insights." + }, + "OfferInsightsCountry": { + "required": [ + "countryCode", + "value" + ], + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format.", + "example": "NL" + }, + "value": { + "type": "number", + "description": "The total value of offer insight.", + "format": "double", + "example": 100 + } + } + }, + "OfferInsightsPeriod": { + "required": [ + "year" + ], + "type": "object", + "properties": { + "day": { + "type": "integer", + "description": "Day of the month.", + "format": "int32", + "example": 1 + }, + "week": { + "type": "integer", + "description": "Week of the year.", + "format": "int32", + "example": 49 + }, + "month": { + "type": "integer", + "description": "Month of the year.", + "format": "int32", + "example": 12 + }, + "year": { + "type": "integer", + "description": "Year.", + "format": "int32", + "example": 2019 + } + } + }, + "Periods": { + "required": [ + "period" + ], + "type": "object", + "properties": { + "period": { + "$ref": "#/components/schemas/OfferInsightsPeriod" + }, + "total": { + "type": "number", + "description": "Total number of customer visits on the product page when the offer had the buy box over the requested period (excluding the current day).", + "format": "double", + "example": 50 + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfferInsightsCountry" + } + } + } + }, + "UploadReportAsset": { + "required": [ + "labels", + "status", + "url" + ], + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL of the asset.", + "example": "http://example.com" + }, + "labels": { + "type": "array", + "description": "The label(s) of the asset.", + "example": [ + "FRONT" + ], + "items": { + "type": "string", + "description": "The label(s) of the asset.", + "example": "[\"FRONT\"]" + } + }, + "status": { + "type": "string", + "description": "The processing state of the submitted asset.", + "example": "DECLINED", + "enum": [ + "IN_PROGRESS", + "DECLINED", + "PUBLISHED" + ] + }, + "subStatus": { + "type": "string", + "description": "The reason code explaining why the value was rejected.", + "example": "DOWNLOAD_FAILED_404", + "enum": [ + "DELETED", + "DOWNLOAD_FAILED_404", + "DOWNLOAD_FAILED_UNAUTHORIZED", + "IMAGE_FLAGGED_AS_DUPLICATE", + "IMAGE_RATE_LIMITED", + "IMPORT_FAILED", + "LABEL_UPDATED", + "MATCH_TO_PRODUCT_FAILED", + "NOT_VALID_FOR_IMPORT", + "PUBLISHED", + "RECEIVED", + "SCORED_OTHER_IMAGE_WON", + "STORED", + "SUPPLIED_FLAGGED_AS_BLACKLISTED", + "UNKNOWN", + "UNPUBLISHED", + "UNSUPPORTED_MIMETYPE", + "UPLOAD_CANCELLED", + "UPLOAD_DEADLINE_REACHED", + "UPLOAD_FAILED", + "UPLOAD_REJECTED" + ] + }, + "subStatusDescription": { + "type": "string", + "description": "The reason explaining why the value was rejected.", + "example": "Failed to download." + } + } + }, + "UploadReportAttribute": { + "required": [ + "id", + "status", + "values" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier of the attribute for which the value has changed.", + "example": "Width" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UploadReportValue" + } + }, + "status": { + "type": "string", + "description": "The processing state of the submitted attribute.", + "example": "DECLINED", + "enum": [ + "IN_PROGRESS", + "DECLINED", + "PUBLISHED" + ] + }, + "subStatus": { + "type": "string", + "description": "The reason code explaining why the value was rejected.", + "example": "INVALID_NUMBER", + "enum": [ + "BLOCKED_BY_RATE_LIMITER", + "CREATED", + "DEPRECATED", + "IDENTICAL_VALUE_AS_BEFORE", + "MATCH_TO_PRODUCT_FAILED", + "NOT_CHANGED", + "NOT_RECENT", + "PROCESSING_STARTED", + "RECEIVED", + "REJECTED", + "REJECTED_BY_BRAND_AUTHORITY", + "REJECTED_BY_LOGISTIC", + "REJECTED_NO_DATA", + "REJECTED_UNPROCESSABLE", + "SELECTED", + "SELECTED_BY_BRAND_AUTHORITY", + "SELECTED_BY_LOGISTIC", + "SELECTION_DELETED", + "SELECTION_MERGED", + "TIMED_OUT", + "UPDATED", + "UPLOADED", + "UNKNOWN", + "VALID_EAN", + "VALIDATED", + "VALIDATION_FAILED", + "VALIDATION_FAILED_DISABLED_GPC_CODE", + "VALIDATION_FAILED_DOES_NOT_EXIST", + "VALIDATION_FAILED_INVALID_DATE", + "VALIDATION_FAILED_INVALID_EAN", + "VALIDATION_FAILED_INVALID_FRACTION", + "VALIDATION_FAILED_INVALID_GPC_CODE", + "VALIDATION_FAILED_INVALID_INTEGER", + "VALIDATION_FAILED_INVALID_ISODATE", + "VALIDATION_FAILED_INVALID_ISODATETIME", + "VALIDATION_FAILED_INVALID_LOV_VALUE", + "VALIDATION_FAILED_INVALID_MULTIPLE_VALUES", + "VALIDATION_FAILED_INVALID_NO_VALUES", + "VALIDATION_FAILED_INVALID_NUMBER", + "VALIDATION_FAILED_INVALID_NUMERIC_TEXT", + "VALIDATION_FAILED_INVALID_TEXT", + "VALIDATION_FAILED_INVALID_UNIT", + "VALIDATION_FAILED_INVALID_URL", + "VALIDATION_FAILED_INVALID_VALUES", + "VALIDATION_FAILED_NOT_ALLOWED", + "VALIDATION_FAILED_UNKNOWN_BASETYPE", + "WAITING_FOR_GLOBAL_ID" + ] + }, + "subStatusDescription": { + "type": "string", + "description": "The reason explaining why the value was rejected.", + "example": "The provided number is not correct." + } + } + }, + "UploadReportResponse": { + "required": [ + "attributes", + "language", + "status", + "uploadId" + ], + "type": "object", + "properties": { + "uploadId": { + "type": "string", + "description": "The identifier of the upload report.", + "example": "3fa90f24-5b44-417f-b212-5cd18ce64c0e" + }, + "language": { + "type": "string", + "description": "The language in which content is submitted.", + "example": "nl", + "enum": [ + "nl", + "nl-BE", + "fr", + "fr-BE" + ] + }, + "status": { + "type": "string", + "description": "The current status of the upload report.", + "example": "IN_PROGRESS", + "enum": [ + "IN_PROGRESS", + "COMPLETED" + ] + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UploadReportAttribute" + } + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UploadReportAsset" + } + } + }, + "description": "Upload report." + }, + "UploadReportValue": { + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the attribute.", + "example": "14.5" + }, + "unitId": { + "type": "string", + "description": "The unit identifier of the attribute.", + "example": "mm" + } + } + }, + "Attributes": { + "required": [ + "id", + "values" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier of the attribute.", + "example": "Appearance Name" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Values" + } + } + } + }, + "AudioTracks": { + "type": "object", + "properties": { + "discNumber": { + "type": "string", + "description": "The disc number within an album the audio track is stored on.", + "example": "1" + }, + "trackNumber": { + "type": "string", + "description": "The track number on the album.", + "example": "14" + }, + "discSide": { + "type": "string", + "description": "The disc side on which the audio track is stored on.", + "example": "A" + }, + "title": { + "type": "string", + "description": "The title of the audio track.", + "example": "Back home" + }, + "artistName": { + "type": "string", + "description": "The name of the artist(s) performing the audio track.", + "example": "Golden Earring" + }, + "playTime": { + "type": "string", + "description": "The play time of the audio track.", + "example": "3:51" + }, + "clipUrl": { + "type": "string", + "description": "The URL on which an audio clip of the audio track has been made available.", + "example": "https://example.com/ABC.mp3" + }, + "clipType": { + "type": "string", + "description": "The format in which the audio clip is available.", + "example": "mp3" + } + } + }, + "CatalogProduct": { + "required": [ + "attributes", + "gpc", + "parties", + "published" + ], + "type": "object", + "properties": { + "published": { + "type": "boolean", + "description": "Indicates whether the product meets the minimum requirements for publishing to the webshop.", + "example": true + }, + "gpc": { + "$ref": "#/components/schemas/Gpc" + }, + "enrichment": { + "$ref": "#/components/schemas/Enrichment" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attributes" + } + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Party" + } + }, + "audioTracks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AudioTracks" + } + }, + "series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Serie" + } + } + } + }, + "Enrichment": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "description": "The current enrichment level of the product.", + "format": "int32", + "example": 1 + } + } + }, + "Gpc": { + "required": [ + "chunkId" + ], + "type": "object", + "properties": { + "chunkId": { + "type": "string", + "description": "The identifier of the current GPC/Product Classification.", + "example": "30005965" + } + } + }, + "Party": { + "required": [ + "name", + "role", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the party involved for this product.", + "example": "Maybelline" + }, + "type": { + "type": "string", + "description": "The type of party involved for this product.", + "example": "Brand" + }, + "role": { + "type": "string", + "description": "The role of the party involved for this product.", + "example": "BRAND" + } + } + }, + "Serie": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the product serie(s) the EAN belongs to.", + "example": "Maybelline Lash Sensational" + } + } + }, + "Values": { + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the attribute.", + "example": "122" + }, + "unitId": { + "type": "string", + "description": "The unit identifier of the attribute.", + "example": "unece.unit.MMT" + }, + "valueId": { + "type": "string", + "description": "The identifier of the attribute's value. ", + "example": "700071825" + } + } + } + }, + "securitySchemes": { + "OAuth2": { + "type": "http", + "description": "JWT-based access to api.bol.com", + "in": "header", + "scheme": "bearer" } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/invoices/{invoice-id}/specification" : { - "get" : { - "tags" : [ "Invoices" ], - "summary" : "Get an invoice specification by invoice id", - "description" : "Gets an invoice specification for an invoice with a paginated list of its transactions. The available media types differ per invoice specification and are listed within the response from the ‘GET all invoices’ call. Note, the media types listed in the response must be given in our standard API format.", - "operationId" : "get-invoice-specification", - "produces" : [ "application/vnd.retailer.v9+json", "application/vnd.retailer.v9+openxmlformats-officedocument.spreadsheetml.sheet" ], - "parameters" : [ { - "name" : "invoice-id", - "in" : "path", - "description" : "The identifier of the invoice.", - "required" : true, - "type" : "string" - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a maximum of 25,000 lines.", - "required" : false, - "type" : "integer", - "minimum" : 1, - "format" : "int32" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers" : { - "post" : { - "tags" : [ "Offers" ], - "summary" : "Create a new offer", - "description" : "Creates a new offer, and adds it to the catalog. After creation, status information can be retrieved to review if the offer is valid and published to the shop.", - "operationId" : "post-offer", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateOfferRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/export" : { - "post" : { - "tags" : [ "Offers" ], - "summary" : "Request an offer export file", - "description" : "Request an offer export file containing all offers.", - "operationId" : "post-offer-export", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateOfferExportRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/export/{report-id}" : { - "get" : { - "tags" : [ "Offers" ], - "summary" : "Retrieve an offer export file by offer export id", - "description" : "Retrieve an offer export file containing all offers.", - "operationId" : "get-offer-export", - "produces" : [ "application/vnd.retailer.v9+csv" ], - "parameters" : [ { - "name" : "report-id", - "in" : "path", - "description" : "Unique identifier for an offer export report.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request." - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/unpublished" : { - "post" : { - "tags" : [ "Offers" ], - "summary" : "Request an unpublished offer report", - "description" : "Request an unpublished offer report containing all unpublished offers and reasons.", - "operationId" : "post-unpublished-offer-report", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateUnpublishedOfferReportRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/unpublished/{report-id}" : { - "get" : { - "tags" : [ "Offers" ], - "summary" : "Retrieve an unpublished offer report by report id", - "description" : "Retrieve an unpublished offer report containing all unpublished offers and reasons.", - "operationId" : "get-unpublished-offer-report", - "produces" : [ "application/vnd.retailer.v9+csv" ], - "parameters" : [ { - "name" : "report-id", - "in" : "path", - "description" : "Unique identifier for unpublished offer report.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request." - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/{offer-id}" : { - "get" : { - "tags" : [ "Offers" ], - "summary" : "Retrieve an offer by its offer id", - "description" : "Retrieve an offer by using the offer id provided to you when creating or listing your offers.", - "operationId" : "get-offer", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "path", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/RetailerOffer" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "put" : { - "tags" : [ "Offers" ], - "summary" : "Update an offer", - "description" : "Use this endpoint to send an offer update. This endpoint returns a process status.", - "operationId" : "put-offer", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "path", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/UpdateOfferRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "delete" : { - "tags" : [ "Offers" ], - "summary" : "Delete offer by id", - "description" : "Delete an offer by id.", - "operationId" : "delete-offer", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "path", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/{offer-id}/price" : { - "put" : { - "tags" : [ "Offers" ], - "summary" : "Update price(s) for offer by id", - "description" : "Update price(s) for offer by id.", - "operationId" : "update-offer-price", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "path", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/UpdateOfferPriceRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/offers/{offer-id}/stock" : { - "put" : { - "tags" : [ "Offers" ], - "summary" : "Update stock for offer by id", - "description" : "Update stock for offer by id.", - "operationId" : "update-offer-stock", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "offer-id", - "in" : "path", - "description" : "Unique identifier for an offer.", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/UpdateOfferStockRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/orders" : { - "get" : { - "tags" : [ "Orders" ], - "summary" : "Get a list of orders", - "description" : "Gets a paginated list of all orders for a retailer.", - "operationId" : "get-orders", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32" - }, { - "name" : "fulfilment-method", - "in" : "query", - "description" : "Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB). In order to retrieve both FBR and FBB orders, ALL can be used as a parameter.", - "required" : false, - "type" : "string", - "default" : "FBR", - "enum" : [ "FBR", "FBB", "ALL" ] - }, { - "name" : "status", - "in" : "query", - "description" : "To filter on order status. You can filter on either all orders independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders.", - "required" : false, - "type" : "string", - "default" : "OPEN", - "enum" : [ "OPEN", "SHIPPED", "ALL" ] - }, { - "name" : "change-interval-minute", - "in" : "query", - "description" : "To filter on the period in minutes during which the latest change was performed on an order item.", - "required" : false, - "type" : "integer", - "maximum" : 60, - "format" : "int32" - }, { - "name" : "latest-change-date", - "in" : "query", - "description" : "To filter on the date on which the latest change was performed on an order item. Up to 3 months of history is supported.", - "required" : false, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ReducedOrders" - } - } - } - } - }, - "/retailer/orders/cancellation" : { - "put" : { - "tags" : [ "Orders" ], - "summary" : "Cancel an order item by an order item id", - "description" : "This endpoint can be used to either confirm a cancellation request by the customer or to cancel an order item you yourself are unable to fulfil.", - "operationId" : "cancel-order-item", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/Container for the order items that have to be cancelled." - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/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", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ShipmentRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/orders/{order-id}" : { - "get" : { - "tags" : [ "Orders" ], - "summary" : "Get an order by order id", - "description" : "Gets an order by order id. The order can be partially shipped or cancelled, and the message contains the quantity shipped or cancelled items. The unitPrice takes account of volume discounts.", - "operationId" : "get-order", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "order-id", - "in" : "path", - "description" : "The id of the order to get.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/list" : { - "post" : { - "tags" : [ "Products" ], - "summary" : "Get product list", - "description" : "Gets the list of products based on category, search term or filters.", - "operationId" : "get-product-list", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "Accept-Language", - "in" : "header", - "description" : "The language in which the product list will be retrieved.", - "required" : false, - "type" : "string", - "default" : "nl", - "x-example" : "nl", - "enum" : [ "nl", "nl-BE", "nl-NL", "fr-BE" ] - }, { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ProductListRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductListResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "406" : { - "description" : "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/list-filters" : { - "get" : { - "tags" : [ "Products" ], - "summary" : "Get product list filters", - "description" : "Gets the list of possible filters for products based on category or search term.", - "operationId" : "get-product-list-filters", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "country-code", - "in" : "query", - "description" : "The country for which the filters will be retrieved.", - "required" : false, - "type" : "string", - "default" : "NL", - "x-example" : "NL", - "enum" : [ "NL", "BE" ] - }, { - "name" : "search-term", - "in" : "query", - "description" : "The search-term to get the associated categories and filters for.", - "required" : false, - "type" : "string", - "maxLength" : 50, - "minLength" : 0, - "x-example" : "pen" - }, { - "name" : "category-id", - "in" : "query", - "description" : "The category to get the associated filters for.", - "required" : false, - "type" : "string", - "maxLength" : 11, - "minLength" : 0, - "x-example" : "10505" - }, { - "name" : "Accept-Language", - "in" : "header", - "description" : "The language in which the product list filters will be retrieved.", - "required" : false, - "type" : "string", - "default" : "nl", - "x-example" : "nl", - "enum" : [ "nl", "nl-BE", "nl-NL", "fr-BE" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductListFiltersResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "406" : { - "description" : "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/{ean}/assets" : { - "get" : { - "tags" : [ "Products" ], - "summary" : "Get product assets", - "description" : "Gets the list of asset available for the product by EAN.", - "operationId" : "get-product-assets", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - }, { - "name" : "usage", - "in" : "query", - "description" : "Type of the asset being used for.", - "required" : false, - "type" : "string", - "default" : "PRIMARY", - "x-example" : "ADDITIONAL", - "enum" : [ "PRIMARY", "ADDITIONAL", "IMAGE" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductAssetsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/{ean}/offers" : { - "get" : { - "tags" : [ "Products" ], - "summary" : "Get a list of competing offers by EAN", - "description" : "Use this endpoint to get a list of offers available in the webshop. The list includes offers for all retailers.", - "operationId" : "get-competing-offers", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32", - "x-example" : 1 - }, { - "name" : "country-code", - "in" : "query", - "description" : "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format.", - "required" : false, - "type" : "string", - "default" : "NL", - "x-example" : "NL", - "enum" : [ "NL", "BE" ] - }, { - "name" : "best-offer-only", - "in" : "query", - "description" : "Indicator to request the best offer within the country for the requested EAN.", - "required" : false, - "type" : "boolean", - "default" : false, - "x-example" : true - }, { - "name" : "condition", - "in" : "query", - "description" : "The condition of the offered product.", - "required" : false, - "type" : "string", - "default" : "NEW", - "x-example" : "NEW", - "enum" : [ "ALL", "BAD", "MODERATE", "REASONABLE", "GOOD", "AS_NEW", "NEW" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/CompetingOffersResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/{ean}/placement" : { - "get" : { - "tags" : [ "Products" ], - "summary" : "Get product placement", - "description" : "Gets the list of categories and the URL where the product is placed in the webshop.", - "operationId" : "get-product-placement", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - }, { - "name" : "country-code", - "in" : "query", - "description" : "The country of the product placed on the webshop.", - "required" : false, - "type" : "string", - "default" : "NL", - "x-example" : "NL", - "enum" : [ "NL", "BE" ] - }, { - "name" : "Accept-Language", - "in" : "header", - "description" : "The language in which the product categories and URL will be retrieved.", - "required" : false, - "type" : "string", - "default" : "nl", - "x-example" : "nl", - "enum" : [ "nl", "nl-BE", "fr-BE" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductPlacementResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "406" : { - "description" : "Not acceptable: The sent request header does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/{ean}/product-ids" : { - "get" : { - "tags" : [ "Products" ], - "summary" : "Get product ids by EAN", - "description" : "Get the bol.com specific product identifier and the related EANs.", - "operationId" : "get-product-ids", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this product.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductIdsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/products/{ean}/ratings" : { - "get" : { - "tags" : [ "Products" ], - "summary" : "Get product ratings", - "description" : "Gets a list of ratings for the products associated with the provided EAN.", - "operationId" : "get-product-ratings", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "ean", - "in" : "path", - "description" : "The EAN number associated with this rating.", - "required" : true, - "type" : "string", - "x-example" : "0000007740404" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductRatingsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/promotions" : { - "get" : { - "tags" : [ "Promotions" ], - "summary" : "Get a list of promotions", - "description" : "Gets a paginated list of all promotions for a retailer.", - "operationId" : "get-promotions", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "promotion-type", - "in" : "query", - "description" : "The type(s) of promotion to be retrieved.", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "AWARENESS", "PRICE_OFF" ] - }, - "collectionFormat" : "multi" - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32", - "x-example" : 1 - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Promotions" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/promotions/{promotion-id}" : { - "get" : { - "tags" : [ "Promotions" ], - "summary" : "Get a promotion by promotion id", - "description" : "Gets the details of a promotion.", - "operationId" : "get-promotion", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "promotion-id", - "in" : "path", - "description" : "The identifier of the promotion.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Promotion" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/promotions/{promotion-id}/products" : { - "get" : { - "tags" : [ "Promotions" ], - "summary" : "Get a list of products", - "description" : "Gets a paginated list of all products that are present within a promotion.", - "operationId" : "get-products", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "promotion-id", - "in" : "path", - "description" : "The identifier of the promotion.", - "required" : true, - "type" : "string" - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32", - "x-example" : 1 - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Products" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments" : { - "get" : { - "tags" : [ "Replenishments" ], - "summary" : "Get replenishments", - "description" : "Gets a list of replenishments.", - "operationId" : "get-replenishments", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "reference", - "in" : "query", - "description" : "Custom user defined reference to identify the replenishment.", - "required" : false, - "type" : "string", - "x-example" : "REFERENCE1" - }, { - "name" : "ean", - "in" : "query", - "description" : "The EAN number associated with this product.", - "required" : false, - "type" : "string", - "x-example" : "0000007740404" - }, { - "name" : "start-date", - "in" : "query", - "description" : "The creation start date to find the replenishment. In ISO 8601 format.", - "required" : false, - "type" : "string", - "x-example" : "2021-01-01" - }, { - "name" : "end-date", - "in" : "query", - "description" : "The end date of the range to find the replenishment. In ISO 8601 format.", - "required" : false, - "type" : "string", - "x-example" : "2021-01-02" - }, { - "name" : "state", - "in" : "query", - "description" : "The current state(s) of the replenishment.", - "required" : false, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "multi", - "x-example" : "ANNOUNCED" - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32", - "x-example" : 1 - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ReplenishmentsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "post" : { - "tags" : [ "Replenishments" ], - "summary" : "Create a replenishment", - "description" : "Creates a replenishment.", - "operationId" : "post-replenishment", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateReplenishmentRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/delivery-dates" : { - "get" : { - "tags" : [ "Replenishments" ], - "summary" : "Get delivery dates", - "description" : "Retrieve a list of available delivery dates for a replenishment.", - "operationId" : "get-delivery-dates", - "produces" : [ "application/vnd.retailer.v9+json" ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/DeliveryDatesResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/pickup-time-slots" : { - "post" : { - "tags" : [ "Replenishments" ], - "summary" : "Post pickup time slots", - "description" : "Retrieve pickup time slots.", - "operationId" : "post-pickup-time-slots", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/PickupTimeSlotsRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/PickupTimeSlotsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/product-destinations" : { - "post" : { - "tags" : [ "Replenishments" ], - "summary" : "Request product destinations", - "description" : "Requests a list of product destinations by EANs.", - "operationId" : "post-request-product-destinations", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/RequestProductDestinationsRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/product-destinations/{product-destinations-id}" : { - "get" : { - "tags" : [ "Replenishments" ], - "summary" : "Get product destinations by product destinations id", - "description" : "Gets the product destinations for one or more products by product destinations id.", - "operationId" : "get-product-destinations", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "product-destinations-id", - "in" : "path", - "description" : "The identifier of the product destinations requested.", - "required" : true, - "type" : "string", - "x-example" : "9483fc7e-faf3-4814-864e-dee412044c27" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProductDestinationsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/product-labels" : { - "post" : { - "tags" : [ "Replenishments" ], - "summary" : "Post product labels", - "description" : "Retrieve product labels.", - "operationId" : "post-product-labels", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+pdf" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ProductLabelsRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/{replenishment-id}" : { - "get" : { - "tags" : [ "Replenishments" ], - "summary" : "Get a replenishment by replenishment id", - "description" : "Gets a replenishment by replenishment id.", - "operationId" : "get-replenishment", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "replenishment-id", - "in" : "path", - "description" : "The unique identifier of the replenishment.", - "required" : true, - "type" : "string", - "x-example" : "2312078154" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ReplenishmentResponse" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "put" : { - "tags" : [ "Replenishments" ], - "summary" : "Update a replenishment by replenishment id", - "description" : "Updates a replenishment.", - "operationId" : "put-replenishment", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "replenishment-id", - "in" : "path", - "description" : "The unique identifier of the replenishment.", - "required" : true, - "type" : "string", - "x-example" : "2312078154" - }, { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/UpdateReplenishmentRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/{replenishment-id}/load-carrier-labels" : { - "get" : { - "tags" : [ "Replenishments" ], - "summary" : "Get load carrier labels", - "description" : "Retrieve the load carrier labels.", - "operationId" : "get-load-carrier-labels", - "produces" : [ "application/vnd.retailer.v9+pdf" ], - "parameters" : [ { - "name" : "replenishment-id", - "in" : "path", - "description" : "The unique identifier of the replenishment.", - "required" : true, - "type" : "string", - "x-example" : "2312078154" - }, { - "name" : "label-type", - "in" : "query", - "description" : "The type of label which you want to print.", - "required" : false, - "type" : "string", - "default" : "WAREHOUSE", - "x-example" : "WAREHOUSE", - "enum" : [ "WAREHOUSE", "TRANSPORT" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/replenishments/{replenishment-id}/pick-list" : { - "get" : { - "tags" : [ "Replenishments" ], - "summary" : "Get pick list", - "description" : "Retrieve the pick list.", - "operationId" : "get-pick-list", - "produces" : [ "application/vnd.retailer.v9+pdf" ], - "parameters" : [ { - "name" : "replenishment-id", - "in" : "path", - "description" : "The unique identifier of the replenishment.", - "required" : true, - "type" : "string", - "x-example" : "2312078154" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/retailers/{retailer-id}" : { - "get" : { - "tags" : [ "Retailers" ], - "summary" : "Get retailer information by retailer id", - "description" : "Gets retailer information of a single retailer.", - "operationId" : "get-retailer-information", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "retailer-id", - "in" : "path", - "description" : "The Id of the retailer which information belongs to.", - "required" : true, - "type" : "string", - "x-example" : "1055479" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/RetailerInformationResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/returns" : { - "get" : { - "tags" : [ "Returns" ], - "summary" : "Get returns", - "description" : "Get a paginated list of multi-item returns. Handled returns are sorted by date in descending order, while unhandled returns are sorted by date in ascending order.", - "operationId" : "get-returns", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "page", - "in" : "query", - "description" : "The page to get with a page size of 50.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32" - }, { - "name" : "handled", - "in" : "query", - "description" : "The status of the returns you wish to see, shows either handled or unhandled returns.", - "required" : false, - "type" : "boolean" - }, { - "name" : "fulfilment-method", - "in" : "query", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", - "required" : false, - "type" : "string", - "default" : "FBR", - "enum" : [ "FBR", "FBB" ] - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ReturnsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "post" : { - "tags" : [ "Returns" ], - "summary" : "Create a return", - "description" : "Create a return, and automatically handle it with the provided handling result. When successfully created, the resulting return id is provided in the process status.", - "operationId" : "create-return", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateReturnRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/returns/{return-id}" : { - "get" : { - "tags" : [ "Returns" ], - "summary" : "Get a return by return id", - "description" : "Retrieve a return based on the return id.", - "operationId" : "get-return", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "return-id", - "in" : "path", - "description" : "Unique identifier for a return.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Return" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/returns/{rma-id}" : { - "put" : { - "tags" : [ "Returns" ], - "summary" : "Handle a return by rma id", - "description" : "Allows the user to handle a return. This can be to either handle an open return, or change the handlingResult of an already handled return. Please refer to the Returns documentation for further details.", - "operationId" : "handle-return", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "rma-id", - "in" : "path", - "description" : "The RMA (Return Merchandise Authorization) identifier of the return.", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "in" : "body", - "name" : "body", - "description" : "The handling result requested by the retailer.", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ReturnRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/shipments" : { - "get" : { - "tags" : [ "Shipments" ], - "summary" : "Get shipment list", - "description" : "A paginated list to retrieve all your shipments up to 3 months old. The shipments will be sorted by date in descending order.", - "operationId" : "get-shipments", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "page", - "in" : "query", - "description" : "The page to get with a page size of 50.", - "required" : false, - "type" : "integer", - "default" : 1, - "format" : "int32" - }, { - "name" : "fulfilment-method", - "in" : "query", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", - "required" : false, - "type" : "string", - "default" : "FBR", - "enum" : [ "FBR", "FBB" ] - }, { - "name" : "order-id", - "in" : "query", - "description" : "The id of the order. Only valid without fulfilment-method. The default fulfilment-method is ignored.", - "required" : false, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ShipmentsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/shipments/{shipment-id}" : { - "get" : { - "tags" : [ "Shipments" ], - "summary" : "Get a shipment by shipment id", - "description" : "Retrieve a single shipment by its corresponding id.", - "operationId" : "get-shipment", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "shipment-id", - "in" : "path", - "description" : "The id of the shipment.", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/Shipment" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/shipping-labels" : { - "post" : { - "tags" : [ "Shipping Labels" ], - "summary" : "Create a shipping label", - "description" : "Create a shipping label with a shipping label offer id retrieved from get delivery options.", - "operationId" : "post-shipping-label", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ShippingLabelRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/shipping-labels/delivery-options" : { - "post" : { - "tags" : [ "Shipping Labels" ], - "summary" : "Get delivery options", - "description" : "Retrieves all available delivery options based on the supplied configuration of order items that has to be shipped.", - "operationId" : "get-delivery-options", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/DeliveryOptionsRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/DeliveryOptionsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/shipping-labels/{shipping-label-id}" : { - "get" : { - "tags" : [ "Shipping Labels" ], - "summary" : "Get a shipping label", - "description" : "Retrieves a shipping label by shipping label id. Metadata for the shipping label is added as headers in the response. If you are only interested in the metadata, you can do a HEAD request to retrieve only the headers without the label data.", - "operationId" : "get-shipping-label", - "produces" : [ "application/vnd.retailer.v9+pdf" ], - "parameters" : [ { - "name" : "shipping-label-id", - "in" : "path", - "description" : "The shipping label id.", - "required" : true, - "type" : "string", - "x-example" : "6ff736b5-cdd0-4150-8c67-78269ee986f5" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "headers" : { - "X-Track-And-Trace-Code" : { - "type" : "string", - "description" : "Track and trace code for the retrieved label." - }, - "X-Transporter-Code" : { - "type" : "string", - "description" : "Transporter code for the retrieved label." - } - }, - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" - } - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/subscriptions" : { - "get" : { - "tags" : [ "Subscriptions" ], - "summary" : "Get push notification subscriptions", - "description" : "Retrieve a list of all configured and active push notification subscriptions.", - "operationId" : "get-push-notification-subscriptions", - "produces" : [ "application/vnd.retailer.v9+json" ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/SubscriptionsResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "post" : { - "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.", - "operationId" : "post-push-notification-subscription", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/CreateSubscriptionRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/subscriptions/signature-keys" : { - "get" : { - "tags" : [ "Subscriptions" ], - "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", - "produces" : [ "application/vnd.retailer.v9+json" ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/KeySetResponse" - } - } - } - } - }, - "/retailer/subscriptions/test/{subscription-id}" : { - "post" : { - "tags" : [ "Subscriptions" ], - "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", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "subscription-id", - "in" : "path", - "description" : "A unique identifier for the subscription.", - "required" : true, - "type" : "string", - "x-example" : "1234" - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/subscriptions/{subscription-id}" : { - "get" : { - "tags" : [ "Subscriptions" ], - "summary" : "Get push notification subscription by id", - "description" : "Retrieve a configured and active push notification subscription with the provided id.", - "operationId" : "get-push-notification-subscription", - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "subscription-id", - "in" : "path", - "description" : "A unique identifier for the subscription.", - "required" : true, - "type" : "string", - "x-example" : "1234" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/SubscriptionResponse" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "put" : { - "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.", - "operationId" : "put-push-notification-subscription", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "subscription-id", - "in" : "path", - "description" : "A unique identifier for the subscription.", - "required" : true, - "type" : "string", - "x-example" : "1234" - }, { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/UpdateSubscriptionRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - }, - "delete" : { - "tags" : [ "Subscriptions" ], - "summary" : "Delete push notification subscription", - "description" : "Delete a push notification subscription with the provided id.", - "operationId" : "delete-push-notification-subscription", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "subscription-id", - "in" : "path", - "description" : "A unique identifier for the subscription.", - "required" : true, - "type" : "string", - "x-example" : "1234" - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - }, - "/retailer/transports/{transport-id}" : { - "put" : { - "tags" : [ "Transports" ], - "summary" : "Add transport information by transport id", - "description" : "Add information to an existing transport. The transport id is part of the shipment. You can retrieve the transport id through the GET shipment list request.", - "operationId" : "add-transport-information-by-transport-id", - "consumes" : [ "application/vnd.retailer.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json" ], - "parameters" : [ { - "name" : "transport-id", - "in" : "path", - "description" : "The transport id.", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "The change transport requested by the user.", - "required" : false, - "schema" : { - "$ref" : "#/definitions/ChangeTransportRequest" - } - } ], - "responses" : { - "202" : { - "description" : "Accepted: Successfully scheduled the request for processing.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } - } - }, - "definitions" : { - "AdditionalService" : { - "type" : "object", - "properties" : { - "serviceType" : { - "type" : "string", - "example" : "PLACEMENT_AND_INSTALLATION", - "description" : "An additional service type that the customer selected when purchasing this order item." - } - } - }, - "Address" : { - "type" : "object", - "required" : [ "city", "countryCode", "houseNumber", "houseNumberExtension", "streetName", "zipCode" ], - "properties" : { - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name of the pickup location." - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number of the pickup location." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension of the house number of the pickup location." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The zip code in '1234AB' format for NL and '0000' for BE addresses." - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The city of the pickup address." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The ISO 3166-2 country code." - }, - "attentionOf" : { - "type" : "string", - "example" : "Jan Jansen", - "description" : "Name of the person responsible for this replenishment." - } - } - }, - "Asset" : { - "type" : "object", - "required" : [ "labels", "url" ], - "properties" : { - "url" : { - "type" : "string", - "example" : "http://example.com", - "description" : "The URL of the asset.", - "minLength" : 0, - "maxLength" : 2048 - }, - "labels" : { - "type" : "array", - "example" : "[ \"FRONT\" ]", - "description" : "The label(s) of the asset.", - "items" : { - "type" : "string" - }, - "maxItems" : 2, - "minItems" : 1 - } - } - }, - "Attribute" : { - "type" : "object", - "required" : [ "id", "values" ], - "properties" : { - "id" : { - "type" : "string", - "example" : "Width", - "description" : "The identifier of the attribute for which the value has changed.", - "minLength" : 1, - "maxLength" : 100 - }, - "values" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/AttributeValue" - }, - "maxItems" : 300, - "minItems" : 1 - } - } - }, - "AttributeValue" : { - "type" : "object", - "required" : [ "value" ], - "properties" : { - "value" : { - "type" : "string", - "example" : "14.5", - "description" : "The value of the attribute.", - "minLength" : 1, - "maxLength" : 10000 - }, - "unitId" : { - "type" : "string", - "example" : "mm", - "description" : "The unit identifier of the attribute." - } - } - }, - "Attributes" : { - "type" : "object", - "required" : [ "id", "values" ], - "properties" : { - "id" : { - "type" : "string", - "example" : "Appearance Name", - "description" : "The identifier of the attribute." - }, - "values" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Values" - } - } - } - }, - "AudioTracks" : { - "type" : "object", - "properties" : { - "discNumber" : { - "type" : "string", - "example" : "1", - "description" : "The disc number within an album the audio track is stored on." - }, - "trackNumber" : { - "type" : "string", - "example" : "14", - "description" : "The track number on the album." - }, - "discSide" : { - "type" : "string", - "example" : "A", - "description" : "The disc side on which the audio track is stored on." - }, - "title" : { - "type" : "string", - "example" : "Back home", - "description" : "The title of the audio track." - }, - "artistName" : { - "type" : "string", - "example" : "Golden Earring", - "description" : "The name of the artist(s) performing the audio track." - }, - "playTime" : { - "type" : "string", - "example" : "3:51", - "description" : "The play time of the audio track." - }, - "clipUrl" : { - "type" : "string", - "example" : "https://example.com/ABC.mp3", - "description" : "The URL on which an audio clip of the audio track has been made available." - }, - "clipType" : { - "type" : "string", - "example" : "mp3", - "description" : "The format in which the audio clip is available." - } - } - }, - "BillingDetails" : { - "type" : "object", - "properties" : { - "salutation" : { - "type" : "string", - "example" : "MALE", - "description" : "The salutation of the customer.", - "enum" : [ "MALE", "FEMALE", "UNKNOWN" ] - }, - "firstName" : { - "type" : "string", - "example" : "Billie", - "description" : "The first name of the customer." - }, - "surname" : { - "type" : "string", - "example" : "Jansen", - "description" : "The surname of the customer." - }, - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name." - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension on the house number." - }, - "extraAddressInformation" : { - "type" : "string", - "example" : "Apartment", - "description" : "Additional information related to the address that helps in delivering the package." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders." - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The name of the city." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country code." - }, - "email" : { - "type" : "string", - "example" : "billie@verkopen.bol.com", - "description" : "A scrambled email address that can be used to contact the customer." - }, - "company" : { - "type" : "string", - "example" : "bol.com", - "description" : "The company name." - }, - "vatNumber" : { - "type" : "string", - "example" : "NL999999999B99", - "description" : "The Value Added Tax (VAT) / BTW number for business sellers situated in the Netherlands." - }, - "kvkNumber" : { - "type" : "string", - "example" : "99887766", - "description" : "The Kamer van Koophandel (kvk) number for organizations situated in the Netherlands or ondernemingsnummer for organizations situated in Belgium." - }, - "orderReference" : { - "type" : "string", - "example" : "MijnReferentie", - "description" : "The order reference specified by the customer when ordering a product." - } - }, - "description" : "The details of the customer that is responsible for the financial fulfillment of this order." - }, - "BulkCommissionQuery" : { - "type" : "object", - "required" : [ "ean", "unitPrice" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "condition" : { - "type" : "string", - "example" : "NEW", - "description" : "The condition of the offer.", - "enum" : [ "NEW", "AS_NEW", "GOOD", "REASONABLE", "MODERATE" ] - }, - "unitPrice" : { - "type" : "number", - "example" : 59.0, - "description" : "The price of the product with a period as a decimal separator. The price should always have two decimals precision.", - "minimum" : 0, - "maximum" : 9999 - } - } - }, - "BulkCommissionRequest" : { - "type" : "object", - "required" : [ "commissionQueries" ], - "properties" : { - "commissionQueries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/BulkCommissionQuery" - }, - "maxItems" : 100, - "minItems" : 1 - } - } - }, - "BulkCommissionResponse" : { - "type" : "object", - "required" : [ "commissions" ], - "properties" : { - "commissions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Commission" - } - } - } - }, - "BundlePrice" : { - "type" : "object", - "required" : [ "quantity", "unitPrice" ], - "properties" : { - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "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.", - "minimum" : 1, - "maximum" : 24 - }, - "unitPrice" : { - "type" : "number", - "example" : 9.99, - "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.", - "minimum" : 1, - "maximum" : 9999 - } - } - }, - "Campaign" : { - "type" : "object", - "required" : [ "name", "startDateTime" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "Campaign name", - "description" : "The name of the campaign under which the promotion had been created." - }, - "startDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-03-29T00:00:00.000+02:00", - "description" : "The starting date and time of the campaign." - }, - "endDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-05-10T00:00:00.000+02:00", - "description" : "The ending date and time of the campaign." - } - } - }, - "CatalogProduct" : { - "type" : "object", - "required" : [ "attributes", "gpc", "parties", "published" ], - "properties" : { - "published" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates whether the product meets the minimum requirements for publishing to the webshop." - }, - "gpc" : { - "$ref" : "#/definitions/Gpc" - }, - "enrichment" : { - "$ref" : "#/definitions/Enrichment" - }, - "attributes" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Attributes" - } - }, - "parties" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Party" - } - }, - "audioTracks" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/AudioTracks" - } - }, - "series" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Serie" - } - } - } - }, - "Categories" : { - "type" : "object", - "required" : [ "categoryName", "categoryValues" ], - "properties" : { - "categoryName" : { - "type" : "string", - "example" : "Categorieën", - "description" : "The name of the categories." - }, - "categoryValues" : { - "type" : "array", - "description" : "The list of available categories.", - "items" : { - "$ref" : "#/definitions/CategoryValues" - } - } - } - }, - "Category" : { - "type" : "object", - "required" : [ "categoryId", "categoryName" ], - "properties" : { - "categoryId" : { - "type" : "string", - "example" : "13155", - "description" : "The id of the parent category which the product belongs to." - }, - "categoryName" : { - "type" : "string", - "example" : "Klussen", - "description" : "The name of the parent category which the product belongs to." - }, - "subcategories" : { - "type" : "array", - "description" : "The subcategories which the product belongs to.", - "items" : { - "$ref" : "#/definitions/SubCategory" - } - } - } - }, - "CategoryValues" : { - "type" : "object", - "properties" : { - "categoryValueId" : { - "type" : "string", - "example" : "7934", - "description" : "The id of the category. This id can be used in other endpoints, like Get product list." - }, - "categoryValueName" : { - "type" : "string", - "example" : "Speelgoed", - "description" : "The name of the category." - } - } - }, - "ChangeTransportRequest" : { - "type" : "object", - "properties" : { - "transporterCode" : { - "type" : "string", - "example" : "TNT", - "enum" : [ "BRIEFPOST", "UPS", "TNT", "TNT-EXTRA", "TNT_BRIEF", "TNT-EXPRESS", "DYL", "DPD-NL", "DPD-BE", "BPOST_BE", "BPOST_BRIEF", "DHLFORYOU", "GLS", "FEDEX_NL", "FEDEX_BE", "OTHER", "DHL", "DHL_DE", "DHL-GLOBAL-MAIL", "TSN", "FIEGE", "TRANSMISSION", "PARCEL-NL", "LOGOIX", "PACKS", "COURIER", "TRUNKRS", "CYCLOON" ] - }, - "trackAndTrace" : { - "type" : "string", - "example" : "3SBOL0987654321", - "description" : "The track and trace code that is associated with this transport." - } - } - }, - "ChunkRecommendationsAttribute" : { - "type" : "object", - "required" : [ "id", "values" ], - "properties" : { - "id" : { - "type" : "string", - "example" : "Name", - "description" : "The identifier of the attribute." - }, - "values" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ChunkRecommendationsValue" - }, - "maxItems" : 1, - "minItems" : 1 - } - } - }, - "ChunkRecommendationsAttributes" : { - "type" : "object", - "required" : [ "attributes" ], - "properties" : { - "attributes" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ChunkRecommendationsAttribute" - } - } - } - }, - "ChunkRecommendationsPrediction" : { - "type" : "object", - "required" : [ "chunkId" ], - "properties" : { - "chunkId" : { - "type" : "string", - "example" : "80007268", - "description" : "The identifier of the predicted GPC/Product Classification." - }, - "probability" : { - "type" : "number", - "format" : "double", - "example" : 0.120168649, - "description" : "The probability of the predicted chunk as a ratio, with eleven decimals of precision." - } - } - }, - "ChunkRecommendationsPredictions" : { - "type" : "object", - "required" : [ "predictions" ], - "properties" : { - "predictions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ChunkRecommendationsPrediction" - } - } - } - }, - "ChunkRecommendationsRequest" : { - "type" : "object", - "required" : [ "productContents" ], - "properties" : { - "productContents" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ChunkRecommendationsAttributes" - }, - "maxItems" : 1, - "minItems" : 1 - } - } - }, - "ChunkRecommendationsResponse" : { - "type" : "object", - "required" : [ "recommendations" ], - "properties" : { - "recommendations" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ChunkRecommendationsPredictions" - } - } - } - }, - "ChunkRecommendationsValue" : { - "type" : "object", - "required" : [ "value" ], - "properties" : { - "value" : { - "type" : "string", - "example" : "Bananas", - "description" : "The value of the attribute.", - "minLength" : 1, - "maxLength" : 10000 - } - } - }, - "Commission" : { - "type" : "object", - "required" : [ "condition", "ean", "fixedAmount", "percentage", "reductions", "totalCost", "unitPrice" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "condition" : { - "type" : "string", - "example" : "NEW", - "description" : "The condition of the offer." - }, - "unitPrice" : { - "type" : "number", - "example" : 59.0, - "description" : "The intended selling price per single unit up to 2 decimals precision, including VAT." - }, - "fixedAmount" : { - "type" : "number", - "example" : 0.99, - "description" : "A fixed commission fee, including VAT." - }, - "percentage" : { - "type" : "number", - "example" : 15.0, - "description" : "A percentage of commission, based on the intended selling price per unit, including VAT." - }, - "totalCost" : { - "type" : "number", - "example" : 6.85, - "description" : "The total commission for selling this product at bol.com. The price includes VAT for Dutch sellers, and excludes VAT for Belgium sellers." - }, - "totalCostWithoutReduction" : { - "type" : "number", - "example" : 9.84, - "description" : "The total commission for selling this product at bol.com without reductions including VAT." - }, - "reductions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Reduction" - } - } - } - }, - "CompetingOffersResponse" : { - "type" : "object", - "required" : [ "offers" ], - "properties" : { - "offers" : { - "type" : "array", - "description" : "List of offers.", - "items" : { - "$ref" : "#/definitions/Offer" - } - } - } - }, - "Condition" : { - "type" : "object", - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "AS_NEW", - "description" : "The condition of the offered product.", - "enum" : [ "NEW", "AS_NEW", "GOOD", "REASONABLE", "MODERATE" ] - }, - "category" : { - "type" : "string", - "example" : "SECONDHAND", - "description" : "The category of the condition. If not given NEW or SECONDHAND is derived from NAME.", - "enum" : [ "NEW", "SECONDHAND" ] - }, - "comment" : { - "type" : "string", - "example" : "Heeft een koffie vlek op de kaft.", - "description" : "The description of the condition of the product. Only allowed if name is not NEW and may not contain e-mail addresses.", - "minLength" : 0, - "maxLength" : 2000 - } - } - }, - "Container for the order items that have to be cancelled." : { - "type" : "object", - "required" : [ "orderItems" ], - "properties" : { - "orderItems" : { - "type" : "array", - "description" : "List of order items to cancel. Order item id's must belong to the same order.", - "items" : { - "$ref" : "#/definitions/OrderItemCancellation" - }, - "maxItems" : 1, - "minItems" : 1 - } - } - }, - "Countries" : { - "type" : "object", - "required" : [ "maximum", "minimum" ], - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format." - }, - "minimum" : { - "type" : "number", - "format" : "double", - "example" : 10.5, - "description" : "Minimum number of estimated sales expectations on the bol.com platform." - }, - "maximum" : { - "type" : "number", - "format" : "double", - "example" : 20.5, - "description" : "Maximum number of estimated sales expectations on the bol.com platform." - } - } - }, - "CreateAddress" : { - "type" : "object", - "required" : [ "attentionOf", "city", "houseNumber", "streetName", "zipCode" ], - "properties" : { - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name of the pickup address.", - "minLength" : 1, - "maxLength" : 64 - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number of the pickup address." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The zip code in '1234AB' format for NL and '0000' for BE addresses.", - "minLength" : 1, - "maxLength" : 8 - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension of the house number.", - "minLength" : 0, - "maxLength" : 6 - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The city of the pickup address.", - "minLength" : 1, - "maxLength" : 34 - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The ISO 3166-2 country code.", - "minLength" : 1, - "maxLength" : 3 - }, - "attentionOf" : { - "type" : "string", - "example" : "Billie Bol", - "description" : "Name of the person responsible for this replenishment.", - "minLength" : 1, - "maxLength" : 35 - } - } - }, - "CreateDeliveryInfo" : { - "type" : "object", - "required" : [ "expectedDeliveryDate", "transporterCode" ], - "properties" : { - "expectedDeliveryDate" : { - "type" : "string", - "example" : "2021-01-01", - "description" : "The expected delivery date of the shipment at the bol.com warehouse. In ISO 8601 format." - }, - "transporterCode" : { - "type" : "string", - "example" : "POSTNL", - "description" : "The transporter code that correlates to the transport used for this replenishment.", - "enum" : [ "POSTNL", "DHL", "DPD", "GLS", "UPS", "OTHER" ] - } - } - }, - "CreateOfferExportRequest" : { - "type" : "object", - "required" : [ "format" ], - "properties" : { - "format" : { - "type" : "string", - "example" : "CSV", - "description" : "The file format in which to return the export.", - "enum" : [ "CSV" ] - } - } - }, - "CreateOfferRequest" : { - "type" : "object", - "required" : [ "condition", "ean", "fulfilment", "pricing", "stock" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product. Note: in case an ISBN is provided, the ISBN will be replaced with the actual EAN belonging to this ISBN." - }, - "condition" : { - "$ref" : "#/definitions/Condition" - }, - "reference" : { - "type" : "string", - "example" : "REF12345", - "description" : "A user-defined reference that helps you identify this particular offer when receiving data from us. This element can optionally be left empty and has a maximum amount of 20 characters.", - "minLength" : 0, - "maxLength" : 20 - }, - "onHoldByRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether or not you want to put this offer for sale on the bol.com website. Defaults to false." - }, - "unknownProductTitle" : { - "type" : "string", - "example" : "Unknown Product Title", - "description" : "In case the item is not known to bol.com you can use this field to identify this particular product. Note: in case the product is known to bol.com, the unknown product title will not be stored.", - "minLength" : 0, - "maxLength" : 500 - }, - "pricing" : { - "$ref" : "#/definitions/Pricing" - }, - "stock" : { - "$ref" : "#/definitions/StockCreate" - }, - "fulfilment" : { - "$ref" : "#/definitions/Fulfilment" - } - } - }, - "CreatePickupAppointment" : { - "type" : "object", - "required" : [ "address", "pickupTimeSlot" ], - "properties" : { - "address" : { - "$ref" : "#/definitions/CreateAddress" - }, - "pickupTimeSlot" : { - "$ref" : "#/definitions/CreatePickupTimeSlot" - }, - "commentToTransporter" : { - "type" : "string", - "example" : "Eerste verdieping.", - "description" : "A comment to the transporter regarding the pickup appointment.", - "minLength" : 0, - "maxLength" : 30 - } - } - }, - "CreatePickupTimeSlot" : { - "type" : "object", - "required" : [ "fromDateTime", "untilDateTime" ], - "properties" : { - "fromDateTime" : { - "type" : "string", - "example" : "2021-01-01T09:00:00+01:00", - "description" : "The selected start date and time for the replenishment pickup appointment. In ISO 8601 format." - }, - "untilDateTime" : { - "type" : "string", - "example" : "2021-01-01T10:00:00+01:00", - "description" : "The selected end date and time for the replenishment pickup appointment. In ISO 8601 format." - } - } - }, - "CreateProductContentSingleRequest" : { - "type" : "object", - "required" : [ "attributes", "language" ], - "properties" : { - "language" : { - "type" : "string", - "example" : "nl", - "description" : "The language in which content is submitted.", - "enum" : [ "nl", "nl-BE", "fr", "fr-BE" ] - }, - "attributes" : { - "type" : "array", - "description" : "A list of attributes.", - "items" : { - "$ref" : "#/definitions/Attribute" - }, - "maxItems" : 150, - "minItems" : 1 - }, - "assets" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Asset" - }, - "maxItems" : 30, - "minItems" : 0 - } - } - }, - "CreateReplenishmentLine" : { - "type" : "object", - "required" : [ "ean", "quantity" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The number of announced items.", - "minimum" : 1, - "maximum" : 9999 - } - } - }, - "CreateReplenishmentRequest" : { - "type" : "object", - "required" : [ "labelingByBol", "lines", "numberOfLoadCarriers", "reference" ], - "properties" : { - "reference" : { - "type" : "string", - "example" : "REFERENCE1", - "description" : "Custom user reference for this replenishment. Must contain at least 1 digit and only upper case characters allowed." - }, - "deliveryInfo" : { - "$ref" : "#/definitions/CreateDeliveryInfo" - }, - "labelingByBol" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether the replenishment will be labeled by bol.com." - }, - "numberOfLoadCarriers" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "The number of parcels in this replenishment. Note: if you are using the bol.com pickup service, the maximum number is 20.", - "minimum" : 1, - "maximum" : 66 - }, - "pickupAppointment" : { - "$ref" : "#/definitions/CreatePickupAppointment" - }, - "lines" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/CreateReplenishmentLine" - }, - "maxItems" : 9999, - "minItems" : 1 - } - } - }, - "CreateReturnRequest" : { - "type" : "object", - "required" : [ "handlingResult", "orderItemId", "quantityReturned" ], - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "2012345678", - "description" : "The id for the order item. One order can have multiple order items, but the list can only take one item." - }, - "quantityReturned" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The quantity of items returned.", - "minimum" : 1, - "maximum" : 9999 - }, - "handlingResult" : { - "type" : "string", - "example" : "RETURN_RECEIVED", - "description" : "The handling result requested by the retailer.", - "enum" : [ "RETURN_RECEIVED", "EXCHANGE_PRODUCT", "RETURN_DOES_NOT_MEET_CONDITIONS", "REPAIR_PRODUCT", "CUSTOMER_KEEPS_PRODUCT_PAID" ] - } - } - }, - "CreateSubscriptionRequest" : { - "type" : "object", - "required" : [ "resources", "url" ], - "properties" : { - "resources" : { - "type" : "array", - "example" : "['PROCESS_STATUS']", - "description" : "Type of event.", - "items" : { - "type" : "string", - "enum" : [ "PROCESS_STATUS", "SHIPMENT", "OFFER" ] - } - }, - "url" : { - "type" : "string", - "example" : "https://www.bol.com/webhook", - "description" : "URL to receive this WebHook notification.", - "minLength" : 0, - "maxLength" : 255, - "pattern" : "^https.*" - } - } - }, - "CreateUnpublishedOfferReportRequest" : { - "type" : "object", - "required" : [ "format" ], - "properties" : { - "format" : { - "type" : "string", - "example" : "CSV", - "description" : "The file format in which to return the export.", - "enum" : [ "CSV" ] - } - } - }, - "CustomerDetails" : { - "type" : "object", - "required" : [ "salutation" ], - "properties" : { - "salutation" : { - "type" : "string", - "example" : "MALE", - "description" : "The salutation of the customer.", - "enum" : [ "MALE", "FEMALE", "UNKNOWN" ] - }, - "firstName" : { - "type" : "string", - "example" : "Billie", - "description" : "The first name of the customer." - }, - "surname" : { - "type" : "string", - "example" : "Jansen", - "description" : "The surname of the customer." - }, - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name." - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension on the house number." - }, - "extraAddressInformation" : { - "type" : "string", - "example" : "Apartment", - "description" : "Additional information related to the address that helps in delivering the package." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders." - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The name of the city." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country code." - }, - "email" : { - "type" : "string", - "example" : "billie@verkopen.bol.com", - "description" : "A scrambled email address that can be used to contact the customer." - }, - "deliveryPhoneNumber" : { - "type" : "string", - "example" : "012123456", - "description" : "The delivery phone number of the customer. Filled in case the order requires an appointment for delivering the goods." - }, - "company" : { - "type" : "string", - "example" : "bol.com", - "description" : "The company name." - }, - "vatNumber" : { - "type" : "string", - "example" : "NL999999999B99", - "description" : "The Value Added Tax (VAT) / BTW number for business sellers situated in the Netherlands." - } - }, - "description" : "Information related to the customer." - }, - "DeliveryDatesResponse" : { - "type" : "object", - "properties" : { - "deliveryDates" : { - "type" : "array", - "example" : "2021-01-02", - "description" : "Allowed delivery dates for shipments to the bol.com warehouse in ISO 8601 format.", - "items" : { - "type" : "string" - } - } - } - }, - "DeliveryInformation" : { - "type" : "object", - "required" : [ "destinationWarehouse", "expectedDeliveryDate", "transporterCode" ], - "properties" : { - "expectedDeliveryDate" : { - "type" : "string", - "format" : "date", - "example" : "2021-01-02", - "description" : "The expected delivery date of the shipment at the bol.com warehouse in ISO 8601 format." - }, - "transporterCode" : { - "type" : "string", - "example" : "POSTNL", - "description" : "The transporter that will pickup this replenishment.", - "enum" : [ "POSTNL", "DHL", "DPD", "GLS", "UPS", "OTHER" ] - }, - "destinationWarehouse" : { - "$ref" : "#/definitions/DestinationWarehouse" - } - } - }, - "DeliveryOption" : { - "type" : "object", - "required" : [ "labelDisplayName", "labelPrice", "labelType", "packageRestrictions", "recommended", "shippingLabelOfferId", "transporterCode" ], - "properties" : { - "shippingLabelOfferId" : { - "type" : "string", - "example" : "027b79fa-5743-40f0-94c7-0eac761af611", - "description" : "Unique identifier for the shipping label offer." - }, - "recommended" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates whether this delivery option is recommended to be the best option to ship your order item(s) with." - }, - "validUntilDate" : { - "type" : "string", - "format" : "date", - "example" : "2020-01-12", - "description" : "The date until the delivery option (incl total price) is valid." - }, - "transporterCode" : { - "type" : "string", - "example" : "TNT", - "description" : "A code representing the transporter which is being used for transportation." - }, - "labelType" : { - "type" : "string", - "example" : "PARCEL", - "description" : "The type of the label, representing the way an item is being transported. MAILBOX is a mailbox package with delivery scan. MAILBOX_LIGHT is a mailbox package without delivery scan. PARCEL is a normal package.", - "enum" : [ "PARCEL", "MAILBOX", "MAILBOX_LIGHT" ] - }, - "labelDisplayName" : { - "type" : "string", - "example" : "PostNL & bol.com - Pakket", - "description" : "The display name of the shipping label." - }, - "labelPrice" : { - "$ref" : "#/definitions/LabelPrice" - }, - "packageRestrictions" : { - "$ref" : "#/definitions/PackageRestrictions" - }, - "handoverDetails" : { - "$ref" : "#/definitions/HandoverDetails" - } - }, - "description" : "A delivery option shows how and the costs of a transport for a shippable configuration" - }, - "DeliveryOptionsRequest" : { - "type" : "object", - "required" : [ "orderItems" ], - "properties" : { - "orderItems" : { - "type" : "array", - "description" : "Order items for which the delivery options are requested.", - "items" : { - "$ref" : "#/definitions/DeliveryOptionsRequestOrderItem" - } - } - }, - "description" : "The configuration of order items to get delivery options for." - }, - "DeliveryOptionsRequestOrderItem" : { - "type" : "object", - "required" : [ "orderItemId" ], - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "2012345678", - "description" : "The id for the order item (1 order can have multiple order items)." - } - } - }, - "DeliveryOptionsResponse" : { - "type" : "object", - "required" : [ "deliveryOptions" ], - "properties" : { - "deliveryOptions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/DeliveryOption" - } - } - }, - "description" : "The possible delivery options based on a shippable configuration" - }, - "DestinationWarehouse" : { - "type" : "object", - "required" : [ "city", "countryCode", "houseNumber", "houseNumberExtension", "streetName", "zipCode" ], - "properties" : { - "streetName" : { - "type" : "string", - "example" : "Industrieweg", - "description" : "The street name of the pickup address." - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number of the pickup address." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension of the house number." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The zip code in '1234AB' format for NL and '0000' for BE addresses." - }, - "city" : { - "type" : "string", - "example" : "Waalwijk", - "description" : "The city of the pickup address." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The ISO 3166-2 country code." - }, - "attentionOf" : { - "type" : "string", - "example" : "t.a.v. bol.com", - "description" : "Name of the person responsible for this replenishment." - } - } - }, - "Details" : { - "type" : "object", - "required" : [ "norm", "period" ], - "properties" : { - "period" : { - "description" : "The period for which the performance is measured.", - "$ref" : "#/definitions/PerformanceIndicatorPeriod" - }, - "score" : { - "description" : "The score for this measurement. In case there are no scores for an indicator, this element is omitted from the response.", - "$ref" : "#/definitions/Score" - }, - "norm" : { - "description" : "Service norm for this indicator.", - "$ref" : "#/definitions/Norm" - } - } - }, - "Ean" : { - "type" : "object", - "required" : [ "ean" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "The EAN number associated with this product.", - "description" : "The EAN number associated with this product." - } - } - }, - "Enrichment" : { - "type" : "object", - "required" : [ "status" ], - "properties" : { - "status" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The current enrichment level of the product." - } - } - }, - "FilterRanges" : { - "type" : "object", - "required" : [ "max", "min", "rangeId", "rangeName", "unit" ], - "properties" : { - "rangeId" : { - "type" : "string", - "example" : "PRICE", - "description" : "The id of the range filter product can be found under." - }, - "rangeName" : { - "type" : "string", - "example" : "Prijs", - "description" : "The name of the range filter product can be found under." - }, - "min" : { - "type" : "number", - "example" : 0.99, - "description" : "The minimum value for the range that can be used to filter results." - }, - "max" : { - "type" : "number", - "example" : 4599.0, - "description" : "The maximum value for the range that can be used to filter results." - }, - "unit" : { - "type" : "string", - "example" : "EUR", - "description" : "The unit that applies to the min and max range values." - } - } - }, - "FilterValues" : { - "type" : "object", - "required" : [ "filterValueId" ], - "properties" : { - "filterValueId" : { - "type" : "string", - "example" : "4279587082", - "description" : "The unique identifier of the filter value." - }, - "filterValueName" : { - "type" : "string", - "example" : "LEGO Star Wars", - "description" : "The name of the filter value." - } - } - }, - "Filters" : { - "type" : "object", - "required" : [ "filterName", "filterValues" ], - "properties" : { - "filterName" : { - "type" : "string", - "example" : "Serie", - "description" : "The name of the filter." - }, - "filterValues" : { - "type" : "array", - "description" : "The list of filter values in this filter.", - "items" : { - "$ref" : "#/definitions/FilterValues" - } - } - } - }, - "Fulfilment" : { - "type" : "object", - "required" : [ "method" ], - "properties" : { - "method" : { - "type" : "string", - "example" : "FBR", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", - "enum" : [ "FBR", "FBB" ] - }, - "deliveryCode" : { - "type" : "string", - "description" : "The delivery promise that applies to this offer. This value will only be used in combination with fulfilmentMethod 'FBR'.", - "enum" : [ "24uurs-23", "24uurs-22", "24uurs-21", "24uurs-20", "24uurs-19", "24uurs-18", "24uurs-17", "24uurs-16", "24uurs-15", "24uurs-14", "24uurs-13", "24uurs-12", "1-2d", "2-3d", "3-5d", "4-8d", "1-8d", "MijnLeverbelofte", "VVB" ] - } - } - }, - "Gpc" : { - "type" : "object", - "required" : [ "chunkId" ], - "properties" : { - "chunkId" : { - "type" : "string", - "example" : "30005965", - "description" : "The identifier of the current GPC/Product Classification." - } - } - }, - "HandoverDetails" : { - "type" : "object", - "properties" : { - "meetsCustomerExpectation" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates if you can use this label without receiving a strike if you handover before the latestHandoverDateTime. If this field is 'false' you can still buy and use this label but it will have negative consequences on your performance score because the order will be delivered too early or too late." - }, - "earliestHandoverDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-19T00:00:00+02:00", - "description" : "The date and time at which the parcel can be earliest at the transporter to make sure your parcel is delivered on time." - }, - "latestHandoverDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-19T19:00:00+02:00", - "description" : "The date and time at which the parcel must ultimately be at the transporter to make sure your parcel is delivered on time. If you handover after this date you will receive a strike because you order will be delivered too late." - }, - "collectionMethod" : { - "type" : "string", - "example" : "DROP_OFF", - "description" : "The type of collection for this parcel.", - "enum" : [ "DROP_OFF", "PICK_UP" ] - } - } - }, - "InvalidReplenishmentLine" : { - "type" : "object", - "required" : [ "quantityAnnounced", "quantityInProgress", "quantityReceived", "quantityWithGradedState", "quantityWithRegularState", "type" ], - "properties" : { - "type" : { - "type" : "string", - "example" : "UNKNOWN_FBB_PRODUCT", - "description" : "Type of invalid replenishment line, in case the BSKU and/or EAN cannot be determined for this replenishment line.", - "enum" : [ "UNKNOWN_FBB_PRODUCT", "UNKNOWN_EAN_INVENTORY_RELATION" ] - }, - "quantityAnnounced" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The amount of announced quantity for this replenishment line." - }, - "quantityReceived" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The amount of received quantity for this replenishment line." - }, - "quantityInProgress" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The amount of quantity that is still in progress at the warehouse for this replenishment line." - }, - "quantityWithGradedState" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The quantity within this shipment line that has a graded (unsalable) state." - }, - "quantityWithRegularState" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The quantity within this shipment line that has a regular (salable) state." - } - } - }, - "Inventory" : { - "type" : "object", - "required" : [ "bsku", "ean", "gradedStock", "regularStock", "title" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "bsku" : { - "type" : "string", - "example" : "2950002126612", - "description" : "The BSKU number associated with this product." - }, - "gradedStock" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "The stock that is not available for sale anymore." - }, - "regularStock" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "The stock that is available for sale." - }, - "title" : { - "type" : "string", - "example" : "Product Title", - "description" : "The product title." - } - } - }, - "InventoryResponse" : { - "type" : "object", - "required" : [ "inventory" ], - "properties" : { - "inventory" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Inventory" - } - } - } - }, - "KeySet" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "example" : "0", - "description" : "Key identifier. Maps to the keyId value in the signature header of the push request." - }, - "type" : { - "type" : "string", - "example" : "RSA", - "description" : "Key encryption type.", - "enum" : [ "RSA" ] - }, - "publicKey" : { - "type" : "string", - "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==", - "description" : "The Base64 encoded public key to use when verifying the signature." - } - } - }, - "KeySetResponse" : { - "type" : "object", - "required" : [ "signatureKeys" ], - "properties" : { - "signatureKeys" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/KeySet" - } - } - } - }, - "LabelPrice" : { - "type" : "object", - "required" : [ "totalPrice" ], - "properties" : { - "totalPrice" : { - "type" : "number", - "example" : 2.88, - "description" : "The price that is charged for this delivery option, excluding VAT." - } - } - }, - "Link" : { - "type" : "object", - "required" : [ "href", "method", "rel" ], - "properties" : { - "rel" : { - "type" : "string", - "example" : "self", - "description" : "The link relation." - }, - "href" : { - "type" : "string", - "example" : "https://api.bol.com/shared/process-status/1234567", - "description" : "The URI for the resource linked to." - }, - "method" : { - "type" : "string", - "example" : "GET", - "description" : "The HTTP method to use when accessing the link." - } - } - }, - "LoadCarrier" : { - "type" : "object", - "required" : [ "transportState", "transportStateUpdateDateTime" ], - "properties" : { - "sscc" : { - "type" : "string", - "example" : "020001200000007000", - "description" : "The Serial Shipping Container Code (SSCC) for this load carrier." - }, - "transportLabelTrackAndTrace" : { - "type" : "string", - "example" : "3SJTXX216692157", - "description" : "The track and trace code for this load carrier." - }, - "transportState" : { - "type" : "string", - "example" : "ANNOUNCED", - "description" : "The current state of the transport for this load carrier.", - "enum" : [ "ANNOUNCED", "PICKED_UP", "UNDERWAY", "DELAYED", "ARRIVED", "ERROR" ] - }, - "transportStateUpdateDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-02T09:00:00+01:00", - "description" : "The date and time in ISO 8601 format when the latest update for this transport was received." - } - } - }, - "Norm" : { - "type" : "object", - "required" : [ "condition", "value" ], - "properties" : { - "condition" : { - "type" : "string", - "example" : "<=", - "description" : "Condition norm for this indicator.", - "enum" : [ "<=", ">=" ] - }, - "value" : { - "type" : "number", - "format" : "float", - "example" : 0.6, - "description" : "Service norm for this indicator." - } - } - }, - "NotPublishableReason" : { - "type" : "object", - "required" : [ "code", "description" ], - "properties" : { - "code" : { - "type" : "string", - "example" : "4003", - "description" : "Error code signalling that the offer is invalid." - }, - "description" : { - "type" : "string", - "example" : "The seller is on holiday.", - "description" : "Error message describing the reason the offer is invalid." - } - } - }, - "Offer" : { - "type" : "object", - "required" : [ "bestOffer", "countryCode", "fulfilmentMethod", "maxDeliveryDate", "offerId", "price", "retailerId" ], - "properties" : { - "offerId" : { - "type" : "string", - "example" : "228b6d06-2067-4cef-8447-c21d0c233e61", - "description" : "Unique identifier for an offer." - }, - "retailerId" : { - "type" : "string", - "example" : "0", - "description" : "The ID of the retailer which the offer belongs to." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country code." - }, - "bestOffer" : { - "type" : "boolean", - "example" : true, - "description" : "Indicator if the offer is the best offer within the country for the requested EAN." - }, - "price" : { - "type" : "number", - "example" : 41.5, - "description" : "The selling price to the customer of a single unit including VAT unless there is a discount. The price should always have two decimals precision." - }, - "fulfilmentMethod" : { - "type" : "string", - "example" : "FBB", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB)." - }, - "condition" : { - "type" : "string", - "example" : "NEW", - "description" : "The condition of the offered product." - }, - "ultimateOrderTime" : { - "type" : "string", - "example" : "23:59", - "description" : "The time in ISO 8601 format when the ultimate order time on the day in order to comply to the maxDeliveryDate as a promise." - }, - "minDeliveryDate" : { - "type" : "string", - "format" : "date", - "example" : "2022-10-20", - "description" : "The date at which package can be delivered to customer earliest." - }, - "maxDeliveryDate" : { - "type" : "string", - "format" : "date", - "example" : "2022-10-21", - "description" : "The date at which package can be delivered to customer latest." - } - } - }, - "OfferInsight" : { - "type" : "object", - "required" : [ "countries", "name", "periods", "type" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "BUY_BOX_PERCENTAGE", - "description" : "The name of the requested offer insight." - }, - "type" : { - "type" : "string", - "example" : "percentage", - "description" : "Interpretation of the data that applies to this measurement." - }, - "total" : { - "type" : "number", - "format" : "double", - "example" : 50.0, - "description" : "Total number of customer visits on the product page when the offer had the buy box over the requested period (excluding the current day)." - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/OfferInsightsCountry" - } - }, - "periods" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Periods" - } - } - } - }, - "OfferInsights" : { - "type" : "object", - "required" : [ "offerInsights" ], - "properties" : { - "offerInsights" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/OfferInsight" - } - } - }, - "description" : "Offer insights." - }, - "OfferInsightsCountry" : { - "type" : "object", - "required" : [ "countryCode", "value" ], - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format." - }, - "value" : { - "type" : "number", - "format" : "double", - "example" : 100.0, - "description" : "The total value of offer insight." - } - } - }, - "OfferInsightsPeriod" : { - "type" : "object", - "required" : [ "year" ], - "properties" : { - "day" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "Day of the month." - }, - "week" : { - "type" : "integer", - "format" : "int32", - "example" : 49, - "description" : "Week of the year." - }, - "month" : { - "type" : "integer", - "format" : "int32", - "example" : 12, - "description" : "Month of the year." - }, - "year" : { - "type" : "integer", - "format" : "int32", - "example" : 2019, - "description" : "Year." - } - } - }, - "OffersCountryCode" : { - "type" : "object", - "required" : [ "countryCode" ], - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "Countries in which this offer is currently on sale in the webshop, in ISO-3166-1 format." - } - } - }, - "Order" : { - "type" : "object", - "required" : [ "orderItems", "shipmentDetails" ], - "properties" : { - "orderId" : { - "type" : "string", - "example" : "A2K8290LP8", - "description" : "The identifier of the order." - }, - "pickupPoint" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates whether this order is shipped to a Pick Up Point." - }, - "orderPlacedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2017-02-09T12:39:48+01:00", - "description" : "The date and time in ISO 8601 format when the order was placed." - }, - "shipmentDetails" : { - "$ref" : "#/definitions/ShipmentDetails" - }, - "billingDetails" : { - "$ref" : "#/definitions/BillingDetails" - }, - "orderItems" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/OrderOrderItem" - } - } - }, - "description" : "An order." - }, - "OrderFulfilment" : { - "type" : "object", - "properties" : { - "method" : { - "type" : "string", - "example" : "FBR", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB)." - }, - "distributionParty" : { - "type" : "string", - "example" : "RETAILER", - "description" : "The party that manages the distribution, either bol.com or the retailer itself.", - "enum" : [ "RETAILER", "BOL" ] - }, - "latestDeliveryDate" : { - "type" : "string", - "format" : "date", - "example" : "2017-02-10", - "description" : "The ultimate delivery date at which this order must be delivered at the customer's shipping address. This field is empty in case the exactDeliveryDate is filled." - }, - "exactDeliveryDate" : { - "type" : "string", - "format" : "date", - "example" : "2017-02-13", - "description" : "The exact delivery date at which this order must be delivered at the customer's shipping address. This field is only filled when the customer chose an exact date for delivery. This field is empty in case the latestDeliveryDate is filled." - }, - "expiryDate" : { - "type" : "string", - "format" : "date", - "example" : "2017-02-13", - "description" : "The date this order item will automatically expire and thereby cancelling this order item from the order." - }, - "timeFrameType" : { - "type" : "string", - "example" : "REGULAR", - "description" : "Delivery option selected by the customer.", - "enum" : [ "REGULAR", "EVENING", "APPOINTMENT", "SAMEDAY", "SUNDAY" ] - } - } - }, - "OrderItem" : { - "type" : "object", - "required" : [ "orderItemId" ], - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "2012345678", - "description" : "The order item being confirmed.", - "minLength" : 1, - "maxLength" : 20 - } - } - }, - "OrderItemCancellation" : { - "type" : "object", - "required" : [ "orderItemId", "reasonCode" ], - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "2012345678", - "description" : "The id for the order item. One order can have multiple order items, but the list can only take one item." - }, - "reasonCode" : { - "type" : "string", - "example" : "BAD_CONDITION", - "description" : "The code representing the reason for cancellation of this item.", - "enum" : [ "OUT_OF_STOCK", "REQUESTED_BY_CUSTOMER", "BAD_CONDITION", "HIGHER_SHIPCOST", "INCORRECT_PRICE", "NOT_AVAIL_IN_TIME", "NO_BOL_GUARANTEE", "ORDERED_TWICE", "RETAIN_ITEM", "TECH_ISSUE", "UNFINDABLE_ITEM", "OTHER" ] - } - } - }, - "OrderOffer" : { - "type" : "object", - "properties" : { - "offerId" : { - "type" : "string", - "example" : "6ff736b5-cdd0-4150-8c67-78269ee986f5", - "description" : "Unique identifier for an offer." - }, - "reference" : { - "type" : "string", - "example" : "BOLCOM00123", - "description" : "A user-defined reference tied to the offer upon creating the offer." - } - } - }, - "OrderOrderItem" : { - "type" : "object", - "required" : [ "latestChangedDateTime" ], - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "2012345678", - "description" : "The id for the order item. One order can have multiple order items, but the list can only take one item." - }, - "cancellationRequest" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether the order was cancelled on request of the customer before the retailer has shipped it." - }, - "fulfilment" : { - "$ref" : "#/definitions/OrderFulfilment" - }, - "offer" : { - "$ref" : "#/definitions/OrderOffer" - }, - "product" : { - "$ref" : "#/definitions/OrderProduct" - }, - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "Amount of ordered products for this order item id." - }, - "quantityShipped" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "Amount of shipped products for this order item id." - }, - "quantityCancelled" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "Amount of cancelled products for this order item id." - }, - "unitPrice" : { - "type" : "number", - "example" : 12.99, - "description" : "The selling price to the customer of a single unit including VAT." - }, - "commission" : { - "type" : "number", - "example" : 5.18, - "description" : "The commission for all quantities of this order item." - }, - "additionalServices" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/AdditionalService" - } - }, - "latestChangedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2017-02-09T13:39:48+01:00", - "description" : "The date and time in ISO 8601 format when the orderItem was last changed." - } - }, - "description" : "Order item details from an order." - }, - "OrderProduct" : { - "type" : "object", - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "title" : { - "type" : "string", - "example" : "Product Title", - "description" : "Title of the product as shown on the webshop." - } - } - }, - "PackageRestrictions" : { - "type" : "object", - "required" : [ "maxDimensions", "maxWeight" ], - "properties" : { - "maxWeight" : { - "type" : "string", - "example" : "10 kg", - "description" : "The weight of a package." - }, - "maxDimensions" : { - "type" : "string", - "example" : "10 x 10 x 10 cm", - "description" : "The dimensions of a package." - } - } - }, - "Party" : { - "type" : "object", - "required" : [ "name", "role", "type" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "Maybelline", - "description" : "The name of the party involved for this product." - }, - "type" : { - "type" : "string", - "example" : "Brand", - "description" : "The type of party involved for this product." - }, - "role" : { - "type" : "string", - "example" : "BRAND", - "description" : "The role of the party involved for this product." - } - } - }, - "PerformanceIndicator" : { - "type" : "object", - "required" : [ "details", "name", "type" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "CANCELLATIONS", - "description" : "Indicator name.", - "enum" : [ "CANCELLATIONS", "FULFILMENT", "PHONE_AVAILABILITY", "RESPONSE_TIME", "CASE_ITEM_RATIO", "TRACK_AND_TRACE", "RETURNS", "REVIEWS" ] - }, - "type" : { - "type" : "string", - "example" : "PERCENTAGE", - "description" : "Interpretation of the data that applies to this measurement.", - "enum" : [ "PERCENTAGE", "AVERAGE" ] - }, - "details" : { - "description" : "Details of the indicator.", - "$ref" : "#/definitions/Details" - } - } - }, - "PerformanceIndicatorPeriod" : { - "type" : "object", - "required" : [ "week", "year" ], - "properties" : { - "week" : { - "type" : "string", - "example" : "05", - "description" : "Week number in the ISO-8601 standard." - }, - "year" : { - "type" : "string", - "example" : "2019", - "description" : "Year number in the ISO-8601 standard." - } - } - }, - "PerformanceIndicators" : { - "type" : "object", - "required" : [ "performanceIndicators" ], - "properties" : { - "performanceIndicators" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/PerformanceIndicator" - } - } - } - }, - "Periods" : { - "type" : "object", - "required" : [ "period" ], - "properties" : { - "period" : { - "$ref" : "#/definitions/OfferInsightsPeriod" - }, - "total" : { - "type" : "number", - "format" : "double", - "example" : 50.0, - "description" : "Total number of customer visits on the product page when the offer had the buy box over the requested period (excluding the current day)." - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/OfferInsightsCountry" - } - } - } - }, - "PickupAppointment" : { - "type" : "object", - "required" : [ "address", "pickupTimeSlot" ], - "properties" : { - "commentToTransporter" : { - "type" : "string", - "example" : "Eerste verdieping.", - "description" : "A comment to the transporter regarding the pickup appointment." - }, - "address" : { - "$ref" : "#/definitions/Address" - }, - "pickupTimeSlot" : { - "$ref" : "#/definitions/ReplenishmentPickupTimeSlot" - }, - "pickupDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-01T09:00:00+01:00", - "description" : "The date and time in ISO 8601 format when this replenishment was picked up by the transporter." - }, - "cancellationReason" : { - "type" : "string", - "example" : "NOT_AT_HOME", - "description" : "In case of a pickup cancellation this field indicates the reason for cancelling this pickup.", - "enum" : [ "UNKNOWN_ADDRESS", "NOT_READY", "NO_LABEL", "WRONG_PACKAGE", "NOT_AT_HOME", "OTHER_REASON", "REQUEST_FROM_RETAILER" ] - } - } - }, - "PickupTimeSlot" : { - "type" : "object", - "required" : [ "fromDateTime", "untilDateTime" ], - "properties" : { - "fromDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-01T09:00:00+01:00", - "description" : "The available start date and time for the pickup appointment. In ISO 8601 format." - }, - "untilDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-01T10:00:00+01:00", - "description" : "The available end date and time for the pickup appointment. In ISO 8601 format." - } - } - }, - "PickupTimeSlotsAddress" : { - "type" : "object", - "required" : [ "city", "countryCode", "houseNumber", "streetName", "zipCode" ], - "properties" : { - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name of the pickup address.", - "minLength" : 1, - "maxLength" : 64 - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number of the pickup address." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension of the house number.", - "minLength" : 0, - "maxLength" : 6 - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The zip code in '1234AB' format for NL and '0000' for BE addresses.", - "minLength" : 1, - "maxLength" : 8 - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The city of the pickup address.", - "minLength" : 1, - "maxLength" : 34 - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The ISO 3166-2 country code.", - "minLength" : 1, - "maxLength" : 3 - } - } - }, - "PickupTimeSlotsRequest" : { - "type" : "object", - "required" : [ "address", "numberOfLoadCarriers" ], - "properties" : { - "address" : { - "$ref" : "#/definitions/PickupTimeSlotsAddress" - }, - "numberOfLoadCarriers" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The number of load carriers in this shipment.", - "minimum" : 1, - "maximum" : 50 - } - } - }, - "PickupTimeSlotsResponse" : { - "type" : "object", - "properties" : { - "timeSlots" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/PickupTimeSlot" - } - } - } - }, - "Pricing" : { - "type" : "object", - "required" : [ "bundlePrices" ], - "properties" : { - "bundlePrices" : { - "type" : "array", - "description" : "A set of prices (containing a quantity and selling price) that apply to this offer.", - "items" : { - "$ref" : "#/definitions/BundlePrice" - }, - "maxItems" : 4, - "minItems" : 1 - } - } - }, - "Problem" : { - "type" : "object", - "required" : [ "violations" ], - "properties" : { - "type" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com/problems", - "description" : "Type URI for this problem. Fixed value: https://api.bol.com/problems." - }, - "title" : { - "type" : "string", - "example" : "Error validating request. Consult the bol.com API documentation for more information.", - "description" : "Title describing the nature of the problem." - }, - "status" : { - "type" : "integer", - "format" : "int32", - "example" : "40X", - "description" : "HTTP status returned from the endpoint causing the problem." - }, - "detail" : { - "type" : "string", - "example" : "Bad request", - "description" : "Detailed error message describing in additional detail what caused the service to return this problem." - }, - "host" : { - "type" : "string", - "example" : "Instance-001", - "description" : "Host identifier describing the server instance that reported the problem." - }, - "instance" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com//retailer/resource", - "description" : "Full URI path of the resource that reported the problem." - }, - "violations" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Violation" - } - } - }, - "description" : "Describes a problem that occurred interacting with the API." - }, - "ProcessStatus" : { - "type" : "object", - "required" : [ "createTimestamp", "description", "eventType", "links", "status" ], - "properties" : { - "processStatusId" : { - "type" : "string", - "example" : "1234567", - "description" : "The process status id." - }, - "entityId" : { - "type" : "string", - "example" : "987654321", - "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." - }, - "eventType" : { - "type" : "string", - "example" : "CONFIRM_SHIPMENT", - "description" : "Name of the requested action that is being processed." - }, - "description" : { - "type" : "string", - "example" : "Example process status description for processing 987654321.", - "description" : "Describes the action that is being processed." - }, - "status" : { - "type" : "string", - "example" : "SUCCESS", - "description" : "Status of the action being processed.", - "enum" : [ "PENDING", "SUCCESS", "FAILURE", "TIMEOUT" ] - }, - "errorMessage" : { - "type" : "string", - "example" : "Example process status error message.", - "description" : "Shows error message if applicable." - }, - "createTimestamp" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-11-14T09:34:41+01:00", - "description" : "Time of creation of the response." - }, - "links" : { - "type" : "array", - "description" : "Lists available actions applicable to this endpoint.", - "items" : { - "$ref" : "#/definitions/Link" - } - } - } - }, - "Product" : { - "type" : "object", - "required" : [ "ean" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "relevanceScores" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/RelevanceScore" - } - }, - "maximumPrice" : { - "type" : "number", - "example" : 21.5, - "description" : "The maximum price a product can have in order to be part of the promotion." - } - }, - "description" : "A single product." - }, - "ProductAssets" : { - "type" : "object", - "properties" : { - "usage" : { - "type" : "string", - "example" : "ADDITIONAL", - "description" : "Type of the asset being used for.", - "enum" : [ "PRIMARY", "ADDITIONAL", "IMAGE" ] - }, - "order" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The intended order of the product images." - }, - "variants" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductAssetsVariants" - } - } - } - }, - "ProductAssetsResponse" : { - "type" : "object", - "required" : [ "assets" ], - "properties" : { - "assets" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductAssets" - } - } - } - }, - "ProductAssetsVariants" : { - "type" : "object", - "properties" : { - "size" : { - "type" : "string", - "example" : "small", - "description" : "The name of the size of the asset, if the asset is an image.", - "enum" : [ "small", "medium" ] - }, - "width" : { - "type" : "integer", - "format" : "int32", - "example" : 250, - "description" : "The width of the asset in pixels." - }, - "height" : { - "type" : "integer", - "format" : "int32", - "example" : 200, - "description" : "The height of the asset in pixels." - }, - "mimeType" : { - "type" : "string", - "example" : "image/jpeg", - "description" : "The mime type of the asset.", - "enum" : [ "image/jpeg", "application/pdf", "application/x-mpegurl", "video/mp4" ] - }, - "url" : { - "type" : "string", - "description" : "The URL of the attribute." - } - } - }, - "ProductDestination" : { - "type" : "object", - "required" : [ "destinationWarehouse", "eans" ], - "properties" : { - "destinationWarehouse" : { - "$ref" : "#/definitions/ProductDestinationWarehouse" - }, - "eans" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Ean" - } - } - } - }, - "ProductDestinationAddress" : { - "type" : "object", - "required" : [ "attentionOf", "city", "countryCode", "houseNumber", "streetName", "zipCode" ], - "properties" : { - "streetName" : { - "type" : "string", - "example" : "Industrieweg", - "description" : "The street name of the bol.com warehouse address." - }, - "houseNumber" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The house number of the bol.com warehouse address." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The zipcode of the bol.com warehouse address." - }, - "city" : { - "type" : "string", - "example" : "Waalwijk", - "description" : "The city of the bol.com warehouse address." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The ISO 3166-2 country code of the bol.com warehouse address." - }, - "attentionOf" : { - "type" : "string", - "example" : "t.a.v. bol.com", - "description" : "Name of the person responsible for this replenishment." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The house number extension of the bol.com warehouse address." - } - } - }, - "ProductDestinationWarehouse" : { - "type" : "object", - "required" : [ "address" ], - "properties" : { - "address" : { - "$ref" : "#/definitions/ProductDestinationAddress" - } - } - }, - "ProductDestinationsResponse" : { - "type" : "object", - "required" : [ "productDestinations" ], - "properties" : { - "productDestinations" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductDestination" - } - } - } - }, - "ProductIdsEan" : { - "type" : "object", - "required" : [ "ean" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - } - } - }, - "ProductIdsResponse" : { - "type" : "object", - "required" : [ "bolProductId", "eans" ], - "properties" : { - "bolProductId" : { - "type" : "string", - "example" : "9200000045327288", - "description" : "Identifier of the product. This id is specific to bol.com webshop." - }, - "eans" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductIdsEan" - } - } - } - }, - "ProductLabelsProduct" : { - "type" : "object", - "required" : [ "quantity" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The number of products to generate labels for.", - "minimum" : 1, - "maximum" : 9999 - } - } - }, - "ProductLabelsRequest" : { - "type" : "object", - "required" : [ "labelFormat", "products" ], - "properties" : { - "labelFormat" : { - "type" : "string", - "example" : "AVERY_J8159", - "description" : "The printer format to create labels for.", - "enum" : [ "AVERY_J8159", "AVERY_J8160", "AVERY_3474", "DYMO_99012", "BROTHER_DK11208D", "ZEBRA_Z_PERFORM_1000T" ] - }, - "products" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductLabelsProduct" - }, - "maxItems" : 250, - "minItems" : 1 - } - } - }, - "ProductListFilterRange" : { - "type" : "object", - "required" : [ "max", "min", "rangeId" ], - "properties" : { - "rangeId" : { - "type" : "string", - "example" : "PRICE", - "description" : "The id of the range filter the products can be found within.", - "minLength" : 1, - "maxLength" : 11 - }, - "min" : { - "type" : "number", - "description" : "The minimum value for the range that can be used to filter the products." - }, - "max" : { - "type" : "number", - "description" : "The maximum value for the range that can be used to filter the products." - } - } - }, - "ProductListFilterValue" : { - "type" : "object", - "required" : [ "filterValueId" ], - "properties" : { - "filterValueId" : { - "type" : "string", - "example" : "30639", - "description" : "The unique identifier of the filter value." - } - } - }, - "ProductListFiltersResponse" : { - "type" : "object", - "required" : [ "categoryData", "filterRanges", "filters" ], - "properties" : { - "categoryData" : { - "description" : "The list of categories that are available to further narrow down search results, for the given search term and category.", - "$ref" : "#/definitions/Categories" - }, - "filterRanges" : { - "type" : "array", - "description" : "The list of range filters that is associated with the given search term or category.", - "items" : { - "$ref" : "#/definitions/FilterRanges" - } - }, - "filters" : { - "type" : "array", - "description" : "The list of filters that is associated with the given search term or category.", - "items" : { - "$ref" : "#/definitions/Filters" - } - } - } - }, - "ProductListProduct" : { - "type" : "object", - "required" : [ "eans", "title" ], - "properties" : { - "title" : { - "type" : "string", - "example" : "Product title", - "description" : "The title of the product." - }, - "eans" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductListProductEan" - } - } - } - }, - "ProductListProductEan" : { - "type" : "object", - "required" : [ "ean" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - } - } - }, - "ProductListRequest" : { - "type" : "object", - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country for which the products will be retrieved. Default value: NL", - "enum" : [ "NL", "BE" ] - }, - "searchTerm" : { - "type" : "string", - "example" : "laptop", - "description" : "The search term to get the associated products for.", - "minLength" : 1, - "maxLength" : 50 - }, - "categoryId" : { - "type" : "string", - "example" : "4770", - "description" : "The category to get the associated products for.", - "minLength" : 1, - "maxLength" : 11 - }, - "filterRanges" : { - "type" : "array", - "description" : "The list of range filters to get associated products for.", - "items" : { - "$ref" : "#/definitions/ProductListFilterRange" - }, - "maxItems" : 10, - "minItems" : 0 - }, - "filterValues" : { - "type" : "array", - "description" : "The list of filter values in this filter.", - "items" : { - "$ref" : "#/definitions/ProductListFilterValue" - }, - "maxItems" : 10, - "minItems" : 0 - }, - "sort" : { - "type" : "string", - "description" : "Determines the order of the products.", - "enum" : [ "RELEVANCE", "POPULARITY", "PRICE_ASC", "PRICE_DESC", "RELEASE_DATE", "RATING", "WISHLIST" ] - }, - "page" : { - "type" : "integer", - "format" : "int32", - "description" : "The requested page number with a page size of 50 items.", - "minimum" : 1 - } - } - }, - "ProductListResponse" : { - "type" : "object", - "required" : [ "products", "sort" ], - "properties" : { - "products" : { - "type" : "array", - "description" : "The list of products that is associated with the given search term or category and filters.", - "items" : { - "$ref" : "#/definitions/ProductListProduct" - } - }, - "sort" : { - "type" : "string", - "example" : "RELEVANCE", - "description" : "Determines the order of the products.", - "enum" : [ "RELEVANCE", "POPULARITY", "PRICE_ASC", "PRICE_DESC", "RELEASE_DATE", "RATING", "WISHLIST" ] - } - } - }, - "ProductPlacementResponse" : { - "type" : "object", - "required" : [ "categories", "url" ], - "properties" : { - "url" : { - "type" : "string", - "description" : "The URL of the product on the webshop." - }, - "categories" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Category" - } - } - } - }, - "ProductRatingsRating" : { - "type" : "object", - "properties" : { - "rating" : { - "type" : "integer", - "format" : "int32", - "example" : 4, - "description" : "Scale of the rating provided by the customer." - }, - "count" : { - "type" : "integer", - "format" : "int32", - "example" : 30, - "description" : "The number of ratings for the corresponding scale." - } - } - }, - "ProductRatingsResponse" : { - "type" : "object", - "required" : [ "ratings" ], - "properties" : { - "ratings" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProductRatingsRating" - } - } - } - }, - "Products" : { - "type" : "object", - "required" : [ "products" ], - "properties" : { - "products" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Product" - } - } - }, - "description" : "Container for multiple products." - }, - "Promotion" : { - "type" : "object", - "required" : [ "countries", "endDateTime", "promotionId", "promotionType", "startDateTime", "title" ], - "properties" : { - "promotionId" : { - "type" : "string", - "example" : "1234", - "description" : "The identifier of the promotion." - }, - "title" : { - "type" : "string", - "example" : "Promotion title", - "description" : "The title of the promotion." - }, - "startDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-03-29T00:00:00.000+02:00", - "description" : "The starting date and time of the promotion." - }, - "endDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-05-10T00:00:00.000+02:00", - "description" : "The ending date and time of the promotion." - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/PromotionCountryCode" - } - }, - "promotionType" : { - "type" : "string", - "example" : "AWARENESS", - "description" : "The type of the promotion.", - "enum" : [ "AWARENESS", "PRICE_OFF" ] - }, - "retailerSpecificPromotion" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether the promotion is retailer specific or open to the platform." - }, - "campaign" : { - "$ref" : "#/definitions/Campaign" - } - }, - "description" : "A single promotion." - }, - "PromotionCountryCode" : { - "type" : "object", - "required" : [ "countryCode" ], - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country code of the country in which the promotion is active.", - "enum" : [ "NL", "BE" ] - } - } - }, - "Promotions" : { - "type" : "object", - "properties" : { - "promotions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedPromotion" - } - } - }, - "description" : "Container for multiple promotions." - }, - "ReducedInvalidReplenishmentLine" : { - "type" : "object", - "required" : [ "type" ], - "properties" : { - "type" : { - "type" : "string", - "example" : "UNKNOWN_FBB_PRODUCT", - "description" : "Type of invalid replenishment line, in case the BSKU and/or EAN cannot be determined for this replenishment line.", - "enum" : [ "UNKNOWN_FBB_PRODUCT", "UNKNOWN_EAN_INVENTORY_RELATION" ] - } - } - }, - "ReducedOrder" : { - "type" : "object", - "required" : [ "orderId", "orderItems", "orderPlacedDateTime" ], - "properties" : { - "orderId" : { - "type" : "string", - "example" : "A2K8290LP8", - "description" : "The identifier of the order." - }, - "orderPlacedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2017-02-09T12:39:48+01:00", - "description" : "The date and time in ISO 8601 format when the order was placed." - }, - "orderItems" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedOrderItem" - } - } - }, - "description" : "An order." - }, - "ReducedOrderItem" : { - "type" : "object", - "required" : [ "cancellationRequest", "ean", "fulfilmentMethod", "fulfilmentStatus", "latestChangedDateTime", "orderItemId", "quantity", "quantityCancelled", "quantityShipped" ], - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "2012345678", - "description" : "The id for the order item. One order can have multiple order items, but the list can only take one item." - }, - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "fulfilmentMethod" : { - "type" : "string", - "example" : "FBR", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB)." - }, - "fulfilmentStatus" : { - "type" : "string", - "example" : "OPEN", - "description" : "To filter on order status. You can filter on either all orders independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders." - }, - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "Amount of ordered products for this order item id." - }, - "quantityShipped" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "Amount of shipped products for this order item id." - }, - "quantityCancelled" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "Amount of cancelled products for this order item id." - }, - "cancellationRequest" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether the order was cancelled on request of the customer before the retailer has shipped it." - }, - "latestChangedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2017-02-09T12:39:48+01:00", - "description" : "The date and time in ISO 8601 format when the orderItem was last changed." - } - }, - "description" : "An order item." - }, - "ReducedOrders" : { - "type" : "object", - "required" : [ "orders" ], - "properties" : { - "orders" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedOrder" - } - } - }, - "description" : "Container for many orders." - }, - "ReducedPromotion" : { - "type" : "object", - "required" : [ "countries", "endDateTime", "promotionId", "promotionType", "startDateTime", "title" ], - "properties" : { - "promotionId" : { - "type" : "string", - "example" : "1234", - "description" : "The identifier of the promotion." - }, - "title" : { - "type" : "string", - "example" : "Promotion title", - "description" : "The title of the promotion." - }, - "startDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-03-29T00:00:00.000+02:00", - "description" : "The starting date and time of the promotion." - }, - "endDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-05-10T00:00:00.000+02:00", - "description" : "The ending date and time of the promotion." - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/PromotionCountryCode" - } - }, - "promotionType" : { - "type" : "string", - "example" : "AWARENESS", - "description" : "The type of the promotion.", - "enum" : [ "AWARENESS", "PRICE_OFF" ] - }, - "retailerSpecificPromotion" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether the promotion is retailer specific or open to the platform." - }, - "campaign" : { - "$ref" : "#/definitions/Campaign" - } - }, - "description" : "A single promotion." - }, - "ReducedReplenishment" : { - "type" : "object", - "required" : [ "creationDateTime", "invalidLines", "lines", "reference", "replenishmentId" ], - "properties" : { - "replenishmentId" : { - "type" : "string", - "example" : "2312078154", - "description" : "The unique identifier of the replenishment." - }, - "reference" : { - "type" : "string", - "example" : "REFERENCE1", - "description" : "Custom user defined reference to identify the replenishment." - }, - "creationDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2020-09-09T16:44:03+02:00", - "description" : "The date and time when this replenishment was created. In ISO 8601 format." - }, - "lines" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedReplenishmentLines" - } - }, - "invalidLines" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedInvalidReplenishmentLine" - } - } - } - }, - "ReducedReplenishmentLines" : { - "type" : "object", - "required" : [ "ean" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - } - } - }, - "ReducedReturn" : { - "type" : "object", - "required" : [ "fulfilmentMethod", "registrationDateTime", "returnId", "returnItems" ], - "properties" : { - "returnId" : { - "type" : "string", - "example" : "1", - "description" : "Unique identifier for a return." - }, - "registrationDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2016-11-14T11:06:48.423+01:00", - "description" : "The date and time in ISO 8601 format when this return was registered." - }, - "fulfilmentMethod" : { - "type" : "string", - "example" : "FBR", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB)." - }, - "returnItems" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedReturnItem" - } - } - } - }, - "ReducedReturnItem" : { - "type" : "object", - "required" : [ "ean", "expectedQuantity", "orderId", "processingResults", "rmaId" ], - "properties" : { - "rmaId" : { - "type" : "string", - "example" : "31234567", - "description" : "The RMA (Return Merchandise Authorization) identifier of the return." - }, - "orderId" : { - "type" : "string", - "example" : "4012345678", - "description" : "The id of the customer order this return item is in." - }, - "ean" : { - "type" : "string", - "example" : "9789076174082", - "description" : "The EAN number associated with this product." - }, - "expectedQuantity" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The quantity that is expected to be returned by the customer. Note: this can be greater than 1 in case the customer ordered a quantity greater than 1 of the same product in the same customer order." - }, - "returnReason" : { - "$ref" : "#/definitions/ReturnReason" - }, - "handled" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates if this return item has been handled (by the retailer)." - }, - "processingResults" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReturnProcessingResult" - } - } - } - }, - "ReducedShipment" : { - "type" : "object", - "required" : [ "order", "shipmentItems", "transport" ], - "properties" : { - "shipmentId" : { - "type" : "string", - "example" : "541757635", - "description" : "A unique identifier for this shipment." - }, - "shipmentDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-17T10:55:37+02:00", - "description" : "The date and time in ISO 8601 format when the order item was shipped." - }, - "shipmentReference" : { - "type" : "string", - "example" : "BOLCOM001", - "description" : "Reference supplied by the user when this item was shipped." - }, - "order" : { - "$ref" : "#/definitions/ReducedShipmentOrder" - }, - "shipmentItems" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedShipmentItem" - } - }, - "transport" : { - "$ref" : "#/definitions/ReducedTransport" - } - } - }, - "ReducedShipmentItem" : { - "type" : "object", - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "1234567891", - "description" : "A unique identifier for the item of the order that was shipped in this shipment." - }, - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - } - } - }, - "ReducedShipmentOrder" : { - "type" : "object", - "properties" : { - "orderId" : { - "type" : "string", - "example" : "4123456789", - "description" : "A unique identifier for the order this shipment is related to." - }, - "orderPlacedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-17T10:55:37+02:00", - "description" : "The date and time in ISO 8601 format when the order was placed." - } - } - }, - "ReducedTransport" : { - "type" : "object", - "properties" : { - "transportId" : { - "type" : "string", - "example" : "312778947", - "description" : "The transport id." - } - } - }, - "Reduction" : { - "type" : "object", - "required" : [ "costReduction", "maximumPrice", "startDate" ], - "properties" : { - "maximumPrice" : { - "type" : "number", - "example" : 60.0, - "description" : "Maximum offer price that can be used to benefit from a commission reduction, including VAT." - }, - "costReduction" : { - "type" : "number", - "example" : 2.99, - "description" : "A reduction to the commission if the maximum price criteria is met, including VAT." - }, - "startDate" : { - "type" : "string", - "format" : "date", - "example" : "2018-01-01", - "description" : "The start date from which the commission reduction is valid, in ISO 8601 format." - }, - "endDate" : { - "type" : "string", - "format" : "date", - "example" : "2018-01-30", - "description" : "The end date from which the commission reduction is not valid anymore, in ISO 8601 format." - } - } - }, - "RelatedSearchTerm" : { - "type" : "object", - "required" : [ "searchTerm", "total" ], - "properties" : { - "total" : { - "type" : "integer", - "format" : "int32", - "example" : 100, - "description" : "The number of customer visits on the search page." - }, - "searchTerm" : { - "type" : "string", - "example" : "book", - "description" : "The search term for which you requested the search volume." - } - } - }, - "RelevanceScore" : { - "type" : "object", - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country for which the relevance score has been calculated against.", - "enum" : [ "NL", "BE" ] - }, - "relevanceScore" : { - "type" : "integer", - "format" : "int32", - "example" : 72, - "description" : "The calculated relevance score for the product." - } - }, - "description" : "The relevance score of a product in a promotion." - }, - "ReplenishmentLine" : { - "type" : "object", - "required" : [ "ean", "lineState", "quantityAnnounced", "quantityInProgress", "quantityReceived", "quantityWithGradedState", "quantityWithRegularState" ], - "properties" : { - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product." - }, - "lineState" : { - "type" : "string", - "example" : "ANNOUNCED", - "description" : "The state of the line indicating whether this line was announced within this replenishment.", - "enum" : [ "ANNOUNCED", "UNANNOUNCED", "UNKNOWN" ] - }, - "quantityAnnounced" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The amount of announced quantity for this replenishment line." - }, - "quantityReceived" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The amount of received quantity for this replenishment line." - }, - "quantityInProgress" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The amount of quantity that is still in progress at the warehouse for this replenishment line." - }, - "quantityWithGradedState" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The quantity within this shipment line that has a graded (unsalable) state." - }, - "quantityWithRegularState" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The quantity within this shipment line that has a regular (salable) state." - } - } - }, - "ReplenishmentPickupTimeSlot" : { - "type" : "object", - "required" : [ "fromDateTime", "untilDateTime" ], - "properties" : { - "fromDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-01T09:00:00+01:00", - "description" : "The selected start date and time for the replenishment pickup appointment. In ISO 8601 format." - }, - "untilDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-01T10:00:00+01:00", - "description" : "The selected end date and time for the replenishment pickup appointment. In ISO 8601 format." - } - } - }, - "ReplenishmentResponse" : { - "type" : "object", - "required" : [ "creationDateTime", "deliveryInformation", "invalidLines", "labelingByBol", "lines", "loadCarriers", "reference", "replenishmentId", "state", "stateTransitions" ], - "properties" : { - "replenishmentId" : { - "type" : "string", - "example" : "2312078154", - "description" : "The unique identifier of the replenishment." - }, - "creationDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-01T08:00:00+01:00", - "description" : "The date and time when this replenishment was created. In ISO 8601 format." - }, - "reference" : { - "type" : "string", - "example" : "REFERENCE1", - "description" : "Custom user defined reference to identify the replenishment." - }, - "labelingByBol" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether the replenishment will be labeled by bol.com or not." - }, - "state" : { - "type" : "string", - "example" : "ANNOUNCED", - "description" : "Indicates the state of this replenishment order.", - "enum" : [ "ANNOUNCED", "IN_TRANSIT", "ARRIVED_AT_WH", "IN_PROGRESS_AT_WH", "CANCELLED", "DONE" ] - }, - "deliveryInformation" : { - "$ref" : "#/definitions/DeliveryInformation" - }, - "pickupAppointment" : { - "$ref" : "#/definitions/PickupAppointment" - }, - "numberOfLoadCarriers" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The number of load carriers in this shipment." - }, - "loadCarriers" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/LoadCarrier" - } - }, - "lines" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReplenishmentLine" - } - }, - "invalidLines" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/InvalidReplenishmentLine" - } - }, - "stateTransitions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/StateTransition" - } - } - } - }, - "ReplenishmentsResponse" : { - "type" : "object", - "required" : [ "replenishments" ], - "properties" : { - "replenishments" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedReplenishment" - } - } - } - }, - "RequestProductDestinationsRequest" : { - "type" : "object", - "required" : [ "eans" ], - "properties" : { - "eans" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Ean" - }, - "maxItems" : 50, - "minItems" : 1 - } - } - }, - "RetailerInformationResponse" : { - "type" : "object", - "required" : [ "displayName", "registrationDate", "retailerId" ], - "properties" : { - "retailerId" : { - "type" : "string", - "example" : "1055479", - "description" : "The Id of the retailer which information belongs to." - }, - "displayName" : { - "type" : "string", - "example" : "015E1DDD2EEB34009A616820E5429C", - "description" : "The name of the retailer visible on bol.com" - }, - "registrationDate" : { - "type" : "string", - "example" : "2015-06-17", - "description" : "A date representing the registration date for the retailer within bol.com" - }, - "topRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Indication of retailer's being the top seller." - }, - "ratingMethod" : { - "type" : "string", - "example" : "THREE_MONTHS", - "description" : "An identifier that identifies if the rating is calculated over the past three months or on all reviews for the retailer.", - "enum" : [ "ALL_REVIEWS", "THREE_MONTHS" ] - }, - "retailerRating" : { - "description" : "Rating on different aspects all being one decimal precision.", - "$ref" : "#/definitions/RetailerRating" - }, - "retailerReview" : { - "$ref" : "#/definitions/RetailerReview" - } - } - }, - "RetailerOffer" : { - "type" : "object", - "required" : [ "condition", "ean", "fulfilment", "notPublishableReasons", "offerId", "onHoldByRetailer", "pricing", "stock", "store" ], - "properties" : { - "offerId" : { - "type" : "string", - "example" : "6ff736b5-cdd0-4150-8c67-78269ee986f5", - "description" : "Unique identifier for an offer." - }, - "ean" : { - "type" : "string", - "example" : "0000007740404", - "description" : "The EAN number associated with this product. Note: in case an ISBN is provided, the ISBN will be replaced with the actual EAN belonging to this ISBN." - }, - "reference" : { - "type" : "string", - "example" : "REF12345", - "description" : "A user-defined reference that helps you identify this particular offer when receiving data from us. This element can optionally be left empty and has a maximum amount of 20 characters." - }, - "onHoldByRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether or not you want to put this offer for sale on the bol.com website. Defaults to false." - }, - "unknownProductTitle" : { - "type" : "string", - "example" : "Unknown Product Title", - "description" : "In case the item is not known to bol.com you can use this field to identify this particular product. Note: in case the product is known to bol.com, the unknown product title will not be stored." - }, - "pricing" : { - "$ref" : "#/definitions/Pricing" - }, - "stock" : { - "$ref" : "#/definitions/Stock" - }, - "fulfilment" : { - "$ref" : "#/definitions/Fulfilment" - }, - "store" : { - "$ref" : "#/definitions/Store" - }, - "condition" : { - "$ref" : "#/definitions/Condition" - }, - "notPublishableReasons" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/NotPublishableReason" - } - } - } - }, - "RetailerRating" : { - "type" : "object", - "required" : [ "retailerRating" ], - "properties" : { - "retailerRating" : { - "type" : "number", - "format" : "double", - "example" : 9.1, - "description" : "General rating of the retailer.", - "minimum" : 1, - "maximum" : 10 - }, - "productInformationRating" : { - "type" : "number", - "format" : "double", - "example" : 9.6, - "description" : "Product rating of the retailer.", - "minimum" : 1, - "maximum" : 10 - }, - "deliveryTimeRating" : { - "type" : "number", - "format" : "double", - "example" : 9.4, - "description" : "Delivery rating of the retailer.", - "minimum" : 1, - "maximum" : 10 - }, - "shippingRating" : { - "type" : "number", - "format" : "double", - "example" : 9.4, - "description" : "Shipping rating of the retailer.", - "minimum" : 1, - "maximum" : 10 - }, - "serviceRating" : { - "type" : "number", - "format" : "double", - "example" : 9.4, - "description" : "Service rating of the retailer.", - "minimum" : 1, - "maximum" : 10 - } - } - }, - "RetailerReview" : { - "type" : "object", - "required" : [ "negativeReviewCount", "neutralReviewCount", "positiveReviewCount", "totalReviewCount" ], - "properties" : { - "totalReviewCount" : { - "type" : "integer", - "format" : "int32", - "example" : 14, - "description" : "The total amount of customer review during that rating method period.", - "minimum" : 0 - }, - "approvalPercentage" : { - "type" : "integer", - "format" : "int32", - "example" : 100, - "description" : "The percentage of the amount of customer that rated the retailer either neutral or positive during the rating method period.", - "minimum" : 0, - "maximum" : 10 - }, - "positiveReviewCount" : { - "type" : "integer", - "format" : "int32", - "example" : 13, - "description" : "The amount of positive customer reviews during that rating method period.", - "minimum" : 0 - }, - "neutralReviewCount" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The amount of neutral customer reviews during that rating method period.", - "minimum" : 0 - }, - "negativeReviewCount" : { - "type" : "integer", - "format" : "int32", - "example" : 0, - "description" : "The amount of negative customer reviews during that rating method period.", - "minimum" : 0 - } - } - }, - "Return" : { - "type" : "object", - "required" : [ "fulfilmentMethod", "registrationDateTime", "returnId", "returnItems" ], - "properties" : { - "returnId" : { - "type" : "string", - "example" : "1", - "description" : "Unique identifier for a return." - }, - "registrationDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2016-11-14T11:06:48.423+01:00", - "description" : "The date and time in ISO 8601 format when this return was registered." - }, - "fulfilmentMethod" : { - "type" : "string", - "example" : "FBR", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB)." - }, - "returnItems" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReturnItem" - } - } - } - }, - "ReturnItem" : { - "type" : "object", - "required" : [ "customerDetails", "ean", "expectedQuantity", "handled", "orderId", "processingResults", "rmaId", "title" ], - "properties" : { - "rmaId" : { - "type" : "string", - "example" : "31234567", - "description" : "The RMA (Return Merchandise Authorization) identifier of the return." - }, - "orderId" : { - "type" : "string", - "example" : "4012345678", - "description" : "The id of the customer order this return item is in." - }, - "ean" : { - "type" : "string", - "example" : "9789076174082", - "description" : "The EAN number associated with this product." - }, - "title" : { - "type" : "string", - "example" : "Harry Potter en de steen der wijzen", - "description" : "The product title." - }, - "expectedQuantity" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The quantity that is expected to be returned by the customer. Note: this can be greater than 1 in case the customer ordered a quantity greater than 1 of the same product in the same customer order." - }, - "returnReason" : { - "$ref" : "#/definitions/ReturnReason" - }, - "trackAndTrace" : { - "type" : "string", - "example" : "3SBOL0987654321", - "description" : "The track and trace code that is associated with this transport." - }, - "transporterName" : { - "type" : "string", - "example" : "PostNL", - "description" : "The name of the transporter." - }, - "handled" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates if this return item has been handled (by the retailer)." - }, - "processingResults" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReturnProcessingResult" - } - }, - "customerDetails" : { - "$ref" : "#/definitions/CustomerDetails" - } - } - }, - "ReturnProcessingResult" : { - "type" : "object", - "required" : [ "handlingResult", "processingDateTime", "quantity" ], - "properties" : { - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The processed quantity." - }, - "processingResult" : { - "type" : "string", - "example" : "ACCEPTED", - "description" : "The processing result of the return." - }, - "handlingResult" : { - "type" : "string", - "example" : "RETURN_RECEIVED", - "description" : "The handling result requested by the retailer." - }, - "processingDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-17T10:55:37+02:00", - "description" : "The date and time in ISO 8601 format when the return was processed." - } - } - }, - "ReturnReason" : { - "type" : "object", - "properties" : { - "mainReason" : { - "type" : "string", - "example" : "Niet naar verwachting", - "description" : "The main reason describing why the customer returned this product." - }, - "detailedReason" : { - "type" : "string", - "example" : "Niet naar verwachting", - "description" : "The sub reason describing why the customer returned this product in more detail." - }, - "customerComments" : { - "type" : "string", - "example" : "Lorem Ipsum", - "description" : "Additional details from the customer as to why this item was returned." - } - }, - "description" : "The reason why the customer returned this product." - }, - "ReturnRequest" : { - "type" : "object", - "required" : [ "quantityReturned" ], - "properties" : { - "handlingResult" : { - "type" : "string", - "example" : "RETURN_RECEIVED", - "description" : "The handling result requested by the retailer.", - "enum" : [ "RETURN_RECEIVED", "EXCHANGE_PRODUCT", "RETURN_DOES_NOT_MEET_CONDITIONS", "REPAIR_PRODUCT", "CUSTOMER_KEEPS_PRODUCT_PAID", "STILL_APPROVED" ] - }, - "quantityReturned" : { - "type" : "integer", - "format" : "int32", - "example" : 1, - "description" : "The quantity of items returned.", - "minimum" : 1, - "maximum" : 9999 - } - } - }, - "ReturnsResponse" : { - "type" : "object", - "required" : [ "returns" ], - "properties" : { - "returns" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedReturn" - } - } - } - }, - "SalesForecastPeriod" : { - "type" : "object", - "required" : [ "countries", "total", "weeksAhead" ], - "properties" : { - "weeksAhead" : { - "type" : "integer", - "format" : "int32", - "example" : 2, - "description" : "The number of weeks into the future, starting from today." - }, - "total" : { - "$ref" : "#/definitions/Total" - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Countries" - } - } - } - }, - "SalesForecastResponse" : { - "type" : "object", - "required" : [ "countries", "name", "periods", "total", "type" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "SALES_FORECAST", - "description" : "Indicator name." - }, - "type" : { - "type" : "string", - "example" : "DECIMAL", - "description" : "Interpretation of the data that applies to this measurement." - }, - "total" : { - "$ref" : "#/definitions/Total" - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Countries" - } - }, - "periods" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/SalesForecastPeriod" - } - } - } - }, - "Score" : { - "type" : "object", - "required" : [ "conforms", "denominator", "distanceToNorm", "numerator", "value" ], - "properties" : { - "conforms" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates whether the score conforms to the bol.com service norm or not." - }, - "numerator" : { - "type" : "integer", - "format" : "int32", - "example" : 5, - "description" : "The top part of the fraction (above the line). This usually is the smaller number compared to the denominator." - }, - "denominator" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "The lower part of the fraction (below the line). This usually is the larger number compared to the the numerator." - }, - "value" : { - "type" : "number", - "format" : "float", - "example" : 0.5, - "description" : "The score for this measurement (denominator divided by the numerator)." - }, - "distanceToNorm" : { - "type" : "number", - "format" : "float", - "example" : 0.1, - "description" : "The difference between the score and the bol.com service norm." - } - }, - "description" : "The score for this measurement. In case there are no scores for an indicator, this element is omitted from the response." - }, - "SearchTerm" : { - "type" : "object", - "required" : [ "countries", "periods", "searchTerm", "total", "type" ], - "properties" : { - "searchTerm" : { - "type" : "string", - "example" : "book", - "description" : "The search term for which you requested the search volume." - }, - "type" : { - "type" : "string", - "example" : "count", - "description" : "Interpretation of the data that applies to this measurement." - }, - "total" : { - "type" : "integer", - "format" : "int32", - "example" : 100, - "description" : "The number of customer visits on the search page." - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/SearchTermsCountry" - } - }, - "periods" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/TotalPeriod" - } - }, - "relatedSearchTerms" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/RelatedSearchTerm" - } - } - } - }, - "SearchTerms" : { - "type" : "object", - "properties" : { - "searchTerms" : { - "$ref" : "#/definitions/SearchTerm" - } - } - }, - "SearchTermsCountry" : { - "type" : "object", - "required" : [ "countryCode", "value" ], - "properties" : { - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "Countries in which this offer is currently on sale in the webshop in ISO-3166-1 format." - }, - "value" : { - "type" : "integer", - "format" : "int32", - "example" : 100, - "description" : "The number of customer visits on the search page." - } - } - }, - "SearchTermsPeriod" : { - "type" : "object", - "properties" : { - "day" : { - "type" : "string", - "example" : "19", - "description" : "Day number in the ISO-8601 standard." - }, - "week" : { - "type" : "string", - "example" : "41", - "description" : "Week number in the ISO-8601 standard." - }, - "month" : { - "type" : "string", - "example" : "11", - "description" : "Month number in the ISO-8601 standard." - }, - "year" : { - "type" : "string", - "example" : "2020", - "description" : "Year number in the ISO-8601 standard." - } - } - }, - "Serie" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "Maybelline Lash Sensational", - "description" : "The name of the product serie(s) the EAN belongs to." - } - } - }, - "Shipment" : { - "type" : "object", - "required" : [ "order", "shipmentItems" ], - "properties" : { - "shipmentId" : { - "type" : "string", - "example" : "541757635", - "description" : "A unique identifier for this shipment." - }, - "shipmentDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-17T10:55:37+02:00", - "description" : "The date and time in ISO 8601 format when the order item was shipped." - }, - "shipmentReference" : { - "type" : "string", - "example" : "BOLCOM001", - "description" : "Reference supplied by the user when this item was shipped." - }, - "pickupPoint" : { - "type" : "boolean", - "example" : true, - "description" : "Indicates whether this order is shipped to a Pick Up Point." - }, - "order" : { - "$ref" : "#/definitions/ShipmentOrder" - }, - "shipmentDetails" : { - "$ref" : "#/definitions/ShipmentDetails" - }, - "billingDetails" : { - "$ref" : "#/definitions/BillingDetails" - }, - "shipmentItems" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ShipmentItem" - } - }, - "transport" : { - "$ref" : "#/definitions/ShipmentTransport" - } - } - }, - "ShipmentDetails" : { - "type" : "object", - "properties" : { - "pickupPointName" : { - "type" : "string", - "example" : "Albert Heijn: UTRECHT", - "description" : "The name of Pick Up Point location this order needs to be shipped to." - }, - "salutation" : { - "type" : "string", - "example" : "MALE", - "description" : "The salutation of the customer.", - "enum" : [ "MALE", "FEMALE", "UNKNOWN" ] - }, - "firstName" : { - "type" : "string", - "example" : "Billie", - "description" : "The first name of the customer." - }, - "surname" : { - "type" : "string", - "example" : "Jansen", - "description" : "The surname of the customer." - }, - "streetName" : { - "type" : "string", - "example" : "Dorpstraat", - "description" : "The street name." - }, - "houseNumber" : { - "type" : "string", - "example" : "1", - "description" : "The house number." - }, - "houseNumberExtension" : { - "type" : "string", - "example" : "B", - "description" : "The extension on the house number." - }, - "extraAddressInformation" : { - "type" : "string", - "example" : "Apartment", - "description" : "Additional information related to the address that helps in delivering the package." - }, - "zipCode" : { - "type" : "string", - "example" : "1111ZZ", - "description" : "The ZIP code in '1234AB' format for NL orders and '0000' format for BE orders." - }, - "city" : { - "type" : "string", - "example" : "Utrecht", - "description" : "The name of the city." - }, - "countryCode" : { - "type" : "string", - "example" : "NL", - "description" : "The country code." - }, - "email" : { - "type" : "string", - "example" : "billie@verkopen.bol.com", - "description" : "A scrambled email address that can be used to contact the customer." - }, - "company" : { - "type" : "string", - "example" : "bol.com", - "description" : "The company name." - }, - "deliveryPhoneNumber" : { - "type" : "string", - "example" : "012123456", - "description" : "The delivery phone number of the customer. Filled in case the order requires an appointment for delivering the goods." - }, - "language" : { - "type" : "string", - "example" : "nl", - "description" : "The language of the customer in case of contact.", - "enum" : [ "nl", "nl-BE", "fr", "fr-BE" ] - } - }, - "description" : "The address details where this order needs to be shipped to. This can be the customers' own address, a (company) business address or a Pick Up Point address." - }, - "ShipmentFulfilment" : { - "type" : "object", - "properties" : { - "method" : { - "type" : "string", - "example" : "FBR", - "description" : "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", - "enum" : [ "FBR", "FBB" ] - }, - "distributionParty" : { - "type" : "string", - "example" : "RETAILER", - "description" : "The party that manages the distribution, either bol.com or the retailer itself.", - "enum" : [ "RETAILER", "BOL" ] - }, - "latestDeliveryDate" : { - "type" : "string", - "format" : "date", - "example" : "2017-02-10", - "description" : "The ultimate delivery date at which this order must be delivered at the customer's shipping address. This field is empty in case the exactDeliveryDate is filled." - } - } - }, - "ShipmentItem" : { - "type" : "object", - "properties" : { - "orderItemId" : { - "type" : "string", - "example" : "1234567891", - "description" : "A unique identifier for the item of the order that was shipped in this shipment." - }, - "fulfilment" : { - "$ref" : "#/definitions/ShipmentFulfilment" - }, - "offer" : { - "$ref" : "#/definitions/OrderOffer" - }, - "product" : { - "$ref" : "#/definitions/OrderProduct" - }, - "quantity" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "Amount of the product being ordered." - }, - "unitPrice" : { - "type" : "number", - "example" : 12.99, - "description" : "The selling price to the customer of a single unit including VAT." - }, - "commission" : { - "type" : "number", - "example" : 5.0, - "description" : "The commission." - } - } - }, - "ShipmentOrder" : { - "type" : "object", - "properties" : { - "orderId" : { - "type" : "string", - "example" : "4123456789", - "description" : "A unique identifier for the order this shipment is related to." - }, - "orderPlacedDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-04-17T10:55:37+02:00", - "description" : "The date and time in ISO 8601 format when the order was placed." - } - } - }, - "ShipmentRequest" : { - "type" : "object", - "required" : [ "orderItems" ], - "properties" : { - "orderItems" : { - "type" : "array", - "description" : "Single element list with the order item to ship.", - "items" : { - "$ref" : "#/definitions/OrderItem" - }, - "maxItems" : 1, - "minItems" : 1 - }, - "shipmentReference" : { - "type" : "string", - "example" : "B321SR", - "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.", - "minLength" : 0, - "maxLength" : 90 - }, - "shippingLabelId" : { - "type" : "string", - "example" : "d4c50077-0c19-435f-9bee-1b30b9f4ba1a", - "description" : "The identifier of the purchased shipping label." - }, - "transport" : { - "$ref" : "#/definitions/TransportInstruction" - } - } - }, - "ShipmentTransport" : { - "type" : "object", - "properties" : { - "transportId" : { - "type" : "string", - "example" : "312778947", - "description" : "The transport id." - }, - "transporterCode" : { - "type" : "string", - "example" : "TNT", - "description" : "Specify the transporter that will carry out the shipment." - }, - "trackAndTrace" : { - "type" : "string", - "example" : "3SBOL0987654321", - "description" : "The track and trace code that is associated with this transport." - }, - "shippingLabelId" : { - "type" : "string", - "example" : "123456789", - "description" : "The shipping label id." - }, - "transportEvents" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/TransportEvent" - } - } - } - }, - "ShipmentsResponse" : { - "type" : "object", - "required" : [ "shipments" ], - "properties" : { - "shipments" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReducedShipment" - } - } - } - }, - "ShippingLabelRequest" : { - "type" : "object", - "required" : [ "orderItems", "shippingLabelOfferId" ], - "properties" : { - "orderItems" : { - "type" : "array", - "description" : "Order items for which the delivery options are requested.", - "items" : { - "$ref" : "#/definitions/DeliveryOptionsRequestOrderItem" - } - }, - "shippingLabelOfferId" : { - "type" : "string", - "example" : "027b79fa-5743-40f0-94c7-0eac761af611", - "description" : "Shipping label offer id for which you request a shipping label." - } - }, - "description" : "The configuration of order items to get delivery options for." - }, - "StateTransition" : { - "type" : "object", - "required" : [ "state", "stateDateTime" ], - "properties" : { - "state" : { - "type" : "string", - "example" : "ANNOUNCED", - "description" : "Indicates the state of this replenishment order.", - "enum" : [ "DRAFT", "ANNOUNCED", "IN_TRANSIT", "ARRIVED_AT_WH", "IN_PROGRESS_AT_WH", "CANCELLED", "DONE" ] - }, - "stateDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-01-02T09:00:00+01:00", - "description" : "The date and time in ISO 8601 format that indicates when this states was updated for this replenishment." - } - } - }, - "Stock" : { - "type" : "object", - "required" : [ "managedByRetailer" ], - "properties" : { - "amount" : { - "type" : "integer", - "format" : "int32", - "example" : 6, - "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." - }, - "correctedStock" : { - "type" : "integer", - "format" : "int32", - "example" : 5, - "description" : "The amount of order items in stock minus handled order items and minus open order items. As compared to the stock you sent us. When this reaches 0, your offer will not be for sale on the shop." - }, - "managedByRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Configures whether the retailer manages the stock levels or that bol.com should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account." - } - } - }, - "StockCreate" : { - "type" : "object", - "required" : [ "amount", "managedByRetailer" ], - "properties" : { - "amount" : { - "type" : "integer", - "format" : "int32", - "example" : 6, - "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.", - "minimum" : 0, - "maximum" : 999 - }, - "managedByRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Configures whether the retailer manages the stock levels or that bol.com should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account." - } - } - }, - "Store" : { - "type" : "object", - "required" : [ "visible" ], - "properties" : { - "productTitle" : { - "type" : "string", - "example" : "Product Title", - "description" : "The product title for the product associated with this offer." - }, - "visible" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/OffersCountryCode" - } - } - } - }, - "SubCategory" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "description" : "The id of the subcategory which the product belongs to." - }, - "name" : { - "type" : "string", - "description" : "The name of the subcategory which the product belongs to." - }, - "subcategories" : { - "type" : "array", - "description" : "The subcategories which the product belongs to.", - "items" : { - "$ref" : "#/definitions/SubCategory" - } - } - } - }, - "SubscriptionResponse" : { - "type" : "object", - "required" : [ "id", "resources", "url" ], - "properties" : { - "id" : { - "type" : "string", - "example" : "1234", - "description" : "A unique identifier for the subscription." - }, - "resources" : { - "type" : "array", - "example" : "['PROCESS_STATUS']", - "description" : "Type of event.", - "items" : { - "type" : "string" - } - }, - "url" : { - "type" : "string", - "example" : "https://www.bol.com/webhook", - "description" : "URL to receive this WebHook notification." - } - } - }, - "SubscriptionsResponse" : { - "type" : "object", - "required" : [ "subscriptions" ], - "properties" : { - "subscriptions" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/SubscriptionResponse" - } - } - } - }, - "Total" : { - "type" : "object", - "required" : [ "maximum", "minimum" ], - "properties" : { - "minimum" : { - "type" : "number", - "format" : "double", - "example" : 10.5, - "description" : "Minimum number of estimated sales expectations on the bol.com platform." - }, - "maximum" : { - "type" : "number", - "format" : "double", - "example" : 20.5, - "description" : "Maximum number of estimated sales expectations on the bol.com platform." - } - } - }, - "TotalPeriod" : { - "type" : "object", - "required" : [ "countries", "period", "total" ], - "properties" : { - "period" : { - "$ref" : "#/definitions/SearchTermsPeriod" - }, - "total" : { - "type" : "integer", - "format" : "int32", - "example" : 100, - "description" : "The number of customer visits on the search page." - }, - "countries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/SearchTermsCountry" - } - } - } - }, - "TransportEvent" : { - "type" : "object", - "properties" : { - "eventCode" : { - "type" : "string", - "example" : "AT_TRANSPORTER", - "description" : "The transport event code indicates the location of the parcel within the distribution process.", - "enum" : [ "PRE_ANNOUNCED", "AT_TRANSPORTER", "IN_TRANSIT", "DELIVERED_AT_NEIGHBOURS", "DELIVERED_AT_CUSTOMER", "PICKED_UP_AT_PICK_UP_POINT", "AT_PICK_UP_POINT", "RETURNED_TO_SENDER" ] - }, - "eventDateTime" : { - "type" : "string", - "format" : "date-time", - "example" : "2021-07-28T17:21:07+02:00", - "description" : "The date time of the transport event." - } - } - }, - "TransportInstruction" : { - "type" : "object", - "properties" : { - "transporterCode" : { - "type" : "string", - "example" : "TNT", - "description" : "Specify the transporter that will carry out the shipment." - }, - "trackAndTrace" : { - "type" : "string", - "example" : "3SBOL0987654321", - "description" : "The track and trace code that is associated with this transport." - } - } - }, - "UpdateDeliveryInfo" : { - "type" : "object", - "properties" : { - "expectedDeliveryDate" : { - "type" : "string", - "example" : "2021-01-01", - "description" : "The expected delivery date of the shipment at the bol.com warehouse. In ISO 8601 format." - } - } - }, - "UpdateLoadCarrier" : { - "type" : "object", - "properties" : { - "sscc" : { - "type" : "string", - "example" : "020001200000007000", - "description" : "The Serial Shipping Container Code (SSCC) for this load carrier." - } - } - }, - "UpdateOfferPriceRequest" : { - "type" : "object", - "required" : [ "pricing" ], - "properties" : { - "pricing" : { - "$ref" : "#/definitions/Pricing" - } - } - }, - "UpdateOfferRequest" : { - "type" : "object", - "required" : [ "fulfilment" ], - "properties" : { - "reference" : { - "type" : "string", - "example" : "REF12345", - "description" : "A user-defined reference that helps you identify this particular offer when receiving data from us. This element can optionally be left empty and has a maximum amount of 20 characters.", - "minLength" : 0, - "maxLength" : 20 - }, - "onHoldByRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Indicates whether or not you want to put this offer for sale on the bol.com website. Defaults to false." - }, - "unknownProductTitle" : { - "type" : "string", - "example" : "Unknown Product Title", - "description" : "In case the item is not known to bol.com you can use this field to identify this particular product. Note: in case the product is known to bol.com, the unknown product title will not be stored.", - "minLength" : 0, - "maxLength" : 500 - }, - "fulfilment" : { - "$ref" : "#/definitions/Fulfilment" - } - } - }, - "UpdateOfferStockRequest" : { - "type" : "object", - "required" : [ "amount", "managedByRetailer" ], - "properties" : { - "amount" : { - "type" : "integer", - "format" : "int32", - "example" : 6, - "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.", - "minimum" : 0, - "maximum" : 999 - }, - "managedByRetailer" : { - "type" : "boolean", - "example" : false, - "description" : "Configures whether the retailer manages the stock levels or that bol.com should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account." - } - } - }, - "UpdateReplenishmentRequest" : { - "type" : "object", - "properties" : { - "state" : { - "type" : "string", - "example" : "CANCELLED", - "description" : "Update the state of the replenishment to cancel the replenishment.", - "enum" : [ "CANCELLED" ] - }, - "deliveryInfo" : { - "$ref" : "#/definitions/UpdateDeliveryInfo" - }, - "numberOfLoadCarriers" : { - "type" : "integer", - "format" : "int32", - "example" : 10, - "description" : "The number of parcels in this replenishment. Note: if you are using the bol.com pickup service, the maximum number is 20.", - "minimum" : 1, - "maximum" : 66 - }, - "loadCarriers" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/UpdateLoadCarrier" - }, - "maxItems" : 66, - "minItems" : 1 - } - } - }, - "UpdateSubscriptionRequest" : { - "type" : "object", - "required" : [ "resources", "url" ], - "properties" : { - "resources" : { - "type" : "array", - "example" : "['PROCESS_STATUS']", - "description" : "Type of event.", - "items" : { - "type" : "string", - "enum" : [ "PROCESS_STATUS", "SHIPMENT", "OFFER" ] - } - }, - "url" : { - "type" : "string", - "example" : "https://www.bol.com/webhook", - "description" : "URL to receive this WebHook notification.", - "pattern" : "^https.*" - } - } - }, - "UploadReportAsset" : { - "type" : "object", - "required" : [ "labels", "status", "url" ], - "properties" : { - "url" : { - "type" : "string", - "example" : "http://example.com", - "description" : "The URL of the asset." - }, - "labels" : { - "type" : "array", - "example" : "[ \"FRONT\" ]", - "description" : "The label(s) of the asset.", - "items" : { - "type" : "string" - } - }, - "status" : { - "type" : "string", - "example" : "DECLINED", - "description" : "The processing state of the submitted asset.", - "enum" : [ "IN_PROGRESS", "DECLINED", "PUBLISHED" ] - }, - "subStatus" : { - "type" : "string", - "example" : "DOWNLOAD_FAILED_404", - "description" : "The reason code explaining why the value was rejected.", - "enum" : [ "DELETED", "DOWNLOAD_FAILED_404", "DOWNLOAD_FAILED_UNAUTHORIZED", "IMAGE_FLAGGED_AS_DUPLICATE", "IMAGE_RATE_LIMITED", "IMPORT_FAILED", "LABEL_UPDATED", "MATCH_TO_PRODUCT_FAILED", "NOT_VALID_FOR_IMPORT", "PUBLISHED", "RECEIVED", "SCORED_OTHER_IMAGE_WON", "STORED", "SUPPLIED_FLAGGED_AS_BLACKLISTED", "UNKNOWN", "UNPUBLISHED", "UNSUPPORTED_MIMETYPE", "UPLOAD_CANCELLED", "UPLOAD_DEADLINE_REACHED", "UPLOAD_FAILED", "UPLOAD_REJECTED" ] - }, - "subStatusDescription" : { - "type" : "string", - "example" : "Failed to download.", - "description" : "The reason explaining why the value was rejected." - } - } - }, - "UploadReportAttribute" : { - "type" : "object", - "required" : [ "id", "status", "values" ], - "properties" : { - "id" : { - "type" : "string", - "example" : "Width", - "description" : "The identifier of the attribute for which the value has changed." - }, - "values" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/UploadReportValue" - } - }, - "status" : { - "type" : "string", - "example" : "DECLINED", - "description" : "The processing state of the submitted attribute.", - "enum" : [ "IN_PROGRESS", "DECLINED", "PUBLISHED" ] - }, - "subStatus" : { - "type" : "string", - "example" : "INVALID_NUMBER", - "description" : "The reason code explaining why the value was rejected.", - "enum" : [ "BLOCKED_BY_RATE_LIMITER", "CREATED", "DEPRECATED", "IDENTICAL_VALUE_AS_BEFORE", "MATCH_TO_PRODUCT_FAILED", "NOT_CHANGED", "NOT_RECENT", "PROCESSING_STARTED", "RECEIVED", "REJECTED", "REJECTED_BY_BRAND_AUTHORITY", "REJECTED_BY_LOGISTIC", "REJECTED_NO_DATA", "REJECTED_UNPROCESSABLE", "SELECTED", "SELECTED_BY_BRAND_AUTHORITY", "SELECTED_BY_LOGISTIC", "SELECTION_DELETED", "SELECTION_MERGED", "TIMED_OUT", "UPDATED", "UPLOADED", "UNKNOWN", "VALID_EAN", "VALIDATED", "VALIDATION_FAILED", "VALIDATION_FAILED_DISABLED_GPC_CODE", "VALIDATION_FAILED_DOES_NOT_EXIST", "VALIDATION_FAILED_INVALID_DATE", "VALIDATION_FAILED_INVALID_EAN", "VALIDATION_FAILED_INVALID_FRACTION", "VALIDATION_FAILED_INVALID_GPC_CODE", "VALIDATION_FAILED_INVALID_INTEGER", "VALIDATION_FAILED_INVALID_ISODATE", "VALIDATION_FAILED_INVALID_ISODATETIME", "VALIDATION_FAILED_INVALID_LOV_VALUE", "VALIDATION_FAILED_INVALID_MULTIPLE_VALUES", "VALIDATION_FAILED_INVALID_NO_VALUES", "VALIDATION_FAILED_INVALID_NUMBER", "VALIDATION_FAILED_INVALID_NUMERIC_TEXT", "VALIDATION_FAILED_INVALID_TEXT", "VALIDATION_FAILED_INVALID_UNIT", "VALIDATION_FAILED_INVALID_URL", "VALIDATION_FAILED_INVALID_VALUES", "VALIDATION_FAILED_NOT_ALLOWED", "VALIDATION_FAILED_UNKNOWN_BASETYPE", "WAITING_FOR_GLOBAL_ID" ] - }, - "subStatusDescription" : { - "type" : "string", - "example" : "The provided number is not correct.", - "description" : "The reason explaining why the value was rejected." - } - } - }, - "UploadReportResponse" : { - "type" : "object", - "required" : [ "attributes", "language", "status", "uploadId" ], - "properties" : { - "uploadId" : { - "type" : "string", - "example" : "3fa90f24-5b44-417f-b212-5cd18ce64c0e", - "description" : "The identifier of the upload report." - }, - "language" : { - "type" : "string", - "example" : "nl", - "description" : "The language in which content is submitted.", - "enum" : [ "nl", "nl-BE", "fr", "fr-BE" ] - }, - "status" : { - "type" : "string", - "example" : "IN_PROGRESS", - "description" : "The current status of the upload report.", - "enum" : [ "IN_PROGRESS", "COMPLETED" ] - }, - "attributes" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/UploadReportAttribute" - } - }, - "assets" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/UploadReportAsset" - } - } - }, - "description" : "Upload report." - }, - "UploadReportValue" : { - "type" : "object", - "required" : [ "value" ], - "properties" : { - "value" : { - "type" : "string", - "example" : "14.5", - "description" : "The value of the attribute." - }, - "unitId" : { - "type" : "string", - "example" : "mm", - "description" : "The unit identifier of the attribute." - } - } - }, - "Values" : { - "type" : "object", - "required" : [ "value" ], - "properties" : { - "value" : { - "type" : "string", - "example" : "122", - "description" : "The value of the attribute." - }, - "unitId" : { - "type" : "string", - "example" : "unece.unit.MMT", - "description" : "The unit identifier of the attribute." - }, - "valueId" : { - "type" : "string", - "example" : "700071825", - "description" : "The identifier of the attribute's value. " - } - } - }, - "Violation" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "exampleValue", - "description" : "Describes the origin of the error, for instance a field or query parameter validation error." - }, - "reason" : { - "type" : "string", - "example" : "Request contains invalid value(s): 'INVALID', allowed values: ALLOWED_VALUE1, ALLOWED_VALUE2.", - "description" : "Detailed description of the validation error that caused the problem." } - }, - "description" : "Describes a violation that occurred interacting with the API." } - } -} \ No newline at end of file +} diff --git a/src/OpenApi/shared-v10.json b/src/OpenApi/shared-v10.json index a4b39a4..e466376 100644 --- a/src/OpenApi/shared-v10.json +++ b/src/OpenApi/shared-v10.json @@ -1,294 +1,462 @@ { - "swagger" : "2.0", - "host": "api.bol.com", - "schemes": ["https"], - "info" : { - "description" : "The bol.com API shared logic.", - "version" : "10.x", - "title" : "v10 - Shared API" - }, - "tags" : [ { - "name" : "Process Status" - } ], - "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", - "produces" : [ "application/vnd.retailer.v10+json", "application/vnd.advertiser.v10+json" ], - "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, - "type" : "string", - "x-example" : "987654321" - }, { - "name" : "event-type", - "in" : "query", - "description" : "The event type can only be used in combination with the entity id.", - "required" : true, - "type" : "string", - "x-example" : "CONFIRM_SHIPMENT", - "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" ] - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProcessStatusResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/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", - "consumes" : [ "application/vnd.retailer.v10+json", "application/vnd.advertiser.v10+json" ], - "produces" : [ "application/vnd.retailer.v10+json", "application/vnd.advertiser.v10+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/BulkProcessStatusRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProcessStatusResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } + "openapi": "3.0.1", + "info": { + "title": "v10 - Shared API", + "description": "The bol.com API shared logic.", + "version": "10.x" }, - "/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", - "produces" : [ "application/vnd.retailer.v10+json", "application/vnd.advertiser.v10+json" ], - "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, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } + "servers": [ + { + "url": "https://api.bol.com" } - } - } - }, - "definitions" : { - "BulkProcessStatusRequest" : { - "type" : "object", - "required" : [ "processStatusQueries" ], - "properties" : { - "processStatusQueries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProcessStatusId" - }, - "maxItems" : 1000, - "minItems" : 1 + ], + "security": [ + { + "OAuth2": [] } - } - }, - "Link" : { - "type" : "object", - "required" : [ "href", "method", "rel" ], - "properties" : { - "rel" : { - "type" : "string", - "example" : "self", - "description" : "The link relation." - }, - "href" : { - "type" : "string", - "example" : "https://api.bol.com/shared/process-status/1234567", - "description" : "The URI for the resource linked to." - }, - "method" : { - "type" : "string", - "example" : "GET", - "description" : "The HTTP method to use when accessing the link." + ], + "tags": [ + { + "name": "Process Status", + "description": "Process status resources" } - } - }, - "Problem" : { - "type" : "object", - "required" : [ "violations" ], - "properties" : { - "type" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com/problems", - "description" : "Type URI for this problem. Fixed value: https://api.bol.com/problems." - }, - "title" : { - "type" : "string", - "example" : "Error validating request. Consult the bol.com API documentation for more information.", - "description" : "Title describing the nature of the problem." - }, - "status" : { - "type" : "integer", - "format" : "int32", - "example" : "40X", - "description" : "HTTP status returned from the endpoint causing the problem." - }, - "detail" : { - "type" : "string", - "example" : "Bad request", - "description" : "Detailed error message describing in additional detail what caused the service to return this problem." - }, - "host" : { - "type" : "string", - "example" : "Instance-001", - "description" : "Host identifier describing the server instance that reported the problem." - }, - "instance" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com//retailer/resource", - "description" : "Full URI path of the resource that reported the problem." - }, - "violations" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Violation" - } - } - }, - "description" : "Describes a problem that occurred interacting with the API." - }, - "ProcessStatus" : { - "type" : "object", - "required" : [ "createTimestamp", "description", "eventType", "links", "status" ], - "properties" : { - "processStatusId" : { - "type" : "string", - "example" : "1234567", - "description" : "The process status id." - }, - "entityId" : { - "type" : "string", - "example" : "987654321", - "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." - }, - "eventType" : { - "type" : "string", - "example" : "CONFIRM_SHIPMENT", - "description" : "Name of the requested action that is being processed." - }, - "description" : { - "type" : "string", - "example" : "Example process status description for processing 987654321.", - "description" : "Describes the action that is being processed." - }, - "status" : { - "type" : "string", - "example" : "SUCCESS", - "description" : "Status of the action being processed.", - "enum" : [ "PENDING", "SUCCESS", "FAILURE", "TIMEOUT" ] - }, - "errorMessage" : { - "type" : "string", - "example" : "Example process status error message.", - "description" : "Shows error message if applicable." - }, - "createTimestamp" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-11-14T09:34:41+01:00", - "description" : "Time of creation of the response." + ], + "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" + } + } + } + } + } + } }, - "links" : { - "type" : "array", - "description" : "Lists available actions applicable to this endpoint.", - "items" : { - "$ref" : "#/definitions/Link" - } - } - } - }, - "ProcessStatusId" : { - "type" : "object", - "properties" : { - "processStatusId" : { - "type" : "string", - "example" : "1234567", - "description" : "The process status id." - } - } - }, - "ProcessStatusResponse" : { - "type" : "object", - "required" : [ "processStatuses" ], - "properties" : { - "processStatuses" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProcessStatus" - } + "/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" + } + } + } + } + } + } } - } }, - "Violation" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "exampleValue", - "description" : "Describes the origin of the error, for instance a field or query parameter validation error." + "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" + } + } + } + } }, - "reason" : { - "type" : "string", - "example" : "Request contains invalid value(s): 'INVALID', allowed values: ALLOWED_VALUE1, ALLOWED_VALUE2.", - "description" : "Detailed description of the validation error that caused the problem." + "securitySchemes": { + "OAuth2": { + "type": "http", + "description": "JWT-based access to api.bol.com", + "in": "header", + "scheme": "bearer" + } } - }, - "description" : "Describes a violation that occurred interacting with the API." } - } -} \ No newline at end of file +} diff --git a/src/OpenApi/shared.json b/src/OpenApi/shared.json index 3de70c3..ada5aea 100644 --- a/src/OpenApi/shared.json +++ b/src/OpenApi/shared.json @@ -1,294 +1,462 @@ { - "swagger" : "2.0", - "host": "api.bol.com", - "schemes": ["https"], - "info" : { - "description" : "The bol.com API shared logic.", - "version" : "9.x", - "title" : "v9 - Shared API" - }, - "tags" : [ { - "name" : "Process Status" - } ], - "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", - "produces" : [ "application/vnd.retailer.v9+json", "application/vnd.advertiser.v9+json" ], - "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, - "type" : "string", - "x-example" : "987654321" - }, { - "name" : "event-type", - "in" : "query", - "description" : "The event type can only be used in combination with the entity id.", - "required" : true, - "type" : "string", - "x-example" : "CONFIRM_SHIPMENT", - "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_CATEGORY_REPORT", "CREATE_SOV_SEARCH_TERM_REPORT", "UPLOAD_INVOICE" ] - }, { - "name" : "page", - "in" : "query", - "description" : "The requested page number with a page size of 50 items.", - "required" : false, - "type" : "integer", - "default" : 1, - "minimum" : 1, - "format" : "int32" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProcessStatusResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/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", - "consumes" : [ "application/vnd.retailer.v9+json", "application/vnd.advertiser.v9+json" ], - "produces" : [ "application/vnd.retailer.v9+json", "application/vnd.advertiser.v9+json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/BulkProcessStatusRequest" - } - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProcessStatusResponse" - } - }, - "400" : { - "description" : "Bad request: The sent request does not meet the API specification. Please check the error message(s) for more information.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } - } - } + "openapi": "3.0.1", + "info": { + "title": "v9 - Shared API", + "description": "The bol.com API shared logic.", + "version": "9.x" }, - "/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", - "produces" : [ "application/vnd.retailer.v9+json", "application/vnd.advertiser.v9+json" ], - "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, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Ok: Successfully processed the request.", - "schema" : { - "$ref" : "#/definitions/ProcessStatus" - } - }, - "404" : { - "description" : "Not found: The requested item could not be found.", - "schema" : { - "$ref" : "#/definitions/Problem" - } - } + "servers": [ + { + "url": "https://api.bol.com" } - } - } - }, - "definitions" : { - "BulkProcessStatusRequest" : { - "type" : "object", - "required" : [ "processStatusQueries" ], - "properties" : { - "processStatusQueries" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProcessStatusId" - }, - "maxItems" : 1000, - "minItems" : 1 + ], + "security": [ + { + "OAuth2": [] } - } - }, - "Link" : { - "type" : "object", - "required" : [ "href", "method", "rel" ], - "properties" : { - "rel" : { - "type" : "string", - "example" : "self", - "description" : "The link relation." - }, - "href" : { - "type" : "string", - "example" : "https://api.bol.com/shared/process-status/1234567", - "description" : "The URI for the resource linked to." - }, - "method" : { - "type" : "string", - "example" : "GET", - "description" : "The HTTP method to use when accessing the link." + ], + "tags": [ + { + "name": "Process Status", + "description": "Process status resource" } - } - }, - "Problem" : { - "type" : "object", - "required" : [ "violations" ], - "properties" : { - "type" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com/problems", - "description" : "Type URI for this problem. Fixed value: https://api.bol.com/problems." - }, - "title" : { - "type" : "string", - "example" : "Error validating request. Consult the bol.com API documentation for more information.", - "description" : "Title describing the nature of the problem." - }, - "status" : { - "type" : "integer", - "format" : "int32", - "example" : "40X", - "description" : "HTTP status returned from the endpoint causing the problem." - }, - "detail" : { - "type" : "string", - "example" : "Bad request", - "description" : "Detailed error message describing in additional detail what caused the service to return this problem." - }, - "host" : { - "type" : "string", - "example" : "Instance-001", - "description" : "Host identifier describing the server instance that reported the problem." - }, - "instance" : { - "type" : "string", - "format" : "uri", - "example" : "https://api.bol.com//retailer/resource", - "description" : "Full URI path of the resource that reported the problem." - }, - "violations" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Violation" - } - } - }, - "description" : "Describes a problem that occurred interacting with the API." - }, - "ProcessStatus" : { - "type" : "object", - "required" : [ "createTimestamp", "description", "eventType", "links", "status" ], - "properties" : { - "processStatusId" : { - "type" : "string", - "example" : "1234567", - "description" : "The process status id." - }, - "entityId" : { - "type" : "string", - "example" : "987654321", - "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." - }, - "eventType" : { - "type" : "string", - "example" : "CONFIRM_SHIPMENT", - "description" : "Name of the requested action that is being processed." - }, - "description" : { - "type" : "string", - "example" : "Example process status description for processing 987654321.", - "description" : "Describes the action that is being processed." - }, - "status" : { - "type" : "string", - "example" : "SUCCESS", - "description" : "Status of the action being processed.", - "enum" : [ "PENDING", "SUCCESS", "FAILURE", "TIMEOUT" ] - }, - "errorMessage" : { - "type" : "string", - "example" : "Example process status error message.", - "description" : "Shows error message if applicable." - }, - "createTimestamp" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-11-14T09:34:41+01:00", - "description" : "Time of creation of the response." + ], + "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.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProcessStatusResponse" + } + }, + "application/vnd.advertiser.v9+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.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + }, + "application/vnd.advertiser.v9+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.v9+json": { + "schema": { + "$ref": "#/components/schemas/BulkProcessStatusRequest" + } + }, + "application/vnd.advertiser.v9+json": { + "schema": { + "$ref": "#/components/schemas/BulkProcessStatusRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Ok: Successfully processed the request.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProcessStatusResponse" + } + }, + "application/vnd.advertiser.v9+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.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + }, + "application/vnd.advertiser.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } }, - "links" : { - "type" : "array", - "description" : "Lists available actions applicable to this endpoint.", - "items" : { - "$ref" : "#/definitions/Link" - } - } - } - }, - "ProcessStatusId" : { - "type" : "object", - "properties" : { - "processStatusId" : { - "type" : "string", - "example" : "1234567", - "description" : "The process status id." - } - } - }, - "ProcessStatusResponse" : { - "type" : "object", - "required" : [ "processStatuses" ], - "properties" : { - "processStatuses" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ProcessStatus" - } + "/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.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProcessStatus" + } + }, + "application/vnd.advertiser.v9+json": { + "schema": { + "$ref": "#/components/schemas/ProcessStatus" + } + } + } + }, + "404": { + "description": "Not found: The requested item could not be found.", + "content": { + "application/vnd.retailer.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + }, + "application/vnd.advertiser.v9+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + } + } } - } }, - "Violation" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "exampleValue", - "description" : "Describes the origin of the error, for instance a field or query parameter validation error." + "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" + } + } + } + } }, - "reason" : { - "type" : "string", - "example" : "Request contains invalid value(s): 'INVALID', allowed values: ALLOWED_VALUE1, ALLOWED_VALUE2.", - "description" : "Detailed description of the validation error that caused the problem." + "securitySchemes": { + "OAuth2": { + "type": "http", + "description": "JWT-based access to api.bol.com", + "in": "header", + "scheme": "bearer" + } } - }, - "description" : "Describes a violation that occurred interacting with the API." } - } -} \ No newline at end of file +} From b4a90ad92c369b37b0b833b6b168b516ec72ac6b Mon Sep 17 00:00:00 2001 From: "WoutervanderLoop.nl" Date: Tue, 22 Aug 2023 13:46:19 +0200 Subject: [PATCH 2/3] Upgrade Client and ClientGenerator to support OpenAPI v3 --- src/Client.php | 114 ++++++++++++----------- src/OpenApi/ClientGenerator.php | 154 +++++++++++++++++++------------- src/OpenApi/SwaggerSpecs.php | 2 +- 3 files changed, 155 insertions(+), 115 deletions(-) diff --git a/src/Client.php b/src/Client.php index e8d254f..92fd31d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -47,7 +47,7 @@ public function getCommissions(array $commissionQueries): array * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getCommission(string $ean, float $unitPrice, ?string $condition = 'NEW'): ?Model\Commission + public function getCommission(string $ean, float $unitPrice, ?string $condition = null): ?Model\Commission { $url = "retailer/commission/${ean}"; $options = [ @@ -76,7 +76,7 @@ public function getCommission(string $ean, float $unitPrice, ?string $condition * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getCatalogProduct(string $ean, ?string $AcceptLanguage = 'nl'): ?Model\CatalogProduct + public function getCatalogProduct(string $ean, ?string $AcceptLanguage = null): ?Model\CatalogProduct { $url = "retailer/content/catalog-products/${ean}"; $options = [ @@ -170,7 +170,7 @@ public function getUploadReport(string $uploadId): ?Model\UploadReportResponse * @param string $period The time unit in which the offer insights are grouped. * @param int $numberOfPeriods The number of periods for which the offer insights are requested back in time. The * maximum available periods are 24 for MONTH, 104 for WEEK, and 730 for DAY. - * @param array $name The name of the requested offer insight. + * @param string $name The name of the requested offer insight. * @return Model\OfferInsight[] * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -178,7 +178,7 @@ public function getUploadReport(string $uploadId): ?Model\UploadReportResponse * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getOfferInsights(string $offerId, string $period, int $numberOfPeriods, array $name): array + public function getOfferInsights(string $offerId, string $period, int $numberOfPeriods, string $name): array { $url = "retailer/insights/offer"; $options = [ @@ -199,7 +199,7 @@ public function getOfferInsights(string $offerId, string $period, int $numberOfP /** * Gets the measurements for your performance indicators per week. - * @param array $name The type of the performance indicator + * @param string $name The type of the performance indicator * @param string $year Year number in the ISO-8601 standard. * @param string $week Week number in the ISO-8601 standard. If you would like to get the relative scores from the * current week, please provide the current week number here. Be advised that measurements can change heavily over @@ -211,7 +211,7 @@ public function getOfferInsights(string $offerId, string $period, int $numberOfP * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getPerformanceIndicators(array $name, string $year, string $week): array + public function getPerformanceIndicators(string $name, string $year, string $week): array { $url = "retailer/insights/performance/indicator"; $options = [ @@ -469,7 +469,7 @@ public function postOfferExport(string $format): Model\ProcessStatus /** * Retrieve an offer export file containing all offers. - * @param string $reportId Unique identifier for an offer export report. + * @param string $reportId Unique identifier for an offer export file. * @return string|null * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -683,7 +683,7 @@ public function updateOfferStock(string $offerId, Model\UpdateOfferStockRequest * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getOrders(?int $page = 1, ?string $fulfilmentMethod = 'FBR', ?string $status = 'OPEN', ?int $changeIntervalMinute = null, ?string $latestChangeDate = null): array + public function getOrders(?int $page = 1, ?string $fulfilmentMethod = null, ?string $status = null, ?int $changeIntervalMinute = null, ?string $latestChangeDate = null): array { $url = "retailer/orders"; $options = [ @@ -718,7 +718,7 @@ public function cancelOrderItem(array $orderItems): Model\ProcessStatus { $url = "retailer/orders/cancellation"; $options = [ - 'body' => Model\ContainerForTheOrderItemsThatHaveToBeCancelled::constructFromArray(['orderItems' => $orderItems]), + 'body' => Model\CancellationRequest::constructFromArray(['orderItems' => $orderItems]), 'produces' => 'application/vnd.retailer.v9+json', 'consumes' => 'application/vnd.retailer.v9+json', ]; @@ -793,12 +793,13 @@ public function getOrder(string $orderId): ?Model\Order * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getProductList(Model\ProductListRequest $productListRequest, ?string $AcceptLanguage = 'nl'): ?Model\ProductListResponse + public function getProductList(Model\ProductListRequest $productListRequest, ?string $AcceptLanguage = null): ?Model\ProductListResponse { $url = "retailer/products/list"; $options = [ 'body' => $productListRequest, 'produces' => 'application/vnd.retailer.v9+json', + 'consumes' => 'application/json', ]; $responseTypes = [ '200' => Model\ProductListResponse::class, @@ -821,7 +822,7 @@ public function getProductList(Model\ProductListRequest $productListRequest, ?st * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getProductListFilters(?string $countryCode = 'NL', ?string $searchTerm = null, ?string $categoryId = null, ?string $AcceptLanguage = 'nl'): ?Model\ProductListFiltersResponse + public function getProductListFilters(?string $countryCode = null, ?string $searchTerm = null, ?string $categoryId = null, ?string $AcceptLanguage = null): ?Model\ProductListFiltersResponse { $url = "retailer/products/list-filters"; $options = [ @@ -851,7 +852,7 @@ public function getProductListFilters(?string $countryCode = 'NL', ?string $sear * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getProductAssets(string $ean, ?string $usage = 'PRIMARY'): array + public function getProductAssets(string $ean, ?string $usage = null): array { $url = "retailer/products/${ean}/assets"; $options = [ @@ -884,7 +885,7 @@ public function getProductAssets(string $ean, ?string $usage = 'PRIMARY'): array * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getCompetingOffers(string $ean, ?int $page = 1, ?string $countryCode = 'NL', ?bool $bestOfferOnly = false, ?string $condition = 'NEW'): array + public function getCompetingOffers(string $ean, ?int $page = 1, ?string $countryCode = null, ?bool $bestOfferOnly = false, ?string $condition = null): array { $url = "retailer/products/${ean}/offers"; $options = [ @@ -917,7 +918,7 @@ public function getCompetingOffers(string $ean, ?int $page = 1, ?string $country * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getProductPlacement(string $ean, ?string $countryCode = 'NL', ?string $AcceptLanguage = 'nl'): ?Model\ProductPlacementResponse + public function getProductPlacement(string $ean, ?string $countryCode = null, ?string $AcceptLanguage = null): ?Model\ProductPlacementResponse { $url = "retailer/products/${ean}/placement"; $options = [ @@ -985,7 +986,7 @@ public function getProductRatings(string $ean): array /** * Gets a paginated list of all promotions for a retailer. - * @param array $promotionType The type(s) of promotion to be retrieved. + * @param string $promotionType The type(s) of promotion to be retrieved. * @param int|null $page The requested page number with a page size of 50 items. * @return Model\ReducedPromotion[] * @throws Exception\ConnectException when an error occurred in the HTTP connection. @@ -994,7 +995,7 @@ public function getProductRatings(string $ean): array * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getPromotions(array $promotionType, ?int $page = 1): array + public function getPromotions(string $promotionType, ?int $page = 1): array { $url = "retailer/promotions"; $options = [ @@ -1307,7 +1308,7 @@ public function putReplenishment(string $replenishmentId, Model\UpdateReplenishm * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getLoadCarrierLabels(string $replenishmentId, ?string $labelType = 'WAREHOUSE'): ?string + public function getLoadCarrierLabels(string $replenishmentId, ?string $labelType = null): ?string { $url = "retailer/replenishments/${replenishmentId}/load-carrier-labels"; $options = [ @@ -1386,7 +1387,7 @@ public function getRetailerInformation(string $retailerId): ?Model\RetailerInfor * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getReturns(?int $page = 1, ?bool $handled = null, ?string $fulfilmentMethod = 'FBR'): array + public function getReturns(?int $page = 1, ?bool $handled = null, ?string $fulfilmentMethod = null): array { $url = "retailer/returns"; $options = [ @@ -1421,6 +1422,7 @@ public function createReturn(Model\CreateReturnRequest $createReturnRequest): Mo $options = [ 'body' => $createReturnRequest, 'produces' => 'application/vnd.retailer.v9+json', + 'consumes' => 'application/json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1457,7 +1459,7 @@ public function getReturn(string $returnId): ?Model\ReturnObject * Allows the user to handle a return. This can be to either handle an open return, or change the handlingResult of * an already handled return. Please refer to the Returns documentation for further details. * @param int $rmaId The RMA (Return Merchandise Authorization) identifier of the return. - * @param Model\ReturnRequest $returnRequest The handling result requested by the retailer. + * @param Model\ReturnRequest $returnRequest * @return Model\ProcessStatus * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1495,7 +1497,7 @@ public function handleReturn(int $rmaId, Model\ReturnRequest $returnRequest): Mo * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function getShipments(?int $page = 1, ?string $fulfilmentMethod = 'FBR', ?string $orderId = null): array + public function getShipments(?int $page = 1, ?string $fulfilmentMethod = null, ?string $orderId = null): array { $url = "retailer/shipments"; $options = [ @@ -1617,7 +1619,8 @@ public function getShippingLabel(string $shippingLabelId): ?string } /** - * Retrieve a list of all configured and active push notification subscriptions. + * 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). * @return Model\SubscriptionResponse[] * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1629,7 +1632,7 @@ public function getPushNotificationSubscriptions(): array { $url = "retailer/subscriptions"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\SubscriptionsResponse::class, @@ -1639,9 +1642,9 @@ public function getPushNotificationSubscriptions(): array } /** - * Create a push notification subscription for one (or more) of the available resources. The configured URL has to - * support https scheme. - * @param Model\CreateSubscriptionRequest $createSubscriptionRequest + * 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). + * @param Model\SubscriptionRequest $subscriptionRequest * @return Model\ProcessStatus * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1649,13 +1652,13 @@ public function getPushNotificationSubscriptions(): array * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function postPushNotificationSubscription(Model\CreateSubscriptionRequest $createSubscriptionRequest): Model\ProcessStatus + public function postPushNotificationSubscription(Model\SubscriptionRequest $subscriptionRequest): Model\ProcessStatus { $url = "retailer/subscriptions"; $options = [ - 'body' => $createSubscriptionRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'body' => $subscriptionRequest, + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1678,7 +1681,7 @@ public function getSubscriptionKeys(): array { $url = "retailer/subscriptions/signature-keys"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\KeySetResponse::class, @@ -1689,7 +1692,8 @@ public function getSubscriptionKeys(): array /** * Send a test push notification to all subscriptions for the provided event. - * @param string $subscriptionId A unique identifier for the subscription. + * @param string $subscriptionId The unique identifier assigned to each event notification subscription. This ID is + * used for tracking and managing each subscription. * @return Model\ProcessStatus * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1701,8 +1705,7 @@ public function postTestPushNotification(string $subscriptionId): Model\ProcessS { $url = "retailer/subscriptions/test/${subscriptionId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1712,8 +1715,10 @@ public function postTestPushNotification(string $subscriptionId): Model\ProcessS } /** - * Retrieve a configured and active push notification subscription with the provided id. - * @param string $subscriptionId A unique identifier for the subscription. + * 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). + * @param string $subscriptionId The unique identifier assigned to each event notification subscription. This ID is + * used for tracking and managing each subscription. * @return Model\SubscriptionResponse|null * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1725,7 +1730,7 @@ public function getPushNotificationSubscription(string $subscriptionId): ?Model\ { $url = "retailer/subscriptions/${subscriptionId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '200' => Model\SubscriptionResponse::class, @@ -1736,10 +1741,11 @@ public function getPushNotificationSubscription(string $subscriptionId): ?Model\ } /** - * Update an existing push notification subscription with the supplied id. The configured URL has to support https - * scheme. - * @param string $subscriptionId A unique identifier for the subscription. - * @param Model\UpdateSubscriptionRequest $updateSubscriptionRequest + * 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). + * @param string $subscriptionId The unique identifier assigned to each event notification subscription. This ID is + * used for tracking and managing each subscription. + * @param Model\SubscriptionRequest $subscriptionRequest * @return Model\ProcessStatus * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1747,13 +1753,13 @@ public function getPushNotificationSubscription(string $subscriptionId): ?Model\ * @throws Exception\RateLimitException when the throttling limit has been reached for the API user. * @throws Exception\Exception when something unexpected went wrong. */ - public function putPushNotificationSubscription(string $subscriptionId, Model\UpdateSubscriptionRequest $updateSubscriptionRequest): Model\ProcessStatus + public function putPushNotificationSubscription(string $subscriptionId, Model\SubscriptionRequest $subscriptionRequest): Model\ProcessStatus { $url = "retailer/subscriptions/${subscriptionId}"; $options = [ - 'body' => $updateSubscriptionRequest, - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'body' => $subscriptionRequest, + 'produces' => 'application/vnd.retailer.v10+json', + 'consumes' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1763,8 +1769,9 @@ public function putPushNotificationSubscription(string $subscriptionId, Model\Up } /** - * Delete a push notification subscription with the provided id. - * @param string $subscriptionId A unique identifier for the subscription. + * Deletes a specific event notification subscription associated with a retailer. + * @param string $subscriptionId The unique identifier assigned to each event notification subscription. This ID is + * used for tracking and managing each subscription. * @return Model\ProcessStatus * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1776,8 +1783,7 @@ public function deletePushNotificationSubscription(string $subscriptionId): Mode { $url = "retailer/subscriptions/${subscriptionId}"; $options = [ - 'produces' => 'application/vnd.retailer.v9+json', - 'consumes' => 'application/vnd.retailer.v9+json', + 'produces' => 'application/vnd.retailer.v10+json', ]; $responseTypes = [ '202' => Model\ProcessStatus::class, @@ -1790,7 +1796,7 @@ public function deletePushNotificationSubscription(string $subscriptionId): Mode * Add information to an existing transport. The transport id is part of the shipment. You can retrieve the * transport id through the GET shipment list request. * @param string $transportId The transport id. - * @param Model\ChangeTransportRequest $changeTransportRequest The change transport requested by the user. + * @param Model\ChangeTransportRequest $changeTransportRequest * @return Model\ProcessStatus * @throws Exception\ConnectException when an error occurred in the HTTP connection. * @throws Exception\ResponseException when an unexpected response was received. @@ -1841,8 +1847,8 @@ public function getPriceStarBoundaries(string $ean): ?Model\PriceStarBoundaries * 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 array $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. + * @param string|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. @@ -1850,7 +1856,7 @@ public function getPriceStarBoundaries(string $ean): ?Model\PriceStarBoundaries * @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, array $state = []): array + public function getInvoiceRequests(?string $shipmentId = null, ?int $page = 1, ?string $state = null): array { $url = "retailer/shipments/invoices/requests"; $options = [ @@ -1872,8 +1878,8 @@ public function getInvoiceRequests(?string $shipmentId = null, ?int $page = 1, a /** * Uploads an invoice associated with shipment id. - * @param string $invoice The invoice file. * @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. @@ -1881,7 +1887,7 @@ public function getInvoiceRequests(?string $shipmentId = null, ?int $page = 1, a * @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 $invoice, string $shipmentId): ?Model\ProcessStatus + public function uploadInvoice(string $shipmentId, string $invoice): ?Model\ProcessStatus { $url = "retailer/shipments/invoices/${shipmentId}"; $options = [ diff --git a/src/OpenApi/ClientGenerator.php b/src/OpenApi/ClientGenerator.php index 0209c7b..ec5a840 100644 --- a/src/OpenApi/ClientGenerator.php +++ b/src/OpenApi/ClientGenerator.php @@ -19,7 +19,6 @@ class ClientGenerator 'integer' => 'int', 'float' => 'float', 'number' => 'float', - 'file' => 'string', ]; public function __construct() @@ -76,7 +75,7 @@ protected function generateMethod(string $path, string $httpMethod, array &$code } $methodName = $this->getMethodName($methodDefinition['operationId']); - $arguments = $this->extractArguments($methodDefinition['parameters'] ?? []); + $arguments = $this->extractArguments($methodDefinition); $nullableReturnType = false; if (isset($methodDefinition['responses']['404'])) { @@ -109,10 +108,12 @@ protected function generateMethod(string $path, string $httpMethod, array &$code $this->addQueryParams($arguments, $code); $this->addBodyParam($arguments, $code); $this->addFormData($arguments, $code); - $code[] = sprintf(' \'produces\' => \'%s\',', $methodDefinition['produces'][0]); - if ($methodDefinition['consumes'] ?? false) { - $code[] = sprintf(' \'consumes\' => \'%s\',', $methodDefinition['consumes'][0]); + $responseContent = $methodDefinition['responses']['200']['content'] ?? $methodDefinition['responses']['202']['content'] ?? $methodDefinition['responses']['400']['content'] ?? null; + $code[] = sprintf(' \'produces\' => \'%s\',', array_key_first($responseContent)); + + if ($methodDefinition['requestBody']['content'] ?? false) { + $code[] = sprintf(' \'consumes\' => \'%s\',', array_key_first($methodDefinition['requestBody']['content'])); } $code[] = ' ];'; @@ -154,7 +155,7 @@ protected function generateMethod(string $path, string $httpMethod, array &$code protected function getType(string $ref): string { - //strip #/definitions/ + //strip #/components/schemas/ $type = substr($ref, strrpos($ref, '/') + 1); // There are some weird types like 'delivery windows for inbound shipments.', uppercase and concat @@ -239,12 +240,12 @@ protected function getUrl(string $path, array $arguments): string return $url; } - protected function extractArguments(array $parameters): array + protected function extractArguments(array $methodDefinition): array { $argsWithoutDefault = []; $argsWithDefault = []; - foreach ($parameters as $parameter) { + foreach ($methodDefinition['parameters'] ?? [] as $parameter) { $argument = [ 'default' => null, 'description' => $parameter['description'] ?? null, @@ -253,57 +254,20 @@ protected function extractArguments(array $parameters): array 'required' => $parameter['required'] ]; - if ($parameter['in'] == 'body') { - //strip #/definitions/ - $ref = $parameter['schema']['$ref']; - $type = $this->getType($ref); - $apiType = substr($ref, strrpos($ref, '/') + 1); - - // extract property if it's a model that wraps an array - $refDefinition = $this->specs['definitions'][$apiType]; - if (count($refDefinition['properties']) == 1) { - $property = array_keys($refDefinition['properties'])[0]; - $propDefinition = $refDefinition['properties'][$property]; - - if (isset($propDefinition['type']) && $propDefinition['type'] == 'array') { - $itemsType = $this->getType($propDefinition['items']['$ref']); - $argument['doc'] = 'Model\\' . $itemsType . '[]'; - $argument['php'] = 'array'; - } elseif (isset($propDefinition['type'])) { - $wrappingType = static::$paramTypeMapping[$propDefinition['type']]; - $argument['doc'] = $wrappingType; - $argument['php'] = $wrappingType; - } else { - $wrappingType = $this->getType($propDefinition['$ref']); - $argument['doc'] = 'Model\\' . $wrappingType; - $argument['php'] = 'Model\\' . $wrappingType; - } - $argument['property'] = $property; - $argument['name'] = $property; - $argument['wrapperPhp'] = 'Model\\' . $type; - } - - if (!isset($argument['property'])) { - $argument['php'] = 'Model\\' . $type; - $argument['doc'] = $argument['php']; - $argument['name'] = lcfirst($type); - } - } elseif ($parameter['in'] == 'formData') { - $argument['php'] = static::$paramTypeMapping[$parameter['type']]; - $argument['doc'] = $argument['php']; - $argument['name'] = $this->kebabCaseToCamelCase($parameter['name']); - $argument['is_file'] = 'file' === $parameter['type']; + if ($parameter['in'] == 'query' && isset($parameter['schema']['$ref'])) { + continue; } else { - $argument['php'] = static::$paramTypeMapping[$parameter['type']]; + $argument['php'] = static::$paramTypeMapping[$parameter['schema']['type']]; $argument['doc'] = $argument['php']; $argument['name'] = $this->kebabCaseToCamelCase($parameter['name']); $argument['paramName'] = $parameter['name']; - if (isset($parameter['default'])) { - if ($parameter['type'] == 'string') { - $defaultValue = str_replace(['\''], ['\\\''], $parameter['default']); + + if (isset($parameter['schema']['default'])) { + if ($parameter['schema']['type'] == 'string') { + $defaultValue = str_replace(['\''], ['\\\''], $parameter['schema']['default']); $argument['default'] = sprintf('\'%s\'', $defaultValue); } else { - $argument['default'] = $parameter['default']; + $argument['default'] = $parameter['schema']['default']; } } } @@ -329,6 +293,72 @@ protected function extractArguments(array $parameters): array } } + if (isset($methodDefinition['requestBody']['content']) && $requestBody = current($methodDefinition['requestBody']['content'])) { + if (isset($requestBody['schema']['$ref'])) { + $argument = [ + 'default' => null, + 'description' => null, + 'in' => 'body', + 'paramName' => null, + 'required' => $methodDefinition['requestBody']['required'] + ]; + + //strip #/components/schemas/ + $ref = $requestBody['schema']['$ref']; + $type = $this->getType($ref); + $apiType = substr($ref, strrpos($ref, '/') + 1); + + // extract property if it's a model that wraps an array + $refSchema = $this->specs['components']['schemas'][$apiType]; + if (count($refSchema['properties']) == 1) { + $property = array_keys($refSchema['properties'])[0]; + $propSchema = $refSchema['properties'][$property]; + + if (isset($propSchema['type']) && $propSchema['type'] == 'array') { + $itemsType = $this->getType($propSchema['items']['$ref']); + $argument['doc'] = 'Model\\'.$itemsType.'[]'; + $argument['php'] = 'array'; + } elseif (isset($propSchema['type'])) { + $wrappingType = static::$paramTypeMapping[$propSchema['type']]; + $argument['doc'] = $wrappingType; + $argument['php'] = $wrappingType; + } else { + $wrappingType = $this->getType($propSchema['$ref']); + $argument['doc'] = 'Model\\'.$wrappingType; + $argument['php'] = 'Model\\'.$wrappingType; + } + $argument['property'] = $property; + $argument['name'] = $property; + $argument['wrapperPhp'] = 'Model\\'.$type; + } + + if (!isset($argument['property'])) { + $argument['php'] = 'Model\\'.$type; + $argument['doc'] = $argument['php']; + $argument['name'] = lcfirst($type); + } + + $argsWithoutDefault[] = $argument; + } elseif (array_key_first($methodDefinition['requestBody']['content']) == 'multipart/form-data') { + foreach ($requestBody['schema']['properties'] as $propName => $property) { + $argument = [ + 'default' => null, + 'description' => null, + 'in' => 'formData', + 'paramName' => null, + 'required' => $methodDefinition['requestBody']['required'] + ]; + + $argument['php'] = static::$paramTypeMapping[$property['type']]; + $argument['doc'] = $argument['php']; + $argument['name'] = $this->kebabCaseToCamelCase($propName); + $argument['is_file'] = 'binary' === $property['format']; + + $argsWithoutDefault[] = $argument; + } + } + } + return array_merge($argsWithoutDefault, $argsWithDefault); } @@ -444,6 +474,8 @@ protected function addResponseTypes(array $responses, array &$code): void foreach ($responses as $httpStatus => $response) { $type = null; if (in_array($httpStatus, ['200', '202'])) { + $response = current($response['content'] ?? []); + if (! isset($response['schema'])) { // There are 2 methods that return a csv, but have no response type defined $type = '\'string\''; @@ -469,22 +501,24 @@ protected function getReturnType(array $responses): array throw new \Exception('Could not fit responseType'); } + $response = current($response['content'] ?? []); + if (! isset($response['schema'])) { // There are 2 methods that return a csv, but have no response type defined return ['doc' => 'string', 'php' => 'string']; } elseif (isset($response['schema']['$ref'])) { - //strip #/definitions/ + //strip #/components/schemas/ $ref = $response['schema']['$ref']; $apiType = substr($ref, strrpos($ref, '/') + 1); // extract property if it's a model that wraps an array - $refDefinition = $this->specs['definitions'][$apiType]; - if (count($refDefinition['properties']) == 1) { - $property = array_keys($refDefinition['properties'])[0]; - if (isset($refDefinition['properties'][$property]['type'], $refDefinition['properties'][$property]['items']['$ref']) && $refDefinition['properties'][$property]['type'] == 'array') { + $refSchema = $this->specs['components']['schemas'][$apiType]; + if (count($refSchema['properties']) == 1) { + $property = array_keys($refSchema['properties'])[0]; + if (isset($refSchema['properties'][$property]['type'], $refSchema['properties'][$property]['items']['$ref']) && $refSchema['properties'][$property]['type'] == 'array') { return [ 'doc' => 'Model\\' . $this->getType( - $refDefinition['properties'][$property]['items']['$ref'] + $refSchema['properties'][$property]['items']['$ref'] ) . '[]', 'php' => 'array', 'property' => $property @@ -497,7 +531,7 @@ protected function getReturnType(array $responses): array } else { // currently only array is support - if ($response['schema']['type'] != 'array' || $response['schema']['items']['format'] != 'byte') { + if ($response['schema']['type'] != 'string' || $response['schema']['format'] != 'byte') { throw new \Exception("Only Models and raw bytes are supported as response type"); } return ['doc' => 'string', 'php' => 'string', '']; diff --git a/src/OpenApi/SwaggerSpecs.php b/src/OpenApi/SwaggerSpecs.php index 83e80d8..0f7a39e 100644 --- a/src/OpenApi/SwaggerSpecs.php +++ b/src/OpenApi/SwaggerSpecs.php @@ -41,7 +41,7 @@ public function merge(SwaggerSpecs $specs): SwaggerSpecs $otherSpecs = $specs->getSpecs(); $resultSpecs['paths'] = array_merge($resultSpecs['paths'], $otherSpecs['paths']); - $resultSpecs['definitions'] = array_merge($resultSpecs['definitions'], $otherSpecs['definitions']); + $resultSpecs['components']['schemas'] = array_merge($resultSpecs['components']['schemas'], $otherSpecs['components']['schemas']); return new SwaggerSpecs($resultSpecs); } From 2f73c0e5ffaeb70237ef6470df1c8be8f99ff4d6 Mon Sep 17 00:00:00 2001 From: "WoutervanderLoop.nl" Date: Tue, 22 Aug 2023 14:13:00 +0200 Subject: [PATCH 3/3] Upgrade Models and ModelGenerator to support OpenAPI v3 --- src/Model/CancellationRequest.php | 26 +++++++++ src/Model/Offer.php | 3 +- src/Model/Order.php | 6 +- src/Model/Problem.php | 37 +++++++------ src/Model/ProductListFiltersRequest.php | 44 +++++++++++++++ src/Model/ProductListRequest.php | 2 +- src/Model/ReducedReturnItem.php | 2 +- src/Model/ReturnItem.php | 4 +- src/Model/Shipment.php | 6 +- src/Model/SubCategory.php | 6 -- src/Model/SubscriptionRequest.php | 41 ++++++++++++++ src/Model/SubscriptionResponse.php | 15 ++++- src/Model/Violation.php | 4 +- src/OpenApi/ModelGenerator.php | 73 +++++++++++++------------ 14 files changed, 199 insertions(+), 70 deletions(-) create mode 100644 src/Model/CancellationRequest.php create mode 100644 src/Model/ProductListFiltersRequest.php create mode 100644 src/Model/SubscriptionRequest.php diff --git a/src/Model/CancellationRequest.php b/src/Model/CancellationRequest.php new file mode 100644 index 0000000..a8797cc --- /dev/null +++ b/src/Model/CancellationRequest.php @@ -0,0 +1,26 @@ + [ 'model' => OrderItemCancellation::class, 'array' => true ], + ]; + } + + /** + * @var OrderItemCancellation[] List of order items to cancel. Order item id's must belong to the same order. + */ + public $orderItems = []; +} diff --git a/src/Model/Offer.php b/src/Model/Offer.php index 3a37c01..f652437 100644 --- a/src/Model/Offer.php +++ b/src/Model/Offer.php @@ -76,7 +76,8 @@ public function getModelDefinition(): array public $minDeliveryDate; /** - * @var string The date at which package can be delivered to customer latest. + * @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. */ public $maxDeliveryDate; } diff --git a/src/Model/Order.php b/src/Model/Order.php index fefa423..f478d2e 100644 --- a/src/Model/Order.php +++ b/src/Model/Order.php @@ -40,12 +40,14 @@ public function getModelDefinition(): array public $orderPlacedDateTime; /** - * @var ShipmentDetails + * @var ShipmentDetails The address details where this order needs to be shipped to. This can be the customers' own + * address, a (company) business address or a Pick Up Point address. */ public $shipmentDetails; /** - * @var BillingDetails + * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this + * shipment. */ public $billingDetails; diff --git a/src/Model/Problem.php b/src/Model/Problem.php index 14c2252..02ddc33 100644 --- a/src/Model/Problem.php +++ b/src/Model/Problem.php @@ -15,49 +15,54 @@ class Problem extends AbstractModel public function getModelDefinition(): array { return [ + 'instance' => [ 'model' => null, 'array' => false ], 'type' => [ 'model' => null, 'array' => false ], + 'host' => [ 'model' => null, 'array' => false ], + 'causedBy' => [ 'model' => Problem::class, 'array' => false ], 'title' => [ 'model' => null, 'array' => false ], 'status' => [ 'model' => null, 'array' => false ], - 'detail' => [ 'model' => null, 'array' => false ], - 'host' => [ 'model' => null, 'array' => false ], - 'instance' => [ 'model' => null, 'array' => false ], 'violations' => [ 'model' => Violation::class, 'array' => true ], + 'detail' => [ 'model' => null, 'array' => false ], ]; } /** - * @var string Type URI for this problem. Fixed value: https://api.bol.com/problems. + * @var string */ - public $type; + public $instance; /** - * @var string Title describing the nature of the problem. + * @var string */ - public $title; + public $type; /** - * @var int HTTP status returned from the endpoint causing the problem. + * @var string */ - public $status; + public $host; /** - * @var string Detailed error message describing in additional detail what caused the service to return this - * problem. + * @var Problem Describes a problem that occurred interacting with the API. */ - public $detail; + public $causedBy; /** - * @var string Host identifier describing the server instance that reported the problem. + * @var string */ - public $host; + public $title; /** - * @var string Full URI path of the resource that reported the problem. + * @var int */ - public $instance; + public $status; /** * @var Violation[] */ public $violations = []; + + /** + * @var string + */ + public $detail; } diff --git a/src/Model/ProductListFiltersRequest.php b/src/Model/ProductListFiltersRequest.php new file mode 100644 index 0000000..9178cdf --- /dev/null +++ b/src/Model/ProductListFiltersRequest.php @@ -0,0 +1,44 @@ + [ 'model' => null, 'array' => false ], + 'categoryId' => [ 'model' => null, 'array' => false ], + 'search' => [ 'model' => null, 'array' => false ], + 'category' => [ 'model' => null, 'array' => false ], + ]; + } + + /** + * @var string + */ + public $searchTerm; + + /** + * @var string + */ + public $categoryId; + + /** + * @var string + */ + public $search; + + /** + * @var string + */ + public $category; +} diff --git a/src/Model/ProductListRequest.php b/src/Model/ProductListRequest.php index d595fdf..9ca050d 100644 --- a/src/Model/ProductListRequest.php +++ b/src/Model/ProductListRequest.php @@ -26,7 +26,7 @@ public function getModelDefinition(): array } /** - * @var string The country for which the products will be retrieved. Default value: NL + * @var string The country for which the products will be retrieved. */ public $countryCode; diff --git a/src/Model/ReducedReturnItem.php b/src/Model/ReducedReturnItem.php index 5ce86c5..bda0c99 100644 --- a/src/Model/ReducedReturnItem.php +++ b/src/Model/ReducedReturnItem.php @@ -47,7 +47,7 @@ public function getModelDefinition(): array public $expectedQuantity; /** - * @var ReturnReason + * @var ReturnReason The reason why the customer returned this product. */ public $returnReason; diff --git a/src/Model/ReturnItem.php b/src/Model/ReturnItem.php index 5baff62..c796a4b 100644 --- a/src/Model/ReturnItem.php +++ b/src/Model/ReturnItem.php @@ -56,7 +56,7 @@ public function getModelDefinition(): array public $expectedQuantity; /** - * @var ReturnReason + * @var ReturnReason The reason why the customer returned this product. */ public $returnReason; @@ -81,7 +81,7 @@ public function getModelDefinition(): array public $processingResults = []; /** - * @var CustomerDetails + * @var CustomerDetails Information related to the customer. */ public $customerDetails; } diff --git a/src/Model/Shipment.php b/src/Model/Shipment.php index 6f8579f..5229265 100644 --- a/src/Model/Shipment.php +++ b/src/Model/Shipment.php @@ -53,12 +53,14 @@ public function getModelDefinition(): array public $order; /** - * @var ShipmentDetails + * @var ShipmentDetails The address details where this order needs to be shipped to. This can be the customers' own + * address, a (company) business address or a Pick Up Point address. */ public $shipmentDetails; /** - * @var BillingDetails + * @var BillingDetails The details of the customer that is responsible for the financial fulfillment of this + * shipment. */ public $billingDetails; diff --git a/src/Model/SubCategory.php b/src/Model/SubCategory.php index 8435d9e..cab08f6 100644 --- a/src/Model/SubCategory.php +++ b/src/Model/SubCategory.php @@ -17,7 +17,6 @@ public function getModelDefinition(): array return [ 'id' => [ 'model' => null, 'array' => false ], 'name' => [ 'model' => null, 'array' => false ], - 'subcategories' => [ 'model' => SubCategory::class, 'array' => true ], ]; } @@ -30,9 +29,4 @@ public function getModelDefinition(): array * @var string The name of the subcategory which the product belongs to. */ public $name; - - /** - * @var SubCategory[] The subcategories which the product belongs to. - */ - public $subcategories = []; } diff --git a/src/Model/SubscriptionRequest.php b/src/Model/SubscriptionRequest.php new file mode 100644 index 0000000..6f7db5d --- /dev/null +++ b/src/Model/SubscriptionRequest.php @@ -0,0 +1,41 @@ + [ 'model' => null, 'array' => true ], + 'url' => [ 'model' => null, 'array' => false ], + 'subscriptionType' => [ 'model' => null, 'array' => false ], + ]; + } + + /** + * @var array Array of event types for which the subscription is set. Note that some event types are only available + * for certain subscription types. + */ + public $resources = []; + + /** + * @var string 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. + */ + public $url; + + /** + * @var string 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. + */ + public $subscriptionType; +} diff --git a/src/Model/SubscriptionResponse.php b/src/Model/SubscriptionResponse.php index f9db0cd..d1d3978 100644 --- a/src/Model/SubscriptionResponse.php +++ b/src/Model/SubscriptionResponse.php @@ -18,21 +18,30 @@ public function getModelDefinition(): array 'id' => [ 'model' => null, 'array' => false ], 'resources' => [ 'model' => null, 'array' => true ], 'url' => [ 'model' => null, 'array' => false ], + 'subscriptionType' => [ 'model' => null, 'array' => false ], ]; } /** - * @var string A unique identifier for the subscription. + * @var string The unique identifier assigned to each event notification subscription. This ID is used for tracking + * and managing each subscription. */ public $id; /** - * @var array Type of event. + * @var array */ public $resources = []; /** - * @var string URL to receive this WebHook notification. + * @var string 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. */ public $url; + + /** + * @var string 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. + */ + public $subscriptionType; } diff --git a/src/Model/Violation.php b/src/Model/Violation.php index bb1b63a..33e2985 100644 --- a/src/Model/Violation.php +++ b/src/Model/Violation.php @@ -21,12 +21,12 @@ public function getModelDefinition(): array } /** - * @var string Describes the origin of the error, for instance a field or query parameter validation error. + * @var string */ public $name; /** - * @var string Detailed description of the validation error that caused the problem. + * @var string */ public $reason; } diff --git a/src/OpenApi/ModelGenerator.php b/src/OpenApi/ModelGenerator.php index c52a113..1f47472 100644 --- a/src/OpenApi/ModelGenerator.php +++ b/src/OpenApi/ModelGenerator.php @@ -34,16 +34,15 @@ public static function run() public function generateModels(): void { - foreach ($this->specs['definitions'] as $type => $modelDefinition) { + foreach ($this->specs['components']['schemas'] as $type => $modelSchema) { $this->generateModel($type); } } public function generateModel($type): void { - - $modelDefinition = $this->specs['definitions'][$type]; - $type = $this->getType('#/definitions/' . $type); + $modelSchema = $this->specs['components']['schemas'][$type]; + $type = $this->getType('#/components/schemas/' . $type); echo $type . "..."; @@ -56,23 +55,19 @@ public function generateModel($type): void $code[] = sprintf('class %s extends AbstractModel', $type); $code[] = '{'; // TODO Add enums - $this->generateDefinition($modelDefinition, $code); - $this->generateFields($modelDefinition, $code); - $this->generateDateTimeGetters($modelDefinition, $code); - $this->generateMonoFieldAccessors($modelDefinition, $code); + $this->generateSchema($modelSchema, $code); + $this->generateFields($modelSchema, $code); + $this->generateDateTimeGetters($modelSchema, $code); + $this->generateMonoFieldAccessors($modelSchema, $code); $code[] = '}'; $code[] = ''; - //print_r($modelDefinition); - - //echo implode("\n", $code); - file_put_contents(__DIR__ . '/../Model/' . $type . '.php', implode("\n", $code)); echo "ok\n"; } - protected function generateDefinition(array $modelDefinition, array &$code): void + protected function generateSchema(array $modelSchema, array &$code): void { $code[] = ' /**'; $code[] = ' * Returns the definition of the model: an associative array with field names as key and'; @@ -85,7 +80,7 @@ protected function generateDefinition(array $modelDefinition, array &$code): voi $code[] = ' {'; $code[] = ' return ['; - foreach ($modelDefinition['properties'] as $name => $propDefinition) { + foreach ($modelSchema['properties'] as $name => $propDefinition) { $model = 'null'; $array = 'false'; @@ -103,18 +98,16 @@ protected function generateDefinition(array $modelDefinition, array &$code): voi throw new \Exception('Unknown property definition'); } - $code[] = sprintf(' \'%s\' => [ \'model\' => %s, \'array\' => %s ],', $name, $model, $array); + $code[] = sprintf(' \'%s\' => [ \'model\' => %s, \'array\' => %s ],', $this->kebabCaseToCamelCase($name), $model, $array); } $code[] = ' ];'; $code[] = ' }'; } - protected function generateFields(array $modelDefinition, array &$code): void + protected function generateFields(array $modelSchema, array &$code): void { - - - foreach ($modelDefinition['properties'] as $name => $propDefinition) { + foreach ($modelSchema['properties'] as $name => $propDefinition) { if (isset($propDefinition['type'])) { $propType = static::$propTypeMapping[$propDefinition['type']]; if ($propType == 'array' && isset($propDefinition['items']['$ref'])) { @@ -130,8 +123,8 @@ protected function generateFields(array $modelDefinition, array &$code): void $code[] = ''; $code[] = ' /**'; - if (isset($propDefinition['description'])) { - $code[] = $this->wrapComment(sprintf('@var %s %s', $propType, $propDefinition['description']), ' * '); + if (isset($propDefinition['description']) || isset($this->specs['components']['schemas'][$propType]['description'])) { + $code[] = $this->wrapComment(sprintf('@var %s %s', $propType, $propDefinition['description'] ?? $this->specs['components']['schemas'][$propType]['description']), ' * '); } else { $code[] = sprintf(' * @var %s', $propType); } @@ -139,16 +132,16 @@ protected function generateFields(array $modelDefinition, array &$code): void $code[] = ' */'; if (isset($propDefinition['type']) && $propDefinition['type'] == 'array') { - $code[] = sprintf(' public $%s = [];', $name); + $code[] = sprintf(' public $%s = [];', $this->kebabCaseToCamelCase($name)); } else { - $code[] = sprintf(' public $%s;', $name); + $code[] = sprintf(' public $%s;', $this->kebabCaseToCamelCase($name)); } } } - protected function generateDateTimeGetters(array $modelDefinition, array &$code): void + protected function generateDateTimeGetters(array $modelSchema, array &$code): void { - foreach ($modelDefinition['properties'] as $name => $propDefinition) { + foreach ($modelSchema['properties'] as $name => $propDefinition) { if (strpos($name, 'DateTime') === false) { continue; } @@ -165,9 +158,9 @@ protected function generateDateTimeGetters(array $modelDefinition, array &$code) } } - protected function generateMonoFieldAccessors(array $modelDefinition, array &$code): void + protected function generateMonoFieldAccessors(array $modelSchema, array &$code): void { - $monoFields = $this->getFieldsWithMonoFieldModelType($modelDefinition); + $monoFields = $this->getFieldsWithMonoFieldModelType($modelSchema); foreach ($monoFields as $fieldName => $fieldProps) { if ($fieldProps['monoFieldType'] == 'array') { @@ -254,7 +247,7 @@ protected function generateMonoFieldAccessors(array $modelDefinition, array &$co protected function getType(string $ref): string { - //strip #/definitions/ + //strip #/components/schemas/ $type = substr($ref, strrpos($ref, '/') + 1); // There are some weird types like 'delivery windows for inbound shipments.', uppercase and concat @@ -279,11 +272,11 @@ protected function getModelNamespace(): string return $namespace . '\Model'; } - protected function getFieldsWithMonoFieldModelType(array $modelDefinition): array + protected function getFieldsWithMonoFieldModelType(array $modelSchema): array { $fields = []; - foreach ($modelDefinition['properties'] as $propName => $propDefinition) { + foreach ($modelSchema['properties'] as $propName => $propDefinition) { $isArray = null; if (isset($propDefinition['$ref'])) { $propType = $this->getType($propDefinition['$ref']); @@ -295,17 +288,17 @@ protected function getFieldsWithMonoFieldModelType(array $modelDefinition): arra $propType = $propDefinition['type']; } - if (!isset($this->specs['definitions'][$propType])) { + if (!isset($this->specs['components']['schemas'][$propType])) { continue; } - if (count($this->specs['definitions'][$propType]['properties']) != 1) { + if (count($this->specs['components']['schemas'][$propType]['properties']) != 1) { continue; } - $subPropName = array_keys($this->specs['definitions'][$propType]['properties'])[0]; + $subPropName = array_keys($this->specs['components']['schemas'][$propType]['properties'])[0]; - $subProp = $this->specs['definitions'][$propType]['properties'][$subPropName]; + $subProp = $this->specs['components']['schemas'][$propType]['properties'][$subPropName]; if (isset($subProp['type'])) { $subPropType = $subProp['type']; } elseif (isset($subProp['$ref'])) { @@ -325,6 +318,18 @@ protected function getFieldsWithMonoFieldModelType(array $modelDefinition): arra return $fields; } + protected function kebabCaseToCamelCase(string $name): string + { + // Fix for bug in specs where name contains spaces (e.g. 'get packing list') + $name = str_replace(' ', '-', $name); + + $nameElems = explode('-', $name); + for ($i=1; $i