{ "swagger": "2.0", "info": { "title": "Shopping Cart Management", "description": "This is Swagger UI environment generated for the TMF Shopping Cart Management specification", "version": "2.0" }, "host": "biologeek.orange-labs.fr", "basePath": "/tmf-api/shoppingCartManagement", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/shoppingCart": { "get": { "operationId": "listShoppingCart", "summary": "List or find 'ShoppingCart' objects", "tags": [ "shoppingCart" ], "parameters": [ { "type": "string", "required": false, "in": "query", "name": "fields", "description": "Comma separated properties to display in response" }, { "name": "validFor.endDateTime", "format": "date-time", "required": false, "in": "query", "type": "string", "description": "For filtering: An instant of time, ending at the TimePeriod." }, { "name": "validFor.startDateTime", "format": "date-time", "required": false, "in": "query", "type": "string", "description": "For filtering: An instant of time, starting at the TimePeriod" }, { "type": "string", "required": false, "in": "query", "name": "note.author", "description": "For filtering: Author of the note" }, { "name": "note.date", "format": "date-time", "required": false, "in": "query", "type": "string", "description": "For filtering: Date of the note" }, { "type": "string", "required": false, "in": "query", "name": "note.text", "description": "For filtering: Text of the note" }, { "type": "boolean", "required": false, "in": "query", "name": "contactMedium.preferred", "description": "For filtering: If true, indicates that is the preferred contact medium" }, { "type": "string", "required": false, "in": "query", "name": "contactMedium.type", "description": "For filtering: Type of the contact medium, such as: email address, telephone number, postal address" }, { "type": "string", "required": false, "in": "query", "name": "cartTotalPrice.name", "description": "For filtering: A short descriptive name such as \"Subscription price\"." }, { "type": "string", "required": false, "in": "query", "name": "cartTotalPrice.priceType", "description": "For filtering: A category that describes the price, such as recurring, discount, allowance, penalty, and so forth" }, { "type": "string", "required": false, "in": "query", "name": "cartTotalPrice.recurringChargePeriod", "description": "For filtering: Could be month, week..." }, { "type": "string", "required": false, "in": "query", "name": "cartTotalPrice.unitOfMeasure", "description": "For filtering: Could be minutes, GB..." }, { "type": "string", "required": false, "in": "query", "name": "cartItem.action", "description": "For filtering: Can be \"add\" / \"modify\" / \"no_change\"/ \"delete\"" }, { "type": "integer", "required": false, "in": "query", "name": "cartItem.quantity", "description": "For filtering: Quantity of cart items" }, { "type": "string", "required": false, "in": "query", "name": "cartItem.status", "description": "For filtering: status of cart item. e.g \"Active\" , \"SavedForLater\"." }, { "type": "string", "required": false, "in": "query", "name": "relatedParty.name", "description": "For filtering: Name of the related party" }, { "type": "string", "required": false, "in": "query", "name": "relatedParty.role", "description": "For filtering: Role of the related party." } ], "responses": { "200": { "description": "Ok", "schema": { "items": { "$ref": "#/definitions/ShoppingCart" }, "type": "array" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "createShoppingCart", "summary": "Creates a 'ShoppingCart'", "tags": [ "shoppingCart" ], "parameters": [ { "schema": { "$ref": "#/definitions/ShoppingCart_Create" }, "required": true, "in": "body", "name": "shoppingCart", "description": "The Shopping Cart to be created" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/ShoppingCart" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/shoppingCart/{id}": { "get": { "operationId": "retrieveShoppingCart", "summary": "Retrieves a 'ShoppingCart' by Id", "tags": [ "shoppingCart" ], "parameters": [ { "required": true, "type": "string", "name": "id", "in": "path", "description": "Identifier of the Shopping Cart" } ], "responses": { "200": { "description": "Ok", "schema": { "items": { "$ref": "#/definitions/ShoppingCart" }, "type": "array" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "updateShoppingCart", "summary": "Updates partially a 'ShoppingCart' by Id", "tags": [ "shoppingCart" ], "parameters": [ { "required": true, "type": "string", "name": "id", "in": "path", "description": "Identifier of the Shopping Cart" }, { "schema": { "$ref": "#/definitions/ShoppingCart_Update" }, "required": true, "in": "body", "name": "shoppingCart", "description": "The Shopping Cart to be updated" } ], "responses": { "201": { "description": "Updated", "schema": { "$ref": "#/definitions/ShoppingCart" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "deleteShoppingCart", "summary": "Deletes a 'ShoppingCart' by Id", "tags": [ "shoppingCart" ], "parameters": [ { "required": true, "type": "string", "name": "id", "in": "path", "description": "Identifier of the Shopping Cart" } ], "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/hub": { "post": { "operationId": "registerListener", "summary": "Register a listener", "description": "Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", "tags": [ "events subscription" ], "parameters": [ { "name": "data", "schema": { "$ref": "#/definitions/EventSubscriptionInput" }, "required": true, "in": "body", "description": "Data containing the callback endpoint to deliver the information" } ], "responses": { "201": { "description": "Subscribed", "schema": { "$ref": "#/definitions/EventSubscription" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } } } } }, "/hub/{id}": { "delete": { "operationId": "unregisterListener", "summary": "Unregister a listener", "description": "Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", "tags": [ "events subscription" ], "parameters": [ { "name": "id", "type": "string", "required": true, "in": "path", "description": "The id of the registered listener" } ], "responses": { "201": { "description": "Unsubscribed" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "ShoppingCart": { "type": "object", "description": "Shopping Cart resource is used for the temporarily selection and reservation of product offerings in e-commerce, call center and retail purchase. Shopping cart supports purchase of both physical and digital goods and service (e.g. handset, telecom network service). Shopping Cart contain list of cart items, a reference to customer (partyRole) or contact medium in case customer not exist, and the total items price including promotions", "properties": { "href": { "type": "string", "description": "Hyperlink to access the shopping cart" }, "id": { "type": "string", "description": "Unique identifier created on provider side (e.g. Order Capture system)" }, "validFor": { "$ref": "#/definitions/TimePeriod", "description": "The period for which the shopping cart is valid (e.g. 90 if no activity or 7 days if cart is empty)" }, "note": { "type": "array", "items": { "$ref": "#/definitions/Note" } }, "contactMedium": { "type": "array", "items": { "$ref": "#/definitions/ContactMedium" } }, "cartTotalPrice": { "type": "array", "items": { "$ref": "#/definitions/CartPrice" } }, "cartItem": { "type": "array", "items": { "$ref": "#/definitions/CartItem" } }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedPartyRef" } } } }, "ShoppingCart_Create": { "type": "object", "description": "Shopping Cart resource is used for the temporarily selection and reservation of product offerings in e-commerce, call center and retail purchase. Shopping cart supports purchase of both physical and digital goods and service (e.g. handset, telecom network service). Shopping Cart contain list of cart items, a reference to customer (partyRole) or contact medium in case customer not exist, and the total items price including promotions\nSkipped properties: id,href", "required": [ "cartItem" ], "properties": { "validFor": { "$ref": "#/definitions/TimePeriod", "description": "The period for which the shopping cart is valid (e.g. 90 if no activity or 7 days if cart is empty)" }, "note": { "type": "array", "items": { "$ref": "#/definitions/Note" } }, "contactMedium": { "type": "array", "items": { "$ref": "#/definitions/ContactMedium" } }, "cartTotalPrice": { "type": "array", "items": { "$ref": "#/definitions/CartPrice" } }, "cartItem": { "type": "array", "items": { "$ref": "#/definitions/CartItem" } }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedPartyRef" } } } }, "ShoppingCart_Update": { "type": "object", "description": "Shopping Cart resource is used for the temporarily selection and reservation of product offerings in e-commerce, call center and retail purchase. Shopping cart supports purchase of both physical and digital goods and service (e.g. handset, telecom network service). Shopping Cart contain list of cart items, a reference to customer (partyRole) or contact medium in case customer not exist, and the total items price including promotions\nSkipped properties: id,href,id,href,validFor,cartTotalPrice", "properties": { "note": { "type": "array", "items": { "$ref": "#/definitions/Note" } }, "contactMedium": { "type": "array", "items": { "$ref": "#/definitions/ContactMedium" } }, "cartItem": { "type": "array", "items": { "$ref": "#/definitions/CartItem" } }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedPartyRef" } } } }, "TimePeriod": { "type": "object", "description": "A base / value business entity used to represent a period of time between two timepoints.", "properties": { "endDateTime": { "type": "string", "format": "date-time", "description": "An instant of time, ending at the TimePeriod." }, "startDateTime": { "type": "string", "format": "date-time", "description": "An instant of time, starting at the TimePeriod" } } }, "Note": { "type": "object", "description": "Extra information about the ticket or a product order", "properties": { "author": { "type": "string", "description": "Author of the note" }, "date": { "type": "string", "format": "date-time", "description": "Date of the note" }, "text": { "type": "string", "description": "Text of the note" } } }, "ContactMedium": { "type": "object", "description": "Indicates the contact medium that could be used to contact the party.", "properties": { "preferred": { "type": "boolean", "description": "If true, indicates that is the preferred contact medium" }, "type": { "type": "string", "description": "Type of the contact medium, such as: email address, telephone number, postal address" }, "validFor": { "$ref": "#/definitions/TimePeriod", "description": "The time period that the contact medium is valid for" }, "characteristic": { "$ref": "#/definitions/MediumCharacteristic" } } }, "CartPrice": { "type": "object", "description": "An amount, usually of money, that represents the actual price paid by the customer for this item. May represent the total price of the shopping cart or the total of the cart item depending on the relation", "properties": { "description": { "type": "string", "description": "A narrative that explains in detail the semantics of this order item price." }, "name": { "type": "string", "description": "A short descriptive name such as \"Subscription price\"." }, "priceType": { "type": "string", "description": "A category that describes the price, such as recurring, discount, allowance, penalty, and so forth" }, "recurringChargePeriod": { "type": "string", "description": "Could be month, week..." }, "unitOfMeasure": { "type": "string", "description": "Could be minutes, GB..." }, "price": { "$ref": "#/definitions/Price" }, "priceAlteration": { "type": "array", "items": { "$ref": "#/definitions/PriceAlteration" } } } }, "CartItem": { "type": "object", "description": "An identified part of the shopping cart. A shopping cart is decomposed into one or more shopping cart item. Cart item represents a product offering or bundled product offering that user wish to purchase, as well as the pricing of the product offering, reference to product in case of configured characteristic or installation address. Cart items can be related to other cart item to related bundled offerings or reference cart Items to a shipping options", "properties": { "action": { "type": "string", "description": "Can be \"add\" / \"modify\" / \"no_change\"/ \"delete\"" }, "id": { "type": "string", "description": "Identifier of the cart item (generally it is a sequence number 01, 02, 03, ...) in the shopping cart" }, "quantity": { "type": "integer", "description": "Quantity of cart items" }, "status": { "type": "string", "description": "status of cart item. e.g \"Active\" , \"SavedForLater\"." }, "cardItem": { "type": "array", "items": { "$ref": "#/definitions/CartItem" } }, "totalItemPrice": { "type": "array", "items": { "$ref": "#/definitions/CartPrice" } }, "product": { "$ref": "#/definitions/ProductRefOrValue" }, "itemPrice": { "type": "array", "items": { "$ref": "#/definitions/CartPrice" } }, "productOffering": { "$ref": "#/definitions/ProductOfferingRef" }, "cartItemRelationship": { "type": "array", "items": { "$ref": "#/definitions/CartItemRelationship" } } } }, "RelatedPartyRef": { "type": "object", "description": "RelatedParty reference. A related party defines party or party role linked to a specific entity.", "properties": { "href": { "type": "string", "description": "Reference of the related party, could be a party reference or a party role reference" }, "id": { "type": "string", "description": "Unique identifier of a related party" }, "name": { "type": "string", "description": "Name of the related party" }, "role": { "type": "string", "description": "Role of the related party." }, "validFor": { "$ref": "#/definitions/TimePeriod", "description": "Validity period of the related party" } } }, "MediumCharacteristic": { "type": "object", "description": "Describes the contact medium characteristics that could be used to contact a party (an individual or an organization)", "properties": { "city": { "type": "string", "description": "The city" }, "country": { "type": "string", "description": "The country" }, "emailAddress": { "type": "string", "description": "Full email address in standard format" }, "faxNumber": { "type": "string", "description": "The fax number of the contact" }, "phoneNumber": { "type": "string", "description": "The primary phone number of the contact" }, "postCode": { "type": "string", "description": "Postcode" }, "stateOrProvince": { "type": "string", "description": "State or province" }, "street1": { "type": "string", "description": "Describes the street" }, "street2": { "type": "string", "description": "Complementary street description" }, "type": { "type": "string", "description": "Type of medium (fax, mobile phone...)" } } }, "Price": { "type": "object", "description": "Provides all amounts (tax included, duty free, tax rate), used currency and percentage to apply for Price Alteration.", "properties": { "dutyFreeAmount": { "$ref": "#/definitions/Money", "description": "All taxes excluded amount (expressed in the given currency)" }, "percentage": { "type": "float", "description": "Percentage to apply for ProdOfferPriceAlteration" }, "taxIncludedAmount": { "$ref": "#/definitions/Money", "description": "All taxes included amount (expressed in the given currency)" }, "taxRate": { "type": "float", "description": "Tax rate" } } }, "PriceAlteration": { "type": "object", "description": "Is an amount, usually of money, that modifies the price charged for an order item.", "properties": { "applicationDuration": { "type": "integer", "description": "Duration during which the alteration applies on the order item price (for instance 2 months free of charge for the recurring charge)" }, "description": { "type": "string", "description": "A narrative that explains in detail the semantics of this order item price alteration" }, "name": { "type": "string", "description": "A short descriptive name such as \"Monthly discount\"" }, "priceCondition": { "type": "string", "description": "Condition that triggers the price application" }, "priceType": { "type": "string", "description": "A category that describes the price such as recurring, one time and usage." }, "priority": { "type": "integer", "description": "Priority level for applying this alteration among all the defined alterations on the order item price" }, "recurringChargePeriod": { "type": "string", "description": "Could be month, week..." }, "unitOfMeasure": { "type": "string", "description": "Could be minutes, GB..." }, "validFor": { "$ref": "#/definitions/TimePeriod", "description": "The period for which the price alteration is valid" }, "price": { "$ref": "#/definitions/Price" } } }, "Money": { "type": "object", "description": "A base / value business entity used to represent money", "properties": { "unit": { "type": "string", "description": "Currency (ISO4217 norm uses 3 letters to define the currency)" }, "value": { "type": "float", "description": "A positive floating point number" } } }, "ProductRefOrValue": { "type": "object", "description": "Product reference. Configure the product characteristics (only configurable characteristics and necessary only if a non default value is selected) and/or identify the product that needs to be modified/deleted.", "properties": { "href": { "type": "string", "description": "Reference of the product" }, "id": { "type": "string", "description": "Unique identifier of the product" }, "name": { "type": "string", "description": "Name of the product" }, "productRelationship": { "type": "array", "items": { "$ref": "#/definitions/ProductRefOrValueRelationship" } }, "place": { "type": "array", "items": { "$ref": "#/definitions/PlaceRef" } }, "characteristic": { "type": "array", "items": { "$ref": "#/definitions/ProductCharacteristic" } }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedPartyRef" } }, "productSpecification": { "$ref": "#/definitions/ProductSpecificationRef" } } }, "ProductOfferingRef": { "type": "object", "description": "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.", "properties": { "href": { "type": "string", "description": "Reference of the product offering" }, "id": { "type": "string", "description": "Unique identifier of the product offering" }, "name": { "type": "string", "description": "Name of the product offering" }, "bundledProductOffering": { "type": "array", "items": { "$ref": "#/definitions/BundledProductOfferingRef" } } } }, "CartItemRelationship": { "type": "object", "description": "Relationship among cart items mainly other than hierarchical relationships such as \"RelyOn\", \"DependentOn\", \"Shipping\" etc.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "Type of the order item relationship" }, "cartItem": { "type": "array", "items": { "$ref": "#/definitions/CartItemRef" } } } }, "ProductRefOrValueRelationship": { "type": "object", "description": "Represents a relationship between products - which potentially holds an entire product object or a product reference (with partial content)", "properties": { "type": { "type": "string", "description": "Type of the product relationship. It can be :\n