openapi: 3.2.0 info: title: Entur Compensation API version: 2026.09.0 description: 'Operations tagged Compensation across 2 of this provider''s published API definitions: entur-refund-partner-openapi.json, entur-refund-partner-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.entur.io/sales description: production - url: https://api.staging.entur.io/sales description: staging - url: https://api.dev.entur.io/sales description: dev security: - jwt: [] tags: - name: Compensation description: Reduce the price of one or more orders to compensate customers without performing a full refund. Used when a price adjustment is sufficient instead of cancelling or refunding order lines. paths: /v1/compensations: parameters: - $ref: '#/components/parameters/authHeader' - $ref: '#/components/parameters/dciHeader' - $ref: '#/components/parameters/posHeader' - $ref: '#/components/parameters/settlementHeader' - $ref: '#/components/parameters/ET-Client-Name' - $ref: '#/components/parameters/X-Correlation-Id' post: tags: - Compensation summary: Reduce one or multiple orders' price and thus provide compensation for the… description: Leverages the possibility to compensate one or more orders in a batch operation operationId: compensateOrders requestBody: description: A compensation request detailing which orders to compensate and by how much content: application/json: schema: $ref: '#/components/schemas/CompensationRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CompensationResponse' '400': $ref: '#/components/responses/badRequest' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/conflict' '500': $ref: '#/components/responses/internalServerError' servers: - url: https://api.entur.io/sales description: production - url: https://api.staging.entur.io/sales description: staging - url: https://api.dev.entur.io/sales description: dev /v1/compensations/{orderId}: parameters: - $ref: '#/components/parameters/authHeader' - $ref: '#/components/parameters/dciHeader' - $ref: '#/components/parameters/posHeader' - $ref: '#/components/parameters/settlementHeader' - $ref: '#/components/parameters/orderIdPathParam' - $ref: '#/components/parameters/ET-Client-Name' - $ref: '#/components/parameters/X-Correlation-Id' put: tags: - Compensation summary: Reduce an single order price and thus provide compensation for the paying… description: Leverages the possibility to compensate one order operationId: compensateOrder requestBody: description: The request body, detailing an single order to compensate and by how much content: application/json: schema: $ref: '#/components/schemas/CompensationOperationRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CompensationOperationResponse' '400': $ref: '#/components/responses/badRequest' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/conflict' '500': $ref: '#/components/responses/internalServerError' deprecated: false servers: - url: https://api.entur.io/sales description: production - url: https://api.staging.entur.io/sales description: staging - url: https://api.dev.entur.io/sales description: dev components: schemas: RefundError: type: object properties: title: type: string example: Bad Request error: type: string exception: type: string message: type: string example: Validation Failed path: type: string example: /v1/refunds/NTA2JGR7 status: type: integer format: int32 example: 400 timestamp: type: string format: date-time example: '2020-07-21T17:32:28Z' required: - error - exception - message - path - status - timestamp - title title: RefundError CompensationDetails: type: object description: The summary of a CompensationElement' outcome properties: orderLineIds: type: array description: Optional list of order line ids that have been compensated. If empty the whole order was compensated example: - a3d7bfeb-c76c-4ded-8253-dbd04da15c13 - 26b02145-7dbf-4be9-8600-ff4a570d83d5 items: type: string feeId: type: string description: ID of the resulting REDUCTION fee for the compensation example: fd894a04-bfa5-4e04-92e5-fd235449ea7d involvedAuthorityIds: type: array description: A list of all the Authority ids associated with the compensated operation example: - ENT:Authority:Test items: type: string required: - feeId - involvedAuthorityIds title: CompensationDetails CompensationRequest: type: object description: A request performing compensation operations in batch properties: compensationOperations: type: array description: A required list of one or more compensation operations items: $ref: '#/components/schemas/CompensationOperation' required: - compensationOperations title: CompensationRequest CompensationOperation: type: object description: An entry describing a compensation operation properties: orderId: type: string description: The order id referencing the order to be compensated example: NTA2JGR7 elements: type: array description: A list of compensation elements items: $ref: '#/components/schemas/CompensationElement' required: - elements - orderId title: CompensationOperation CompensationResponse: type: object description: The response from performing one or more compensation operations properties: operationResults: type: array items: $ref: '#/components/schemas/CompensationResult' required: - operationResults title: CompensationResponse CompensationOperationResponse: type: object description: The response from performing a single compensation operation properties: operationResult: $ref: '#/components/schemas/CompensationResult' required: - operationResult title: CompensationOperationResponse CompensationResult: type: object description: The response from performing one or more compensation operations properties: orderId: type: string example: NTA2JGR7 details: type: array description: A collection of compensation details, corresponding to each CompensationElement in a CompensationOperation items: $ref: '#/components/schemas/CompensationDetails' affectedPaymentAndPaymentTransactionIds: type: object additionalProperties: type: array items: type: integer format: int64 description: Map containing one or more payment ids, mapping to its transaction ids that have been affected by the credit operation example: '286535': - 6784139 - 6784140 pattern: \\d+ creditId: type: integer format: int64 description: ID of the performed Credit example: 123456 required: - affectedPaymentAndPaymentTransactionIds - creditId - details - orderId title: CompensationResult CompensationOperationRequest: type: object description: A request performing an single compensation operation properties: elements: type: array description: A list of compensation elements items: $ref: '#/components/schemas/CompensationElement' additionalTerminalData: $ref: '#/components/schemas/TerminalRefundingData' overrideReimbursementType: type: string description: 'Used to override the payment method that the refund operations will be registered as. All refund operations that will target a payment transaction that is imported, will be overridden. Available types: CASH' example: CASH required: - compensationElements title: CompensationOperationRequest TerminalRefundingData: type: object description: Holder for data that needs to be provided when performing a refund on an external terminal properties: additionalData: type: object additionalProperties: type: string description: Any extra transaction data which could be relevant can be specified as a key value map of strings. If there exists keys here that clash with specific types in this request, the fields in the request are prioritized baxNumber: type: string description: When performing an offline refund to card terminal, the BAX-number is mandatory info example: '123456' obfuscatedCardNumber: type: string description: The obfuscated value of the card number the refund was performed against example: '************1234' paymentType: type: string description: The type of payment method that is provided to the terminal for refunding example: MASTERCARD rrn: type: string description: Reconciliation reference number used to track an order (transaction) through different economy systems. Generated by a terminal example: '000000016575' terminalId: type: string description: When performing an offline refund to card terminal, the terminal id is mandatory info example: '84565479' transactionConfirmedAt: type: string format: date-time description: Datetime when credit transaction was completed externally by the client. example: '2018-03-07T12:20:46Z' required: - baxNumber - obfuscatedCardNumber - paymentType - rrn - terminalId - transactionConfirmedAt title: TerminalRefundingData CompensationElement: type: object description: A element that wraps a sub operation on a given order. Typically when different properties: orderLineIds: type: array description: Optional list of order line ids that are to be compensated. If left empty the whole order is assumed to be compensated example: - a3d7bfeb-c76c-4ded-8253-dbd04da15c13 - 26b02145-7dbf-4be9-8600-ff4a570d83d5 items: type: string compensationAmount: type: string description: The amount of compensation desired for this order example: '123.45' compensationReason: type: string description: Optional field describing the reason for the compensation example: The bus was late required: - compensationAmount title: CompensationElement responses: notFound: description: Not Found content: application/json: schema: $ref: '#/components/schemas/RefundError' example: timestamp: '2025-11-13T10:15:30+01:00' status: 404 title: Not Found error: Not Found exception: NotFoundException message: This orderId does not have any options path: /v1/refunds/options/{orderId} badRequest: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/RefundError' example: timestamp: '2025-11-13T10:15:30+01:00' status: 400 title: Bad Request error: Bad Request exception: BAD_REQUEST message: Required parameter 'xx' is not present. path: /v1/refunds internalServerError: description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/RefundError' example: timestamp: '2025-11-13T10:15:30+01:00' status: 500 title: Internal Server Error error: Internal Server Error exception: InternalServerException message: Unexpected error while retrieving refunds path: /v1/refunds/{orderId} conflict: description: Conflict content: application/json: schema: $ref: '#/components/schemas/RefundError' example: timestamp: '2025-11-13T10:15:30+01:00' status: 409 title: Conflict error: Conflict exception: ConflictException message: Order with orderId 1 already refunded. path: /v1/refunds/admin/{orderId} parameters: settlementHeader: name: Entur-Settlement-Id in: header description: An id for connecting a credit to a settlement required: false style: simple explode: false schema: type: string example: '12345' orderIdPathParam: name: orderId in: path description: The id of the order that one would like to get or perform refund operations on required: true style: simple explode: false schema: type: string example: NTA2JGR7 X-Correlation-Id: name: X-Correlation-Id in: header description: Correlation id required: false style: simple explode: false schema: type: string ET-Client-Name: name: ET-Client-Name in: header description: 'Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: `-`.' required: false style: simple explode: false schema: type: string dciHeader: name: Entur-Distribution-Channel in: header description: Distribution channel identifier. required: true style: simple explode: false schema: type: string example: ENT:DistributionChannel:App posHeader: name: Entur-Pos in: header description: Point-of-sale identifier. required: true style: simple explode: false schema: type: string example: 1000600-abc authHeader: name: Authorization in: header description: Authorization header required: true style: simple explode: false schema: type: string example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c x-refined-from: - entur-refund-partner-openapi.json - entur-refund-partner-openapi.yml