openapi: 3.1.1 info: title: Strex Merchant API description: This specification describe API for the REST services that must be implemented by the merchant. contact: name: Strex url: https://www.strex.no email: technicalsupport@strex.no license: name: Strex url: http://www.strex.no version: v1.0 servers: - url: https://strex.merchant.no/strex/api/v1/ tags: - name: Forwarding Services description: Receive SMS messages and delivery status updates. externalDocs: description: Click to open Docs url: https://todo/ paths: /forwarding/sms: post: tags: - Forwarding Services summary: SMS Forward - Allows Merchants to receive SMS’s sent to their shortnumber via Strex description: "The SMS forward function allows Merchants to receive SMS’s sent\ \ to their shortnumber via Strex. Please note that Strex supports subnumber\ \ of 9 digits also for MO SMS. Also note that the namespace id’s varies,\ \ please take this into account when implementing the server side. In case\ \ of network issues the merchant might receive duplicate smsforward requests\ \ (multiple forwardSMS requests with same messageRequestId), make sure these\ \ are filtered to avoid duplicate charging requests." operationId: SMSForward parameters: - name: X-CorrelationID in: header description: | client's CorrelationID required: true schema: type: string requestBody: content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/SMSForwardRequest' required: true responses: "200": description: | Success. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/SMSForwardSuccessfulResponse' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/SMSForwardSuccessfulResponse' "400": description: | *Bad Request* - Indicates that client has sent malformed request.nPossibly missing mandatory query parameters, invalid value in query parameters, validation exception etc. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "404": description: "*Not Found* - Indicates server has not found the requested\ \ URI. \nPossibly missing path parameters, invalid web resource etc.\n" content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "405": description: | *Method Not Allowed* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "409": description: | *Conflict* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "412": description: | *Precondition Failed* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "429": description: | *Exceeded rate limit* - . content: {} "500": description: | *Internal Server Error* - server failed in handling the client request. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "502": description: | *Bad Gateway* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "503": description: | *Service unavailable* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "504": description: Service is temporarily unavailable content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' default: description: | *Internal Server Error* - server failed in handling the client request. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' x-codegen-request-body-name: requestBody /forwarding/delivery-notifications: post: tags: - Forwarding Services summary: Delivery Notification - informs Merchants about the delivery status. description: "Delivery Notification informs Merchants about the delivery status of \ MT-SMS messages (SMS Payment and SendSMS), and status of the Sell transaction in case Easy Web Registration has been triggered. Note: The Delivery Notification Flag in the Sell request only applies to the SMS delivery notification, in the case of a Sell trx that get’s put on hold for Easy web registration, the Delivery Notification will always be sent." operationId: DNForward parameters: - name: X-CorrelationID in: header description: | client's CorrelationID required: true schema: type: string requestBody: content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/DNForwardRequest' required: true responses: "200": description: | Success. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/DNForwardSuccessfulResponse' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/DNForwardSuccessfulResponse' "400": description: | *Bad Request* - Indicates that client has sent malformed request.nPossibly missing mandatory query parameters, invalid value in query parameters, validation exception etc. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "404": description: "*Not Found* - Indicates server has not found the requested\ \ URI. \nPossibly missing path parameters, invalid web resource etc.\n" content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "405": description: | *Method Not Allowed* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "409": description: | *Conflict* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "412": description: | *Precondition Failed* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "429": description: | *Exceeded rate limit* - . content: {} "500": description: | *Internal Server Error* - server failed in handling the client request. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "502": description: | *Bad Gateway* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "503": description: | *Service unavailable* - . content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "504": description: Service is temporarily unavailable content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' default: description: | *Internal Server Error* - server failed in handling the client request. content: application/json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' application/problem+json; charset=UTF-8: schema: $ref: '#/components/schemas/TForwardErrorRFC9457' x-codegen-request-body-name: requestBody components: schemas: TTraceId: type: string description: ID used for tracking example: 9282f50277668f7c462cf83bef2a2e16 DNForwardRequest: required: - messageRequestId - msisdn - shortCode - statusCode - statusDescription type: object properties: type: $ref: '#/components/schemas/TDeliveryNotificationMessageType' timeStamp: $ref: '#/components/schemas/TTimeStamp' transId: $ref: '#/components/schemas/TTraceId' messageRequestId: maxLength: 40 type: string description: Unique request Id for the Message like 1b3e7a5d-659e-3585-1ea4-39c4faa1d476 example: 3b4e7a5d-659e-3585-2ea4-29c4faa1d471 origCorrelationId: type: string description: Original ‘corelationID’ origTransId: maxLength: 40 type: string description: | Transaction ID example: 8a40c63bbeaff29df1c3556a94c33a12 shortCode: type: string example: "1234" msisdn: maxLength: 16 type: string description: MSISDN example: "4712345678" mnoRef: maxLength: 20 type: string description: MNO Reference example: telenor statusCode: maxLength: 10 type: string description: CPA Status Code for the message example: "0" statusDescription: maxLength: 100 type: string description: Description for the Status Code example: Message Sent Successfully metaData: type: object additionalProperties: type: string description: | DN Forward request object TDeliveryNotificationMessageType: type: string description: | Type of message ENUM example: deliveryNotification enum: - deliveryNotification TSMSForwardMessageType: type: string description: | Type of message ENUM example: forwardSMS enum: - forwardSMS TTimeStamp: pattern: ^(?!\s*$).+ type: string description: Timestamp of message when received from MNO in outgoing requests format: date-time example: 2023-10-01T12:00:00Z DNForwardSuccessfulResponse: required: - transId type: object properties: transId: $ref: '#/components/schemas/TTraceId' metaData: type: object additionalProperties: type: string description: Successful response TForwardErrorRFC9457: type: object properties: type: type: string example: about:blank or https://problems-registry.smartbear.com/missing-body-property title: type: string example: Missing body property detail: type: string example: The request is missing an expected body property. status: type: integer format: int32 example: 400 code: type: string description: "Possible error codes and meaning (code: status description):\ \ \n\n SMS Forward:\n 0: \"Success\" \n 200: \"Success\" \n 9999: \"Invalid\ \ Status Code\" \n\n \n\n DN Forward:\n 0: \"Success\" \n 200: \"Success\"\ \ \n 1020: \"The request (Delivery Notification) failed because the transaction\ \ was missing the mandatory params\" \n 1008: \"The bad request\" \n 9999:\ \ \"Invalid Status Code\" \n " example: "1008" transId: $ref: '#/components/schemas/TTraceId' errors: type: array items: type: object properties: detail: type: string example: "The body property {orgTrxID} is required" pointer: type: string example: orgTrxID description: "Response containing descriptive error text and the error code\n\ type: object\n\n\n Docs: \nhttps://www.rfc-editor.org/rfc/rfc9457.html \n\ https://swagger.io/blog/problem-details-rfc9457-doing-api-errors-well/" SMSForwardRequest: required: - message - messageRequestId - msisdn - shortCode - timeStamp - type type: object properties: type: $ref: '#/components/schemas/TSMSForwardMessageType' timeStamp: $ref: '#/components/schemas/TTimeStamp' messageRequestId: maxLength: 40 type: string description: Unique request Id for the Message like 4b3e7a5d-659e-3585-1ea4-39c4faa1d476 example: 4b3e7a5d-659e-3585-1ea4-39c4faa1d476 shortCode: type: string example: "1234" msisdn: maxLength: 16 type: string description: MSISDN example: "4712345678" mnoRef: maxLength: 20 type: string description: MNO Reference example: telenor message: type: string description: actual SMS example: Hello world! metaData: type: object additionalProperties: type: string description: | SMS Forward request object SMSForwardSuccessfulResponse: required: - transId type: object properties: transId: $ref: '#/components/schemas/TTraceId' metaData: type: object additionalProperties: type: string description: Successful response responses: "400-BadRequest": description: | *Bad Request* - Indicates that client has sent malformed request.nPossibly missing mandatory query parameters, invalid value in query parameters, validation exception etc. content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "404-NotFound": description: "*Not Found* - Indicates server has not found the requested URI.\ \ \nPossibly missing path parameters, invalid web resource etc.\n" content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "405-MethodNotAllowed": description: | *Method Not Allowed* - . content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "409-Conflict": description: | *Conflict* - . content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "412-PreconditionFailed": description: | *Precondition Failed* - . content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "429-ExceededRateLimit": description: | *Exceeded rate limit* - . content: {} "500-InternalServerError": description: | *Internal Server Error* - server failed in handling the client request. content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "502-BadGateway": description: | *Bad Gateway* - . content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "503-ServiceUnavailable": description: | *Service unavailable* - . content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' "504-Down": description: Service is temporarily unavailable content: '*/*': schema: $ref: '#/components/schemas/TForwardErrorRFC9457' parameters: header-correlationid: name: X-CorrelationID in: header description: | client's CorrelationID required: true schema: type: string x-original-swagger-version: "2.0"