openapi: 3.0.3 info: title: Open Gateway Onboarding and Ordering (TMF931) version: 1.0.0 description: 'Lets aggregators and channel partners onboard themselves and their customers programmatically, following TM Forum TMF931 (Open Gateway Operate API: Onboarding and Ordering). Register an application owner, create applications, see which API products are on offer and order access to them, without manual set-up on the portal.' servers: - url: https://api.ooredoo.com description: Ooredoo API gateway tags: - name: Authentication - name: API products - name: Onboarding - name: Ordering paths: /tmf-api/oauth/v4/token: post: tags: - Authentication summary: Get an access token description: Exchange your app's consumer key and secret for an access token (OAuth 2.0 client credentials). operationId: getToken parameters: - name: client_id in: header required: true description: Client ID of onboarded client. schema: type: string format: password default: 67Q4itU3ivApTHRB4dJKFh4R5UAdG5RAsMeEq2NppNgd6LBH - name: client_secret in: header required: true description: Client secret of onboarded client. schema: type: string format: password default: yp1CUQyGwEMNruGXtnhIbpTOuK6BGlxAFmiGlG2FQea3cHgaVqRw7rybKnWAUeKB requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object properties: grant_type: type: string default: client_credentials description: OAuth grant type required: - grant_type responses: '200': description: Access token content: application/json: schema: type: object properties: access_token: type: string token_type: type: string example: Bearer expires_in: type: integer example: 3599 '401': description: Invalid client credentials security: [] /tmf-api/openGatewayOperateAPIOnboardingAndOrdering/v4/apiProduct: get: tags: - API products summary: List the API products you can order operationId: listApiProduct parameters: - $ref: '#/components/parameters/transactionId' - $ref: '#/components/parameters/countryCode' responses: '200': description: API products content: application/json: schema: type: array items: $ref: '#/components/schemas/ApiProduct' '401': description: Missing or invalid access token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: The token does not carry the scope this operation needs content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] /tmf-api/openGatewayOperateAPIOnboardingAndOrdering/v4/applicationOwner: post: tags: - Onboarding summary: Register an application owner (your organisation or your customer's) operationId: createApplicationOwner parameters: - $ref: '#/components/parameters/transactionId' - $ref: '#/components/parameters/countryCode' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ApplicationOwner_Create' example: '@type': ApplicationOwner name: Example Aggregator description: Sandbox sample owner engagedParty: '@type': Organization name: Example Aggregator LLC contactMedium: - '@type': email id: api@example.com emailAddress: api@example.com organizationIdentification: - '@type': OrganizationIdentification identificationId: CR-123456 registeredGeographicAddress: city: Doha countryCode: value: QA responses: '201': description: Application owner created content: application/json: schema: $ref: '#/components/schemas/ApplicationOwner' '400': description: 'Invalid request: a required field is missing or malformed' content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Missing or invalid access token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: The token does not carry the scope this operation needs content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] /tmf-api/openGatewayOperateAPIOnboardingAndOrdering/v4/application: post: tags: - Onboarding summary: Create an application for an owner operationId: createApplication parameters: - $ref: '#/components/parameters/transactionId' - $ref: '#/components/parameters/countryCode' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Application_Create' example: '@type': Application name: fraud-check-app description: Sandbox sample app type: web applicationOwner: id: AO-0001 responses: '201': description: Application created, with its credentials content: application/json: schema: $ref: '#/components/schemas/Application' '400': description: 'Invalid request: a required field is missing or malformed' content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Missing or invalid access token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: The token does not carry the scope this operation needs content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] /tmf-api/openGatewayOperateAPIOnboardingAndOrdering/v4/apiProductOrder: post: tags: - Ordering summary: Order access to API products for an application operationId: createApiProductOrder parameters: - $ref: '#/components/parameters/transactionId' - $ref: '#/components/parameters/countryCode' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ApiProductOrder_Create' example: '@type': ApiProductOrder email: api@example.com key: sandbox-client-id-0001 productOrderItem: - id: SimSwap responses: '201': description: Order accepted content: application/json: schema: type: object additionalProperties: true '400': description: 'Invalid request: a required field is missing or malformed' content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Missing or invalid access token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: The token does not carry the scope this operation needs content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] components: parameters: transactionId: name: transactionId in: header required: true description: Your unique ID for this request, used for tracing schema: type: string default: tryit-0001 countryCode: name: countryCode in: header required: true description: Market the request is for (operator country, ISO 3166-1 alpha-3) schema: type: string enum: - QAT - OMN - KWT - IRQ - MDV - PSE - DZA - TUN default: QAT securitySchemes: BearerAuth: type: http scheme: bearer description: Access token from the token endpoint schemas: Error: type: object properties: status: type: integer code: type: string message: type: string ApiProduct: type: object properties: id: type: string example: SimSwap name: type: string example: Camara SimSwap description: type: string ApplicationOwner_Create: type: object required: - name - engagedParty properties: '@type': type: string example: ApplicationOwner name: type: string example: Example Aggregator description: type: string engagedParty: type: object required: - name - contactMedium - organizationIdentification properties: '@type': type: string example: Organization name: type: string example: Example Aggregator LLC contactMedium: type: array items: type: object properties: '@type': type: string example: EmailContactMedium id: type: string emailAddress: type: string example: api@example.com organizationIdentification: type: array items: type: object required: - identificationId properties: '@type': type: string example: OrganizationIdentification identificationId: type: string example: CR-123456 registeredGeographicAddress: type: object properties: city: type: string example: Doha countryCode: type: object properties: value: type: string example: QA ApplicationOwner: type: object properties: id: type: string name: type: string status: type: string Application_Create: type: object required: - name - applicationOwner properties: '@type': type: string example: Application name: type: string example: fraud-check-app description: type: string type: type: string applicationOwner: type: object required: - id properties: id: type: string description: ID returned when the owner was created Application: type: object properties: id: type: string name: type: string clientId: type: string clientSecret: type: string ApiProductOrder_Create: type: object required: - '@type' - email - key - productOrderItem properties: '@type': type: string example: ApiProductOrder email: type: string description: Email of the application owner example: api@example.com key: type: string description: Client ID of the application productOrderItem: type: array items: type: object required: - id properties: id: type: string description: API product ID from GET /apiProduct example: SimSwap