{ "swagger": "2.0", "info": { "description": "Swagger (OpenAPI) Spec of all Flamingo Commerce modules", "title": "Flamingo Commerce API Spec", "contact": { "name": "Flamingo", "url": "https://gitter.im/i-love-flamingo/community#", "email": "flamingo@aoe.com" }, "license": { "name": "MIT" }, "version": "1.0" }, "paths": { "/api/v1/cart": { "get": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Get the current cart", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.getCartResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Remove all stored cart information e.g. items, deliveries, billing address and returns the empty cart.", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/billing": { "put": { "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Adds billing infos to the current cart", "parameters": [ { "type": "string", "description": "vat", "name": "vat", "in": "formData" }, { "type": "string", "description": "firstname", "name": "firstname", "in": "formData", "required": true }, { "type": "string", "description": "lastname", "name": "lastname", "in": "formData", "required": true }, { "type": "string", "description": "middlename", "name": "middlename", "in": "formData" }, { "type": "string", "description": "title", "name": "title", "in": "formData" }, { "type": "string", "description": "salutation", "name": "salutation", "in": "formData" }, { "type": "string", "description": "street", "name": "street", "in": "formData" }, { "type": "string", "description": "streetNr", "name": "streetNr", "in": "formData" }, { "type": "string", "description": "addressLine1", "name": "addressLine1", "in": "formData" }, { "type": "string", "description": "addressLine2", "name": "addressLine2", "in": "formData" }, { "type": "string", "description": "company", "name": "company", "in": "formData" }, { "type": "string", "description": "postCode", "name": "postCode", "in": "formData" }, { "type": "string", "description": "city", "name": "city", "in": "formData" }, { "type": "string", "description": "state", "name": "state", "in": "formData" }, { "type": "string", "description": "regionCode", "name": "regionCode", "in": "formData" }, { "type": "string", "description": "country", "name": "country", "in": "formData" }, { "type": "string", "description": "countryCode", "name": "countryCode", "in": "formData" }, { "type": "string", "description": "phoneAreaCode", "name": "phoneAreaCode", "in": "formData" }, { "type": "string", "description": "phoneCountryCode", "name": "phoneCountryCode", "in": "formData" }, { "type": "string", "description": "phoneNumber", "name": "phoneNumber", "in": "formData" }, { "type": "string", "description": "email", "name": "email", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/deliveries/items": { "delete": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Remove all cart items from all deliveries and return the cart, keeps the delivery info untouched.", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/delivery/{deliveryCode}": { "put": { "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Adds delivery infos, such as shipping address to the delivery for the cart", "parameters": [ { "type": "string", "description": "the identifier for the delivery in the cart", "name": "deliveryCode", "in": "path", "required": true }, { "type": "string", "description": "vat", "name": "deliveryAddress.vat", "in": "formData" }, { "type": "string", "description": "firstname", "name": "deliveryAddress.firstname", "in": "formData", "required": true }, { "type": "string", "description": "lastname", "name": "deliveryAddress.lastname", "in": "formData", "required": true }, { "type": "string", "description": "middlename", "name": "deliveryAddress.middlename", "in": "formData" }, { "type": "string", "description": "title", "name": "deliveryAddress.title", "in": "formData" }, { "type": "string", "description": "salutation", "name": "deliveryAddress.salutation", "in": "formData" }, { "type": "string", "description": "street", "name": "deliveryAddress.street", "in": "formData" }, { "type": "string", "description": "streetNr", "name": "deliveryAddress.streetNr", "in": "formData" }, { "type": "string", "description": "addressLine1", "name": "deliveryAddress.addressLine1", "in": "formData" }, { "type": "string", "description": "addressLine2", "name": "deliveryAddress.addressLine2", "in": "formData" }, { "type": "string", "description": "company", "name": "deliveryAddress.company", "in": "formData" }, { "type": "string", "description": "postCode", "name": "deliveryAddress.postCode", "in": "formData" }, { "type": "string", "description": "city", "name": "deliveryAddress.city", "in": "formData" }, { "type": "string", "description": "state", "name": "deliveryAddress.state", "in": "formData" }, { "type": "string", "description": "regionCode", "name": "deliveryAddress.regionCode", "in": "formData" }, { "type": "string", "description": "country", "name": "deliveryAddress.country", "in": "formData" }, { "type": "string", "description": "countryCode", "name": "deliveryAddress.countryCode", "in": "formData" }, { "type": "string", "description": "phoneAreaCode", "name": "deliveryAddress.phoneAreaCode", "in": "formData" }, { "type": "string", "description": "phoneCountryCode", "name": "deliveryAddress.phoneCountryCode", "in": "formData" }, { "type": "string", "description": "phoneNumber", "name": "deliveryAddress.phoneNumber", "in": "formData" }, { "type": "string", "description": "email", "name": "deliveryAddress.email", "in": "formData", "required": true }, { "type": "boolean", "description": "useBillingAddress", "name": "useBillingAddress", "in": "formData" }, { "type": "string", "description": "shippingMethod", "name": "shippingMethod", "in": "formData" }, { "type": "string", "description": "shippingCarrier", "name": "shippingCarrier", "in": "formData" }, { "type": "string", "description": "locationCode", "name": "locationCode", "in": "formData" }, { "type": "string", "format": "date-time", "description": "desired date/time in RFC3339", "name": "desiredTime", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Cleans the given delivery from the cart", "parameters": [ { "type": "string", "description": "the identifier for the delivery in the cart", "name": "deliveryCode", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/delivery/{deliveryCode}/item": { "put": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Update item in the cart", "parameters": [ { "type": "string", "description": "the identifier for the delivery in the cart", "name": "deliveryCode", "in": "path", "required": true }, { "type": "string", "description": "the item that should be updated", "name": "itemID", "in": "query", "required": true }, { "type": "integer", "description": "the new qty", "name": "qty", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } }, "post": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Add Item to cart", "parameters": [ { "type": "string", "description": "the identifier for the delivery in the cart", "name": "deliveryCode", "in": "path", "required": true }, { "type": "string", "description": "the product identifier that should be added", "name": "marketplaceCode", "in": "query", "required": true }, { "type": "string", "description": "optional the product identifier of the variant (for configurable products) that should be added", "name": "variantMarketplaceCode", "in": "query" }, { "type": "integer", "description": "optional the qty that should be added", "name": "qty", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Delete item from cart", "parameters": [ { "type": "string", "description": "the identifier for the delivery in the cart", "name": "deliveryCode", "in": "path", "required": true }, { "type": "string", "description": "the item that should be deleted", "name": "itemID", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/gift-card": { "post": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Apply Gift Card", "parameters": [ { "type": "string", "description": "the gift card code", "name": "couponCode", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Remove Gift Card", "parameters": [ { "type": "string", "description": "the couponCode that should be deleted as gift card", "name": "couponCode", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/payment-selection": { "put": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Update/set the PaymentSelection for the current cart", "parameters": [ { "type": "string", "description": "name of the payment gateway - e.g. 'offline'", "name": "gateway", "in": "query", "required": true }, { "type": "string", "description": "name of the payment method - e.g. 'offlinepayment_cashondelivery'", "name": "method", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/voucher": { "post": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Apply Voucher Code", "parameters": [ { "type": "string", "description": "the couponCode that should be applied", "name": "couponCode", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Remove Voucher Code", "parameters": [ { "type": "string", "description": "the couponCode that should be applied", "name": "couponCode", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/cart/voucher-gift-card": { "post": { "description": "Use this if you have one user input and that input can be used to either enter a voucher or a gift card", "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Apply Gift Card or Voucher (auto detected)", "parameters": [ { "type": "string", "description": "the couponCode that should be applied as gift card or voucher", "name": "couponCode", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CartAPIResult" } } } } }, "/api/v1/checkout/placeorder": { "get": { "produces": [ "application/json" ], "tags": [ "Checkout" ], "summary": "Returns the last saved context", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.placeOrderContext" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/checkoutError" } } } }, "put": { "produces": [ "application/json" ], "tags": [ "Checkout" ], "summary": "Starts the place order process, which is a background process handling payment and rollbacks if required.", "parameters": [ { "type": "string", "description": "the returnURL that should be used after an external payment flow", "name": "returnURL", "in": "query", "required": true } ], "responses": { "201": { "description": "201 if new process was started", "schema": { "$ref": "#/definitions/controller.startPlaceOrderResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/checkoutError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/checkoutError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "Checkout" ], "summary": "Clears the last placed order if in final state", "responses": { "200": { "description": "OK", "schema": { "type": "boolean" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/checkoutError" } } } } }, "/api/v1/checkout/placeorder/cancel": { "post": { "produces": [ "application/json" ], "tags": [ "Checkout" ], "summary": "Cancels a running place order process", "responses": { "200": { "description": "OK", "schema": { "type": "boolean" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/checkoutError" } } } } }, "/api/v1/checkout/placeorder/refresh": { "post": { "produces": [ "application/json" ], "tags": [ "Checkout" ], "summary": "Returns the current place order context and proceeds the process in a non blocking way", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.placeOrderContext" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/checkoutError" } } } } }, "/api/v1/checkout/placeorder/refresh-blocking": { "post": { "description": "This is useful to get the most recent place order context, for example after returning from an external payment provider", "produces": [ "application/json" ], "tags": [ "Checkout" ], "summary": "Proceeds the process and returns the place order context afterwards (blocking)", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.placeOrderContext" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/checkoutError" } } } } }, "/api/v1/payment/status": { "get": { "produces": [ "application/json" ], "tags": [ "Payment" ], "summary": "Get the payment status of current cart (or last placed cart)", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.FlowStatus" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cart.Cart" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/paymentResultError" } } } } }, "/api/v1/products/{marketplacecode}": { "get": { "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Gets the requested product", "parameters": [ { "type": "string", "description": "the marketplace code (idendifier) for the product", "name": "marketplacecode", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.APIResult" }, { "type": "object", "properties": { "product": { "$ref": "#/definitions/domain.SimpleProduct" } } } ] } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/controller.APIResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.APIResult" } } } } } }, "definitions": { "ProductAttribute": { "type": "object", "properties": { "Code": { "description": "Code is the internal attribute identifier", "type": "string" }, "CodeLabel": { "description": "CodeLabel is the human-readable (perhaps localized) attribute name", "type": "string" }, "Label": { "description": "Label is the human-readable (perhaps localized) attribute value", "type": "string" }, "RawValue": { "description": "RawValue is the untouched original value of the attribute" }, "UnitCode": { "description": "UnitCode is the internal code of the attribute values measuring unit", "type": "string" } } }, "ProductAttributes": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ProductAttribute" } }, "ProductMedia": { "type": "object", "properties": { "MimeType": { "type": "string" }, "Reference": { "type": "string" }, "Title": { "type": "string" }, "Type": { "type": "string" }, "Usage": { "type": "string" } } }, "application.PlaceOrderPaymentInfo": { "type": "object", "properties": { "Amount": { "$ref": "#/definitions/domain.Price" }, "CreditCardInfo": { "$ref": "#/definitions/placeorder.CreditCardInfo" }, "Gateway": { "type": "string" }, "Method": { "type": "string" }, "PaymentProvider": { "type": "string" }, "Title": { "type": "string" } } }, "cart.AdditionalData": { "type": "object", "properties": { "CustomAttributes": { "description": "CustomAttributes list of key values", "type": "object", "additionalProperties": { "type": "string" } }, "ReservedOrderID": { "description": "ReservedOrderID is an ID already known by the Cart of the future order ID", "type": "string" } } }, "cart.Address": { "type": "object", "properties": { "AdditionalAddressLines": { "type": "array", "items": { "type": "string" } }, "City": { "type": "string" }, "Company": { "type": "string" }, "Country": { "type": "string" }, "CountryCode": { "type": "string" }, "Email": { "type": "string" }, "Firstname": { "type": "string" }, "Lastname": { "type": "string" }, "MiddleName": { "type": "string" }, "PostCode": { "type": "string" }, "RegionCode": { "type": "string" }, "Salutation": { "type": "string" }, "State": { "type": "string" }, "Street": { "type": "string" }, "StreetNr": { "type": "string" }, "Telephone": { "description": "Deprecated: parts of number should be distinguished, please use TelephoneCountryCode, TelephoneAreaCode and TelephoneNumber", "type": "string" }, "TelephoneAreaCode": { "type": "string" }, "TelephoneCountryCode": { "type": "string" }, "TelephoneNumber": { "type": "string" }, "Title": { "type": "string" }, "Vat": { "type": "string" } } }, "cart.AppliedDiscount": { "type": "object", "properties": { "Applied": { "description": "how much of the discount has been subtracted from cart price, IMPORTANT: always negative", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "CampaignCode": { "description": "unique code of the underlying campaign or rule e.g. \"summer-campaign-2018\"", "type": "string" }, "CouponCode": { "description": "code of discount e.g. provided by user \"summer2018\"", "type": "string" }, "CustomAttributes": { "description": "stores additional discount attributes", "type": "object", "additionalProperties": true }, "IsItemRelated": { "description": "flag indicating if the discount is applied due to item in cart", "type": "boolean" }, "Label": { "description": "readable name of discount \"Super Summer Sale 2018\"", "type": "string" }, "SortOrder": { "description": "indicates in which order discount have been applied, low value has been applied before high value", "type": "integer" }, "Type": { "description": "to distinguish between discounts", "type": "string" } } }, "cart.AppliedGiftCard": { "type": "object", "properties": { "Applied": { "description": "how much of the gift card has been subtracted from cart price", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "Code": { "type": "string" }, "CustomAttributes": { "description": "additional custom attributes", "type": "object", "additionalProperties": true }, "Remaining": { "description": "how much of the gift card is still available", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] } } }, "cart.Cart": { "type": "object", "properties": { "AdditionalData": { "description": "AdditionalData can be used for Custom attributes", "allOf": [ { "$ref": "#/definitions/cart.AdditionalData" } ] }, "AppliedCouponCodes": { "description": "AppliedCouponCodes hold the coupons or discount codes that are applied to the cart", "type": "array", "items": { "$ref": "#/definitions/cart.CouponCode" } }, "AppliedGiftCards": { "description": "AppliedGiftCards is a list of applied gift cards", "type": "array", "items": { "$ref": "#/definitions/cart.AppliedGiftCard" } }, "AuthenticatedUserID": { "description": "AuthenticatedUserID holds the potential customer ID", "type": "string" }, "BelongsToAuthenticatedUser": { "description": "BelongsToAuthenticatedUser displays if the cart is guest cart (false) or from an authenticated user (true)", "type": "boolean" }, "BillingAddress": { "description": "BillingAddress is the main billing address (relevant for all payments/invoices)", "allOf": [ { "$ref": "#/definitions/cart.Address" } ] }, "DefaultCurrency": { "type": "string" }, "Deliveries": { "description": "Deliveries contains a list of desired Deliveries (or Shipments) involved in this cart", "type": "array", "items": { "$ref": "#/definitions/cart.Delivery" } }, "EntityID": { "description": "EntityID is a second identifier that may be used by some backends", "type": "string" }, "GrandTotal": { "description": "GrandTotal is the final amount that need to be paid by the customer (gross)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "GrandTotalNet": { "description": "GrandTotalNet is the corresponding net value to GrandTotal", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "GrandTotalNetWithGiftCards": { "description": "GrandTotalNetWithGiftCards is the corresponding net value to GrandTotalWithGiftCards", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "GrandTotalWithGiftCards": { "description": "GrandTotalWithGiftCards is the final amount with the applied gift cards subtracted.", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ID": { "description": "ID is the main identifier of the cart", "type": "string" }, "ItemRelatedDiscountAmount": { "description": "ItemRelatedDiscountAmount is the sum of discounts that are related to the item (including shipping discounts)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "NonItemRelatedDiscountAmount": { "description": "NonItemRelatedDiscountAmount is the sum of discounts that are not related to the item (including shipping discounts)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "PaymentSelection": { "description": "PaymentSelection is used to store information on \"how\" the customer wants to pay" }, "Purchaser": { "description": "Purchaser hold additional infos for the legal contact person in this order", "allOf": [ { "$ref": "#/definitions/cart.Person" } ] }, "ShippingGross": { "description": "ShippingGross is the sum of all shipping costs including tax", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ShippingGrossWithDiscounts": { "description": "ShippingGrossWithDiscounts is the sum of all shipping costs with all shipping discounts including tax", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ShippingNet": { "description": "ShippingNet is the sum of all shipping costs", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ShippingNetWithDiscounts": { "description": "ShippingNetWithDiscounts is the sum of all shipping costs with all shipping discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalGross": { "description": "SubTotalGross is the sum of all delivery subtotals (without shipping/ discounts)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalGrossWithDiscounts": { "description": "SubTotalGrossWithDiscounts is the sum of row gross prices reduced by the applied discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalNet": { "description": "SubTotalNet is the sum of all delivery net subtotals (without shipping/ discounts)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalNetWithDiscounts": { "description": "SubTotalNetWithDiscounts is the sum of row net prices reduced by the net value of the applied discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "TotalDiscountAmount": { "description": "TotalDiscountAmount is the sum of all discounts (incl. shipping)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "TotalGiftCardAmount": { "description": "AppliedGiftCardsAmount is the part of GrandTotal which is paid by gift cards", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "Totalitems": { "description": "Additional non taxable totals", "type": "array", "items": { "$ref": "#/definitions/cart.Totalitem" } } } }, "cart.CouponCode": { "type": "object", "properties": { "Code": { "type": "string" }, "CustomAttributes": { "description": "CustomAttributes can hold additional data for coupon code - keys and values are project specific", "type": "object", "additionalProperties": true } } }, "cart.Delivery": { "type": "object", "properties": { "Cartitems": { "description": "Cartitems is the list of items belonging to this delivery", "type": "array", "items": { "$ref": "#/definitions/cart.Item" } }, "DeliveryInfo": { "description": "DeliveryInfo contains details for this delivery e.g. how and where the delivery should be delivered to", "allOf": [ { "$ref": "#/definitions/cart.DeliveryInfo" } ] }, "GrandTotal": { "description": "GrandTotal contains the final price to pay", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ItemRelatedDiscountAmount": { "description": "ItemRelatedDiscountAmount contains the sum of discounts that are related to the item, e.g. promo due to product attribute", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "NonItemRelatedDiscountAmount": { "description": "NonItemRelatedDiscountAmount contains the sum of discounts that are not related to the item, e.g. a general promo", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ShippingItem": { "description": "ShippingItem\trepresent the shipping cost that may be involved in this delivery", "allOf": [ { "$ref": "#/definitions/cart.ShippingItem" } ] }, "SubTotalDiscountAmount": { "description": "TotalDiscountAmount contains the sum of all discounts (excl. shipping)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalGross": { "description": "SubTotalGross contains the sum of row gross prices, without shipping/discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalGrossWithDiscounts": { "description": "SubTotalGrossWithDiscounts contains the sum of row gross prices reduced by the applied discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalNet": { "description": "SubTotalNet contains the sum of row net prices, without shipping/discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SubTotalNetWithDiscounts": { "description": "SubTotalNetWithDiscounts contains the sum of row net prices reduced by the net value of the applied discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "TotalDiscountAmount": { "description": "TotalDiscountAmount contains the sum of all discounts (incl. shipping)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] } } }, "cart.DeliveryInfo": { "type": "object", "properties": { "AdditionalData": { "description": "AdditionalData can be used to store project specific information on the delivery", "type": "object", "additionalProperties": { "type": "string" } }, "Carrier": { "description": "Carrier optional name of the Carrier that should be responsible for executing the delivery", "type": "string" }, "Code": { "description": "Code is a project specific identifier for the Delivery - you need it for the AddToCart Request for example\nthe code can follow the convention in the Readme: Type_Method_LocationType_LocationCode", "type": "string" }, "DeliveryLocation": { "description": "DeliveryLocation is the target location for the delivery", "allOf": [ { "$ref": "#/definitions/cart.DeliveryLocation" } ] }, "DesiredTime": { "description": "DesiredTime is an optional desired time for the delivery", "type": "string" }, "Method": { "description": "Method is the shipping method something that is project specific and that can mean different delivery qualities with different delivery costs", "type": "string" }, "Workflow": { "description": "Workflow of the Delivery e.g. delivery or pickup, see DeliveryWorkflowPickup, DeliveryWorkflowDelivery or DeliveryWorkflowUnspecified", "type": "string" } } }, "cart.DeliveryLocation": { "type": "object", "properties": { "Address": { "description": "Address contains the address of the delivery location, maybe not relevant if the type is not address", "allOf": [ { "$ref": "#/definitions/cart.Address" } ] }, "Code": { "description": "Code is an optional identifier of this location/destination", "type": "string" }, "Type": { "description": "Type is the type of the delivery - use some of the constant defined in the package like DeliverylocationTypeAddress", "type": "string" }, "UseBillingAddress": { "description": "UseBillingAddress if the address should be taken from billing (only relevant for type address)", "type": "boolean" } } }, "cart.ExistingCustomerData": { "type": "object", "properties": { "ID": { "description": "ID of the customer", "type": "string" } } }, "cart.Item": { "type": "object", "properties": { "AdditionalData": { "type": "object", "additionalProperties": { "type": "string" } }, "AppliedDiscounts": { "description": "AppliedDiscounts contains the details about the discounts applied to this item - they can be \"itemrelated\" or not\nitemrelated would be e.g. special price, buy 3 pay 2\nnon-itemrelated would be e.g. 10% on everything", "type": "array", "items": { "$ref": "#/definitions/cart.AppliedDiscount" } }, "BundleConfig": { "$ref": "#/definitions/domain.BundleConfiguration" }, "ExternalReference": { "description": "ExternalReference can be used by cart service implementations to separate the representation in an external\ncart service from the unique item ID", "type": "string" }, "ID": { "description": "ID of the item - needs to be unique over the whole cart", "type": "string" }, "ItemRelatedDiscountAmount": { "description": "ItemRelatedDiscountAmount is the sum of all itemrelated Discounts", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "MarketplaceCode": { "description": "MarketplaceCode is the identifier for the product", "type": "string" }, "NonItemRelatedDiscountAmount": { "description": "NonItemRelatedDiscountAmount is the sum of non-itemrelated Discounts where IsItemRelated = false", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "ProductName": { "type": "string" }, "Qty": { "type": "integer" }, "RowPriceGross": { "description": "RowPriceGross is the price incl. taxes for the whole Qty of products", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "RowPriceGrossWithDiscount": { "description": "RowPriceGrossWithDiscount is the price incl. taxes with deducted discounts for the whole Qty of products\nThis is in most cases the final price for the customer to pay", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "RowPriceGrossWithItemRelatedDiscount": { "description": "RowPriceGrossWithItemRelatedDiscount is the price incl. taxes with deducted item related discounts for the whole Qty of products", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "RowPriceNet": { "description": "RowPriceNet is the price excl. taxes for the whole Qty of products", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "RowPriceNetWithDiscount": { "description": "RowPriceNetWithDiscount is the discounted net price for the whole Qty of products", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "RowPriceNetWithItemRelatedDiscount": { "description": "RowPriceNetWithItemRelatedDiscount is the price excl. taxes with deducted item related discounts for the whole Qty of products", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "RowTaxes": { "description": "RowTaxes is a list of all taxes applied for the given Qty of products", "type": "array", "items": { "$ref": "#/definitions/cart.Tax" } }, "SinglePriceGross": { "description": "SinglePriceGross is the gross price (incl. taxes) for a single product", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SinglePriceNet": { "description": "SinglePriceNet is the net price (excl. taxes) for a single product", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "SourceID": { "description": "Source Id of where the items should be initial picked - This is set by the SourcingLogic", "type": "string" }, "TotalDiscountAmount": { "description": "TotalDiscountAmount is the sum of all applied discounts (aka the savings for the customer)", "allOf": [ { "$ref": "#/definitions/domain.Price" } ] }, "VariantMarketPlaceCode": { "description": "VariantMarketPlaceCode is used for Configurable products", "type": "string" } } }, "cart.Person": { "type": "object", "properties": { "Address": { "$ref": "#/definitions/cart.Address" }, "ExistingCustomerData": { "description": "ExistingCustomerData if the current purchaser is an existing customer - this contains infos about existing customer", "allOf": [ { "$ref": "#/definitions/cart.ExistingCustomerData" } ] }, "PersonalDetails": { "$ref": "#/definitions/cart.PersonalDetails" } } }, "cart.PersonalDetails": { "type": "object", "properties": { "DateOfBirth": { "type": "string" }, "Nationality": { "type": "string" }, "PassportCountry": { "type": "string" }, "PassportNumber": { "type": "string" } } }, "cart.ShippingItem": { "type": "object", "properties": { "AppliedDiscounts": { "type": "array", "items": { "$ref": "#/definitions/cart.AppliedDiscount" } }, "PriceGross": { "$ref": "#/definitions/domain.Price" }, "PriceGrossWithDiscounts": { "$ref": "#/definitions/domain.Price" }, "PriceNet": { "$ref": "#/definitions/domain.Price" }, "PriceNetWithDiscounts": { "$ref": "#/definitions/domain.Price" }, "TaxAmount": { "$ref": "#/definitions/domain.Price" }, "Title": { "type": "string" } } }, "cart.Tax": { "type": "object", "properties": { "Amount": { "$ref": "#/definitions/domain.Price" }, "Rate": { "type": "string" }, "Type": { "type": "string" } } }, "cart.Teaser": { "type": "object", "properties": { "DeliveryCodes": { "type": "array", "items": { "type": "string" } }, "ItemCount": { "type": "integer" }, "ProductCount": { "type": "integer" } } }, "cart.Totalitem": { "type": "object", "properties": { "Code": { "type": "string" }, "Price": { "$ref": "#/definitions/domain.Price" }, "Title": { "type": "string" }, "Type": { "type": "string" } } }, "cartResultError": { "type": "object", "properties": { "Code": { "type": "string" }, "Message": { "type": "string" } } }, "checkoutError": { "type": "object", "properties": { "Code": { "type": "string" }, "Message": { "type": "string" } } }, "controller.APIResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/productResultError" }, "Product": {}, "Success": { "type": "boolean" } } }, "controller.CartAPIResult": { "type": "object", "properties": { "CartTeaser": { "$ref": "#/definitions/cart.Teaser" }, "CartValidationResult": { "$ref": "#/definitions/validation.Result" }, "Data": {}, "DataValidationInfo": { "type": "object" }, "Error": { "description": "Contains details if success is false", "allOf": [ { "$ref": "#/definitions/cartResultError" } ] }, "Success": { "type": "boolean" } } }, "controller.getCartResult": { "type": "object", "properties": { "Cart": { "$ref": "#/definitions/cart.Cart" }, "CartValidationResult": { "$ref": "#/definitions/validation.Result" } } }, "controller.placeOrderContext": { "type": "object", "properties": { "Cart": { "$ref": "#/definitions/cart.Cart" }, "CartValidationResult": { "$ref": "#/definitions/validation.Result" }, "FailedReason": { "type": "string" }, "OrderInfos": { "$ref": "#/definitions/controller.placedOrderInfos" }, "State": { "type": "string" }, "StateData": {}, "UUID": { "type": "string" } } }, "controller.placedOrderInfos": { "type": "object", "properties": { "Email": { "type": "string" }, "PaymentInfos": { "type": "array", "items": { "$ref": "#/definitions/application.PlaceOrderPaymentInfo" } }, "PlacedDecoratedCart": { "$ref": "#/definitions/decorator.DecoratedCart" }, "PlacedOrderInfos": { "type": "array", "items": { "$ref": "#/definitions/placeorder.PlacedOrderInfo" } } } }, "controller.startPlaceOrderResult": { "type": "object", "properties": { "UUID": { "type": "string" } } }, "decorator.DecoratedCart": { "type": "object", "properties": { "Cart": { "$ref": "#/definitions/cart.Cart" }, "DecoratedDeliveries": { "type": "array", "items": { "$ref": "#/definitions/decorator.DecoratedDelivery" } } } }, "decorator.DecoratedCartItem": { "type": "object", "properties": { "Item": { "$ref": "#/definitions/cart.Item" }, "Product": {} } }, "decorator.DecoratedDelivery": { "type": "object", "properties": { "DecoratedItems": { "type": "array", "items": { "$ref": "#/definitions/decorator.DecoratedCartItem" } }, "Delivery": { "$ref": "#/definitions/cart.Delivery" } } }, "domain.Badge": { "type": "object", "properties": { "Code": { "type": "string" }, "Color": { "description": "Color optional display color of the badge, e.g. a hex color like \"#E30613\"", "type": "string" }, "Label": { "type": "string" }, "Priority": { "description": "Priority optional display priority of the badge, higher priorities should be displayed first", "type": "integer" } } }, "domain.BundleConfiguration": { "type": "object", "additionalProperties": { "$ref": "#/definitions/domain.ChoiceConfiguration" } }, "domain.CategoryTeaser": { "type": "object", "properties": { "Code": { "description": "Code the identifier of the Category", "type": "string" }, "Name": { "description": "Name is the speaking name of the category", "type": "string" }, "Path": { "description": "The Path (root to leaf) for this Category - separated by \"/\"", "type": "string" } } }, "domain.ChoiceConfiguration": { "type": "object", "properties": { "MarketplaceCode": { "type": "string" }, "Qty": { "type": "integer" }, "VariantMarketplaceCode": { "type": "string" } } }, "domain.Error": { "type": "object", "properties": { "ErrorCode": { "type": "string" }, "ErrorMessage": { "type": "string" } } }, "domain.FlowActionData": { "type": "object", "properties": { "DisplayData": { "description": "DisplayData holds data, normally HTML to be displayed to the user", "type": "string" }, "FormParameter": { "type": "object", "additionalProperties": { "$ref": "#/definitions/domain.FormField" } }, "URL": { "description": "URL is used to pass URL data to the user if the current state needs some", "type": "string" }, "WalletDetails": { "$ref": "#/definitions/domain.WalletDetails" } } }, "domain.FlowStatus": { "type": "object", "properties": { "Action": { "description": "Action to perform to proceed in the payment flow. If status is \"payment_waiting_for_customer\" this field contains information about what to do - e.g. \"redirect\" or \"show_iframe\"", "type": "string" }, "ActionData": { "$ref": "#/definitions/domain.FlowActionData" }, "Data": { "description": "Data contains additional information related to the action / flow" }, "Error": { "description": "Error contains additional information in case of an error (e.g. payment failed)", "allOf": [ { "$ref": "#/definitions/domain.Error" } ] }, "Status": { "description": "Status of the payment flow. E.g. \"payment_completed\", \"payment_waiting_for_customer\" or \"payment_failed\"", "type": "string" } } }, "domain.FormField": { "type": "object", "properties": { "Value": { "type": "array", "items": { "type": "string" } } } }, "domain.LoyaltyEarningInfo": { "type": "object", "properties": { "Default": { "$ref": "#/definitions/domain.Price" }, "Type": { "type": "string" } } }, "domain.LoyaltyPriceInfo": { "type": "object", "properties": { "Context": { "$ref": "#/definitions/domain.PriceContext" }, "Default": { "$ref": "#/definitions/domain.Price" }, "DiscountText": { "type": "string" }, "Discounted": { "$ref": "#/definitions/domain.Price" }, "IsDiscounted": { "type": "boolean" }, "MaxPointsToSpent": { "type": "string" }, "MinPointsToSpent": { "type": "string" }, "Type": { "description": "Type or Name of the Loyalty program", "type": "string" } } }, "domain.PaymentRequestAPI": { "type": "object", "properties": { "CompleteURL": { "type": "string" }, "Details": { "type": "string" }, "MerchantValidationURL": { "type": "string" }, "Methods": { "type": "string" }, "Options": { "type": "string" } } }, "domain.Price": { "type": "object" }, "domain.PriceContext": { "type": "object", "properties": { "ChannelCode": { "type": "string" }, "CustomerGroup": { "type": "string" }, "DeliveryCode": { "type": "string" }, "From": { "type": "string" }, "Locale": { "type": "string" }, "To": { "type": "string" } } }, "domain.PriceInfo": { "type": "object", "properties": { "ActiveBase": { "type": "string" }, "ActiveBaseAmount": { "type": "string" }, "ActiveBaseUnit": { "type": "string" }, "CampaignRules": { "type": "array", "items": { "type": "string" } }, "Context": { "$ref": "#/definitions/domain.PriceContext" }, "Default": { "$ref": "#/definitions/domain.Price" }, "DenyMoreDiscounts": { "type": "boolean" }, "DiscountText": { "type": "string" }, "Discounted": { "$ref": "#/definitions/domain.Price" }, "IsDiscounted": { "type": "boolean" }, "TaxClass": { "type": "string" } } }, "domain.SimpleProduct": { "type": "object", "properties": { "ActiveLoyaltyPrice": { "$ref": "#/definitions/domain.LoyaltyPriceInfo" }, "ActivePrice": { "$ref": "#/definitions/domain.PriceInfo" }, "Attributes": { "$ref": "#/definitions/ProductAttributes" }, "AvailablePrices": { "type": "array", "items": { "$ref": "#/definitions/domain.PriceInfo" } }, "Badges": { "type": "array", "items": { "$ref": "#/definitions/domain.Badge" } }, "Categories": { "type": "array", "items": { "$ref": "#/definitions/domain.CategoryTeaser" } }, "CategoryToCodeMapping": { "type": "array", "items": { "type": "string" } }, "CreatedAt": { "type": "string" }, "Description": { "type": "string" }, "Identifier": { "type": "string" }, "IsNew": { "type": "boolean" }, "IsSaleable": { "type": "boolean" }, "Keywords": { "type": "array", "items": { "type": "string" } }, "LoyaltyEarnings": { "description": "LoyaltyEarnings holds optional infos about potential loyalty earnings", "type": "array", "items": { "$ref": "#/definitions/domain.LoyaltyEarningInfo" } }, "LoyaltyPrices": { "description": "LoyaltyPrices holds optional infos for products that can be paid in a loyalty program", "type": "array", "items": { "$ref": "#/definitions/domain.LoyaltyPriceInfo" } }, "MainCategory": { "$ref": "#/definitions/domain.CategoryTeaser" }, "MarketPlaceCode": { "type": "string" }, "Media": { "type": "array", "items": { "$ref": "#/definitions/ProductMedia" } }, "RetailerCode": { "type": "string" }, "RetailerName": { "type": "string" }, "RetailerSku": { "type": "string" }, "SaleableFrom": { "type": "string" }, "SaleableTo": { "type": "string" }, "ShortDescription": { "type": "string" }, "Stock": { "type": "array", "items": { "$ref": "#/definitions/domain.Stock" } }, "StockLevel": { "description": "Deprecated: use Stock[x].Level instead", "type": "string" }, "Teaser": { "$ref": "#/definitions/domain.TeaserData" }, "Title": { "type": "string" }, "UpdatedAt": { "type": "string" }, "VisibleFrom": { "type": "string" }, "VisibleTo": { "type": "string" } } }, "domain.Stock": { "type": "object", "properties": { "Amount": { "type": "integer" }, "DeliveryCode": { "type": "string" }, "InStock": { "type": "boolean" }, "Level": { "type": "string" } } }, "domain.TeaserData": { "type": "object", "properties": { "Badges": { "description": "Badges optional slice of badges to teaser a product", "type": "array", "items": { "$ref": "#/definitions/domain.Badge" } }, "MarketPlaceCode": { "description": "The sku that should be used to link from Teasers", "type": "string" }, "Media": { "description": "Media", "type": "array", "items": { "$ref": "#/definitions/ProductMedia" } }, "PreSelectedVariantSku": { "description": "PreSelectedVariantSku might be set for configurables to give a hint to link to a variant of a configurable (That might be the case if a user filters for an attribute and in the teaser the variant with that attribute is shown)", "type": "string" }, "ShortDescription": { "type": "string" }, "ShortTitle": { "type": "string" }, "TeaserAvailablePrices": { "type": "array", "items": { "$ref": "#/definitions/domain.PriceInfo" } }, "TeaserLoyaltyEarningInfo": { "description": "TeaserLoyaltyEarning is the teaser for the loyalty earning used in grid / list view", "allOf": [ { "$ref": "#/definitions/domain.LoyaltyEarningInfo" } ] }, "TeaserLoyaltyPriceInfo": { "description": "TeaserLoyaltyPriceInfo is the loyalty price that can be used for teaser (e.g. on listing views)", "allOf": [ { "$ref": "#/definitions/domain.LoyaltyPriceInfo" } ] }, "TeaserPrice": { "description": "TeaserPrice is the price that should be shown in teasers (listview)", "allOf": [ { "$ref": "#/definitions/domain.PriceInfo" } ] }, "TeaserPriceIsFromPrice": { "description": "TeaserPriceIsFromPrice is set to true in cases where a product might have different prices (e.g. configurable)", "type": "boolean" }, "URLSlug": { "type": "string" } } }, "domain.WalletDetails": { "type": "object", "properties": { "PaymentRequestAPI": { "$ref": "#/definitions/domain.PaymentRequestAPI" }, "UsedPaymentMethod": { "type": "string" } } }, "paymentResultError": { "type": "object", "properties": { "Code": { "type": "string" }, "Message": { "type": "string" } } }, "placeorder.CreditCardInfo": { "type": "object", "properties": { "AnonymizedCardNumber": { "type": "string" }, "CardHolder": { "type": "string" }, "Expire": { "type": "string" }, "Type": { "type": "string" } } }, "placeorder.PlacedOrderInfo": { "type": "object", "properties": { "DeliveryCode": { "type": "string" }, "OrderNumber": { "type": "string" } } }, "productResultError": { "type": "object", "properties": { "Code": { "type": "string" }, "Message": { "type": "string" } } }, "validation.ItemValidationError": { "type": "object", "properties": { "ErrorMessageKey": { "type": "string" }, "ItemID": { "type": "string" } } }, "validation.Result": { "type": "object", "properties": { "CommonErrorMessageKey": { "type": "string" }, "HasCommonError": { "type": "boolean" }, "ItemResults": { "type": "array", "items": { "$ref": "#/definitions/validation.ItemValidationError" } } } } }, "tags": [ { "description": "All Cart related APIs endpoints, most suitable to be called from a browser, because they rely on the session and cookie headers.", "name": "Cart" }, { "description": "All Payment-related APIs endpoints, most suitable to be called from a browser, because they rely on the session and cookie headers.", "name": "Payment" }, { "description": "All Product related APIs endpoints.", "name": "Product" }, { "description": "All Checkout-related APIs endpoints, most suitable to be called from a browser, because they rely on the session and cookie headers.", "name": "Checkout" } ] }