swagger: '2.0' info: title: Product Ordering description: |+ **TMF API Reference : TMF 622 - Product Ordering Management** **Release : 19.0 - June 2019** The Product Ordering API provides a standardized mechanism for placing a product order with all of the necessary order parameters. The API consists of a simple set of operations that interact with CRM/Order Negotiation systems in a consistent manner. A product order is created based on a product offer that is defined in a catalog. The product offer identifies the product or set of products that are available to a customer, and includes characteristics such as pricing, product options and market. This API provide a task based resource to request order cancellation. The product order references the product offer and identifies any specific requests made by the customer. **Product Order resource** A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa. Main Product Order attributes are its identifier, state, priority category (mass market, Enterprise, etc.) related dates (start, completion, etc.), related billing account, related parties and order items. Main Order Items (aka order lines) attributes are the ordered offering and product characteristics with the related action to be performed (e.g. add or delete the products), state, location information for delivery, order item price and price alteration. Product Order API performs the following operations on product order : -Retrieval of a product order or a collection of product orders depending on filter criteria -Partial update of a product order (including updating rules) -Creation of a product order (including default values and creation rules) -Deletion of product order (for administration purposes) -Notification of events on product order. **cancelProductOrder resource** This resource is used to request a product order cancellation. Product Order API performs the following operations on product order : -Retrieval of a cancel product order or a collection of cancel product orders -Creation of a cancel product order -Notification of events on cancel product order. Copyright © TM Forum 2019. All Rights Reserved version: 4.0.0 host: api.ooredoo.ps basePath: /tmf-api/productOrderingManagement/v1 schemes: - https consumes: - application/json produces: - application/json;charset=utf-8 security: - Oauth: [] tags: - name: productOrder paths: /productOrder: post: operationId: createProductOrder summary: Creates a ProductOrder description: This operation creates a ProductOrder entity. tags: - productOrder parameters: - name: productOrder description: The ProductOrder to be created required: true schema: $ref: '#/definitions/ProductOrder_Create' in: body - name: transactionId description: transactionId required: true in: header type: string - name: applicationCode description: applicationCode required: true in: header type: string - name: applicationUserName description: applicationUserName required: true in: header type: string responses: '201': description: Created schema: $ref: '#/definitions/ProductOrder' '400': description: Bad Request schema: $ref: '#/definitions/Error' '401': description: Unauthorized schema: $ref: '#/definitions/Error' '403': description: Forbidden schema: $ref: '#/definitions/Error' '405': description: Method Not allowed schema: $ref: '#/definitions/Error' '409': description: Conflict schema: $ref: '#/definitions/Error' '500': description: Internal Server Error schema: $ref: '#/definitions/Error' securityDefinitions: Oauth: type: "oauth2" tokenUrl: "https://api.ooredoo.ps/tmf-api/oauth/token" flow: "application" definitions: Any: {} Characteristic: type: object description: Describes a given characteristic of an object or entity through a name/value pair. required: - name - value properties: name: type: string description: Name of the characteristic value: $ref: '#/definitions/Any' description: The value of the characteristic OrderItemActionType: type: string description: action to be performed on the product enum: - add - modify - delete - noChange Product: type: object description: A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s). properties: id: type: string description: Unique identifier of the product href: type: string description: Reference of the product description: type: string description: Is the description of the product. It could be copied from the description of the Product Offering. isBundle: type: boolean description: If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering. isCustomerVisible: type: boolean description: If true, the product is visible by the customer. name: type: string description: Name of the product. It could be the same as the name of the product offering orderDate: type: string format: date-time description: Is the date when the product was ordered productSerialNumber: type: string description: Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router. startDate: type: string format: date-time description: Is the date from which the product starts terminationDate: type: string format: date-time description: Is the date when the product was terminated product: type: array items: $ref: '#/definitions/ProductRefOrValue' productCharacteristic: type: array items: $ref: '#/definitions/Characteristic' productOrderItem: type: array items: $ref: '#/definitions/RelatedProductOrderItem' realizingResource: type: array items: $ref: '#/definitions/ResourceRef' relatedParty: type: array items: $ref: '#/definitions/RelatedParty' '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name ProductOrder: type: object description: A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, required: - productOrderItem properties: id: type: string description: ID created on repository side (OM system) href: type: string description: Hyperlink to access the order orderDate: type: string format: date-time description: Date when the order was created productOrderItem: type: array items: $ref: '#/definitions/ProductOrderItem' minItems: 1 relatedParty: type: array items: $ref: '#/definitions/RelatedParty' ProductOrder_Create: type: object description: |- A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,completionDate,orderDate,state,expectedCompletionDate,productOrderItem.state required: - productOrderItem properties: cancellationDate: type: string format: date-time description: 'Date when the order is cancelled. This is used when order is cancelled. ' cancellationReason: type: string description: 'Reason why the order is cancelled. This is used when order is cancelled. ' requestedStartDate: type: string format: date-time description: 'Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ' channel: type: array items: $ref: '#/definitions/RelatedChannel' productOrderItem: type: array items: $ref: '#/definitions/ProductOrderItem' minItems: 1 relatedParty: type: array items: $ref: '#/definitions/RelatedParty' '@type': type: string example: 'Bundle Topup' description: 'Possible values Single Order, Multi Order and Bundle Topup' ProductOrderItem: type: object description: An identified part of the order. A product order is decomposed into one or more order items. required: - id - action properties: id: type: string description: Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) action: $ref: '#/definitions/OrderItemActionType' description: 'The action to be carried out on the Product. Can be: add, modify, delete, noChange' product: $ref: '#/definitions/ProductRefOrValue' ProductRefOrValue: type: object description: A product to be created defined by value or existing defined by reference. The polymorphic attributes @type, @schemaLocation & @referredType are related to the product entity and not the RelatedProductRefOrValue class itself properties: id: type: string description: Unique identifier of the product description: type: string description: Is the description of the product. It could be copied from the description of the Product Offering. productCharacteristic: type: array items: $ref: '#/definitions/Characteristic' productOrderItem: type: array items: $ref: '#/definitions/RelatedProductOrderItem' realizingResource: type: array items: $ref: '#/definitions/ResourceRef' RelatedChannel: type: object description: Related channel to another entity. May be online web, mobile app, social ,etc. required: - id properties: id: type: string description: Unique identifier of a related entity. RelatedParty: type: object description: Related Entity reference. A related party defines party or party role linked to a specific entity. required: - id properties: id: type: string description: Unique identifier of a related entity. name: type: string description: Name of the related entity. relatedDetails: type: string description: Name of the relatedDetails. RelatedProductOrderItem: type: object description: RelatedProductOrderItem (ProductOrder item) .The product order item which triggered product creation/change/termination. properties: orderItemAction: type: string description: Action of the order item for this product ResourceRef: type: object properties: id: type: string description: Unique identifier of a related entity. required: - id Error: description: Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx) type: object required: - code - reason properties: code: type: string description: Application relevant detail, defined in the API or a common list. reason: type: string description: Explanation of the reason for the error which can be shown to a client user. message: type: string description: More details and corrective actions related to the error which can be shown to a client user. status: type: string description: HTTP Error code extension referenceError: type: string format: uri description: URI of documentation describing the error. '@baseType': type: string description: When sub-classing, this defines the super-class. '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name.