Created
July 31, 2025 07:12
-
-
Save AndreSchwarzer/1403f1b7bf86b92ca0ee812ca8eab6ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.4 | |
| info: | |
| version: 1.0.1 | |
| title: Matchplay Card API | |
| description: '' | |
| servers: | |
| - url: https://app.matchplaycard.de/api/v1/mpc/ | |
| - url: https://eagle.qa.clubgolf.de/api/v1/mpc/ | |
| - url: http://127.0.0.1:8000/api/v1/mpc/ | |
| tags: | |
| - name: Partners | |
| - name: Benefits | |
| - name: Customers | |
| description: Requires the token of a Customer not an Application, except `/customers/login` | |
| paths: | |
| /partners: | |
| get: | |
| tags: | |
| - Partners | |
| operationId: getAllPartners | |
| summary: Retrieve all partners | |
| responses: | |
| "200": | |
| description: A collection of partners | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PartnerCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /partners/geo: | |
| get: | |
| tags: | |
| - Partners | |
| operationId: getAllPartnersGeoJson | |
| summary: Retrieve all partners locations as geoJSON | |
| responses: | |
| "200": | |
| description: geoJSON response | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PartnerGeoResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /partners/{partnerUuid}: | |
| get: | |
| tags: | |
| - Partners | |
| operationId: getPartnerById | |
| summary: Retrieve a single partner | |
| parameters: | |
| - name: partnerUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A single partner | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PartnerResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /partners/{partnerUuid}/benefits: | |
| get: | |
| tags: | |
| - Partners | |
| operationId: getPartnerBenefitsById | |
| summary: Retrieve a single partner's benefits | |
| parameters: | |
| - name: partnerUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A single partner's benefits | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BenefitCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /benefits: | |
| get: | |
| tags: | |
| - Benefits | |
| operationId: getAllBenefits | |
| summary: Retrieve all benefits | |
| responses: | |
| "200": | |
| description: A collection of benefits | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BenefitCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /benefits/{benefitUuid}: | |
| get: | |
| tags: | |
| - Benefits | |
| operationId: getBenefitById | |
| summary: Retrieve a single benefit | |
| parameters: | |
| - name: benefitUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A single BenefitCollectionResponse | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Benefit' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/login: | |
| post: | |
| tags: | |
| - Customers | |
| operationId: getCustomerToken | |
| summary: Retrieve a token for a customer | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| email: | |
| type: string | |
| format: email | |
| password: | |
| type: string | |
| responses: | |
| "200": | |
| description: A token response for a Customer login | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/LoginToken' | |
| "401": | |
| description: Unauthorized | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| errors: | |
| type: object | |
| properties: | |
| email: | |
| type: array | |
| nullable: true | |
| items: | |
| type: string | |
| example: "Die E-Mail-Adresse oder das Passwort sind falsch." | |
| password: | |
| type: array | |
| nullable: true | |
| items: | |
| type: string | |
| example: "Die E-Mail-Adresse oder das Passwort sind falsch." | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/login/status: | |
| post: | |
| tags: | |
| - Customers | |
| operationId: getCustomerTokenStatus | |
| summary: Retrieve a token status for a customer | |
| responses: | |
| "200": | |
| description: A token status response for a Customer login | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/TokenStatus' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/logout: | |
| post: | |
| tags: | |
| - Customers | |
| operationId: logoutCustomerPost | |
| summary: Logout a customer | |
| responses: | |
| "200": | |
| description: Successful logout | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| delete: | |
| tags: | |
| - Customers | |
| operationId: logoutCustomerDelete | |
| summary: Logout a customer | |
| responses: | |
| "200": | |
| description: Successful logout | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/partners: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getAllPartnersCustomer | |
| summary: Retrieve all partners | |
| responses: | |
| "200": | |
| description: A collection of partners | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PartnerCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/partners/{partnerUuid}: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getPartnerByIdCustomer | |
| summary: Retrieve a single partner | |
| parameters: | |
| - name: partnerUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A single partner | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PartnerResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/partners/favorites: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getAllPartnersCustomerFavorite | |
| summary: Retrieve all favorite partners | |
| responses: | |
| "200": | |
| description: A collection of partners | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PartnerCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/partners/favorites/{partnerUuid}: | |
| post: | |
| tags: | |
| - Customers | |
| operationId: getPartnerByIdCustomerAddFavorite | |
| summary: Add a single partner as favorite | |
| parameters: | |
| - name: partnerUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: OK | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| delete: | |
| tags: | |
| - Customers | |
| operationId: getPartnerByIdCustomerRemoveFavorite | |
| summary: Remove a single partner as favorite | |
| parameters: | |
| - name: partnerUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: OK | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/partners/{partnerUuid}/benefits: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getPartnerBenefitsByIdCustomers | |
| summary: Retrieve a single partner's benefits | |
| parameters: | |
| - name: partnerUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A single partner's benefits | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BenefitCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/benefits: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getAllBenefitsCustomer | |
| summary: Retrieve all benefits | |
| responses: | |
| "200": | |
| description: A collection of benefits | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BenefitCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/benefits/redeemed: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getAllRedeemedBenefitsCustomer | |
| summary: Retrieve all redeemed claims | |
| responses: | |
| "200": | |
| description: A collection of claims | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ClaimCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/benefits/redeemable: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getAllRedeemableBenefitsCustomer | |
| summary: Retrieve all redeemable claims | |
| responses: | |
| "200": | |
| description: A collection of claims | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ClaimCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/benefits/expired: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getAllExpiredBenefitsCustomer | |
| summary: Retrieve all expire claims | |
| responses: | |
| "200": | |
| description: A collection of claims | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ClaimCollectionResponse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/benefits/{benefitUuid}: | |
| get: | |
| tags: | |
| - Customers | |
| operationId: getBenefitByIdCustomer | |
| summary: Retrieve a single benefit | |
| parameters: | |
| - name: benefitUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A benefit response | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Benefit' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| /customers/benefits/{benefitUuid}/claim: | |
| post: | |
| tags: | |
| - Customers | |
| operationId: claimBenefitByIdCustomer | |
| summary: Claim a single benefit | |
| parameters: | |
| - name: benefitUuid | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| format: uuid | |
| responses: | |
| "200": | |
| description: A claim response | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ClaimResonse' | |
| "401": | |
| description: Unauthorized | |
| "403": | |
| description: Forbidden | |
| "404": | |
| description: Not Found | |
| "410": | |
| description: "Gone (personal limit exceeded) [Test UUID: 9A1C91E2-CDFB-434A-80FD-000000000410]" | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Message' | |
| "423": | |
| description: "Locked (personal limit exceeded, recoverable) [Test UUID: 9A1C91E2-CDFB-434A-80FD-000000000423]" | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/MessageRecoverable' | |
| components: | |
| securitySchemes: | |
| BearerAuth: | |
| type: http | |
| scheme: bearer | |
| bearerFormat: JWT | |
| description: "Fill in your acquired bearer token here, must be like 'Bearer TOKEN_HERE'" | |
| schemas: | |
| MetaResponse: | |
| type: object | |
| properties: | |
| current_page: | |
| type: integer | |
| from: | |
| type: integer | |
| last_page: | |
| type: integer | |
| links: | |
| type: array | |
| items: | |
| type: object | |
| properties: | |
| url: | |
| type: string | |
| nullable: true | |
| label: | |
| type: string | |
| active: | |
| type: boolean | |
| path: | |
| type: string | |
| per_page: | |
| type: integer | |
| to: | |
| type: integer | |
| total: | |
| type: integer | |
| LinksResponse: | |
| type: object | |
| properties: | |
| first: | |
| type: string | |
| format: uri | |
| last: | |
| type: string | |
| format: uri | |
| prev: | |
| type: string | |
| format: uri | |
| nullable: true | |
| next: | |
| type: string | |
| format: uri | |
| nullable: true | |
| PartnerGeoResponse: | |
| type: object | |
| description: geoJSON | |
| properties: | |
| type: | |
| type: string | |
| example: "FeatureCollection" | |
| features: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Feature' | |
| PartnerResponse: | |
| type: object | |
| description: A partner response | |
| properties: | |
| data: | |
| $ref: '#/components/schemas/Partner' | |
| PartnerCollectionResponse: | |
| type: object | |
| description: A collection of partners response | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Partner' | |
| links: | |
| type: object | |
| $ref: '#/components/schemas/LinksResponse' | |
| meta: | |
| type: object | |
| $ref: '#/components/schemas/MetaResponse' | |
| BenefitCollectionResponse: | |
| type: object | |
| description: A collection of partners response | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Benefit' | |
| links: | |
| type: object | |
| $ref: '#/components/schemas/LinksResponse' | |
| meta: | |
| type: object | |
| $ref: '#/components/schemas/MetaResponse' | |
| ClaimCollectionResponse: | |
| type: object | |
| description: A collection of partners response | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Claim' | |
| links: | |
| type: object | |
| $ref: '#/components/schemas/LinksResponse' | |
| meta: | |
| type: object | |
| $ref: '#/components/schemas/MetaResponse' | |
| Partner: | |
| type: object | |
| description: A partner entity | |
| properties: | |
| uuid: | |
| type: string | |
| format: uuid | |
| is_active: | |
| type: boolean | |
| name: | |
| type: string | |
| description: | |
| type: string | |
| nullable: true | |
| path_logo: | |
| type: string | |
| format: uri | |
| nullable: true | |
| path_hero: | |
| type: string | |
| format: uri | |
| nullable: true | |
| dgv_club_id: | |
| type: integer | |
| nullable: true | |
| contact: | |
| type: object | |
| properties: | |
| phone: | |
| type: string | |
| website: | |
| type: string | |
| format: uri | |
| email: | |
| type: string | |
| format: email | |
| address: | |
| type: object | |
| properties: | |
| address: | |
| type: string | |
| postcode: | |
| type: string | |
| city: | |
| type: string | |
| iso_3166_2: | |
| type: string | |
| iso_3166_alpha2: | |
| type: string | |
| lng: | |
| type: number | |
| lat: | |
| type: number | |
| ratings: | |
| type: number | |
| nullable: true | |
| example: 4.9 | |
| Feature: | |
| type: object | |
| description: A geoJSON feature | |
| properties: | |
| type: | |
| type: string | |
| example: "Feature" | |
| geometry: | |
| type: object | |
| properties: | |
| type: | |
| type: string | |
| example: "Point" | |
| coordinates: | |
| type: array | |
| items: | |
| type: number | |
| example: [6.79601482, 51.23487948] | |
| properties: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| example: "Clubgolf GmbH & Co. KG" | |
| uuid: | |
| type: string | |
| format: uuid | |
| example: "80B51BD9-5F91-4BCF-B879-AA1D950F3BC1" | |
| Benefit: | |
| type: object | |
| properties: | |
| uuid: | |
| type: string | |
| format: uuid | |
| partner_uuid: | |
| type: string | |
| format: uuid | |
| is_active: | |
| type: boolean | |
| type: | |
| type: string | |
| contact: | |
| type: string | |
| discount_stacking: | |
| type: boolean | |
| restrictions: | |
| type: object | |
| properties: | |
| redeemability_per_day: | |
| type: object | |
| properties: | |
| monday: | |
| type: boolean | |
| tuesday: | |
| type: boolean | |
| wednesday: | |
| type: boolean | |
| thursday: | |
| type: boolean | |
| friday: | |
| type: boolean | |
| saturday: | |
| type: boolean | |
| sunday: | |
| type: boolean | |
| public_holiday: | |
| type: boolean | |
| redeemability_only_in_period: | |
| type: object | |
| properties: | |
| display_as: | |
| type: string | |
| from_day: | |
| type: string | |
| from_month: | |
| type: string | |
| until_day: | |
| type: string | |
| until_month: | |
| type: string | |
| handicap: | |
| type: object | |
| properties: | |
| per_person: | |
| type: integer | |
| nullable: true | |
| sum_group: | |
| type: integer | |
| nullable: true | |
| avg_group: | |
| type: integer | |
| nullable: true | |
| location: | |
| type: string | |
| nullable: true | |
| cooldown: | |
| type: string | |
| quantifier: | |
| type: string | |
| is_available: | |
| type: boolean | |
| nullable: true | |
| Claim: | |
| type: object | |
| properties: | |
| uuid: | |
| type: string | |
| format: uuid | |
| voucher: | |
| type: string | |
| benefit_uuid: | |
| type: string | |
| format: uuid | |
| partner_uuid: | |
| type: string | |
| format: uuid | |
| redeemed_at: | |
| type: string | |
| format: date-time | |
| nullable: true | |
| expires_at: | |
| type: string | |
| format: date-time | |
| nullable: true | |
| ClaimResonse: | |
| type: object | |
| properties: | |
| data: | |
| $ref: '#/components/schemas/Claim' | |
| LoginToken: | |
| type: object | |
| properties: | |
| token: | |
| type: string | |
| name: | |
| type: string | |
| email: | |
| type: string | |
| format: email | |
| expires: | |
| type: string | |
| format: date-time | |
| TokenStatus: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| email: | |
| type: string | |
| format: email | |
| expires: | |
| type: string | |
| format: date-time | |
| Message: | |
| type: object | |
| properties: | |
| message: | |
| type: string | |
| example: Persönliches Kontingent erschöpft. | |
| MessageRecoverable: | |
| type: object | |
| properties: | |
| message: | |
| type: string | |
| example: Persönliches Kontingent erschöpft. Wieder ab 01.08.2025 verfügbar. | |
| security: | |
| - BearerAuth: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment