openapi: 3.1.0 info: description: |- API for handling payment data (betalingsoplysninger) submitted by Payment Service Providers (PSP). For all endpoints for submitting payment data to CESOP-DK, and retrieving status and validation report for submitted data, a JWT must be issued by Billetautomat, authorizing the caller. title: CESOP-DK API version: 2.0.0 servers: - description: PROD url: https://api.cesop.skat.dk - description: TFE url: https://api.cesop.tfe.skat.dk paths: /api/v2/betalingsoplysninger/pligtig/{pligtigSeNummer}/aarstal/{aarstal}/kvartal/{kvartal}/indlevering/{anvenderIndberetningId}: post: description: Submit data representing CESOP PaymentData xml for a given PSP for validation and delivery to CESOP operationId: Submit parameters: - description: The PSP company registration number in: path name: pligtigSeNummer required: true schema: type: string example: "30808460" pattern: "[1-9]\\d{7}" - description: The year for which data is being submitted in: path name: aarstal required: true schema: type: integer example: 2024 pattern: "[2-9]\\d{3}" - description: The quarter in the year for which data is being submitted in: path name: kvartal required: true schema: type: integer example: 1 pattern: "[1234]" - description: "An identifier for the given submission, provided by the submitter" in: path name: anvenderIndberetningId required: true schema: type: string example: PMT-Q1-2024-DK-30808460-1-1.xml pattern: "^PMT-Q[1-4]-[2][0-9]{3}-DK-[1-9][0-9]{7}-\\d+-\\d+.xml$" requestBody: content: application/xml: schema: type: string format: binary description: The PaymentData xml for a given PSP required: true responses: "201": content: application/json: schema: $ref: "#/components/schemas/IndleveringApiResponse" description: "Payment data received by CESOP-DK, ready for validation and\ \ delivery to CESOP" "400": content: application/problem+json: examples: Maximum value for quarter (kvartal) is 4: description: Maximum value for quarter (kvartal) is 4 value: type: about:blank title: Bad Request detail: Kvartal må maksimalt være 4 status: 400 Minimum value for quarter (kvartal) is 1: description: Minimum value for quarter (kvartal) is 1 value: type: about:blank title: Bad Request detail: Kvartal skal være mindst 1 status: 400 schema: $ref: "#/components/schemas/ProblemDetail" description: Invalid values was provided as parameters for the submission "403": content: application/problem+json: example: type: about:blank title: Forbidden detail: The user does not have sufficient rights for submitting data for the given PSP status: 403 schema: $ref: "#/components/schemas/ProblemDetail" description: The user does not have sufficient rights for submitting data for the given PSP security: - Billetautomat: - cesop-api summary: Submit payment data for validation and delivery to CESOP tags: - paymentdata /api/v2/betalingsoplysninger/pligtig/{pligtigSeNummer}/indlevering/{indleveringId}/status: get: description: Returns the treatment status for a given submission operationId: GetStatus parameters: - description: The PSP company registration number in: path name: pligtigSeNummer required: true schema: type: string example: "30808460" pattern: "[1-9]\\d{7}" - description: The submission identifier in: path name: indleveringId required: true schema: type: string example: cdf29e73-0b06-4ee8-8ee4-09a383c8361a pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" responses: "200": content: application/json: examples: EU_DELVIST_GODKENDT: description: Submission has been partially validated by CESOP-EU value: status: EU_DELVIST_GODKENDT EU_GODKENDT: description: Submission has been validated by CESOP-EU value: status: EU_GODKENDT EU_VALIDERING_AFVIST: description: Submission has been invalidated by CESOP-EU value: status: EU_VALIDERING_AFVIST NATIONAL_VALIDERING_AFVIST: description: Submission has been invalidated by CESOP-DK value: status: NATIONAL_VALIDERING_AFVIST UNDER_BEHANDLING: description: Submission has been received by CESOP-DK value: status: UNDER_BEHANDLING schema: $ref: "#/components/schemas/StatusApiResponse" description: Submission treatment status returned successfully "403": content: application/problem+json: example: type: about:blank title: Forbidden detail: The user does not have sufficient rights for accessing the treatment status status: 403 schema: $ref: "#/components/schemas/ProblemDetail" description: The user does not have sufficient rights for accessing the treatment status "404": content: application/problem+json: example: type: about:blank title: Indlevering Not Found detail: "Unknown indleveringId: 2cf89d8a-ba17-4506-8025-76a2250f100c" status: 404 schema: $ref: "#/components/schemas/ProblemDetail" description: The submission identifier (indleveringId) provided by the user does not match any submission security: - Billetautomat: - cesop-api summary: Get treatment status for submission tags: - paymentdata /api/v2/betalingsoplysninger/pligtig/{pligtigSeNummer}/indlevering/{indleveringId}/validering: get: description: Returns the result of the validation of submission data operationId: GetValidation parameters: - description: The PSP company registration number in: path name: pligtigSeNummer required: true schema: type: string example: "30808460" pattern: "[1-9]\\d{7}" - description: The submission identifier in: path name: indleveringId required: true schema: type: string example: cdf29e73-0b06-4ee8-8ee4-09a383c8361a pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" responses: "200": content: application/xml: {} description: Result of the validation returned successfully "403": content: application/problem+json: example: type: about:blank title: Forbidden detail: The user does not have sufficient rights for accessing the validation result status: 403 schema: $ref: "#/components/schemas/ProblemDetail" description: The user does not have sufficient rights for accessing the validation result "404": content: application/problem+json: example: type: about:blank title: Indlevering Not Found detail: "Unknown indleveringId: 2cf89d8a-ba17-4506-8025-76a2250f100c" status: 404 schema: $ref: "#/components/schemas/ProblemDetail" description: The submission identifier (indleveringId) provided by the user does not match any submission security: - Billetautomat: - cesop-api summary: Get result of validation tags: - paymentdata components: schemas: IndleveringApiResponse: type: object description: Submission result example: |- { "indleveringId": "cdf29e73-0b06-4ee8-8ee4-09a383c8361a", "indleveringTidspunkt": "2023-05-21T12:26:20+01:00" } properties: indleveringId: type: string format: uuid description: Submission identifier generated by CESOP-DK example: cdf29e73-0b06-4ee8-8ee4-09a383c8361a indleveringTidspunkt: type: string format: date-time description: ISO-8601 timestamp for registration of submission to CESOP-DK example: 2023-05-21T12:26:20+01:00 title: IndleveringApiResponse ProblemDetail: type: object description: RFC 7807 compliant problem details example: |- { "type": "about:blank", "title": "Problem Detail Title", "detail": "E.g. I'm a teapot", "status": 418 } properties: detail: type: string description: A human-readable explanation specific to this occurrence of the problem example: about:blank status: type: integer format: int32 description: The HTTP status code example: 400 title: type: string description: "A short, human-readable summary of the problem type" example: Not Found type: type: string description: The problem type as specified by RFC 7807 example: about:blank title: ProblemDetail StatusApiResponse: type: object description: Submission status example: |- { "status": "UNDER_BEHANDLING" } properties: status: type: string description: The submission has been received by CESOP-DK example: UNDER_BEHANDLING title: StatusApiResponse securitySchemes: Billetautomat: bearerFormat: JWT scheme: bearer type: http