swagger: '2.0' info: title: TMF629_CustomerManagement description: This is Swagger UI environment generated for the TMF Customer Management specification For OMV version: '5.0' host: api.ooredoo.com basePath: /tmf-api/customerManagement/v1/ schemes: - https consumes: - application/json produces: - application/json;charset=utf-8 security: - Oauth: [] tags: - name: customer parameters: transactionId: name: transactionId description: Transaction Id should be, an string value in: header type: string required: true Accept: name: Accept description: application/json required: true type: string in: header Content-Type: name: Content-Type description: application/json required: true type: string in: header countrycodeParam: name: countryCode in: header type: string enum: - DZA - MDV - OMN - PSE - TUN - KWT required: false paths: /customer: post: operationId: createCustomer summary: Creates a Customer description: This operation creates a Customer entity. tags: - customer parameters: - name: customer description: The Customer to be created required: true schema: $ref: '#/definitions/Customer_Create' in: body - $ref: '#/parameters/transactionId' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/Accept' - $ref: '#/parameters/countrycodeParam' responses: '201': description: Created schema: $ref: '#/definitions/Customer' '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' /customer/{id}: get: operationId: retrieveCustomer summary: Retrieves a Customer by ID description: This operation retrieves a Customer entity. Attribute selection is enabled for all first level attributes. tags: - customer parameters: - name: id description: Identifier of the Customer required: true type: string in: path - name: fields description: Comma-separated properties to provide in response required: false type: string in: query - $ref: '#/parameters/transactionId' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/Accept' - $ref: '#/parameters/countrycodeParam' responses: '200': description: Success schema: $ref: '#/definitions/Customer' '400': description: Bad Request schema: $ref: '#/definitions/Error' '401': description: Unauthorized schema: $ref: '#/definitions/Error' '403': description: Forbidden schema: $ref: '#/definitions/Error' '404': description: Not Found 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' patch: operationId: patchCustomer summary: Updates partially a Customer description: This operation updates partially a Customer entity. tags: - customer parameters: - name: id description: Identifier of the Customer required: true type: string in: path - name: customer description: The Customer to be updated required: true schema: $ref: '#/definitions/Customer_Update' in: body - $ref: '#/parameters/transactionId' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/Accept' - $ref: '#/parameters/countrycodeParam' responses: '200': description: Updated schema: $ref: '#/definitions/Customer' '400': description: Bad Request schema: $ref: '#/definitions/Error' '401': description: Unauthorized schema: $ref: '#/definitions/Error' '403': description: Forbidden schema: $ref: '#/definitions/Error' '404': description: Not Found 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.com/tmf-api/oauth/token" flow: "application" definitions: AccountRef: type: object description: Account reference. A account may be a party account or a financial account. required: - name properties: id: type: string description: Unique identifier of the account href: type: string description: Reference of the account description: type: string description: Detailed description of the account name: type: string description: Name of the account '@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 '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. AgreementRef: type: object description: Agreement reference. An agreement represents a contract or arrangement, either written or verbal and sometimes enforceable by law, such as a service level agreement or a customer price agreement. An agreement involves a number of other business entities, such as products, services, and resources and/or their specifications. properties: id: type: string description: Unique identifier of a related entity. href: type: string description: Reference of the related entity. name: type: string description: Name of the agreement '@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 '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. required: - id 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 valueType: type: string description: Data type of the value of the characteristic value: $ref: '#/definitions/Any' description: The value of the characteristic '@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 ContactMedium: type: object description: Indicates the contact medium that could be used to contact the party. required: - mediumType - characteristic properties: mediumType: type: string description: 'Type of the contact medium, such as: email address, telephone number, postal address' preferred: type: boolean description: If true, indicates that is the preferred contact medium characteristic: $ref: '#/definitions/MediumCharacteristic' description: Any additional characteristic(s) of this contact medium validFor: $ref: '#/definitions/TimePeriod' description: The time period that the contact medium is valid for '@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 individualIdentification: type: object description: Represents our registration of information used as proof of identity by an individual (passport, national identity card, drivers license, social security number, birth certificate) required: - identificationType - identificationId properties: identificationType: type: string description: 'ID Document Type (nid, passport)' identificationId: type: string description: Identification Document Number CreditProfile: type: object description: Credit profile for the party (containing credit scoring, ...). By default only the current credit profile is retrieved. It can be used as a list to give the party credit profiles history, the first one in the list will be the current one. required: - creditProfileDate - validFor properties: creditProfileDate: type: string format: date-time description: The date the profile was established creditRiskRating: type: integer description: This is an integer whose value is used to rate the risk creditScore: type: integer description: A measure of a person or organizations creditworthiness calculated on the basis of a combination of factors such as their income and credit history validFor: $ref: '#/definitions/TimePeriod' description: The period for which the profile is valid '@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 Customer: type: object required: - engagedParty properties: id: type: string description: Unique identifier for Customers href: type: string description: Url used to reference the customer. name: type: string description: A word, term, or phrase by which the Customer is known and distinguished from other Customers. fname: type: string example: John description: First name. lname: type: string example: Doe description: Last name. status: type: string description: Used to track the lifecycle status of the customer. statusReason: type: string description: A string providing an explanation on the value of the status lifecycle. For instance if the status is Rejected, statusReason will provide the reason for rejection. account: type: array items: $ref: '#/definitions/AccountRef' agreement: type: array items: $ref: '#/definitions/AgreementRef' characteristic: type: array items: $ref: '#/definitions/Characteristic' description: Describes the characteristic of a customer. contactMedium: type: array items: $ref: '#/definitions/ContactMedium' individualIdentification: type: array items: $ref: '#/definitions/individualIdentification' creditProfile: type: array items: $ref: '#/definitions/CreditProfile' engagedParty: $ref: '#/definitions/RelatedParty' description: The party - an organization or an individual - that is engaged as a customer. paymentMethod: type: array items: $ref: '#/definitions/PaymentMethodRef' relatedParty: type: array items: $ref: '#/definitions/RelatedParty' validFor: $ref: '#/definitions/TimePeriod' description: The time period that the Customer is valid for. '@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 Customer_Create: type: object description: |- Skipped properties: id,href required: - engagedParty - contactMedium - name - lastName - '@type' - '@baseType' - individualIdentification properties: status: type: string description: Used to track the lifecycle status of the customer. name: type: string example: John description: First name. lastName: type: string example: Doe description: Last name. statusReason: type: string description: A string providing an explanation on the value of the status lifecycle. For instance if the status is Rejected, statusReason will provide the reason for rejection. account: type: array items: $ref: '#/definitions/AccountRef' agreement: type: array items: $ref: '#/definitions/AgreementRef' characteristic: type: array items: $ref: '#/definitions/Characteristic' description: Describes the characteristic of a customer. individualIdentification: type: array items: $ref: '#/definitions/individualIdentification' description: Describes the Identification of a customer. contactMedium: type: array items: $ref: '#/definitions/ContactMedium' creditProfile: type: array items: $ref: '#/definitions/CreditProfile' engagedParty: $ref: '#/definitions/RelatedParty' description: The party - an organization or an individual - that is engaged as a customer. paymentMethod: type: array items: $ref: '#/definitions/PaymentMethodRef' relatedParty: type: array items: $ref: '#/definitions/RelatedParty' validFor: $ref: '#/definitions/TimePeriod' description: The time period that the Customer is valid for. '@baseType': type: string description: Customer type, (prepaid, postpaid, mix) '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: For OMV Customer Group (Corporate, Individual) Customer_Update: type: object description: |- Skipped properties: id,href required: - engagedParty properties: name: type: string description: A word, term, or phrase by which the Customer is known and distinguished from other Customers. fname: type: string example: John description: First name. lname: type: string example: Doe description: Last name. status: type: string description: Used to track the lifecycle status of the customer. statusReason: type: string description: A string providing an explanation on the value of the status lifecycle. For instance if the status is Rejected, statusReason will provide the reason for rejection. account: type: array items: $ref: '#/definitions/AccountRef' agreement: type: array items: $ref: '#/definitions/AgreementRef' characteristic: type: array items: $ref: '#/definitions/Characteristic' description: Describes the characteristic of a customer. contactMedium: type: array items: $ref: '#/definitions/ContactMedium' individualIdentification: type: array items: $ref: '#/definitions/individualIdentification' creditProfile: type: array items: $ref: '#/definitions/CreditProfile' engagedParty: $ref: '#/definitions/RelatedParty' description: The party - an organization or an individual - that is engaged as a customer. paymentMethod: type: array items: $ref: '#/definitions/PaymentMethodRef' relatedParty: type: array items: $ref: '#/definitions/RelatedParty' validFor: $ref: '#/definitions/TimePeriod' description: The time period that the Customer is valid for. '@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 EntityRef: type: object description: Entity reference schema to be use for all entityRef class. properties: id: type: string description: Unique identifier of a related entity. href: type: string description: Reference of the related entity. name: type: string description: Name of the related entity. '@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 '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. required: - id MediumCharacteristic: type: object description: Describes the contact medium characteristics that could be used to contact a party (an individual or an organization) required: - id - country - emailAddress - city - island - phoneNumber - address - street1 properties: city: type: string description: BSS city Code island: type: string description: BSS Island Code contactType: type: string description: 'The type of contact, for example: phone number such as mobile, fixed home, fixed office. postal address such as shipping instalation…' country: type: string description: BSS Country code address: type: string description: Customer primary address address1: type: string description: Customer secondary address emailAddress: type: string example: johndoe@example.com description: Full email address in standard format faxNumber: type: string description: The fax number of the contact phoneNumber: type: string example: 9609610000 description: The primary phone number of the contact secondaryContact: type: string example: 555-5678 description: Contact number postCode: type: string description: Postcode socialNetworkId: type: string description: Identifier as a member of a social network stateOrProvince: type: string description: State or province street1: type: string description: Describes the street street2: type: string description: Complementary street description '@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 PaymentMethodRef: type: object description: PaymentMethod reference. A payment method defines a specific mean of payment (e.g direct debit). properties: id: type: string description: Unique identifier of the payment mean href: type: string description: Reference of the payment mean name: type: string description: Name of the payment mean '@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 '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. required: - id RelatedParty: type: object description: Related Entity reference. A related party defines party or party role linked to a specific entity. required: - '@referredType' - id properties: id: type: string description: Unique identifier of a related entity. href: type: string description: Reference of the related entity. name: type: string description: Name of the related entity. role: type: string description: Role played by the related party '@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 '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. TimePeriod: type: object description: A period of time, either as a deadline (endDateTime only) a startDateTime only, or both properties: endDateTime: type: string format: date-time description: End of the time period, using IETC-RFC-3339 format startDateTime: type: string format: date-time description: Start of the time period, using IETC-RFC-3339 format. If you define a start, you must also define an end EventSubscription: type: object description: Sets the communication endpoint address the service instance must use to deliver notification information required: - id - callback properties: id: type: string description: Id of the listener callback: type: string description: The callback being registered. query: type: string description: additional data to be passed EventSubscriptionInput: type: object description: Sets the communication endpoint address the service instance must use to deliver notification information required: - callback properties: callback: type: string description: The callback being registered. query: type: string description: additional data to be passed CustomerCreateEvent: type: object description: The notification data structure properties: id: type: string description: Identifier of the resource involved in the event href: type: string description: Reference of the resource involved in the event eventId: type: string description: The identifier of the notification. eventTime: type: string format: date-time description: Time of the event occurrence. eventType: type: string description: The type of the notification. correlationId: type: string description: The correlation id for this event. domain: type: string description: The domain of the event. title: type: string description: The title of the event. description: type: string description: An explanatory of the event. priority: type: string description: A priority. timeOcurred: type: string format: date-time description: The time the event occured. event: description: The event payload linked to the involved resource object $ref: '#/definitions/CustomerCreateEventPayload' CustomerCreateEventPayload: type: object description: The event data structure properties: customer: description: The involved resource data for the event $ref: '#/definitions/Customer' CustomerAttributeValueChangeEvent: type: object description: The notification data structure properties: eventId: type: string description: The identifier of the notification. eventTime: type: string format: date-time description: Time of the event occurrence. eventType: type: string description: The type of the notification. correlationId: type: string description: The correlation id for this event. domain: type: string description: The domain of the event. title: type: string description: The title of the event. description: type: string description: An explanatory of the event. priority: type: string description: A priority. timeOcurred: type: string format: date-time description: The time the event occured. fieldPath: type: string description: The path identifying the object field concerned by this notification. event: description: The event payload linked to the involved resource object $ref: '#/definitions/CustomerAttributeValueChangeEventPayload' CustomerAttributeValueChangeEventPayload: type: object description: The event data structure properties: customer: description: The involved resource data for the event $ref: '#/definitions/Customer' CustomerStateChangeEvent: type: object description: The notification data structure properties: id: type: string description: Identifier of the resource involved in the event href: type: string description: Reference of the resource involved in the event eventId: type: string description: The identifier of the notification. eventTime: type: string format: date-time description: Time of the event occurrence. eventType: type: string description: The type of the notification. correlationId: type: string description: The correlation id for this event. domain: type: string description: The domain of the event. title: type: string description: The title of the event. description: type: string description: An explanatory of the event. priority: type: string description: A priority. timeOcurred: type: string format: date-time description: The time the event occured. event: description: The event payload linked to the involved resource object $ref: '#/definitions/CustomerStateChangeEventPayload' CustomerStateChangeEventPayload: type: object description: The event data structure properties: customer: description: The involved resource data for the event $ref: '#/definitions/Customer' CustomerDeleteEvent: type: object description: The notification data structure properties: id: type: string description: Identifier of the resource involved in the event href: type: string description: Reference of the resource involved in the event eventId: type: string description: The identifier of the notification. eventTime: type: string format: date-time description: Time of the event occurrence. eventType: type: string description: The type of the notification. correlationId: type: string description: The correlation id for this event. domain: type: string description: The domain of the event. title: type: string description: The title of the event. description: type: string description: An explanatory of the event. priority: type: string description: A priority. timeOcurred: type: string format: date-time description: The time the event occured. event: description: The event payload linked to the involved resource object $ref: '#/definitions/CustomerDeleteEventPayload' CustomerDeleteEventPayload: type: object description: The event data structure properties: customer: description: The involved resource data for the event $ref: '#/definitions/Customer' 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.