swagger: '2.0'
info:
  description: >
    Welcome to MyBeezBox API documentation. You can use our API to access our
    different endpoints.


    You can find more use cases [here](https://doc.mybeezbox.com/).


    <div class="theme-admonition theme-admonition-caution alert alert--warning
    admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-styles-module">
      <div class="admonitionContent_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-styles-module">
        <p>This API documentation is a work in progress.</p>
      </div>
    </div>


    **Glossary:**


    Data types can be:
      * `integer`: a number that can be written without a fractional component. For example, 1.
      * `float`: a number that is not an integer, because it includes a fraction represented in decimal format. For example, 1.5.
      * `boolean`: a data type with two possible values. For example, true or false.

    If you need information not available in the documentation, do not hesitate
    to contact us.
  version: 1.0.0
  title: MyBeezBox API
  contact:
    email: dev@mybeezbox.com
schemes:
  - https
host: demo.bonkdo.com
basePath: /api/
tags:
  - name: Authentication
    description: >
      Describe the authentication and authorization process. In particular, how
      to fetch your API token, and permissions.
  - name: Media manager
    description: Everything about the media manager and how to upload pictures
  - name: Giftcards
    description: Everything about giftcards
  - name: Giftcard usages
    description: Everything about giftcard usages
  - name: Vouchers - Vouchers
    description: Everything about vouchers
  - name: Vouchers - Prototypes
    description: Everything about prototypes
  - name: Vouchers - Options
    description: Everything about options
  - name: Network giftcards
    description: Everything about network giftcards
  - name: Network giftcard usages
    description: Everything about network giftcard usages
  - name: Network vouchers
    description: Everything about network vouchers
  - name: Network voucher usages
    description: Everything about network voucher usages
  - name: Partners
    description: Everything about partners
  - name: Payment Hub - Payments
    description: Everything about Payment Hub's payments
  - name: Payment Hub - Payout requests
    description: Everything about Payment Hub's payout requests
  - name: Payment Hub - Invoices
    description: Everything about Payment Hub's invoices
  - name: Payment Hub - KYC
    description: Everything about Payment Hub's KYC levels
  - name: Payment Hub - Wallets
    description: Everything about Payment Hub's wallets
  - name: Multi-product orders
    description: Everything about multi-product orders and funnel
  - name: Payment requests
    description: Everything about payment requests
paths:
  /api-token-auth/:
    post:
      tags:
        - Authentication
      summary: Fetch your API token
      description: ''
      operationId: apiTokenAuth
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Credentials
          required: true
          schema:
            type: object
            required:
              - username
              - password
            properties:
              username:
                type: string
                example: johndoe
              password:
                type: string
                example: mypassword
      responses:
        '200':
          description: Successful request
          schema:
            $ref: '#/definitions/SuccessfulAuthToken'
        '400':
          description: Bad request
  /permissions/me:
    get:
      tags:
        - Authentication
      summary: Fetch your permissions
      description: List of the current user's permissions
      operationId: getMyPermissions
      produces:
        - application/json
      responses:
        '200':
          description: Successful request
          schema:
            $ref: '#/definitions/PermissionList'
      security:
        - ApiKey:
            - read:access_giftcards
  /partners/giftcards/:
    get:
      tags:
        - Giftcards
      summary: Get all giftcards
      description: Get all giftcards
      operationId: getPartnerGcs
      produces:
        - application/json
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedPartnerGiftcards'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Giftcard not found
      security:
        - ApiKey:
            - read:giftcards
  /partners/giftcards/{id}/:
    get:
      tags:
        - Giftcards
      summary: Find a giftcard by its id
      description: Returns a single giftcard
      operationId: getPartnerGcById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: Code of the giftcard to return
          required: true
          type: integer
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/PartnerGiftcard'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Giftcard not found
      security:
        - ApiKey:
            - read:giftcards
  /partners/giftcard_by_code/{code}/:
    get:
      tags:
        - Giftcards
      summary: Find a giftcard by its code
      description: Returns a single giftcard
      operationId: getPartnerGcByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of the giftcard to return
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/PartnerGiftcard'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Giftcard not found
      security:
        - ApiKey:
            - read:giftcards
  /vouchers:
    get:
      tags:
        - Vouchers - Vouchers
      summary: Get all vouchers
      description: The result is paginated
      operationId: getAllVouchers
      produces:
        - application/json
      parameters:
        - in: query
          name: code
          description: Search voucher by code
        - in: query
          name: voucher_prototype_name
          description: Search voucher by prototype name
        - in: query
          name: gifter
          description: Search voucher by gifter
        - in: query
          name: giftee
          description: Search voucher by giftee
        - in: query
          name: origin_url
          description: Search voucher by origin url
        - in: query
          name: page
          description: Pagination
      responses:
        '200':
          description: vouchers list
          schema:
            $ref: '#/definitions/PaginatedVouchers'
      security:
        - ApiKey:
            - write:vouchers
            - read:vouchers
  /vouchers_by_code/{code}/:
    get:
      tags:
        - Vouchers - Vouchers
      summary: Get a voucher by code
      description: ''
      operationId: getOneVoucher
      produces:
        - application/json
      parameters:
        - in: path
          name: code
          type: string
          description: The code of the voucher you are looking for
      responses:
        '200':
          description: vouchers info
          schema:
            $ref: '#/definitions/Voucher'
        '404':
          description: voucher with given `code` doesn’t exist
      security:
        - ApiKey:
            - write:vouchers
            - read:vouchers
    patch:
      tags:
        - Vouchers - Vouchers
      summary: Update a voucher
      description: ''
      operationId: getOneVoucher
      produces:
        - application/json
      parameters:
        - in: path
          name: code
          type: string
          description: The voucher code you are looking for
        - in: body
          name: body
          type: object
          required: true
          schema:
            required:
              - state
            properties:
              state:
                type: string
                enum:
                  - draft
                  - paid
                  - error
                  - using
                  - used
                  - exprd
      responses:
        '200':
          description: Success
        '404':
          description: voucher with given `code` doesn’t exist
      security:
        - ApiKey:
            - write:vouchers
            - read:vouchers
  /v1/vouchers/prototypes/:
    post:
      tags:
        - Vouchers - Prototypes
      summary: Create a voucher prototype
      operationId: createVouchersPrototype
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Voucher prototype that will be created
          required: true
          schema:
            $ref: '#/definitions/VoucherPrototype'
      responses:
        '201':
          description: Voucher prototype created
          schema:
            $ref: '#/definitions/VoucherPrototype'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:voucherprototypes
            - read:voucherprototypes
    get:
      tags:
        - Vouchers - Prototypes
      summary: Get all prototypes
      description: Get all voucher prototypes
      operationId: getVouchersPrototypes
      produces:
        - application/json
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedVoucherPrototypes'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:voucherprototypes
  /v1/vouchers/prototypes/{id}/:
    get:
      tags:
        - Vouchers - Prototypes
      summary: Get prototype by its ID
      description: Returns a single voucher prototype
      operationId: getVouchersPrototypeById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the prototype
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/VoucherPrototype'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Prototype not found
      security:
        - ApiKey:
            - read:voucherprototypes
    patch:
      tags:
        - Vouchers - Prototypes
      summary: Update prototype by its ID
      description: Updates a single voucher prototype
      operationId: updateVouchersPrototypeById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the prototype
          required: true
          type: int
          format: int64
        - name: body
          in: body
          description: Voucher prototype that will be updated
          required: true
          schema:
            $ref: '#/definitions/VoucherPrototype'
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/VoucherPrototype'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Prototype not found
      security:
        - ApiKey:
            - write:voucherprototypes
  /v1/vouchers/prototypes/{id}/options/:
    get:
      tags:
        - Vouchers - Prototypes
      summary: Get all options related to a prototype
      description: Get all options related to a voucher prototype
      operationId: getVouchersPrototypeOptionsById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the prototype
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/VoucherPrototypeOption'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Prototype not found
      security:
        - ApiKey:
            - read:voucherprototypes
  /v1/vouchers/options/:
    post:
      tags:
        - Vouchers - Options
      summary: Create an option
      operationId: createVouchersOption
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Option that will be created
          required: true
          schema:
            $ref: '#/definitions/VoucherOption'
      responses:
        '201':
          description: Option created
          schema:
            $ref: '#/definitions/VoucherOption'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:voucheroptions
            - read:voucheroptions
    get:
      tags:
        - Vouchers - Options
      summary: Get all options
      description: Get all voucher options
      operationId: getVouchersOptions
      produces:
        - application/json
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedVoucherOptions'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:voucheroptions
  /v1/vouchers/options/{id}/:
    get:
      tags:
        - Vouchers - Options
      summary: Get option by its ID
      description: Returns a single voucher option
      operationId: getVouchersOptionById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the option
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/VoucherOption'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Option not found
      security:
        - ApiKey:
            - read:voucheroptions
    patch:
      tags:
        - Vouchers - Options
      summary: Update option by its ID
      description: Updates a single voucher option
      operationId: updateVouchersOptionById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the option
          required: true
          type: int
          format: int64
        - name: body
          in: body
          description: Voucher option that will be updated
          required: true
          schema:
            $ref: '#/definitions/VoucherPrototypeOption'
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/VoucherPrototypeOption'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Option not found
      security:
        - ApiKey:
            - write:voucheroptions
  /v1/vouchers/options/categories/:
    post:
      tags:
        - Vouchers - Options
      summary: Create a category
      operationId: createVouchersOptionCategory
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Option that will be created
          required: true
          schema:
            $ref: '#/definitions/VoucherOptionCategory'
      responses:
        '201':
          description: Category created
          schema:
            $ref: '#/definitions/VoucherOptionCategory'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:voucheroptioncategories
            - read:voucheroptioncategories
    get:
      tags:
        - Vouchers - Options
      summary: Get all categories
      description: Get all voucher option categories
      operationId: getVouchersOptionCategories
      produces:
        - application/json
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/VoucherOptionCategory'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:voucheroptions
  /v1/vouchers/options/categories/{id}/:
    get:
      tags:
        - Vouchers - Options
      summary: Get category by its ID
      description: Returns a single voucher option category
      operationId: getVouchersOptionCategoryById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the category
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/VoucherOptionCategory'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Category not found
      security:
        - ApiKey:
            - read:voucheroptioncategories
    patch:
      tags:
        - Vouchers - Options
      summary: Update category by its ID
      description: Updates a single voucher option category
      operationId: updateVouchersOptionCategoryById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the option
          required: true
          type: int
          format: int64
        - name: body
          in: body
          description: Voucher option category that will be updated
          required: true
          schema:
            $ref: '#/definitions/VoucherOptionCategory'
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/VoucherOptionCategory'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Category not found
      security:
        - ApiKey:
            - write:voucheroptioncategories
  /v1/network_giftcards/giftcards/:
    post:
      tags:
        - Network giftcards
      summary: Create a new network giftcard
      description: ''
      operationId: createNgc
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Network giftcard that will be created
          required: true
          schema:
            type: object
            required:
              - marketplace_uuid
              - status
              - value
              - gifter
              - from_gifter
              - activation_date
              - expiration_date
            properties:
              marketplace_uuid:
                type: string
                format: uuid
                description: The UUID of the marketplace
                example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
              status:
                type: string
                description: Status of the network giftcard
                enum:
                  - draft
                  - paid
                  - cncld
                  - using
                  - test
                example: paid
              value:
                type: number
                format: float
                example: 100
              gifter:
                $ref: '#/definitions/Customer'
              giftee:
                $ref: '#/definitions/Customer'
              from_gifter:
                type: string
                description: A message from the gifter, to the giftee
                example: Happy birthday!
              activation_date:
                type: string
                description: Activation date of the network giftcard
                example: 2022-06-16 12:00:0.000000+00:00
              expiration_date:
                type: string
                description: Expiration date of the network giftcard
                example: 2023-06-16 12:00:0.000000+00:00
      responses:
        '201':
          description: Network giftcard created
          schema:
            $ref: '#/definitions/NetworkGiftcard'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:networkgiftcards
            - read:networkgiftcards
  /networkgiftcards_by_code/{code}/:
    get:
      tags:
        - Network giftcards
      summary: (DEPRECATED) Find network giftcard by its code
      description: (DEPRECATED) Returns a single network giftcard
      operationId: getNgcByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of network giftcard to return
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/NetworkGiftcard'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard not found
      security:
        - ApiKey:
            - read:networkgiftcards
  /marketplaces/networkgiftcard_by_code/{code}/:
    get:
      tags:
        - Network giftcards
      summary: Find a network giftcard by its code
      description: Returns a single network giftcard
      operationId: getMarketplaceNgcByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of the network giftcard to return
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/MarketplaceNetworkGiftcard'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard not found
      security:
        - ApiKey:
            - read:networkgiftcards
  /marketplaces/networkgiftcard_by_code/{code}/usages/:
    get:
      tags:
        - Network giftcard usages
      summary: Get all usages related to a network giftcard
      description: Returns all network giftcard's usages
      operationId: getMarketplaceNgcUsagesByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of network giftcard
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            $ref: '#/definitions/MarketplaceNetworkGiftcardUsage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard not found
      security:
        - ApiKey:
            - read:networkgiftcards
  /marketplaces/networkgiftcards_by_email/{email}/:
    get:
      tags:
        - Network giftcards
      summary: Find network giftcards by email
      description: Returns a list of network giftcards
      operationId: getMarketplaceNgcByEmail
      produces:
        - application/json
      parameters:
        - name: email
          in: path
          description: The Network Giftcard gifter or giftee email.
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/MarketplaceNetworkGiftcard'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcards not found
      security:
        - ApiKey:
            - read:networkgiftcards
  /networkgiftcards_by_code/{code}/use/:
    post:
      tags:
        - Network giftcard usages
      summary: Use a network giftcard by code
      description: >
        This endpoint gets given `partner_source_id`, and sets the usage's
        partner with the partner that has given source ID. For example:
          * Partner A: `ID = 1`, `source ID = 111`.
          * Partner B: `ID = 2`, `source ID = 222`.

        If the request has `partner_source_id = 222`, the usage's partner will
        be `Partner B`. If the request has `partner_source_id = 2`, it will
        raise an error because there is not partner with given source ID.

        If you want to use `partner_source_id = 2` to set the same partner
        (using its ID, instead of source ID), you should use the endpoint
        `/networkgiftcards_by_code/{code}/use_with_mybb_id/`.
      operationId: useNgcByCode
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of network giftcard to use
          required: true
          type: string
        - in: body
          name: body
          description: Data to use the network giftcard
          required: true
          schema:
            type: object
            required:
              - creation_date
              - value
              - partner_source_id
            properties:
              creation_date:
                type: string
                description: >
                  Date/time that will be used to set the creation date of the
                  usage. Set 12:00 as hour, so we avoid timezone issues.
                example: 2022-06-16T12:00
              value:
                type: number
                format: decimal
                description: Value of the usage.
                example: 20
              comment:
                type: string
                description: >-
                  Additional comment, that is displayed as a note on our
                  dashboard.
                example: Used from our own API
              reservation_id:
                type: string
                example: 123-ABC
              partner_source_id:
                type: integer
                format: int64
                example: 222
              freeze_payout_date:
                type: string
                description: >
                  Date/time that will be used to take into account this usage in
                  the payout. So instead of using the "creation date", we use
                  this field:
                    - Creation date: 01/01/2022
                    - Freeze payout date: 01/05/2022

                  The payout from May 2022 will include this usage, instead of
                  the payout of January 2022.
                example: 2022-08-01T12:00
              send_usage_notification_email:
                type: boolean
                description: >
                  Whether we should send notification emails (after creating the
                  usage) to marketplace and beneficiary, or not. By default,
                  this is `false`.
                example: false
              giftee_email:
                type: string
                format: email
                description: >
                  Email that will overwrite the beneficiary's email of the
                  giftcard, and will be used as recipient of the email (if
                  desired). If notification email should be sent, by default we
                  use current beneficiary's email. But if we don't have any
                  beneficiary's email, we will use buyer's one.
                example: beneficiary@mybeezbox.com
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/NetworkGiftcardUsage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard not found
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:networkgiftcards
            - read:networkgiftcards
  /networkgiftcards_by_code/{code}/use_with_mybb_id/:
    post:
      tags:
        - Network giftcard usages
      summary: Use a network giftcard by code
      description: >
        This endpoint gets given `partner_source_id`, and sets the usage's
        partner with the partner that has given source ID. For example:
          * Partner A: `ID = 1`, `source ID = 111`.
          * Partner B: `ID = 2`, `source ID = 222`.

        If the request has `partner_source_id = 2`, the usage's partner will be
        `Partner B`. If the request has `partner_source_id = 222`, it will raise
        an error because there is not partner with given ID.

        If you want to use `partner_source_id = 222` to set the same partner
        (using its ID, instead of its source ID), you should use the endpoint
        `/networkgiftcards_by_code/{code}/use/`.
      operationId: useNgcWithMyBBidByCode
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of network giftcard to use
          required: true
          type: string
        - in: body
          name: body
          description: Data to use the network giftcard
          required: true
          schema:
            type: object
            required:
              - creation_date
              - value
              - partner_id
            properties:
              creation_date:
                type: string
                description: >
                  Date/time that will be used to set the creation date of the
                  usage. Set 12:00 as hour, so we avoid timezone issues.
                example: 2022-06-16T12:00
              value:
                type: number
                format: decimal
                description: Value of the usage.
                example: 20
              comment:
                type: string
                description: >-
                  Additional comment, that is displayed as a note on our
                  dashboard.
                example: Used from our own API
              reservation_id:
                type: string
                example: 123-ABC
              partner_id:
                type: integer
                format: int64
                example: 2
              freeze_payout_date:
                type: string
                description: >
                  Date/time that will be used to take into account this usage in
                  the payout. So instead of using the "creation date", we use
                  this field:
                    - Creation date: 01/01/2022
                    - Freeze payout date: 01/05/2022

                  The payout from May 2022 will include this usage, instead of
                  the payout of January 2022.
                example: 2022-08-01T12:00
              send_usage_notification_email:
                type: boolean
                description: >
                  Whether we should send notification emails (after creating the
                  usage) to marketplace and beneficiary, or not. By default,
                  this is `false`.
                example: false
              giftee_email:
                type: string
                description: >
                  Email that will overwrite the beneficiary's email of the
                  giftcard, and will be used as recipient of the email (if
                  desired). If notification email should be sent, by default we
                  use current beneficiary's email. But if we don't have any
                  beneficiary's email, we will use buyer's one.
                example: beneficiary@mybeezbox.com
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/NetworkGiftcardUsage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard not found
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:networkgiftcards
            - read:networkgiftcards
  /networkgiftcards_by_code/{code}/usages/:
    get:
      tags:
        - Network giftcard usages
      summary: Get all usages related to a network giftcard
      description: Returns all network giftcard's usages
      operationId: getNgcUsagesByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of network giftcard
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/NetworkGiftcardUsage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard not found
      security:
        - ApiKey:
            - read:networkgiftcards
  /networkgiftcardusages/{id}/cancel/:
    post:
      tags:
        - Network giftcard usages
      summary: Cancel an already existing network giftcard usage
      description: >
        If the network giftcard usage is already linked to a payout, this won't
        be executed
      operationId: cancelNgcUsage
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of network giftcard usage
          required: true
          type: integer
          format: int64
        - in: body
          name: body
          description: Data to cancel the network giftcard usage
          required: true
          schema:
            type: object
            properties:
              comment:
                type: string
                description: A possible comment that can be set when creating the usage
                example: This usage was created via API
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/NetworkGiftcardUsage'
        '400':
          description: Invalid ID supplied
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network giftcard usage not found
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:networkgiftcardusages
            - read:networkgiftcardusages
  /marketplaces/networkvoucherboxes/:
    get:
      tags:
        - Network vouchers
      summary: Get all boxes
      description: Get all network voucher boxes
      operationId: getMarketplaceNetworkVoucherBoxes
      produces:
        - application/json
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/NetworkVoucherBox'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:networkvoucherboxes
  /marketplaces/networkvoucherboxes/{id}/:
    get:
      tags:
        - Network vouchers
      summary: Get box by its ID
      description: Returns a single box
      operationId: getMarketplaceNetworkVoucherBoxById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the box
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/NetworkVoucherBox'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Box not found
      security:
        - ApiKey:
            - read:networkvoucherboxes
  /marketplaces/networkvoucherboxes/{id}/offers/:
    get:
      tags:
        - Network vouchers
      summary: Get all offers related to a box
      description: Get all offers related to a box
      operationId: getMarketplaceNetworkVoucherBoxOffersById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the box
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/NetworkVoucherOffer'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Box not found
      security:
        - ApiKey:
            - read:networkvoucherboxes
  /marketplaces/networkvoucher_by_code/{code}/:
    get:
      tags:
        - Network vouchers
      summary: Find a network voucher by its code
      description: Returns a single network voucher
      operationId: getNvByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of the network voucher to return
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/MarketplaceNetworkVoucher'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network vouchers not found
      security:
        - ApiKey:
            - read:networkvouchers
  /marketplaces/networkvoucher_by_code/{code}/usages/:
    get:
      tags:
        - Network voucher usages
      summary: Get all usages related to a network voucher
      description: Returns all network voucher's usages
      operationId: getNvUsagesByCode
      produces:
        - application/json
      parameters:
        - name: code
          in: path
          description: Code of network voucher
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            $ref: '#/definitions/NetworkVoucherUsage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network voucher not found
      security:
        - ApiKey:
            - read:networkvouchers
  /marketplaces/networkvouchers_by_email/{email}/:
    get:
      tags:
        - Network vouchers
      summary: Find network vouchers by email
      description: Returns a list of network vouchers
      operationId: getMarketplaceNgcByEmail
      produces:
        - application/json
      parameters:
        - name: email
          in: path
          description: The Network Voucher gifter or giftee email.
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/MarketplaceNetworkVoucher'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network vouchers not found
      security:
        - ApiKey:
            - read:networkvouchers
  /payment_hub/partner/create/:
    post:
      tags:
        - Partners
      summary: Create a new partner
      description: ''
      operationId: createPartner
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Partner that will be created
          required: true
          schema:
            type: object
            required:
              - status
              - commercial_name
              - short_name
              - agency_email
            properties:
              status:
                type: string
                description: |
                  Status of the partner:
                    * `a`: Active
                    * `i`: Inactive
                    * `t`: Test
                enum:
                  - a
                  - i
                  - t
                example: a
              name:
                type: string
                example: 'Partner #1'
              commercial_name:
                type: string
                example: 'Partner #1 commercial name'
              short_name:
                type: string
                example: partner1
              company_type:
                type: string
                description: |
                  Partner's company type:
                    * `bus`: Business
                    * `sol`: Soletrader
                    * `org`: Organization
                enum:
                  - bus
                  - ind
                  - sol
                  - org
                example: bus
              siret_number:
                type: string
                example: '123456789'
              legal_representative_first_name:
                type: string
                example: Representative's first name
              legal_representative_last_name:
                type: string
                example: Representative's last name
              legal_representative_birthday:
                type: string
                description: Birth date of the legal representative
                example: '2022-05-01'
              hq_address_line_1:
                type: string
                example: 'Address line #1'
              hq_address_line_2:
                type: string
                example: 'Address line #2'
              hq_postal_code:
                type: string
                example: '75000'
              hq_city:
                type: string
                example: Paris
              hq_country:
                type: string
                example: FR
              rcs:
                type: string
                example: ''
              ape:
                type: string
                example: ''
              vat_id:
                type: string
                example: ''
              agency_email:
                type: string
                format: email
                example: partner1@mybeezbox.com
              agency_phone:
                type: string
                example: '987654321'
              website:
                type: string
                format: uri
                example: https://www.mybeezbox.com
              payout_frequency:
                type: string
                description: |
                  Pay-out frequency:
                    * `week`: Once a week
                    * `month`: Once a month
                enum:
                  - week
                  - month
                example: week
              auto_validate_payout:
                type: boolean
                description: Whether the pay-outs should be validated automatically, or not
                example: true
              freeze_payout:
                type: boolean
                description: >
                  Whether the partner should be able to set 'freeze pay-out'
                  feature. 'Freeze pay-out' allows to take into account a
                  specific date set on transactions, so they are taken into
                  account on that value instead of its creation date.
                example: true
              block_payout_validation:
                type: boolean
                description: Whether the pay-outs should be blocked from validation, or not
                example: true
              iban:
                type: string
                description: IBAN of partner's bank account
                example: FR2212739000304675471929G68
              bic:
                type: string
                description: BIC of partner's bank account
                example: BNPAESMS
      responses:
        '201':
          description: Partner created
          schema:
            $ref: '#/definitions/Partner'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:partners
            - read:partners
  /payment_hub/network_partner/create/:
    post:
      tags:
        - Partners
      summary: Create a new network partner
      description: ''
      operationId: createNetworkPartner
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Partner that will be created
          required: true
          schema:
            type: object
            required:
              - name
              - commercial_name
              - short_name
              - siret_number
              - legal_representative_first_name
              - legal_representative_last_name
              - hq_address_line_1
              - hq_postal_code
              - hq_city
              - hq_country
              - rcs
              - ape
              - vat_id
              - website
              - agency_email
            properties:
              name:
                type: string
                example: 'Partner #1'
              commercial_name:
                type: string
                example: 'Partner #1 commercial name'
              short_name:
                type: string
                example: partner1
              company_type:
                type: string
                description: |
                  Partner's company type:
                    * `bus`: Business
                    * `sol`: Soletrader
                    * `org`: Organization
                enum:
                  - bus
                  - ind
                  - sol
                  - org
                example: bus
              siret_number:
                type: string
                example: '123456789'
              legal_representative_first_name:
                type: string
                example: Representative's first name
              legal_representative_last_name:
                type: string
                example: Representative's last name
              legal_representative_birthday:
                type: string
                description: Birth date of the legal representative
                example: '2022-05-01'
              hq_address_line_1:
                type: string
                example: 'Address line #1'
              hq_address_line_2:
                type: string
                example: 'Address line #2'
              hq_postal_code:
                type: string
                maxLength: 10
                example: '75000'
              hq_city:
                type: string
                example: Paris
              hq_country:
                type: string
                example: FR
              rcs:
                type: string
                example: ''
              ape:
                type: string
                example: ''
              vat_id:
                type: string
                example: ''
              agency_email:
                type: string
                format: email
                example: partner1@mybeezbox.com
              agency_phone:
                type: string
                example: '987654321'
              website:
                type: string
                format: uri
                example: https://www.mybeezbox.com
              link_to_nv_settings:
                type: boolean
                description: >-
                  A flag to link network partner to the Marketplace's
                  NetworkVouchers Settings
              link_to_ngc_settings:
                type: boolean
                description: >-
                  A flag to link network partner to the Marketplace's
                  NetworkGiftcards Settings
              partner_tags:
                type: array
                description: An array of Partner tags
                items:
                  $ref: '#/definitions/PartnerTag'
      responses:
        '201':
          description: Network Partner created
          schema:
            allOf:
              - $ref: '#/definitions/Partner'
              - type: object
                properties:
                  status:
                    type: string
                    example: 'n'
                  source_id:
                    type: string
                    example: sourceID
                  link_to_nv_settings:
                    type: boolean
                    example: true
                  link_to_ngc_settings:
                    type: boolean
                    example: false
                  partner_tags:
                    type: array
                    description: An array of Partner tags
                    items:
                      type: string
                    example:
                      - tag1
                      - tag2
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:partners
            - read:partners
  /payment_hub/networkpartner/update/:
    patch:
      tags:
        - Partners
      summary: Update a network partner
      description: ''
      operationId: updateNetworkPartner
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Partner that will be updated
          required: true
          schema:
            type: object
            required:
              - siret_number
              - source_id
            properties:
              source_id:
                type: string
                description: >-
                  Source ID of the partner. Can be omitted if siret_number is
                  provided.
                example: '12345'
              siret_number:
                type: string
                description: >-
                  SIRET number of the partner.  Can be omitted if source_id is
                  provided.
                example: '12345678901234'
              status:
                type: string
                enum:
                  - i
                  - 'n'
                description: Status of the partner, either inactive or network partner.
                example: 'n'
              link_to_nv_settings:
                type: boolean
                description: Indicates whether the partner should be linked to NV settings.
                example: true
              link_to_ngc_settings:
                type: boolean
                description: >-
                  Indicates whether the partner should be linked to NGC
                  settings.
                example: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  status:
                    type: string
                    enum:
                      - i
                      - 'n'
                  name:
                    type: string
                  linked_to_nv_settings:
                    type: boolean
                  linked_to_ngc_settings:
                    type: boolean
        '400':
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          description: Partner Not Found
      security:
        - ApiKey:
            - write:partners
            - read:partners
  /payment_hub/check_partner_company_number/:
    get:
      tags:
        - Partners
      summary: Check partner by company number
      description: >
        Check if a partner has been created on MyBeezBox, thanks to its company
        number.
      operationId: checkPartnerByCompanyNumber
      produces:
        - application/json
      parameters:
        - in: query
          name: siret_number
          type: string
          description: The SIRET number of the partner, that will be used to search by
          example: '123456789'
        - in: query
          name: commercial_name
          type: string
          description: The commercial name of the partner, that will be used to search by
          example: 'Partner #1'
      responses:
        '200':
          description: Successful operation
          schema:
            type: object
            properties:
              id:
                type: integer
                description: ID of the partner
                example: 1
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Partner not found
      security:
        - ApiKey:
            - read:partner
  /payment_hub/kycdocument/create/:
    post:
      tags:
        - Partners
      summary: Push KYC document for a specific partner
      operationId: createKYCDocument
      consumes:
        - multipart/form-data
      produces:
        - application/json
      parameters:
        - in: formData
          name: file
          type: file
          required: true
          description: The file to push
        - in: formData
          name: partner_uuid
          type: string
          format: uuid
          required: true
          description: The UUID of the partner, related to this KYC document
        - in: formData
          name: comment
          type: string
          description: A custom comment, about the document
          required: true
        - in: formData
          name: document_type
          type: string
          required: true
          description: Type of the document
          enum:
            - IDENTITY_PROOF
            - REGISTRATION_PROOF
            - ARTICLES_OF_ASSOCIATION
            - SHAREHOLDER_DECLARATION
            - ADDRESS_PROOF
          example: IDENTITY_PROOF
      responses:
        '201':
          description: KYC document created
          schema:
            type: object
            properties:
              id:
                type: integer
                format: int64
                description: The ID of the KYC document created
                example: 1
              partner:
                type: integer
                format: int64
                example: 1
              partner_uuid:
                type: string
                format: uuid
                description: UUID of the partner
                example: baf5a0f2-4b5c-422d-9a6b-2fc636e89b45
              comment:
                type: string
                description: A custom comment, about the document
                example: A comment about the document
              document_type:
                type: string
                description: type of the document
                example: IDENTITY_PROOF
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:kycdocuments
            - read:kycdocuments
  /payment_hub/payment/create/:
    post:
      tags:
        - Payment Hub - Payments
      summary: Create a new payment
      description: ''
      operationId: createPayment
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Payment that will be created
          required: true
          schema:
            type: object
            required:
              - customer
              - partner_uuid
              - amount
              - discount
              - product
              - type
            properties:
              customer:
                $ref: '#/definitions/Customer'
                description: The customer that is performing the payment
              partner_uuid:
                type: string
                format: uuid
                description: The UUID of the partner related to the payment
                example: 015862e4-46f4-4230-90e5-3d92607133af
              amount:
                type: number
                format: float
                description: The amount of the payment
                example: 100
              discount:
                type: number
                format: float
                description: The discount of the payment
                example: 0
              product:
                type: string
                description: >
                  Product type related to this payment. It will allow us to
                  process specific fee rules for this payment in specific.
                example: product_type
              type:
                type: string
                description: Type of the payment
                enum:
                  - credit_card
                example: credit_card
              origin:
                type: string
                description: >
                  Origin of the purchase. For example: if it comes from a
                  marketplace, this field allows to trigger specific fee rules.
                example: marketplace1
              payment_receipt_description:
                type: string
                description: >-
                  Text that will be used as description, when creating the
                  payment receipt
                example: Payment created via API
              freeze_payout_date:
                type: string
                description: >
                  Date/time that will be used to take into account this payment
                  in the payout request. So instead of using the "creation
                  date", we use this field:
                    - Creation date: 01/01/2022
                    - Freeze payout date: 01/05/2022

                  The payout request from May 2022 will include this usage,
                  instead of the payout of January 2022.
                example: '2022-05-01'
              extra_source_wallet_uuid:
                type: string
                format: uuid
                description: >
                  UUID of the wallet where we should take money from (when using
                  a voucher/giftcard as a payment method). Field required if
                  `extra_source_amount` is given.
                example: 4a49db15-33ce-4e21-97b6-73776a0fbac4
              extra_source_amount:
                type: number
                format: float
                description: >
                  Amount that we should take from the wallet specified in the
                  previous field (when using a voucher/giftcard as a payment
                  method). Field required if `extra_source_wallet_uuid` is
                  given.
                example: 50
      responses:
        '201':
          description: Payment created
          schema:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: ID of the payment
                example: 123e4567-e89b-12d3-a456-426614174000
              customer:
                $ref: '#/definitions/Customer'
                description: The customer that is performing the payment
              partner_uuid:
                type: string
                format: uuid
                description: The UUID of the partner related to the payment
                example: 015862e4-46f4-4230-90e5-3d92607133af
              partner:
                type: integer
                format: int64
                description: The ID of the partner related to the payment
                example: 1
              amount:
                type: number
                format: float
                description: The amount of the payment
                example: 100
              discount:
                type: number
                format: float
                description: The discount of the payment
                example: 0
              product:
                type: string
                description: >
                  Product type related to this payment. It will allow us to
                  process specific fee rules for this payment in specific.
                example: product_type
              type:
                type: string
                description: Type of the payment
                enum:
                  - credit_card
                example: credit_card
              origin:
                type: string
                description: >
                  Origin of the purchase. For example: if it comes from a
                  marketplace, this field allows to trigger specific fee rules.
                example: marketplace1
              payment_receipt_description:
                type: string
                description: >-
                  Text that will be used as description, when creating the
                  payment receipt
                example: Payment created via API
              freeze_payout_date:
                type: string
                description: >
                  Date/time that will be used to take into account this payment
                  in the payout request. So instead of using the "creation
                  date", we use this field:
                    - Creation date: 01/01/2022
                    - Freeze payout date: 01/05/2022

                  The payout request from May 2022 will include this usage,
                  instead of the payout of January 2022.
                example: '2022-05-01T12:00:00+02:00'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:payments
            - read:payments
  /payment_hub/payment/{id}/update/:
    patch:
      tags:
        - Payment Hub - Payments
      summary: Update a payment
      description: ''
      operationId: updatePayment
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payment
          required: true
          type: string
          format: uuid
        - in: body
          name: body
          description: Payment that will be updated
          required: true
          schema:
            type: object
            required:
              - freeze_payout_date
            properties:
              freeze_payout_date:
                type: string
                description: >
                  Date/time that will be used to take into account this payment
                  in the payout request. So instead of using the "creation
                  date", we use this field:
                    - Creation date: 01/01/2022
                    - Freeze payout date: 01/05/2022

                  The payout request from May 2022 will include this usage,
                  instead of the payout of January 2022.
                example: '2022-05-01'
      responses:
        '200':
          description: Payment updated
          schema:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: ID of the payment
                example: 123e4567-e89b-12d3-a456-426614174000
              freeze_payout_date:
                type: string
                description: >
                  Date/time that will be used to take into account this payment
                  in the payout request. So instead of using the "creation
                  date", we use this field:
                    - Creation date: 01/01/2022
                    - Freeze payout date: 01/05/2022

                  The payout request from May 2022 will include this usage,
                  instead of the payout of January 2022.
                example: '2022-05-01'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:payments
            - read:payments
  /payment_hub/payments/:
    get:
      tags:
        - Payment Hub - Payments
      summary: Get all payments
      description: Get all payments
      operationId: getPayments
      produces:
        - application/json
      parameters:
        - in: query
          name: created_on__gte
          type: string
          description: >-
            The creation date that should be used as a filter (greater or equal
            than "creation date")
          example: '2023-01-01'
        - in: query
          name: created_on__lte
          type: string
          description: >-
            The creation date that should be used as a filter (less or equal
            than "creation date")
          example: '2023-12-12'
        - in: query
          name: partner_uuid
          type: string
          description: The UUID of the partner that should be used as a filter
          example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
        - in: query
          name: status
          type: string
          description: The payment status that should be used as a filter
          example: ok
        - in: query
          name: payout_request_status
          type: string
          description: The payout request status that should be used as a filter
          example: validated
        - in: query
          name: status__in
          type: string
          description: The payment statuses that should be used as a filter.
          example: ok,ip
        - in: query
          name: payout_request_status__in
          type: string
          description: The payout request statuses that should be used as a filter.
          example: validated,to be validated
        - in: query
          name: customer_first_name
          type: string
          description: >-
            The first name of the customer that should be used as a filter (case
            insensitive).
          example: John
        - in: query
          name: customer_last_name
          type: string
          description: >-
            The last name of the customer that should be used as a filter (case
            insensitive).
          example: Doe
        - in: query
          name: customer_email
          type: string
          description: >-
            The email of the customer that should be used as a filter (case
            insensitive).
          example: JohnDoe@mybeezbox.com
        - in: query
          name: partially_refunded
          type: boolean
          description: If true, the endpoint returns only payments with a partial refund.
          example: 'true'
        - in: query
          name: fully_refunded
          type: boolean
          description: If true, the endpoint returns only payments with a full refund.
          example: 'true'
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedPayments'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:payments
  /payment_hub/payments/{id}/:
    get:
      tags:
        - Payment Hub - Payments
      summary: Find payment by its ID
      description: Returns a single payment
      operationId: getPaymentById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payment
          required: true
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/Payment'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payment not found
      security:
        - ApiKey:
            - read:payments
  /payment_hub/payments/{id}/refund/:
    post:
      tags:
        - Payment Hub - Payments
      summary: Refund a payment by its ID
      description: >
        When performing a refund for certain payment, payment status won't
        change. If the refund was successful, a new "refund" transaction will be
        created, linked to this same payment. You can partially refund a
        payment, by providing a body with the value `amount` being the amount to
        refund.
      operationId: refundPaymentById
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payment
          required: true
          type: string
          format: uuid
        - in: body
          name: body
          required: true
          schema:
            type: object
            required:
              - amount
            properties:
              amount:
                type: number
                format: float
                description: Amount should be greater than zero
                example: 10
              split:
                type: object
                description: >
                  The sum of extra_source_amount and additional_payin_amount
                  should be equal to amount. This allows to perform partial
                  refunds explicitly, instead of creating a proportional refund
                  over all sources (if multiple sources of money are used, such
                  as extra source wallets).
                properties:
                  extra_source_amount:
                    type: number
                    format: float
                    description: How much of the extra source amount should be refunded
                    example: 10
                  additional_payin_amount:
                    type: number
                    format: float
                    description: How much of the additional payin should be refunded
                    example: 10
      responses:
        '200':
          description: Successful operation
          schema:
            type: object
            properties:
              status:
                type: string
                description: Status of the refund process
                enum:
                  - ok
                  - error
                example: ok
              detail:
                type: string
                description: Detail of the status of the refund process
                example: The refund was performed successfully
        '400':
          description: Invalid ID supplied
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payment not found
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:payments
            - read:payments
  /payment_hub/payments/{id}/transactions/:
    get:
      tags:
        - Payment Hub - Payments
      summary: Get all transactions linked to a payment
      description: Returns all transations for a given payment
      operationId: getPaymentTransactionsById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payment
          required: true
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/Transaction'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payment not found
      security:
        - ApiKey:
            - read:payments
  /invoicer-payoutrequests/:
    get:
      tags:
        - Payment Hub - Payout requests
      summary: Get all payout requests
      description: Get all payout requests
      operationId: getPors
      produces:
        - application/json
      parameters:
        - in: query
          name: creation_date__gte
          type: string
          description: >-
            The creation date that should be used as a filter (greater or equal
            than "creation date")
          example: '2023-01-01'
        - in: query
          name: creation_date__lte
          type: string
          description: >-
            The creation date that should be used as a filter (less or equal
            than "creation date")
          example: '2023-12-12'
        - in: query
          name: status
          type: string
          description: The status of the payout request that should be used as a filter
          example: validated
        - in: query
          name: partner_uuid
          type: string
          description: The UUID of the partner that should be used as a filter
          example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
        - in: query
          name: has_validated_kyc
          type: boolean
          description: Filter on objects with validated (not validated) KYC
          example: 'true'
        - in: query
          name: has_blocked_payout_validation
          type: boolean
          description: Filter on objects with blocked payout validation
          example: 'false'
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedPayoutRequests'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-payoutrequests/{id}/:
    get:
      tags:
        - Payment Hub - Payout requests
      summary: Find payout request by its ID
      description: Returns a single payout request
      operationId: getPorById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payout request
          required: true
          type: integer
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/PayoutRequest'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payout request not found
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-payoutrequests/{id}/payments/:
    get:
      tags:
        - Payment Hub - Payout requests
      summary: Get all payments related to a payout request
      description: Get all payments related to a payout request
      operationId: getPorPaymentsById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payout request
          required: true
          type: integer
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/Payment'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payout request not found
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-payoutrequests/{id}/validate/:
    post:
      tags:
        - Payment Hub - Payout requests
      summary: Validate a payout request
      operationId: validatePorById
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payout request
          required: true
          type: integer
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PayoutRequest'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payout request not found
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-payoutrequests/{id}/cancel/:
    post:
      tags:
        - Payment Hub - Payout requests
      summary: Cancel a payout request
      operationId: cancelPorById
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payout request
          required: true
          type: integer
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PayoutRequest'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payout request not found
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-payoutrequests/{id}/pdf/:
    get:
      tags:
        - Payment Hub - Payout requests
      summary: Get PDF file from a payout request
      description: >
        Gets the PDF file from a payout request. PDF files are not generated
        automatically so they are generated on demand, only once. As soon as
        it's generated after calling this endpoint, it will be included in the
        list/detail endpoints too.
      operationId: getPorPdfById
      produces:
        - application/pdf
      parameters:
        - name: id
          in: path
          description: ID of payout request
          required: true
          type: integer
      responses:
        '200':
          description: Successful operation
          schema:
            type: file
          headers:
            Content-Disposition:
              type: string
              description: Attachment filename
              example: payout-request-1.pdf
            Content-Type:
              type: string
              description: application/pdf
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payout request not found
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-payoutrequests/{id}/xls/:
    get:
      tags:
        - Payment Hub - Payout requests
      summary: Get XLS file from a payout request
      description: >
        Gets the XLS file from a payout request. XLS files are not generated
        automatically so they are generated on demand, only once. As soon as
        it's generated after calling this endpoint, it will be included in the
        list/detail endpoints too.
      operationId: getPorXlsById
      produces:
        - application/xls
      parameters:
        - name: id
          in: path
          description: ID of payout request
          required: true
          type: integer
      responses:
        '200':
          description: Successful operation
          schema:
            type: file
          headers:
            Content-Disposition:
              type: string
              description: Attachment filename
              example: payout-request-1.xlsx
            Content-Type:
              type: string
              description: application/vnd.ms-excel
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payout request not found
      security:
        - ApiKey:
            - read:payoutrequests
  /invoicer-invoices/:
    get:
      tags:
        - Payment Hub - Invoices
      summary: Get all invoices
      description: Get all invoices
      operationId: getInvoices
      produces:
        - application/json
      parameters:
        - in: query
          name: invoicing_date__gte
          type: string
          description: >-
            The invoicing date that should be used as a filter (greater or equal
            than "invoicing date")
          example: '2023-01-01'
        - in: query
          name: invoicing_date__lte
          type: string
          description: >-
            The invoicing date that should be used as a filter (less or equal
            than "invoicing date")
          example: '2023-12-12'
        - in: query
          name: partner_customer
          type: integer
          description: The ID of the partner that should be used as a filter
          example: 1
        - in: query
          name: partner_uuid
          type: string
          description: The UUID of the partner that should be used as a filter
          example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedInvoices'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:invoices
  /invoicer-invoices/{id}/:
    get:
      tags:
        - Payment Hub - Invoices
      summary: Find invoice by its ID
      description: Returns a single invoice
      operationId: getInvoiceById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of invoice
          required: true
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/Invoice'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Invoice not found
      security:
        - ApiKey:
            - read:invoices
  /invoicer-invoices/{id}/payments/:
    get:
      tags:
        - Payment Hub - Invoices
      summary: Get all payments related to a invoice
      description: Get all payments related to a invoice
      operationId: getInvoicePaymentsById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of invoice
          required: true
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/Payment'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Invoice not found
      security:
        - ApiKey:
            - read:invoices
  /payment_hub/check_partner_kyc_level/{uuid}/:
    get:
      tags:
        - Payment Hub - KYC
      summary: Check partner KYC level
      description: >
        Check if KYC has been validated for a partner thanks to its ID on
        MyBeezBox.
      operationId: checkPartnerKYCLevelById
      produces:
        - application/json
      parameters:
        - name: uuid
          in: path
          description: UUID of the partner
          required: true
          type: string
      responses:
        '200':
          description: Successful operation
          schema:
            type: object
            properties:
              status:
                type: string
                description: KYC status of the partner
                enum:
                  - ok
                  - error
                example: error
              detail:
                type: string
                description: Detail of the status of the partner
                example: KYC has not been validated for this partner
              partner:
                type: integer
                format: int64
                example: 1
              partner_uuid:
                type: string
                description: UUID of the partner
                example: baf5a0f2-4b5c-422d-9a6b-2fc636e89b45
              errors:
                type: array
                description: >
                  List of errors. If status of the partner is "OK", then no
                  errors will be returned (empty list).
                items:
                  $ref: '#/definitions/KYCDocument'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Partner not found
      security:
        - ApiKey:
            - read:kyclevel
  /payment_hub/check_wallet_balance/{uuid}/:
    get:
      tags:
        - Payment Hub - Wallets
      summary: Check wallet's balance by UUID
      operationId: checkWalletBalanceByUuid
      produces:
        - application/json
      parameters:
        - name: partner_uuid
          in: path
          description: Partner UUID for the linked wallet
          required: true
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          schema:
            type: object
            properties:
              amount:
                type: float
                description: Amount of the wallet
                example: 100
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Partner not found
      security:
        - ApiKey:
            - read:wallet
  /payment_hub/get_wallet_transfers/{uuid}/:
    get:
      tags:
        - Payment Hub - Wallets
      summary: Get wallet's transfers by UUID
      operationId: getWalletTransfersByUuid
      produces:
        - application/json
      parameters:
        - name: uuid
          in: path
          description: UUID of the wallet
          required: true
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              type: object
              properties:
                created_on:
                  type: string
                  format: date-time
                  description: Date and time of the transfer creation
                  example: '2023-03-20T12:34:56Z'
                amount:
                  type: float
                  description: Amount of the transfer
                  example: 100
                currency:
                  type: string
                  description: Currency of the transfer
                  example: EUR
                status:
                  type: string
                  description: |
                    Status of the transfer:
                      - "ok": OK
                      - "pen": Pending (in process)
                      - "err": Error
                  enum:
                    - ok
                    - pen
                    - err
                  example: ok
                payment_uuid:
                  type: string
                  format: uuid
                  description: UUID of the payment linked
                  example: 123e4567-e89b-12d3-a456-426614174001
                debited_wallet_uuid:
                  type: string
                  format: uuid
                  description: UUID of the wallet where the money **comes from**
                  example: 123e4567-e89b-12d3-a456-426614174002
                credited_wallet_uuid:
                  type: string
                  format: uuid
                  description: UUID of the wallet where the money **goes to**
                  example: 123e4567-e89b-12d3-a456-426614174003
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Partner not found
      security:
        - ApiKey:
            - read:wallet
  /multiproduct_cart/create/:
    post:
      tags:
        - Multi-product orders
      summary: Create a new multi-product cart
      description: ''
      operationId: createMultiProductCart
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Cart that will be created
          required: true
          schema:
            type: object
            required:
              - partner_uuid
              - data
            properties:
              partner_uuid:
                type: string
                format: uuid
                description: The UUID of the partner/marketplace related to the cart
                example: 015862e4-46f4-4230-90e5-3d92607133af
              data:
                type: object
                required:
                  - network_giftcards
                  - network_vouchers
                  - return_url
                properties:
                  network_giftcards:
                    type: array
                    items:
                      type: object
                      required:
                        - amount
                        - quantity
                        - themed_pdf_id
                      properties:
                        amount:
                          type: number
                          format: float
                          description: The amount of the giftcard
                          example: 25
                        quantity:
                          type: integer
                          format: int64
                          description: The number of giftcards of this amount
                          example: 2
                        themed_pdf_id:
                          type: integer
                          format: int64
                          description: The ID of the themed PDF
                          example: 1
                  network_vouchers:
                    type: array
                    required:
                      - id
                      - quantity
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          format: int64
                          description: The ID of the box
                          example: 1
                        quantity:
                          type: integer
                          format: int64
                          description: The number of vouchers for this box
                          example: 2
                  return_url:
                    type: string
                    description: >-
                      The URL that will be used to redirect the customer after a
                      successful payment
                    example: https://www.mybeezbox.com/
      responses:
        '201':
          description: Cart created
          schema:
            $ref: '#/definitions/MultiProductCart'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:multi-product-cart
  /v1/payment_requests/paymentrequests/:
    post:
      tags:
        - Payment requests
      summary: Create a new payment request
      operationId: createPaymentRequest
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          description: Payment that will be created
          required: true
          schema:
            type: object
            required:
              - partner_uuid
              - amount
              - customer
              - language
            properties:
              partner_uuid:
                type: string
                format: uuid
                description: The UUID of the partner
                example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
              amount:
                type: number
                format: float
                example: 100
              customer:
                $ref: '#/definitions/Customer'
              language:
                type: string
                description: Language of the payment request (used on payment page)
                example: en
              reference:
                type: string
                description: Reference of the payment request
                example: 'Reference #1'
              description:
                type: text
                description: Description of the payment request
                example: Bigger description of this payment request
              origin:
                type: string
                description: >
                  Origin of the purchase. For example: if it comes from a
                  marketplace, this field allows to trigger specific fee rules.
                example: marketplace1
              product:
                type: string
                description: >
                  Product type related to this payment request. It will allow us
                  to process specific fee rules for this payment request in
                  specific.
                example: product_type
      responses:
        '201':
          description: Payment request created
          schema:
            $ref: '#/definitions/PaymentRequest'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
    get:
      tags:
        - Payment requests
      summary: Get all payment requests
      operationId: getPaymentRequests
      produces:
        - application/json
      parameters:
        - in: query
          name: search
          type: string
          description: >-
            The value that should be used to search in the payment requests (by
            reference, description, etc.)
          example: reference1234
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/PaginatedPaymentRequests'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - write:paymentrequests
            - read:paymentrequests
  /v1/payment_requests/paymentrequests/{id}/:
    get:
      tags:
        - Payment requests
      summary: Get payment request by its ID
      description: Returns a single payment request
      operationId: getPaymentRequestById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the payment request
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/PaymentRequest'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:paymentrequests
  /v1/payment_requests/paymentrequests/{id}/payments/:
    get:
      tags:
        - Payment requests
      summary: Get all payments related to a payment request
      description: Get all payments related to a payment request
      operationId: getPaymentRequestPaymentsById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of payment request
          required: true
          type: integer
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/Payment'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Payment request not found
      security:
        - ApiKey:
            - read:paymentrequests
  /v1/media_manager/media/:
    post:
      tags:
        - Media manager
      summary: Create a media
      description: >
        Allows to create a new media, **once at a time**. So you can later use
        this media to be linked to your products as images.
      operationId: createMedia
      consumes:
        - multipart/form-data
      produces:
        - application/json
      parameters:
        - in: formData
          name: name
          type: string
          description: Name of the media
          required: true
        - in: formData
          name: file
          type: file
          description: The image to upload
          required: true
      responses:
        '201':
          description: Media created
          schema:
            $ref: '#/definitions/Media'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '405':
          description: Method not allowed
      security:
        - ApiKey:
            - write:medias
    get:
      tags:
        - Media manager
      summary: Get all medias
      operationId: getMedias
      produces:
        - application/json
      responses:
        '200':
          description: Successful operation
          schema:
            type: array
            items:
              $ref: '#/definitions/Media'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - ApiKey:
            - read:voucherprototypes
  /v1/media_manager/media/{id}/:
    get:
      tags:
        - Media manager
      summary: Get media by its ID
      description: Returns a single media
      operationId: getMediaById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the media
          required: true
          type: int
          format: int64
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/Media'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Media not found
      security:
        - ApiKey:
            - read:medias
    patch:
      tags:
        - Media manager
      summary: Update media by its ID
      description: >
        Allows to update a media name. This could be useful if you want to
        append a suffix `_old` to an existing media, for example. This can only
        be done if the media is not used yet in any other product.
      operationId: updateMediaById
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of the media
          required: true
          type: int
          format: int64
        - name: body
          in: body
          required: true
          schema:
            type: object
            required:
              - name
            properties:
              name:
                type: string
                description: Name of the media
                example: New media name
      responses:
        '200':
          description: Successful operation
          schema:
            $ref: '#/definitions/Media'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Media not found
      security:
        - ApiKey:
            - write:medias
securityDefinitions:
  ApiKey:
    type: apiKey
    name: authorization
    in: header
    description: Token <token_identifier>
definitions:
  SuccessfulAuthToken:
    type: object
    description: |
      Successful response after fetching an API Token
    required:
      - token
      - uuid
      - user
    properties:
      token:
        type: string
        example: f1fb35c26dee337de337f9d642ea21acd3f0f6d5
      uuid:
        type: string
        format: uuid
        example: 123e4567-e89b-12d3-a456-426614174000
      user:
        type: object
        required:
          - id
          - first_name
          - username
          - email
        properties:
          id:
            type: integer
            format: int64
            example: 2
          first_name:
            type: string
            example: John
            description: First name
          username:
            type: string
            example: johdoe
          email:
            type: string
            format: email
            example: johndoe@mybeezbox.com
  Giftcard:
    type: object
    description: |
      A giftcard that can be used through the partner.
    required:
      - code
      - status
      - value
      - remaining_value
      - splitable
      - created_on
      - activated_on
      - expired_on
    properties:
      code:
        type: string
        example: GCx123abc
        description: The Code of the giftcard
      status:
        type: string
        example: paid
        enum:
          - draft
          - paid
          - error
          - using
          - used
          - exprd
          - cncld
          - dspt
        description: The status of the giftcard.
      value:
        type: float
        example: 0
        description: The value of the giftcard
      remaining_value:
        type: float
        example: 0
        description: The current remaining value of a splittable giftcard
      splitable:
        type: boolean
      created_on:
        type: string
        example: '2023-02-03T17:25:31.931031+01:00'
        description: Creation date of the giftcard
        format: date
      activated_on:
        type: string
        example: '2023-02-03T17:28:41.498900+01:00'
        description: Activation date of the giftcard
        format: date
      expired_on:
        type: string
        format: date, nullable
        description: Expiration date of the giftcard
        example: null
  GiftcardUsage:
    type: object
    description: >
      Represents the usage of a network giftcard, specifying the partner that
      used it and the amount used.
    required:
      - id
      - value
      - created_on
      - comment
      - giftcard
    properties:
      id:
        type: integer
        format: int64
        example: 4
      giftcard_info:
        type: object
        properties:
          id:
            type: integer
            format: int64
            example: 1
          code:
            type: string
            example: GCx123abc
      value:
        type: string
        example: '20.00'
      created_on:
        type: string
        description: Creation date of the network giftcard
        example: 2022-06-16T12:00
      comment:
        type: string
        description: A possible comment that can be set when creating the usage
        example: Used from our own API
      is_active:
        type: boolean
        description: Whether this usage is active or not
        example: true
  NetworkGiftcard:
    type: object
    description: >
      A giftcard that can be used through all the partners that are affiliated
      to its marketplace's network.
    required:
      - marketplace_uuid
      - status
      - value
      - activation_date
      - expiration_date
      - gifter
      - from_gifter
    properties:
      id:
        type: integer
        format: int64
        example: 1
      code:
        type: string
        description: Code of the network giftcard
        example: NGCasdf123
      status:
        type: string
        description: Status of the network giftcard
        enum:
          - draft
          - paid
          - cncld
          - using
          - exprd
          - test
        example: paid
      value:
        type: number
        format: float
        example: 100
      remaining_value:
        type: number
        format: float
        example: 100
      creation_date:
        type: string
        description: Creation date of the network giftcard
        example: 2022-06-16 12:00:0.000000+00:00
      activation_date:
        type: string
        description: Activation date of the network giftcard
        example: 2022-06-16 12:00:0.000000+00:00
      expiration_date:
        type: string
        description: Expiration date of the network giftcard
        example: 2023-06-16 12:00:0.000000+00:00
      is_active:
        type: boolean
        description: Sets if the network giftcard can be used right now
        example: true
      is_splittable:
        type: boolean
        description: Sets if the network giftcard can be used multiple times
        example: true
      gifter:
        $ref: '#/definitions/Customer'
      giftee:
        $ref: '#/definitions/Customer'
      from_gifter:
        type: string
        description: A message from the gifter, to the giftee
        example: Happy birthday!
      marketplace_uuid:
        type: string
        format: uuid
        description: The UUID of the partner
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
    xml:
      name: NetworkGiftcard
  NetworkGiftcardUsage:
    type: object
    description: >-
      Represents the usage of a network giftcard, specifying the partner that
      used it and the amount used.
    required:
      - value
      - network_giftcard
      - is_active
      - partner
      - partner_source_id
    properties:
      id:
        type: integer
        format: int64
        example: 1
      network_giftcard:
        type: integer
        format: int64
        description: The network giftcard's ID related to this usage
        example: 1
      partner:
        type: integer
        format: int64
        description: The partner's ID that used this network giftcard
        example: 2
      value:
        type: number
        format: float
        example: 20
      is_active:
        type: boolean
        example: true
      comment:
        type: string
        description: A possible comment that can be set when creating the usage
        example: This usage was created via API
      reservation_id:
        type: string
        example: 123-ABC
      partner_source_id:
        type: integer
        format: int64
        example: 222
      freeze_payout_date:
        type: string
        description: >
          Date/time that will be used to take into account this usage in the
          payout. So instead of using the "creation date", we use this field:
            - Creation date: 01/01/2022
            - Freeze payout date: 01/05/2022

          The payout from May 2022 will include this usage, instead of the
          payout of January 2022.
        example: 2022-06-16T12:00
    xml:
      name: NetworkGiftcardUsage
  NetworkVoucher:
    type: object
    description: >
      A voucher that can be used through all the partners that are affiliated to
      its marketplace's network.
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      code:
        type: string
        description: Code of the network voucher
        example: NVb77qadh
      marketplace:
        type: integer
        format: int64
        description: The marketplace's ID that sold this network voucher
        example: 1
      status:
        type: string
        description: Status of the network voucher
        enum:
          - draft
          - paid
          - cncld
          - using
          - exprd
        example: paid
      creation_date:
        type: string
        description: Creation date of the network voucher
        example: 2022-06-16 12:00:0.000000+00:00
      expiration_date:
        type: string
        description: Expiration date of the network voucher
        example: 2024-06-16 12:00:0.000000+00:00
      usage_date:
        type: string
        description: Usage date of the voucher
        example: null
      last_possible_day_of_usage:
        type: string
        description: Last possible day of usage of the voucher
        example: null
      box:
        type: integer
        format: int64
        description: ID of the box related to this voucher
        example: 1
      expedition_status:
        type: string
        example: not_sent
      expedition_date:
        type: string
        example: 2022-06-16 12:00:0.000000+00:00
      gifter_full_name:
        type: string
        description: Full name of the gifter
        example: John Doe
      gifter_email:
        type: string
        format: email
        description: Email of the gifter
        example: john@doe.com
      giftee_full_name:
        type: string
        description: Full name of the giftee
        example: John Doe's cousin
      giftee_email:
        type: string
        format: email
        description: Email of the giftee
        example: johncousin@doe.com
      from_gifter:
        type: string
        example: From John Doe
      to_giftee:
        type: string
        example: To my lovely cousin
      message:
        type: string
        description: A message from the gifter, to the giftee
        example: Happy birthday!
    xml:
      name: NetworkVoucher
  NetworkVoucherUsage:
    type: object
    description: >-
      Represents the usage of a network voucher, specifying the partner that
      used it.
    required:
      - creation_date
      - is_active
      - partner
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      creation_date:
        type: string
        description: Creation date of the usage
        example: 2022-06-16 12:00:0.000000+00:00
      network_voucher:
        type: integer
        format: int64
        description: The network voucher's ID related to this usage
        example: 1
      partner:
        type: integer
        format: int64
        description: The partner's ID that used this network voucher
        example: 1
      partner_agency_name:
        type: integer
        format: int64
        description: The partner's commercial name
        example: Test partner name
      partner_source_id:
        type: integer
        format: int64
        example: 111
      is_active:
        type: boolean
        example: true
      comment:
        type: string
        description: A possible comment that can be set when creating the usage
        example: This usage was created via API
      management_fees:
        type: number
        format: float
        example: 5
      commission_rate:
        type: number
        format: float
        example: 10
    xml:
      name: NetworkVoucherUsage
  NetworkVoucherBox:
    type: object
    description: >
      A box represent the product sold to buyer. It will allow them to use a
      "network voucher" which is an experience available in different
      establishment of the network.
    required:
      - marketplace
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      name_en:
        type: string
        description: Name of the box (English version)
        example: Three lovely days in Spain
      name_fr:
        type: string
        description: Name of the box (French version)
        example: Trois belles journées en Espagne
      name_es:
        type: string
        description: Name of the box (Spanish version)
        example: Tres días maravillosos en España
      name_it:
        type: string
        description: Name of the box (Italian version)
        example: Tre bellissimi giorni in Spagna
      name_de:
        type: string
        description: Name of the box (German version)
        example: Drei schöne Tage in Spanien
      name_nl:
        type: string
        description: Name of the box (Dutch version)
        example: Drie heerlijke dagen in Spanje
      name_ca:
        type: string
        description: Name of the box (Catalan version)
        example: Tres dies preciosos a Espanya
      name_pt:
        type: string
        description: Name of the box (Portuguese version)
        example: Três dias agradáveis em Espanha
      short_description_en:
        type: string
        description: Short description of the box (English version)
        example: Three lovely days in Spain, to understand their culture
      short_description_fr:
        type: string
        description: Short description of the box (French version)
        example: Trois belles journées en Espagne, pour comprendre leur culture
      short_description_es:
        type: string
        description: Short description of the box (Spanish version)
        example: Tres días maravillosos en España, para comprender su cultura
      short_description_it:
        type: string
        description: Short description of the box (Italian version)
        example: Tre bellissimi giorni in Spagna, per comprendere la loro cultura
      short_description_de:
        type: string
        description: Short description of the box (German version)
        example: Drei schöne Tage in Spanien, um ihre Kultur zu verstehen
      short_description_nl:
        type: string
        description: Short description of the box (Dutch version)
        example: Drie heerlijke dagen in Spanje, om hun cultuur te begrijpen
      short_description_ca:
        type: string
        description: Short description of the box (Catalan version)
        example: Tres dies encantadors a Espanya, per entendre la seva cultura
      short_description_pt:
        type: string
        description: Short description of the box (Portuguese version)
        example: Três dias agradáveis em Espanha, para compreender a sua cultura
      long_description_en:
        type: string
        description: Long description of the box (English version)
        example: Three lovely days in Spain, to understand their culture (...)
      long_description_fr:
        type: string
        description: Long description of the box (French version)
        example: Trois belles journées en Espagne, pour comprendre leur culture (...)
      long_description_es:
        type: string
        description: Long description of the box (Spanish version)
        example: Tres días maravillosos en España, para comprender su cultura (...)
      long_description_it:
        type: string
        description: Long description of the box (Italian version)
        example: Tre bellissimi giorni in Spagna, per comprendere la loro cultura (...)
      long_description_de:
        type: string
        description: Long description of the box (German version)
        example: Drei schöne Tage in Spanien, um ihre Kultur zu verstehen (...)
      long_description_nl:
        type: string
        description: Long description of the box (Dutch version)
        example: Drie heerlijke dagen in Spanje, om hun cultuur te begrijpen (...)
      long_description_ca:
        type: string
        description: Long description of the box (Catalan version)
        example: Tres dies encantadors a Espanya, per entendre la seva cultura (...)
      long_description_pt:
        type: string
        description: Long description of the box (Portuguese version)
        example: Três dias agradáveis em Espanha, para compreender a sua cultura (...)
      creation_date:
        type: string
        description: Creation date of the box
        example: 2022-06-16 12:00:0.000000+00:00
      is_active:
        type: boolean
        description: Whether the box is active (can be purchased) or not
        example: true
      is_highlight:
        type: boolean
        description: Whether the box is highlighted or not
        example: false
      price:
        type: number
        format: decimal
        example: 100
      weight:
        type: number
        format: decimal
        example: 50
      price_scope:
        type: integer
        format: int64
        description: Number of people included in this box
        example: 4
      max_usages:
        type: integer
        format: int64
        description: The maximum times this box can be used
        example: 2
      max_days_after_first_usage:
        type: integer
        format: int64
        description: >-
          The maximum number of days that can pass until this box becomes
          unusable
        example: 2
      nb_mpo_orders:
        type: integer
        format: int64
        description: How many multi-product orders have been purchased with this box
        example: 2
      marketplace:
        type: integer
        format: int64
        description: The marketplace's ID that sells this box
        example: 1
      price_range:
        type: object
        $ref: '#/definitions/PriceRange'
      images:
        type: array
        items:
          $ref: '#/definitions/NetworkVoucherBoxImage'
      allowed_partners:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              format: int64
              example: 1
            source_id:
              type: string
              example: '1234'
            agency_name:
              type: string
              description: The partner's commercial name
              example: Allowed partner 1
      products:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              format: int64
              example: 1
            name_en:
              type: string
              description: Name of the product (English version)
              example: Name of the product
            name_fr:
              type: string
              description: Name of the product (French version)
              example: Nom du produit
            name_es:
              type: string
              description: Name of the product (Spanish version)
              example: Nombre del producto
            name_it:
              type: string
              description: Name of the product (Italian version)
              example: nome del prodotto
            name_de:
              type: string
              description: Name of the product (German version)
              example: Name des Produkts
            name_nl:
              type: string
              description: Name of the product (Dutch version)
              example: Naam van het product
            name_ca:
              type: string
              description: Name of the product (Catalan version)
              example: Nom del producte
            name_pt:
              type: string
              description: Name of the product (Portuguese version)
              example: Nome do produto
            price_range:
              type: object
              $ref: '#/definitions/PriceRange'
    xml:
      name: NetworkVoucherBox
  NetworkVoucherBoxImage:
    type: object
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      image:
        type: object
        properties:
          id:
            type: integer
            format: int64
            example: 2
          uuid:
            type: string
            example: e3289351-9464-447b-af1a-eec41e2df08d
          name:
            type: string
            example: Box cover
          file:
            type: string
            example: >-
              https://storage-site/media_manager/c0fe0524-90d4-4584-9d9f-71020b735612/image.jpg
          size:
            type: integer
            example: 68855
          readable:
            type: boolean
          writable:
            type: boolean
          created_on:
            type: string
            example: '2023-10-10T16:38:53.547093+02:00'
          updated_on:
            type: string
            example: '2023-10-10T16:38:53.547093+02:00'
          archived_on:
            type: string
            example: '2023-10-10T16:38:47+02:00'
          cover:
            type: boolean
  NetworkVoucherOffer:
    type: object
    description: >
      Each establishment of a network can suggest specific "offer" that define
      the experience a Network voucher will allow a beneficiary to live in their
      establishment. They are included in a "Network voucher box".
    required:
      - partner
      - status
      - ranking
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      name_en:
        type: string
        description: Name of the offer (English version)
        example: Name of the offer
      name_fr:
        type: string
        description: Name of the offer (French version)
        example: Nom de l'offre
      name_es:
        type: string
        description: Name of the offer (Spanish version)
        example: Nombre de la oferta
      name_it:
        type: string
        description: Name of the offer (Italian version)
        example: Nome dell'offerta
      name_de:
        type: string
        description: Name of the offer (German version)
        example: Name des Angebots
      name_nl:
        type: string
        description: Name of the offer (Dutch version)
        example: Naam van de aanbieding
      name_ca:
        type: string
        description: Name of the offer (Catalan version)
        example: Nom de l'oferta
      name_pt:
        type: string
        description: Name of the offer (Portuguese version)
        example: Nome da oferta
      description_en:
        type: string
        description: Description of the offer (English version)
        example: Little description of the offer
      description_fr:
        type: string
        description: Description of the offer (French version)
        example: Petite description de l'offre
      description_es:
        type: string
        description: Description of the offer (Spanish version)
        example: Pequeña descripción de la oferta
      description_it:
        type: string
        description: Description of the offer (Italian version)
        example: Breve descrizione dell'offerta
      description_de:
        type: string
        description: Description of the offer (German version)
        example: Kurze Beschreibung des Angebots
      description_nl:
        type: string
        description: Description of the offer (Dutch version)
        example: Korte beschrijving van het aanbod
      description_ca:
        type: string
        description: Description of the offer (Catalan version)
        example: Breu descripció de l'oferta
      description_pt:
        type: string
        description: Description of the offer (Portuguese version)
        example: Breve descrição da oferta
      terms_of_use_en:
        type: string
        description: Terms of use of the offer (English version)
        example: Terms of use
      terms_of_use_fr:
        type: string
        description: Terms of use of the offer (French version)
        example: Conditions d'utilisation
      terms_of_use_es:
        type: string
        description: Terms of use of the offer (Spanish version)
        example: Condiciones de uso
      terms_of_use_it:
        type: string
        description: Terms of use of the offer (Italian version)
        example: Termini di utilizzo
      terms_of_use_de:
        type: string
        description: Terms of use of the offer (German version)
        example: Nutzungsbedingungen
      terms_of_use_nl:
        type: string
        description: Terms of use of the offer (Dutch version)
        example: Gebruiksvoorwaarden
      terms_of_use_ca:
        type: string
        description: Terms of use of the offer (Catalan version)
        example: Condicions d'ús
      terms_of_use_pt:
        type: string
        description: Terms of use of the offer (Portuguese version)
        example: Termos de utilização
      edition_date:
        type: string
        description: Modification date of the offer
        example: 2022-06-16 12:00:0.000000+00:00
      rejection_date:
        type: string
        description: Rejection date of the offer
        example: 2022-06-16 12:00:0.000000+00:00
      is_active:
        type: boolean
        description: Whether the offer is active or not
        example: true
      status:
        type: string
        description: Status of the offer
        enum:
          - DRAFT
          - TO_BE_VALIDATED
          - VALIDATED
          - REJECTED
        example: DRAFT
      ranking:
        type: integer
        format: int64
        description: >
          The ranking of the offer (a value that can be used to determine how
          this offer should be ordered among the others)
        example: 10
      box:
        type: integer
        format: int64
        description: >
          The box's ID related to this offer. `box` and `product` fields are
          exclusive (we can't have values for both fields at the same time).
        example: 1
      product:
        type: integer
        format: int64
        description: >
          The product's ID related to this offer. `box` and `product` fields are
          exclusive (we can't have values for both fields at the same time).
        example: null
      partner:
        type: integer
        format: int64
        description: The partner's ID that offers this box
        example: 1
    xml:
      name: NetworkVoucherOffer
  MarketplaceNetworkVoucher:
    type: object
    description: >
      A voucher that can be used through all the partners that are affiliated to
      its marketplace's network.
    properties:
      id:
        type: integer
        format: int64
        example: 1
      uuid:
        type: string
        format: uuid
        example: 123e4567-e89b-12d3-a456-426614174000
      code:
        type: string
        description: Code of the network voucher
        example: NVb77qadh
      status:
        type: string
        description: Status of the network voucher
        enum:
          - draft
          - paid
          - cncld
          - using
          - exprd
        example: paid
      creation_date:
        type: string
        description: Creation date of the network voucher
        example: 2022-06-16 12:00:0.000000+00:00
      expiration_date:
        type: string
        description: Expiration date of the network voucher
        example: 2024-06-16 12:00:0.000000+00:00
      max_usages:
        type: integer
        format: int64
        description: The maximum usages that can be made of this network voucher
        example: 2
      usage_count:
        type: integer
        format: int64
        description: The usages already made of this network voucher
        example: 1
      pdf_url:
        type: string
        format: url
        description: URL to the network voucher PDF
        example: http://storage-url.com/file.pdf
      box:
        type: integer
        format: int64
        description: ID of the box related to this voucher
        example: 1
      box_name:
        type: string
        example: Discovery Box
      box_price:
        type: number
        format: float
        example: 100
      is_box_active:
        type: boolean
        description: Whether the box is active or not
        example: true
      description:
        type: string
        description: Description of the network voucher
        example: >-
          Enjoy a dinner for two by the sea. Includes: a 3 courses menu and a
          bottle of wine.
      short_description:
        type: string
        description: Short of the network voucher
        example: Enjoy a dinner for two by the sea.
      universes:
        type: array
        description: An array of universes related to the network voucher
        items:
          type: string
          example:
            - Gastronomy
            - Seafood
      tags:
        type: array
        description: An array of tags related to the network voucher
        items:
          type: string
          example:
            - Unforgettable
            - Valentine's Day
      images:
        type: array
        description: An array of images set for the box
        items:
          type: object
          properties:
            image:
              type: string
              format: url
              description: Image URL
              example: http://storage-url.com/image.jpg
            cover:
              type: boolean
              description: Whether this image is the cover or not
              example: false
    xml:
      name: MarketplaceNetworkVoucher
  MarketplaceNetworkGiftcard:
    type: object
    description: >
      A giftcard that can be used through all the partners that are affiliated
      to its marketplace's network.
    required:
      - marketplace_id
      - status
      - value
      - gifter_id
      - from_gifter
    properties:
      id:
        type: integer
        format: int64
        example: 1
      uuid:
        type: string
        format: uuid
        example: 123e4567-e89b-12d3-a456-426614174000
      code:
        type: string
        description: Code of the network giftcard
        example: NGCasdf123
      status:
        type: string
        description: Status of the network giftcard
        enum:
          - draft
          - paid
          - cncld
          - using
          - exprd
          - test
        example: paid
      creation_date:
        type: string
        description: Creation date of the network giftcard
        example: 2022-06-16 12:00:0.000000+00:00
      expiration_date:
        type: string
        description: Expiration date of the network giftcard
        example: 2023-06-16 12:00:0.000000+00:00
      value:
        type: number
        format: float
        example: 100
      remaining_value:
        type: number
        format: float
        example: 100
      pdf_url:
        type: string
        format: url
        description: URL to the network giftcard PDF
        example: http://storage-url.com/file.pdf
      order_uuid:
        type: string
        format: uuid
        example: 0d18sb76-3863-4bca-924e-aj3261907960
      order_creation_date:
        type: string
        description: Creation date of the order
        example: 2023-06-16 12:00:0.000000+00:00
      description:
        type: string
        description: Generic description for the network giftcards
        example: Our giftcards are available in all our establishments
      short_description:
        type: string
        description: Generic short description for the network giftcards
        example: >-
          Our network gift cards allow the recipient to choose the service of
          their dreams in one of our many establishments.
      theme:
        type: string
        description: Theme of the network giftcard
        example: Discovery
      image_url:
        type: string
        description: URL of the giftcard image
        example: >-
          https://storage-url.com/media_manager/c0fe0524-90d4-4584-9d9f-71020b735612/ngc_logo.jpg
    xml:
      name: MarketplaceNetworkGiftcard
  MarketplaceNetworkGiftcardUsage:
    type: object
    description: >-
      Represents the usage of a network giftcard, specifying the partner that
      used it and the amount used.
    required:
      - value
      - network_giftcard
      - is_active
      - partner
      - partner_source_id
    properties:
      id:
        type: integer
        format: int64
        example: 1
      network_giftcard:
        type: integer
        format: int64
        description: The network giftcard's ID related to this usage
        example: 1
      partner:
        type: integer
        format: int64
        description: The partner's ID that used this network giftcard
        example: 2
      value:
        type: number
        format: float
        example: 20
      is_active:
        type: boolean
        example: true
      comment:
        type: string
        description: A possible comment that can be set when creating the usage
        example: This usage was created via API
      reservation_id:
        type: string
        example: 123-ABC
      partner_source_id:
        type: integer
        format: int64
        example: 222
      freeze_payout_date:
        type: string
        description: >
          Date/time that will be used to take into account this usage in the
          payout. So instead of using the "creation date", we use this field:
            - Creation date: 01/01/2022
            - Freeze payout date: 01/05/2022

          The payout from May 2022 will include this usage, instead of the
          payout of January 2022.
        example: 2022-06-16T12:00
    xml:
      name: MarketplaceNetworkGiftcardUsage
  Marketplace:
    type: object
    description: >
      The marketplace brings together the offerings of several establishments
      (of a network or a group) on a single shop.<br> Each establishment can
      have its own gift shop and remains autonomous in the daily management of
      its offers and sales.
    required:
      - id
    properties:
      id:
        type: integer
        format: int64
    xml:
      name: Marketplace
  Customer:
    type: object
    description: A person that can buy or receive a gift
    required:
      - email
    properties:
      first_name:
        type: string
        example: John
      last_name:
        type: string
        example: Doe
      email:
        type: string
        format: email
        example: johndoe@mybeezbox.com
    xml:
      name: Customer
  PayoutRequest:
    type: object
    description: |
      A payout request is whatever it is.
    required:
      - id
      - creation_date
      - partner_uuid
      - partner_agency_name
      - invoicer_marketplace
      - amount
      - status
      - currency
      - currency_symbol
      - bank_account_bic
      - bank_account_iban
    properties:
      id:
        type: integer
        format: int64
        example: 1
      creation_date:
        type: string
        description: Creation date of the payout request
        example: 2022-06-16 12:00:0.000000+00:00
      validation_date:
        type: string
        description: Validation date of the payout request
        example: 2022-06-16 12:00:0.000000+00:00
      partner:
        type: integer
        format: int64
        example: 1
      partner_uuid:
        type: string
        format: uuid
        description: The partner's UUID related to this payout request
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      partner_agency_name:
        type: string
        description: The related partner's commercial name
        example: Test partner name
      invoicer_marketplace:
        type: integer
        format: int64
        description: >-
          The marketplace's ID related to this payout request, that is the
          invoicer
        example: 1
      amount:
        type: number
        format: float
        example: 100
      status:
        type: string
        description: Status of the payout request
        enum:
          - to be validated
          - validated
          - canceled
          - refunded
        example: validated
      currency:
        type: string
        description: The currency of the payout request
        example: EUR
      currency_symbol:
        type: string
        description: The currency symbol of the payout request
        example: €
      bank_account_bic:
        type: string
        description: The BIC of the bank account related to this payout request
        example: BNPAESMS
      bank_account_iban:
        type: string
        description: The IBAN of the bank account related to this payout request
        example: ES2431908277609193727123
      pdf_file:
        type: string
        description: The URL of the PDF file generated
        example: >-
          https://demo.bonkdo.com/media/payoutrequest_pdfs/test-payout-request.pdf
      xls_file:
        type: string
        description: The URL of the XLS file generated
        example: >-
          https://demo.bonkdo.com/media/payoutrequest_xlss/test-payout-request.xls
    xml:
      name: PayoutRequest
  PaginatedPayoutRequests:
    type: object
    description: A list of payout requests, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/invoicer-payoutrequests/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/PayoutRequest'
  Invoice:
    type: object
    description: |
      An invoice is whatever it is.
    required:
      - id
      - creation_date
      - partner_customer
      - partner_agency_name
      - invoicer_marketplace
      - amount
      - status
      - currency
      - currency_symbol
      - bank_account_bic
      - bank_account_iban
    properties:
      id:
        type: string
        format: uuid
        example: 7a82448d-e8a3-4049-8e88-2c8186c3076f
      number:
        type: string
        description: The number of the invoice related.
        example: 1-202301-00001
      partner_customer:
        type: integer
        format: int64
        example: 1
        description: The partner's ID related to this invoice
      partner_uuid:
        type: string
        format: uuid
        description: The partner's UUID related to this invoice
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      partner_agency_name:
        type: string
        description: The related partner's commercial name
        example: Test partner name
      creation_date:
        type: string
        description: Creation date of the invoice
        example: 2022-06-16 12:00:0.000000+00:00
      invoicing_date:
        type: string
        description: >
          Invoicing date (the date the invoice is referring to) of the invoice.
          It always refers to the last day of the previous month.
        example: '2022-12-31'
      total_amount_without_vat:
        type: number
        format: float
        example: 95
      vat_amount:
        type: number
        format: float
        example: 5
      total_amount_with_vat:
        type: number
        format: float
        example: 100
      pdf_file:
        type: string
        description: The URL of the invoice's PDF file
        example: >-
          https://mybb-media-storage-stg.s3.fr-par.scw.cloud/invoice_pdfs/payment_hub_invoice-c9286351-03a9-4ba4-8c15-5833c21ae6f2.pdf
      payins_pdf_file:
        type: string
        description: >-
          The URL of the invoice's PDF file, that displays the list of payments
          related
        example: >-
          http://demo.bonkdo.com/media/invoice_pdfs/invoice-2-Test_marketplace_name-20221231.pdf
      payins_xls_file:
        type: string
        description: >-
          The URL of the invoice's XLS file, that displays the list of payments
          related
        example: >-
          http://demo.bonkdo.com/media/invoice_xlss/invoice-2-Test_marketplace_name-20221231.xls
    xml:
      name: Invoice
  PaginatedInvoices:
    type: object
    description: A list of invoices, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/invoicer-payoutrequests/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/Invoice'
  Partner:
    type: object
    description: |
      A partner is whatever it is.
    required:
      - id
      - uuid
      - status
      - commercial_name
      - short_name
      - agency_email
    properties:
      id:
        type: integer
        format: int64
        example: 1
      uuid:
        type: string
        format: uuid
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      status:
        type: string
        description: |
          Status of the partner:
            * `a`: Active
            * `i`: Inactive
            * `t`: Test
            * `n`: Network partner
        enum:
          - a
          - i
          - t
          - 'n'
        example: a
      name:
        type: string
        example: 'Partner #1'
      commercial_name:
        type: string
        example: 'Partner #1 commercial name'
      short_name:
        type: string
        example: partner1
      company_type:
        type: string
        description: |
          The partner's company type:
            * `bus`: Business
            * `sol`: Soletrader
            * `org`: Organization
        enum:
          - bus
          - ind
          - sol
          - org
        example: bus
      siret_number:
        type: string
        example: '123456789'
      legal_representative_first_name:
        type: string
        example: Representative's first name
      legal_representative_last_name:
        type: string
        example: Representative's last name
      legal_representative_birthday:
        type: string
        description: Birth date of the legal representative
        example: '2022-05-01T12:00:00+02:00'
      hq_address_line_1:
        type: string
        example: 'Address line #1'
      hq_address_line_2:
        type: string
        example: 'Address line #2'
      hq_postal_code:
        type: string
        example: '75000'
      hq_city:
        type: string
        example: Paris
      hq_country:
        type: string
        description: Code of the country should follow the 'ISO 3166-1 alpha-2' standard
        example: FR
      rcs:
        type: string
        example: ''
      ape:
        type: string
        example: ''
      vat_id:
        type: string
        example: ''
      agency_email:
        type: string
        format: email
        example: partner1@mybeezbox.com
      agency_phone:
        type: string
        example: '987654321'
      website:
        type: string
        format: uri
        example: https://www.mybeezbox.com
    xml:
      name: Partner
  PartnerTag:
    type: object
    properties:
      tag:
        type: string
        example: TagExample
    xml:
      name: PartnerTag
  Payment:
    type: object
    description: >
      A payment represents a monetary transaction between a customer and a
      partner. It can be used to record various payment methods and track the
      status of the transaction.
    required:
      - id
      - currency
      - customer
      - partner
      - amount
      - discount
      - type
    properties:
      id:
        type: string
        format: uuid
        example: 7a82448d-e8a3-4049-8e88-2c8186c3076f
      status:
        type: string
        description: |
          Status of the payment:
            - "ok": OK
            - "ip": In process
            - "err": Error
            - "cncld": Cancelled
        enum:
          - ok
          - ip
          - err
          - cncld
        example: ok
      currency:
        type: string
        description: Currency for the payment
        enum:
          - EUR
          - CHF
          - CAD
          - USD
          - GBP
          - XPF
        example: EUR
      payment_receipt_pdf_file:
        type: string
        description: The URL of the PDF file of the payment receipt generated
        example: >-
          https://demo.bonkdo.com/media/paymentreceipt_pdfs/partner-20230315-8a3416b0-e14a-4f0a-a3cd-b3435f3a4fd1.pdf
      customer:
        $ref: '#/definitions/Customer'
      payout_request_id:
        type: integer
        format: int64
        description: ID of the payout request related (if any)
        example: 1
      payout_request_status:
        type: string
        description: Status of the payout request
        enum:
          - to be validated
          - validated
          - canceled
          - using
          - refunded
        example: validated
      payout_request_creation_date:
        type: string
        description: Creation date of the payout request
        example: 2022-06-16 12:00:0.000000+00:00
      payout_request_validation_date:
        type: string
        description: Validation date of the payout request
        example: 2022-06-16 12:00:0.000000+00:00
      partner:
        type: integer
        format: int64
        example: 1
      partner_uuid:
        type: string
        format: uuid
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      amount:
        type: number
        format: float
        example: 100
      commission:
        type: number
        format: float
        example: 5
      net_amount:
        type: number
        format: float
        example: 95
      refunded_amount:
        type: number
        format: float
        example: 10
        description: >-
          How much of the original amount has been refunded already (if any).
          Absolute value.
      type:
        type: string
        description: Type of the payment
        enum:
          - credit_card
          - transfer
          - check
          - cc_terminal
        example: credit_card
      extra_source_amount:
        type: number
        format: float
        description: >-
          How much of the amount of the payment is handled by extra source
          wallet
        example: 100
      extra_source_wallet:
        type: number
        format: integer
        description: ID of the extra source wallet
        example: 1
      extra_source_wallet_uuid:
        type: string
        format: uuid
        description: The UUID of the wallet
        example: a1b2c3d4-e5f6-4789-9012-34567890abcd
      payin_result_code:
        type: string
        description: Result code of the pay-in
        example: '12345'
      payin_result_message:
        type: string
        description: Result message of the pay-in
        example: The transaction was successful
      payment_request_id:
        type: integer
        format: int64
        description: ID of the payment request related (if any)
        example: 1
    xml:
      name: Payment
  KYCDocument:
    type: object
    description: |
      A KYC document is whatever it is.
    required:
      - id
      - partner_uuid
      - creation_date
      - status
      - refused_reason
      - document_type
    properties:
      id:
        type: integer
        format: int64
        example: 1
      partner:
        type: integer
        format: int64
        example: 1
      partner_uuid:
        type: string
        format: uuid
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      refused_reason:
        type: string
        description: Reason of why this document was refused
        enum:
          - DOCUMENT_UNREADABLE
          - DOCUMENT_NOT_ACCEPTED
          - DOCUMENT_HAS_EXPIRED
          - DOCUMENT_INCOMPLETE
          - DOCUMENT_MISSING
          - DOCMENT_DO_NOT_MATCH_USER_DATA
          - DOCUMENT_DO_NOT_MATCH_ACCOUNT_DATA
          - SPECIFIC_CASE
          - DOCUMENT_FALSIFIED
          - UNDERAGE_PERSON
        example: DOCUMENT_UNREADABLE
      document_type:
        type: string
        description: Type of the document
        enum:
          - IDENTITY_PROOF
          - REGISTRATION_PROOF
          - ARTICLES_OF_ASSOCIATION
          - SHAREHOLDER_DECLARATION
          - ADDRESS_PROOF
        example: IDENTITY_PROOF
      status:
        type: string
        description: Status of the document
        enum:
          - CREATED
          - VALIDATION_ASKED
          - VALIDATED
          - REFUSED
          - OUT_OF_DATE
        example: VALIDATED
    xml:
      name: KYCDocument
  Transaction:
    type: object
    description: |
      A transaction is whatever it is.
    required:
      - id
      - currency
      - customer
      - partner
      - amount
      - commission
      - net_amount
      - type
    properties:
      id:
        type: integer
        format: int64
        example: 1
      created_on:
        type: string
        description: Creation date of the transaction
        example: 2022-06-16 12:00:0.000000+00:00
      type:
        type: string
        description: Type of the transaction
        enum:
          - payin
          - refund
        example: payin
      status:
        type: string
        description: |
          Status of the transaction:
            - "ok": OK
            - "pen": Pending (in process)
            - "err": Error
        enum:
          - ok
          - pen
          - err
        example: ok
      amount:
        type: number
        format: float
        example: 100
      commission:
        type: number
        format: float
        example: 5
      net_amount:
        type: number
        format: float
        example: 95
      currency:
        type: string
        description: Currency of the transaction
        enum:
          - EUR
          - CHF
          - CAD
          - USD
          - GBP
          - XPF
        example: EUR
      currency_symbol:
        type: string
        description: Currency symbol of the transaction
        enum:
          - €
          - CHF
          - $
          - $
          - £
          - XPF
        example: €
      partner:
        type: integer
        format: int64
        example: 1
    xml:
      name: Transaction
  PaginatedPayments:
    type: object
    description: A list of payments, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/payment_hub/payments/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/Payment'
  PriceRange:
    type: object
    description: >
      Model used to be able to filter by "price ranges" related to a product. So
      we could have 3 different products with the same name, but each one has a
      specific "price range".
    required:
      - partner
    properties:
      id:
        type: integer
        format: int64
        example: 1
      name_en:
        type: string
        description: Name of the price range (English version)
        example: English price range name
      name_fr:
        type: string
        description: Name of the price range (French version)
        example: French price range name
      name_es:
        type: string
        description: Name of the price range (Spanish version)
        example: Spanish price range name
      name_it:
        type: string
        description: Name of the price range (Italian version)
        example: Italian price range name
      name_nl:
        type: string
        description: Name of the price range (Dutch version)
        example: Dutch price range name
      name_ca:
        type: string
        description: Name of the price range (Catalan version)
        example: Catalan price range name
      name_pt:
        type: string
        description: Name of the price range (Portuguese version)
        example: Portuguese price range name
      partner:
        type: integer
        format: int64
        example: 1
    xml:
      name: PriceRange
  MultiProductCart:
    type: object
    description: >
      A multi-product cart that can be configured from a 3rd-party website, and
      can be used to perform a purchase on MyBB website.
    required:
      - partner_uuid
      - data
    properties:
      id:
        type: string
        format: uuid
        description: The UUID of the cart
        example: 123e4567-e89b-12d3-a456-426614174000
      partner_uuid:
        type: string
        format: uuid
        description: The UUID of the partner/marketplace related to the cart
        example: 015862e4-46f4-4230-90e5-3d92607133af
      data:
        type: object
        required:
          - network_giftcards
          - network_vouchers
          - return_url
        properties:
          network_giftcards:
            type: array
            items:
              type: object
              required:
                - amount
                - quantity
                - themed_pdf_id
              properties:
                amount:
                  type: number
                  format: float
                  description: The amount of the giftcard
                  example: 25
                quantity:
                  type: integer
                  format: int64
                  description: The number of giftcards of this amount
                  example: 2
                themed_pdf_id:
                  type: integer
                  format: int64
                  description: The ID of the themed PDF
                  example: 1
          network_vouchers:
            type: array
            required:
              - id
              - quantity
            items:
              type: object
              properties:
                id:
                  type: integer
                  format: int64
                  description: The ID of the box
                  example: 1
                quantity:
                  type: integer
                  format: int64
                  description: The number of vouchers for this box
                  example: 2
          return_url:
            type: string
            description: >-
              The URL that will be used to redirect the customer after a
              successful payment
            example: https://www.mybeezbox.com/
    xml:
      name: MultiProductCart
  PaginatedPaymentRequests:
    type: object
    description: A list of payment requests, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: >-
          https://demo.bonkdo.com/api/v1/payment_requests/paymentrequests/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/PaymentRequest'
  PaymentRequest:
    type: object
    description: >
      A payment request can be used to request certain amount of money to a
      customer or a partner.
    required:
      - partner_uuid
      - amount
      - language
      - customer
    properties:
      id:
        type: integer
        format: int64
        example: 1
      code:
        type: string
        description: Code of the payment request
        example: PRasdf1234
      status:
        type: string
        description: Status of the payment request
        enum:
          - draft
          - paid
          - cncld
          - using
          - exprd
          - test
        example: paid
      amount:
        type: number
        format: float
        example: 100
      created_on:
        type: string
        description: Creation date of the network giftcard
        example: 2022-06-16 12:00:0.000000+00:00
      modified_on:
        type: string
        description: Creation date of the network giftcard
        example: 2022-06-16 12:00:0.000000+00:00
      reference:
        type: string
        description: Reference of the payment request
        example: 'Reference #1'
      description:
        type: text
        description: Description of the payment request
        example: Bigger description of this payment request
      customer:
        $ref: '#/definitions/Customer'
      partner_uuid:
        type: string
        format: uuid
        description: The UUID of the partner
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      origin:
        type: string
        description: >
          Origin of the purchase. For example: if it comes from a marketplace,
          this field allows to trigger specific fee rules.
        example: marketplace1
      product:
        type: string
        description: >
          Product type related to this payment request. It will allow us to
          process specific fee rules for this payment request in specific.
        example: product_type
    xml:
      name: PaymentRequest
  Media:
    type: object
    properties:
      id:
        type: integer
        format: int64
        example: 1
      uuid:
        type: string
        example: e3289351-9464-447b-af1a-eec41e2df08d
      name:
        type: string
        example: image.jpg
      file:
        type: string
        example: >-
          https://storage-site/media_manager/c0fe0524-90d4-4584-9d9f-71020b735612/image.jpg
      created_on:
        type: string
        example: '2023-10-10T16:38:53.547093+02:00'
      archived_on:
        type: string
        example: null
  PermissionList:
    type: object
    description: A permission list
    properties:
      permissions:
        type: array
        items:
          type: string
        description: current user's permissions
        example:
          - permissions.update_voucher_pdf
          - permissions.access_click_and_collect_bookings
          - permissions.manage_masteradmin
          - permissions.add_network_giftcard_direct_sale
          - permissions.expedition_management
          - permissions.view_permissionstemplate
          - permissions.create_network_giftcard_api
          - permissions.access_marketing_hub_qr_codes
          - permissions.access_workshop_bookings
          - permissions.access_customer_management_contact_requests
          - permissions.access_financial_management_order_lines
          - permissions.access_financial_management_voucher_report
          - permissions.access_configuration_marketplaces
          - permissions.use_network_giftcard_api
          - permissions.use_voucher
  PartnerGiftcard:
    type: object
    description: |
      A giftcard that can be used through the partner.
    required:
      - id
      - code
      - status
      - created_on
      - expires_on
      - value
      - remaining_value
      - gifter_first_name
      - gifter_last_name
      - selling_partner
    properties:
      id:
        type: integer
        format: int64
        example: 1
      code:
        type: string
        description: Code of the giftcard
        example: NGCasdf123
      status:
        type: string
        description: Status of the giftcard
        enum:
          - draft
          - paid
          - cncld
          - using
          - exprd
          - test
        example: paid
      created_on:
        type: string
        description: Creation date of the giftcard
        example: 2022-06-16 12:00:0.000000+00:00
      expires_on:
        type: string
        description: Expiration date of the giftcard
        example: 2023-06-16 12:00:0.000000+00:00
      value:
        type: string
        example: '100.000'
      remaining_value:
        type: string
        example: '100.000'
      gifter_first_name:
        type: string
        description: First name of the buyer
        example: John
      gifter_last_name:
        type: string
        description: Last name of the buyer
        example: Doe
    xml:
      name: PartnerGiftcard
  PaginatedPartnerGiftcards:
    type: object
    description: A list of giftcards, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/partners/giftcards/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/PartnerGiftcard'
  Voucher:
    type: object
    description: A voucher
    required:
      - id
      - url
      - code
      - origin
      - voucher_prototype
      - voucher_prototype_name
      - api_version
      - type
    properties:
      url:
        type: string
        example: https://staging.bonkdo.com/api/vouchers/72533/
      id:
        type: number
        example: 72533
      code:
        type: string
        example: ghakvgngkq
      summary:
        type: string
        example: null
      origin:
        type: string
        example: Mon site web
      voucher_prototype:
        type: number
        example: 218
      voucher_prototype_name:
        type: string
        example: Test univers 4
      voucher_prototype_name_fr:
        type: string
        example: Test univers 4
      voucher_prototype_name_es:
        type: string
        example: null
      voucher_prototype_name_en:
        type: string
        example: null
      voucher_prototype_name_it:
        type: string
        example: null
      voucher_prototype_name_de:
        type: string
        example: null
      voucher_prototype_name_nl:
        type: string
        example: null
      voucher_prototype_name_ca:
        type: string
        example: null
      voucher_prototype_name_pt:
        type: string
        example: null
      voucher_prototype_description_fr:
        type: string
        example: Prototype description
      voucher_prototype_description_es:
        type: string
        example: null
      voucher_prototype_description_en:
        type: string
        example: null
      voucher_prototype_description_it:
        type: string
        example: null
      voucher_prototype_description_de:
        type: string
        example: null
      voucher_prototype_description_nl:
        type: string
        example: null
      voucher_prototype_description_ca:
        type: string
        example: null
      voucher_prototype_description_pt:
        type: string
        example: null
      voucher_prototype_rent_conditions_fr:
        type: string
        example: Rent conditions
      voucher_prototype_rent_conditions_es:
        type: string
        example: null
      voucher_prototype_rent_conditions_en:
        type: string
        example: null
      voucher_prototype_rent_conditions_it:
        type: string
        example: null
      voucher_prototype_rent_conditions_de:
        type: string
        example: null
      voucher_prototype_rent_conditions_nl:
        type: string
        example: null
      voucher_prototype_rent_conditions_ca:
        type: string
        example: null
      voucher_prototype_rent_conditions_pt:
        type: string
        example: null
      voucher_prototype_type:
        type: number
        example: 4
      nb_nights:
        type: number
        example: 2
      nb_babies:
        type: number
        example: 0
      nb_children:
        type: number
        example: 0
      nb_adults:
        type: number
        example: 2
      options:
        type: array
        items:
          type: object
          properties:
            url:
              type: string
              example: http://staging.bonkdo.com/api/vouchers/72533/options/25/
            option:
              type: object
              properties:
                url:
                  type: string
                  example: http://staging.bonkdo.com.api/options/25/
                id:
                  type: integer
                  example: 25
                name_fr:
                  type: string
                  example: Option (fr)
                name_en:
                  type: string
                  example: Option (en)
                name_es:
                  type: string
                  example: Option (es)
                name_it:
                  type: string
                  example: Option (it)
                name_de:
                  type: string
                  example: Option (de)
                name_nl:
                  type: string
                  example: Option (nl)
                name_ca:
                  type: string
                  example: Option (ca)
                name_pt:
                  type: string
                  example: Option (pt)
                description_fr:
                  type: string
                  example: Option's description (fr)
                description_en:
                  type: string
                  example: Option's description (en)
                description_es:
                  type: string
                  example: Option's description (es)
                description_it:
                  type: string
                  example: Option's description (it)
                description_de:
                  type: string
                  example: Option's description (de)
                description_nl:
                  type: string
                  example: Option's description (nl)
                description_ca:
                  type: string
                  example: Option's description (ca)
                description_pt:
                  type: string
                  example: Option's description (pt)
                has_been_ordered:
                  type: boolean
                  example: false
                countable:
                  type: boolean
                  example: true
                services_info:
                  type: array
                  items:
                    type: object
                    properties:
                      service_cost:
                        type: float
                        example: 45.0817368709326
                      service_buying_vat:
                        type: float
                        example: 5.5
                      service_selling_vat:
                        type: float
                        example: 5.5
                      service_price:
                        type: float
                        example: 165.68
                price:
                  type: float
                  example: 94.48
                selling_price:
                  type: float
                  example: 94.48
                is_active:
                  type: boolean
                is_global:
                  type: boolean
                ranking:
                  type: integer
                category:
                  type: integer
                voucher_prototypes:
                  type: array
                  items:
                    - 13
                    - 26
            count:
              type: integer
              example: 1
            total_price:
              type: float
              example: 94.48
      voucher_prototype_included_options:
        type: array
        items:
          type: object
          properties:
            option:
              type: object
              properties:
                name_fr:
                  type: string
                  example: Option (fr)
                name_en:
                  type: string
                  example: Option (en)
                name_es:
                  type: string
                  example: Option (es)
                name_it:
                  type: string
                  example: Option (it)
                name_de:
                  type: string
                  example: Option (de)
                name_nl:
                  type: string
                  example: Option (nl)
                name_ca:
                  type: string
                  example: Option (ca)
                name_pt:
                  type: string
                  example: Option (pt)
                source_id:
                  type: string
                  example: XXX
            count:
              type: integer
              example: 1
      reception_mode:
        type: string
        example: 0
      reception_mode_display:
        type: string
        example: Email à l'acheteur
      selling_partner:
        type: string
        example: https://staging.bonkdo.com/api/partners/1/
      gifter_civility:
        type: string
        example: M
      gifter_first_name:
        type: string
        example: John
      gifter_last_name:
        type: string
        example: Doe
      gifter_fullname:
        type: string
        example: John Doe
      gifter_address:
        type: string
        example: Avenue
      gifter_email:
        type: string
        example: john@mybeezbox.com
      gifter_zipcode:
        type: string
        example: 75018
      gifter_city:
        type: string
        example: Paris
      gifter_country:
        type: string
        example: FR
      gifter_wired_phone:
        type: string
        example: (+33)1 23 45 67 89
      gifter_mobile_phone:
        type: string
        example: null
      self_gifted:
        type: boolean
      giftee_first_name:
        type: string
        example: John Doe
      giftee_last_name:
        type: string
        example: Doe
      giftee_email:
        type: string
        example: john+o@mybeezbox.com
      giftee_phone_number:
        type: string
        example: '+33678735335'
      recipient_address:
        type: string
        format: nullable
      message:
        type: string
        example: null
      total_price:
        type: string
        example: '215.00'
      purchase_price:
        type: string
        example: '215.00'
      rent_price:
        type: string
        example: '230.00'
      bought_rent_price:
        type: string
        example: '230.00'
      creation_date:
        type: string
        example: '2023-01-24T10:03:09.565674+01:00'
      activation_date:
        type: string
        format: nullable
      usage_date:
        type: string
        format: nullable
      expiration_date:
        type: string
        example: '2025-01-23T10:03:23.830839+01:00'
      expiration_date_display:
        type: string
        format: date
        example: '2025-01-23'
      gifter:
        type: number
        example: 3918
      giftee:
        type: number
        example: 18277
      state:
        type: string
        enum:
          - paid
          - used
          - using
          - exprd
        example: paid
      rentals:
        type: array
        items: null
      pdf_file:
        type: string
        example: >-
          https://staging.bonkdo.com/media/voucher_pdfs/3e4a937e-2dd9-4966-b7a9-9ec0ee3c01d4.pdf
      printable_pdf_file:
        type: string
        format: nullable
      coupon:
        type: string
        format: nullable
      coupon_details:
        type: string
        format: nullable
      coupon_for_email_details:
        type: object
        properties:
          id:
            type: number
            example: 532
          valid:
            type: boolean
          discount_text:
            type: string
            example: 15.00 €
          number_of_usage:
            type: number
            example: 228
          new_validity_period:
            type: string
            format: nullable
          booking_engine_id:
            type: string
            format: nullable
          is_activated:
            type: boolean
          code:
            type: string
            example: '@mybeezbox.com'
          type:
            type: string
            example: email
          start:
            type: string
            format: nullable
          end:
            type: string
            format: nullable
          discount:
            type: string
            example: '15.00'
          discount_type:
            type: string
            example: fixed
          is_value_increased:
            type: boolean
          is_value_increased_multiple_times:
            type: boolean
          max_usage:
            type: number
            example: 0
          voucher_prototypes_ids:
            type: array
            items: null
          cnc_offers_ids:
            type: array
            items: null
          eshop_products_ids:
            type: array
            items: null
          experience_offers_ids:
            type: array
            items: null
          workshops_ids:
            type: array
            items: null
          workshop_categories_ids:
            type: array
            items: null
          events_ids:
            type: array
            items: null
          flashsales_offers_ids:
            type: array
            items: null
          payment_amount_condition_minimum:
            type: string
            format: nullable
          giftcode:
            type: string
            format: nullable
          email_condition:
            type: string
            example: '@mybeezbox.com'
          price_condition_min_amount:
            type: string
            format: nullable
          product_condition_min_amount:
            type: string
            format: nullable
          activate_for_vouchers:
            type: boolean
          activate_for_giftcards:
            type: boolean
          activate_for_clickandcollect:
            type: boolean
          activate_for_ecommerce:
            type: boolean
          activate_for_experiences:
            type: boolean
          activate_for_tickets_events:
            type: boolean
          activate_for_workshops:
            type: boolean
          activate_for_flashsales:
            type: boolean
          activate_for_moneypot:
            type: boolean
          activate_for_network_giftcards:
            type: boolean
          activate_for_network_vouchers:
            type: boolean
          offer_delivery_cost_clickandcollect:
            type: boolean
          print_at_home_reception_mode:
            type: boolean
          expedition_reception_mode:
            type: boolean
          giftee_email_reception_mode:
            type: boolean
          postal_mail_to_beneficiary_reception_mode:
            type: boolean
          on_site_expedition_mode:
            type: boolean
          partner:
            type: number
            example: 1
      api_version:
        type: string
        example: 2
      type:
        type: number
        example: 4
      to_giftee:
        type: string
        example: John Doe
      from_gifter:
        type: string
        example: John Doe
      expedition_status:
        type: string
        example: not_sent
      expedition_date:
        type: string
        format: nullable
      cover_letter_url:
        type: string
        format: nullable
      language:
        type: string
        example: fr
      is_group_payment:
        type: boolean
      is_usable:
        type: boolean
      is_extendable:
        type: boolean
      invoice_url:
        type: string
        example: >-
          https://staging.bonkdo.com/fr/accounting/invoice/d29866a2-8441-42c5-a22d-4f515e1ac3f4/
      is_refundable:
        type: boolean
      payment_type:
        type: string
        example: payzen
      imported_from:
        type: string
        format: nullable
  PaginatedVouchers:
    type: object
    description: A list of vouchers, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/vouchers/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/Voucher'
  VoucherPrototype:
    type: object
    description: A prototype
    required:
      - name_en
      - name_fr
      - name_es
      - name_it
      - name_de
      - name_nl
      - name_ca
      - name_pt
      - description_en
      - description_fr
      - description_es
      - description_it
      - description_de
      - description_nl
      - description_ca
      - description_pt
      - long_description_en
      - long_description_fr
      - long_description_es
      - long_description_it
      - long_description_de
      - long_description_nl
      - long_description_ca
      - long_description_pt
      - universe
      - stay_price
      - type
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      name_en:
        type: string
        description: Name of the prototype (English version)
        example: Prototype
      name_fr:
        type: string
        description: Name of the prototype (French version)
        example: Offre
      name_es:
        type: string
        description: Name of the prototype (Spanish version)
        example: Prototipo
      name_it:
        type: string
        description: Name of the prototype (Italian version)
        example: Prototipo
      name_de:
        type: string
        description: Name of the prototype (German version)
        example: Prototyp
      name_nl:
        type: string
        description: Name of the prototype (Dutch version)
        example: Prototype
      name_ca:
        type: string
        description: Name of the prototype (Catalan version)
        example: Prototip
      name_pt:
        type: string
        description: Name of the prototype (Portuguese version)
        example: Protótipo
      is_active:
        type: boolean
        default: false
        description: Whether the prototype is active or not.
      type:
        type: string
        description: Type of the prototype
        enum:
          - stay
          - standard
          - fixed_stay
      is_highlight:
        type: boolean
        default: false
        description: Whether the prototype is highlighted or not.
      price_scope:
        type: integer
        format: int64
        default: 1
        description: >
          Number of persons the rate applies to. Use the value `0` for "whole
          rental".
      max_capacity:
        type: integer
        format: int64
        default: 0
        description: >-
          Maximum capacity of the prototype. Use the value `0` if the prototype
          has not a maximum capacity.
      min_capacity:
        type: integer
        format: int64
        default: 1
        description: Minimum capacity of the prototype.
      stay_price:
        type: float
        description: Selling price of the prototype
        example: 10.5
      adults_price:
        type: float
        description: Price for additional adult.
        example: null
      children_price:
        type: float
        description: Price for additional child.
        example: null
      baby_price:
        type: float
        description: Price for additional baby.
        example: null
      description_en:
        type: string
        description: Description of the prototype (English version).
        example: Description
      description_fr:
        type: string
        description: Description of the prototype (French version).
        example: Description
      description_es:
        type: string
        description: Description of the prototype (Spanish version).
        example: Descripción
      description_it:
        type: string
        description: Description of the prototype (Italian version).
        example: Descrizione
      description_de:
        type: string
        description: Description of the prototype (German version).
        example: Beschreibung
      description_nl:
        type: string
        description: Description of the prototype (Dutch version).
        example: Beschrijving
      description_ca:
        type: string
        description: Description of the prototype (Catalan version).
        example: Descripció
      description_pt:
        type: string
        description: Description of the prototype (Portuguese version).
        example: Descrição
      long_description_en:
        type: string
        description: Long description of the prototype (English version).
        example: Long description
      long_description_fr:
        type: string
        description: Long description of the prototype (French version).
        example: Description longue
      long_description_es:
        type: string
        description: Long description of the prototype (Spanish version).
        example: Descripción larga
      long_description_it:
        type: string
        description: Long description of the prototype (Italian version).
        example: Descrizione lunga
      long_description_de:
        type: string
        description: Long description of the prototype (German version).
        example: Lange Beschreibung
      long_description_nl:
        type: string
        description: Long description of the prototype (Dutch version).
        example: Lange beschrijving
      long_description_ca:
        type: string
        description: Long description of the prototype (Catalan version).
        example: Descripció llarga
      long_description_pt:
        type: string
        description: Long description of the prototype (Portuguese version).
        example: Descrição longa
      rent_conditions_en:
        type: string
        description: Rent conditions (English version).
        example: Terms of use
      rent_conditions_fr:
        type: string
        description: Rent conditions (French version).
        example: Conditions d'utilisation
      rent_conditions_es:
        type: string
        description: Rent conditions (Spanish version).
        example: Términos y condiciones de uso
      rent_conditions_it:
        type: string
        description: Rent conditions (Italian version).
        example: Termini di utilizzo
      rent_conditions_de:
        type: string
        description: Rent conditions (German version).
        example: Nutzungsbedingungen
      rent_conditions_nl:
        type: string
        description: Rent conditions (Dutch version).
        example: Gebruiksvoorwaarden
      rent_conditions_ca:
        type: string
        description: Rent conditions (Catalan version).
        example: Condicions d'ús
      rent_conditions_pt:
        type: string
        description: Rent conditions (Portuguese version).
        example: Termos de utilização
      how_to_book_html_en:
        type: string
        description: String containing HTML.
        example: <p>Text (en)</p>
      how_to_book_html_fr:
        type: string
        description: String containing HTML.
        example: <p>Text (fr)</p>
      how_to_book_html_es:
        type: string
        description: String containing HTML.
        example: <p>Text (es)</p>
      how_to_book_html_it:
        type: string
        description: String containing HTML.
        example: <p>Text (it)</p>
      how_to_book_html_de:
        type: string
        description: String containing HTML.
        example: <p>Text (de)</p>
      how_to_book_html_nl:
        type: string
        description: String containing HTML.
        example: <p>Text (nl)</p>
      how_to_book_html_ca:
        type: string
        description: String containing HTML.
        example: <p>Text (ca)</p>
      how_to_book_html_pt:
        type: string
        description: String containing HTML.
        example: <p>Text (pt)</p>
      pdf_description_en:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_fr:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_es:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_it:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_de:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_nl:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_ca:
        type: string
        description: This field should not exceed 300 characters.
      pdf_description_pt:
        type: string
        description: This field should not exceed 300 characters.
      partner:
        type: integer
        format: int64
        description: The ID of the partner.
        example: 1
        readOnly: true
      partner_uuid:
        type: string
        format: uuid
        description: The UUID of the partner
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      universe:
        type: integer
        format: int64
        description: The ID of the universe.
        example: 1
      environment:
        type: integer
        format: int64
        description: The ID of the environment.
        example: 2
      last_active_day:
        type: date
        format: date
        description: >
          The last day of diffusion in date format `YYYY-mm-dd` If set, the
          prototype's `is_active` value will become `false` when this date
          passes.
      ranking:
        type: integer
        format: int64
        default: 1
        description: Number that allows setting display priority on funnel.
      nb_orders:
        type: integer
        format: int64
        description: How many orders have been purchased with this prototype
        example: 2
        readOnly: true
      images:
        type: array
        items:
          type: integer
        description: List of `Media` IDs linked to the prototype
        example:
          - 1
          - 2
          - 3
      cover_image:
        type: integer
        format: int64
        default: 1
        description: >
          `Media` ID that should be used as cover image for the prototype. Set
          this to `null` if you want to remove the cover image, if it was set
          before.
    xml:
      name: VoucherPrototype
  PaginatedVoucherPrototypes:
    type: object
    description: A list of prototypes, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/partners/voucherprototypes/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/VoucherPrototype'
  VoucherOption:
    type: object
    description: A voucher option
    required:
      - name_en
      - name_fr
      - name_es
      - name_it
      - name_de
      - name_nl
      - name_ca
      - name_pt
      - description_en
      - description_fr
      - description_es
      - description_it
      - description_de
      - description_nl
      - description_ca
      - description_pt
      - selling_price
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      name_en:
        type: string
        description: Name of the option (English version)
        example: Option
      name_fr:
        type: string
        description: Name of the option (French version)
        example: Option
      name_es:
        type: string
        description: Name of the option (Spanish version)
        example: Opción
      name_it:
        type: string
        description: Name of the option (Italian version)
        example: Opzione
      name_de:
        type: string
        description: Name of the option (German version)
        example: Option
      name_nl:
        type: string
        description: Name of the option (Dutch version)
        example: Optie
      name_ca:
        type: string
        description: Name of the option (Catalan version)
        example: Opció
      name_pt:
        type: string
        description: Name of the option (Portuguese version)
        example: Opção
      description_en:
        type: string
        description: Description of the option (English version).
        example: Description
      description_fr:
        type: string
        description: Description of the option (French version).
        example: Description
      description_es:
        type: string
        description: Description of the option (Spanish version).
        example: Descripción
      description_it:
        type: string
        description: Description of the option (Italian version).
        example: Descrizione
      description_de:
        type: string
        description: Description of the option (German version).
        example: Beschreibung
      description_nl:
        type: string
        description: Description of the option (Dutch version).
        example: Beschrijving
      description_ca:
        type: string
        description: Description of the option (Catalan version).
        example: Descripció
      description_pt:
        type: string
        description: Description of the option (Portuguese version).
        example: Descrição
      selling_price:
        type: float
        example: 10.5
        description: Selling price of the option.
      is_active:
        type: boolean
        default: true
        description: Whether the option is active or not.
      countable:
        type: boolean
        default: false
        description: Whether the option can be selected more than once, or not.
      is_global:
        type: boolean
        default: false
        description: If enabled, the option can be purchased on all prototypes.
      ranking:
        type: integer
        format: int64
        default: 1
        example: 10
        description: Number that allows setting display priority on funnel
      partner:
        type: integer
        format: int64
        description: The ID of the partner.
        example: 1
        readOnly: true
      partner_uuid:
        type: string
        format: uuid
        description: The UUID of the partner
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
      voucher_prototypes_ids:
        type: array
        items:
          type: integer
        example:
          - 1
          - 2
          - 3
        description: List of voucher prototypes IDs that are linked to this option.
      category_id:
        type: integer
        format: int64
        description: The ID of the category.
        example: null
    xml:
      name: VoucherOption
  VoucherPrototypeOption:
    type: object
    description: An option linked to a prototype
    required:
      - id
      - count
      - included
      - option
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      count:
        type: integer
        format: int64
        example: 1
        description: Number of times the option has been selected.
      included:
        type: boolean
        default: true
        description: Whether the option is included in the price of the prototype, or not.
      option:
        $ref: '#/definitions/VoucherOption'
  PaginatedVoucherOptions:
    type: object
    description: A list of voucher options, with pagination feature
    required:
      - count
      - next
      - previous
      - has_next
      - has_previous
      - current_page
      - page_range
      - results
    properties:
      count:
        type: integer
        format: int64
        example: 1
      previous:
        type: string
        example: null
      has_previous:
        type: boolean
        example: false
      has_next:
        type: boolean
        example: true
      current_page:
        type: integer
        format: int64
        example: 1
      next:
        type: string
        example: https://demo.bonkdo.com/api/partners/voucherprototypes/?page=2
      page_range:
        type: array
        example:
          - 1
          - 2
          - 3
        items:
          type: integer
          format: int64
      results:
        type: array
        items:
          $ref: '#/definitions/VoucherOption'
  VoucherOptionCategory:
    type: object
    description: A voucher option category
    required:
      - name_en
      - name_fr
      - name_es
      - name_it
      - name_de
      - name_nl
      - name_ca
      - name_pt
      - description_en
      - description_fr
      - description_es
      - description_it
      - description_de
      - description_nl
      - description_ca
      - description_pt
      - partner_uuid
    properties:
      id:
        type: integer
        format: int64
        example: 1
        readOnly: true
      name_en:
        type: string
        description: Name of the category (English version)
        example: Category
      name_fr:
        type: string
        description: Name of the category (French version)
        example: Catégorie
      name_es:
        type: string
        description: Name of the category (Spanish version)
        example: Categoría
      name_it:
        type: string
        description: Name of the category (Italian version)
        example: Categoria
      name_de:
        type: string
        description: Name of the category (German version)
        example: Kategorie
      name_nl:
        type: string
        description: Name of the category (Dutch version)
        example: Categorie
      name_ca:
        type: string
        description: Name of the category (Catalan version)
        example: Categoria
      name_pt:
        type: string
        description: Name of the category (Portuguese version)
        example: Categoria
      description_en:
        type: string
        description: Description of the category (English version).
        example: Description
      description_fr:
        type: string
        description: Description of the category (French version).
        example: Description
      description_es:
        type: string
        description: Description of the category (Spanish version).
        example: Descripción
      description_it:
        type: string
        description: Description of the category (Italian version).
        example: Descrizione
      description_de:
        type: string
        description: Description of the category (German version).
        example: Beschreibung
      description_nl:
        type: string
        description: Description of the category (Dutch version).
        example: Beschrijving
      description_ca:
        type: string
        description: Description of the category (Catalan version).
        example: Descripció
      description_pt:
        type: string
        description: Description of the category (Portuguese version).
      is_active:
        type: boolean
        default: true
        description: Whether the option is active or not.
      ranking:
        type: integer
        format: int64
        default: 1
        example: 10
        description: Number that allows setting display priority on funnel
      min_number_options:
        type: integer
        format: int64
        default: null
        example: 10
        description: >
          If set, the buyer has to choose at least this number of options to
          validate. If empty, it's not mandatory to choose an option.
      max_number_options:
        type: integer
        format: int64
        default: null
        example: 10
        description: >
          If set, the buyer have to choose at most this number of options to
          validate. If empty, it's not mandatory to choose an option.
      partner:
        type: integer
        format: int64
        description: The ID of the partner.
        example: 1
        readOnly: true
      partner_uuid:
        type: string
        format: uuid
        description: The UUID of the partner
        example: baf5a0f2-4b5b-422d-9a1b-2fc636e89b45
    xml:
      name: VoucherOption
