All Downloads are FREE. Search and download functionalities are using the official Maven repository.

e.ecosystem.turnonline-product-billing-client.0.26.source-code.swagger2.json Maven / Gradle / Ivy

There is a newer version: 0.46
Show newest version
{
    "swagger": "2.0",
    "info": {
        "description": "TurnOnline.biz Ecosystem Product Billing microservice. Order, product, and invoice management system with support of the product purchases between business accounts.",
        "version": "1.0",
        "title": "Product Billing"
    },
    "host": "${env.ENDPOINTS_SERVICE_NAME}",
    "basePath": "/api/billing",
    "tags": [
        {
            "name": "Product Catalog",
            "description": "Catalog of products to sell"
        },
        {
            "name": "Product Publishing",
            "description": "Product publishing management"
        },
        {
            "name": "Order Management",
            "description": "Order management and recurring billing"
        },
        {
            "name": "Product Billing",
            "description": "Invoicing with support of the product purchases between business accounts"
        },
        {
            "name": "Purchases",
            "description": "Purchases of products, memberships, subscriptions within the company"
        },
        {
            "name": "Bill Settlements",
            "description": "Invoices and receipts settlement"
        },
        {
            "name": "Code-books",
            "description": "Service related code-books"
        },
        {
            "name": "Access Configuration",
            "description": "Accounting system access configuration"
        }
    ],
    "schemes": [
        "https"
    ],
    "paths": {
        "/v1/codebook/billing-units": {
            "get": {
                "tags": [
                    "Code-books"
                ],
                "summary": "Available list of units",
                "description": "Returns the available list of billing units.",
                "operationId": "listBillingUnits",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "Accept-Language",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "description": "The language the client has configured to prefer in results. If requested language is not supported (or not provided at all) will fallback to the default language of the associated account."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The available list of billing units.",
                        "schema": {
                            "$ref": "#/definitions/BillingUnitCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/codebook/number-series": {
            "get": {
                "tags": [
                    "Code-books"
                ],
                "summary": "List of number series",
                "description": "Returns the account related list of available number series that might be used to increment invoice number.",
                "operationId": "listAccountNumberSeries",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The list of number series resources.",
                        "schema": {
                            "$ref": "#/definitions/NumberSeriesCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/codebook/vat-rates": {
            "get": {
                "tags": [
                    "Code-books"
                ],
                "summary": "Get current VAT rates",
                "description": "Returns the current VAT rates based on the domicile of the authenticated account (either user or associated service account).",
                "operationId": "listVatRates",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "domicile",
                        "in": "query",
                        "required": false,
                        "type": "string",
                        "description": "The company residence (ISO 3166 alpha-2 country code) to filter the VAT rates valid for given country. If requested domicile is not supported (or not provided at all) will fallback to the domicile of the associated account."
                    },
                    {
                        "name": "Accept-Language",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "description": "The language the client has configured to prefer in results. If requested language is not supported (or not provided at all) will fallback to the default language of the associated account."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The list of VAT rate resources matching filtering criteria.",
                        "schema": {
                            "$ref": "#/definitions/VatRateCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/configs/{profile_name}": {
            "put": {
                "tags": [
                    "Access Configuration"
                ],
                "summary": "Modify accounting system access config",
                "description": "It supports multiple access configurations. Unless you provide at least single 'default' profile configuration, the integration with the underlying accounting system will be disabled.\nIn order to enable access to the built-in accounting system, create a 'default' profile with either an empty body or with type FLEXI_BEE.",
                "operationId": "modifyAccountingSystemProfile",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/AccountingSystem"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The accounting system profile.",
                        "schema": {
                            "$ref": "#/definitions/AccountingSystem"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn’t understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Access Configuration"
                ],
                "summary": "Delete accounting system profile",
                "operationId": "deleteAccountingSystemProfile",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the accounting system profile has been deleted."
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn’t understand or some validation fails. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete accounting system profile that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time."
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "profile_name",
                    "in": "path",
                    "required": true,
                    "type": "string",
                    "description": "The accounting system profile name. Use 'default' for single access."
                }
            ]
        },
        "/v1/invoices": {
            "get": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Search invoices",
                "description": "Search invoices within the company.",
                "operationId": "searchInvoices",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0.",
                        "default": 0
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve.",
                        "default": 10
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer invoice's properties in order to make the retrieval faster.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of filtered invoices. Sorted descending based on the invoice modification date.",
                        "schema": {
                            "$ref": "#/definitions/InvoiceCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Create an invoice",
                "description": "Creates an invoice, related order will be created as well.",
                "operationId": "createInvoice",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.send-invoice",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether to send this invoice to customer account. If customer at invoice has defined a valid contact email, notification email will be sent to the customer with PDF invoice in attachment. If sending has been processed successfully, the invoice status will be changed to SENT.\n\nIf customer does not have neither an account (SELLER) nor contact email, the client will get bad request response and invoice will remain in its original status.",
                        "default": false
                    },
                    {
                        "name": "vnd.turnon.cloud.bill-company",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether an issued invoice will be either billed to company or personal profile. A default is true (billed company profile).",
                        "default": true
                    },
                    {
                        "name": "vnd.turnon.cloud.contact-email",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "description": "The contact email address where current copy of the invoice will be sent. This email address has higher priority as an email defined in Invoice.customer.contactEmail, but will not be stored and original customer's contact email will be kept.\n\nUseful only if vnd.turnon.cloud.send-invoice is set to TRUE, otherwise ignored."
                    },
                    {
                        "name": "vnd.turnon.cloud.bank-account-id",
                        "in": "header",
                        "required": false,
                        "type": "integer",
                        "format": "int64",
                        "description": "The identification (within Product Billing service) of the bank account to be listed at invoice as a beneficiary."
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Newly created invoice.",
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/orders": {
            "get": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Search orders",
                "operationId": "searchOrders",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0.",
                        "default": 0
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve.",
                        "default": 10
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer order's properties in order to make the retrieval faster.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The list of the filtered orders.",
                        "schema": {
                            "$ref": "#/definitions/OrderCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Create an order",
                "operationId": "createOrder",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.bill-company",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether an issued invoice will be either billed to company or personal profile. A default value for missing parameter is true (billed company profile).",
                        "default": true
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Newly created and updated order.",
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/orders/{order_id}": {
            "get": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Return the order",
                "operationId": "getOrder",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "invoices",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "If present with a positive integer value, the Order response will include property 'invoices' with list of already issued invoices (if any). It represents a limit of max number of expected invoices to be included in the result.",
                        "x-example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The order for requested ID.",
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to retrieve an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Update the order",
                "operationId": "updateOrder",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The successfully updated order.",
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to update an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Delete the order",
                "operationId": "deleteOrder",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the order and all its related resources has been enqueued to be deleted asynchronously."
                    },
                    "400": {
                        "description": "The error indicates the order is not allowed to be deleted as it has already issued invoices or has status FINISHED.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                }
            ]
        },
        "/v1/orders/{order_id}/invoices": {
            "get": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "List order invoices",
                "operationId": "listOrderInvoices",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve."
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer invoice's properties in order to make the retrieval faster.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The list of invoices issued from the parent order. Sorted descending based on the invoice modification date.",
                        "schema": {
                            "$ref": "#/definitions/InvoiceCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Create order invoice",
                "description": "Creates an invoice based on the status of the current order by providing an empty invoice resource. To override any of the order property provide invoice body with properties you intend to override.",
                "operationId": "createOrderInvoice",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.send-invoice",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether to send this invoice to customer account. If customer at invoice has defined a valid contact email, notification email will be sent to the customer with PDF invoice in attachment. If sending has been processed successfully, the invoice status will be changed to SENT.\n\nIf customer does not have neither an account (SELLER) nor contact email, the client will get bad request response and invoice will remain in its original status.",
                        "default": false
                    },
                    {
                        "name": "vnd.turnon.cloud.bill-company",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether an issued invoice will be either billed to company or personal profile. If not provided the configuration from the associated order will be taken. A default is true (billed company profile).",
                        "default": true
                    },
                    {
                        "name": "vnd.turnon.cloud.contact-email",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "description": "The contact email address where current copy of the invoice will be sent. This email address has higher priority as an email defined in Invoice.customer.contactEmail, but will not be stored and original customer's contact email will be kept.\n\nUseful only if vnd.turnon.cloud.send-invoice is set to TRUE, otherwise ignored."
                    },
                    {
                        "name": "vnd.turnon.cloud.bank-account-id",
                        "in": "header",
                        "required": false,
                        "type": "integer",
                        "format": "int64",
                        "description": "The identification (within Product Billing service) of the bank account to be listed at invoice as a beneficiary."
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The newly issued invoice based on the parent order.",
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                }
            ]
        },
        "/v1/orders/{order_id}/invoices/{invoice_id}": {
            "get": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Return order invoice",
                "operationId": "getOrderInvoice",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The invoice for requested ID.",
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Modify order invoice",
                "description": "If sending the invoice to customer with either an empty or unchanged invoice body the original invoice will not be modified (modification date will remain with the origin value) if the condition will be met:\n\n* Header vnd.turnon.cloud.send-invoice will be set to TRUE\n\nOtherwise invoice resource will be modified (modification date will change), however properties will remain the same.",
                "operationId": "modifyOrderInvoice",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.send-invoice",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether to send this invoice to customer account. If customer at invoice has defined a valid contact email, notification email will be sent to the customer with PDF invoice in attachment. If sending has been processed successfully, the invoice status will be changed to SENT.\n\nIf customer does not have neither an account (SELLER) nor contact email, the client will get bad request response and invoice will remain in its original status."
                    },
                    {
                        "name": "vnd.turnon.cloud.bill-company",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "The boolean indication whether this invoice will be either billed to company or personal profile.\n\nIf not provided the current invoice configuration will be applied. If provided, the value will be stored and will override original configuration."
                    },
                    {
                        "name": "vnd.turnon.cloud.contact-email",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "description": "The contact email address where current copy of the invoice will be sent. This email address has higher priority as an email defined in Invoice.customer.contactEmail, but will not be stored and original customer's contact email will be kept.\n\nUseful only if vnd.turnon.cloud.send-invoice is set to TRUE, otherwise ignored."
                    },
                    {
                        "name": "vnd.turnon.cloud.bank-account-id",
                        "in": "header",
                        "required": false,
                        "type": "integer",
                        "format": "int64",
                        "description": "The identification (within Product Billing service) of the bank account to be listed at invoice as a beneficiary."
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The updated invoice.",
                        "schema": {
                            "$ref": "#/definitions/Invoice"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Delete order invoice",
                "operationId": "deleteOrderInvoice",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the invoice has been deleted."
                    },
                    "400": {
                        "description": "The error indicates the invoice is not allowed to be deleted as it has another status as NEW.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                },
                {
                    "name": "invoice_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification unique for specified order"
                }
            ]
        },
        "/v1/orders/{order_id}/invoices/{invoice_id}/items": {
            "get": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "List invoice billing items",
                "operationId": "listInvoiceBillingItems",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The list of billing items of the specified invoice.",
                        "schema": {
                            "$ref": "#/definitions/PricingItemCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Add invoice billing item",
                "description": "Adds a new pricing item in to the related invoice that will be processed as a billing item.",
                "operationId": "addInvoiceBillingItem",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/PricingItem"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recalculated invoice billing items as a result of the change.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                },
                {
                    "name": "invoice_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification unique for specified order"
                }
            ]
        },
        "/v1/orders/{order_id}/invoices/{invoice_id}/items/{item_id}": {
            "get": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Return invoice billing item",
                "operationId": "getInvoiceBillingItem",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The billing item for requested ID.",
                        "schema": {
                            "$ref": "#/definitions/PricingItem"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice related resources that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Modify invoice billing item",
                "operationId": "modifyInvoiceBillingItem",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/PricingItem"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recalculated invoice billing items as a result of the change.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice related resources that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Delete invoice billing item",
                "operationId": "deleteInvoiceBillingItem",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Recalculated invoice billing items as a result of the change.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice related resources that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                },
                {
                    "name": "invoice_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification unique for specified order"
                },
                {
                    "name": "item_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The billing item identification unique for specified order and invoice"
                }
            ]
        },
        "/v1/orders/{order_id}/invoices/{invoice_id}/status": {
            "get": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Return current invoice status",
                "operationId": "getInvoiceStatus",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The current invoice status.",
                        "schema": {
                            "$ref": "#/definitions/InvoiceStatus"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It’s a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                },
                {
                    "name": "invoice_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification unique for specified order"
                }
            ]
        },
        "/v1/orders/{order_id}/items": {
            "get": {
                "tags": [
                    "Order Management"
                ],
                "summary": "List order items",
                "operationId": "listOrderItems",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The list of order items.",
                        "schema": {
                            "$ref": "#/definitions/PricingItemCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Add order item",
                "operationId": "addOrderItem",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/PricingItem"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recalculated pricing items as a result of the change.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                }
            ]
        },
        "/v1/orders/{order_id}/items/{item_id}": {
            "get": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Return order item",
                "operationId": "getOrderItem",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The order item for requested ID.",
                        "schema": {
                            "$ref": "#/definitions/PricingItem"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or item that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Modify order item",
                "operationId": "modifyOrderItem",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/PricingItem"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recalculated pricing items as a result of the change.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or item that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Delete order item",
                "operationId": "deleteOrderItem",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Recalculated pricing items as a result of the change.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or item that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                },
                {
                    "name": "item_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The order item identification unique for specified order"
                }
            ]
        },
        "/v1/orders/{order_id}/status": {
            "get": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Return current order status",
                "operationId": "getOrderStatus",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The current order status.",
                        "schema": {
                            "$ref": "#/definitions/OrderStatus"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It’s a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Order Management"
                ],
                "summary": "Change order status",
                "operationId": "changeOrderStatus",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/OrderStatus"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Order status has been successfully applied."
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn’t understand. The client should not repeat the request without modifications.\n\nCheck allowed values of the status to be set by client.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to update an order that does not exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It’s a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                }
            ]
        },
        "/v1/prices": {
            "post": {
                "tags": [
                    "Product Billing"
                ],
                "summary": "Calculate all pricing items",
                "description": "Calculate all pricing items and total price.",
                "operationId": "createPrice",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Calculated pricing of the incoming items.",
                        "schema": {
                            "$ref": "#/definitions/Pricing"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/products": {
            "get": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Search products",
                "description": "Returns the list of the product that meets the filtering criteria.",
                "operationId": "listProducts",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0.",
                        "default": 0
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve.",
                        "default": 10
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer product's properties in order to make the retrieval faster.",
                        "default": false
                    },
                    {
                        "name": "vnd.turnon.cloud.calc-pricing-items",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "'True' value will trigger product pricing calculation. In the JSON payload response there will be an extra property ProductPricing.items with recalculated pricing items tree based on the current product's values with default structure.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The list of the filtered products.",
                        "schema": {
                            "$ref": "#/definitions/ProductCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Create a new product",
                "description": "Create a new product within product catalog.",
                "operationId": "createProduct",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.calc-pricing-items",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "'True' value will trigger product pricing calculation. In the JSON payload response there will be an extra property ProductPricing.items with recalculated pricing items tree based on the current product's values with default structure.",
                        "default": false
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Newly created and updated product.",
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn’t understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/products/{product_id}": {
            "get": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Return the product",
                "description": "Returns the product for the given ID.",
                "operationId": "getProduct",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.calc-pricing-items",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "'True' value will trigger product pricing calculation. In the JSON payload response there will be an extra property ProductPricing.items with recalculated pricing items tree based on the current product's values with default structure.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The product response for given ID.",
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to retrieve a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Update the product",
                "description": "Updates the product.",
                "operationId": "updateProduct",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.calc-pricing-items",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "'True' value will trigger product pricing calculation. In the JSON payload response there will be an extra property ProductPricing.items with recalculated pricing items tree based on the current product's values with default structure.",
                        "default": false
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The successfully updated product.",
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to update a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Delete the product",
                "description": "Deletes the product from the product catalog. The product that has an associations with other resources cannot be deleted.",
                "operationId": "deleteProduct",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the product has been deleted."
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "product_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique product identification."
                }
            ]
        },
        "/v1/products/{product_id}/event": {
            "get": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Return the product's event",
                "operationId": "getProductEvent",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The product's event response for given ID.",
                        "schema": {
                            "$ref": "#/definitions/Event"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to retrieve event associated with a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Update the product's event",
                "operationId": "updateProductEvent",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Event"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The confirmation, the product’s event has been updated.",
                        "schema": {
                            "$ref": "#/definitions/Event"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to update event associated with a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Delete the product's event",
                "operationId": "deleteProductEvent",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the product's event has been deleted."
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete event associated with a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "product_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64"
                }
            ]
        },
        "/v1/products/{product_id}/publishing": {
            "get": {
                "tags": [
                    "Product Publishing"
                ],
                "summary": "Return the publishing",
                "operationId": "getProductPublishing",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Returns the requested product's publishing.",
                        "schema": {
                            "$ref": "#/definitions/ProductPublishing"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to retrieve publishing associated with a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Product Publishing"
                ],
                "summary": "Update the publishing",
                "operationId": "updateProductPublishing",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/ProductPublishing"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns the updated product's publishing.",
                        "schema": {
                            "$ref": "#/definitions/ProductPublishing"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to update publishing associated with a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Product Publishing"
                ],
                "summary": "Delete the publishing",
                "operationId": "deleteProductPublishing",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the product publishing has been deleted."
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete publishing associated with a product that doesn't exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "product_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64"
                }
            ]
        },
        "/v1/products/{product_id}/publishing/pictures/{order}": {
            "delete": {
                "tags": [
                    "Product Publishing"
                ],
                "summary": "Delete product picture",
                "operationId": "deleteProductPicture",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the product picture has been deleted."
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete picture associated with a product that doesn't exist or picture order has not found.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "product_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique product identification."
                },
                {
                    "name": "order",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int32",
                    "description": "The order number of the picture within list."
                }
            ]
        },
        "/v1/purchases": {
            "post": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Register an expense",
                "description": "Register an expense that represents a purchase outside of the Ecosystem.",
                "operationId": "createExpenseDocument",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vnd.turnon.cloud.order-id",
                        "in": "header",
                        "required": false,
                        "type": "integer",
                        "format": "int64",
                        "description": "The identification of the purchase order to assign incoming invoice to."
                    },
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Expenditure"
                        }
                    },
                    {
                        "name": "vnd.turnon.cloud.request-hashcode",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "description": "The unique hash code of the new record. If present, it helps to avoid double submission of the same request."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Identification of the document for given expense.",
                        "schema": {
                            "$ref": "#/definitions/Bill"
                        }
                    },
                    "400": {
                        "description": "The error indicates that client has made a request that server couldn't understand. The client should not repeat the request without modifications.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/purchases/expenses": {
            "get": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Search expenses",
                "description": "Search expenses for this company that represents any purchase either inside or outside of the Ecosystem.",
                "operationId": "searchExpenses",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0.",
                        "default": 0
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve.",
                        "default": 10
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer expense's properties in order to make the retrieval faster.",
                        "default": false
                    },
                    {
                        "name": "orderId",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int64",
                        "description": "Identification of the purchase order to filter solely related invoices."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of filtered expenses. Sorted descending based on the expense modification date.",
                        "schema": {
                            "$ref": "#/definitions/ExpenseCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/purchases/orders": {
            "get": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Search purchase orders",
                "description": "Search purchase orders for this company",
                "operationId": "searchPurchaseOrders",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0.",
                        "default": 0
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve.",
                        "default": 10
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer order's properties in order to make the retrieval faster.",
                        "default": false
                    },
                    {
                        "name": "vnd.turnon.cloud.calc-pricing-items",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "'True' value will trigger pricing calculation. Response will have recalculated order items tree.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The list of the filtered purchase orders.",
                        "schema": {
                            "$ref": "#/definitions/PurchaseOrderCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        },
        "/v1/purchases/orders/{order_id}": {
            "get": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Return the purchase order",
                "description": "Return single purchase order for specified ID",
                "operationId": "getPurchaseOrder",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "invoices",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "If present with a positive integer value, the Order response will include property 'invoices' with list of already issued invoices (if any). It represents a limit of max number of expected incoming invoices to be included in the result.",
                        "x-example": 1
                    },
                    {
                        "name": "vnd.turnon.cloud.calc-pricing-items",
                        "in": "header",
                        "required": false,
                        "type": "boolean",
                        "description": "'True' value will trigger pricing calculation. Response will have recalculated order items tree.",
                        "default": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The purchase order for requested ID.",
                        "schema": {
                            "$ref": "#/definitions/PurchaseOrder"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to retrieve an order that doesn’t exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Decline purchase order",
                "description": "Decline purchase order for specified ID",
                "operationId": "declinePurchaseOrder",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the purchase order has been declined."
                    },
                    "400": {
                        "description": "The error indicates the purchase order can't be declined as it has already any of the invoice already has made a payment.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete a purchase order that doesn’t exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification."
                }
            ]
        },
        "/v1/purchases/orders/{order_id}/invoices": {
            "get": {
                "tags": [
                    "Purchases"
                ],
                "summary": "List order's incoming invoices",
                "description": "List of incoming invoices for single purchase order identified by ID",
                "operationId": "listOrderIncomingInvoices",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The position of the first result to retrieve, numbered from 0."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "type": "integer",
                        "format": "int32",
                        "description": "The maximum number of results to retrieve."
                    },
                    {
                        "name": "lightList",
                        "in": "query",
                        "required": false,
                        "type": "boolean",
                        "description": "Set to TRUE to return fewer invoice's properties in order to make the retrieval faster.",
                        "default": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The list of incoming invoices. Sorted descending based on the invoice modification date.",
                        "schema": {
                            "$ref": "#/definitions/IncomingInvoiceCollection"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order that doesn’t exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification."
                }
            ]
        },
        "/v1/purchases/orders/{order_id}/invoices/{invoice_id}": {
            "get": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Return incoming invoice",
                "description": "Return single incoming invoice identified by order and invoice ID",
                "operationId": "getIncomingOrderInvoice",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The incoming invoice for requested ID.",
                        "schema": {
                            "$ref": "#/definitions/IncomingInvoice"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to work with an order or invoice that doesn’t exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Purchases"
                ],
                "summary": "Delete internal incoming invoice",
                "description": "Delete single incoming invoice. Valid only for internal document.",
                "operationId": "deleteIncomingInvoice",
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "204": {
                        "description": "The confirmation, the incoming invoice has been deleted."
                    },
                    "400": {
                        "description": "The error indicates the incoming invoice can't be deleted as the invoice already has been paid out or it's not an internal document.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "The error when client tries to delete a purchase order that doesn’t exist.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            },
            "parameters": [
                {
                    "name": "order_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification"
                },
                {
                    "name": "invoice_id",
                    "in": "path",
                    "required": true,
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification unique for specified order"
                }
            ]
        },
        "/v1/transactions": {
            "post": {
                "tags": [
                    "Bill Settlements"
                ],
                "summary": "Push the transaction to be paired",
                "description": "Push the transaction to be paired with a bill.\nIn order to successfully pair the bill either a valid receipt identification or invoice identification (it includes order Id too) must be provided.\n\n**Error handling:**\n* In case of an invalid or unknown transaction's property enum values the  default value will be set.\n* A transaction that did not match any bill will be marked as a receipt and will be processed later.",
                "operationId": "pushTransaction",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Transaction"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Confirmation the transaction has been received."
                    },
                    "400": {
                        "description": "The error when client tries to push a transaction with an invalid structure.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "The error when the authentication credential fails.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "It's a failure of the server. The client can repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "503": {
                        "description": "The service is unavailable or the server has timed out processing of the request. The client may repeat the request without modifications at any later time.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "security": [
                    {
                        "firebase-a9a2a51a": []
                    }
                ]
            }
        }
    },
    "securityDefinitions": {
        "firebase-a9a2a51a": {
            "type": "oauth2",
            "authorizationUrl": "",
            "flow": "implicit",
            "x-google-issuer": "https://securetoken.google.com/${env.TOKEN_ISSUER}",
            "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/[email protected]",
            "x-google-audiences": "${env.TOKEN_ISSUER}"
        }
    },
    "definitions": {
        "AccountingSystem": {
            "type": "object",
            "properties": {
                "disableGZip": {
                    "type": "boolean",
                    "description": "Indication whether to disable GZip compression of HTTP content for requests to sync with accounting system.",
                    "default": false
                },
                "password": {
                    "type": "string",
                    "description": "The accounting system password or API key if any."
                },
                "type": {
                    "type": "string",
                    "description": "The type of the accounting system against which this account is being configured to synchronize accounting related resources. If not configured default type will be returned (never empty).",
                    "default": "FLEXI_BEE",
                    "enum": [
                        "FLEXI_BEE",
                        "ON_PREMISE",
                        "DUMMY"
                    ]
                },
                "url": {
                    "type": "string",
                    "description": "The accounting system integration URL dedicated to this account. Full path including protocol and port number. If not provided the built-in accounting system integration will be used (for FLEXI_BEE type only)."
                },
                "username": {
                    "type": "string",
                    "description": "The accounting system username if any."
                }
            },
            "description": "Accounting system access configuration."
        },
        "BankAccount": {
            "type": "object",
            "properties": {
                "beneficiary": {
                    "type": "string",
                    "description": "The bank account beneficiary name (business name)."
                },
                "bic": {
                    "type": "string",
                    "description": "The international Bank Identifier Code (BIC/ISO 9362, a normalized code - also known as SWIFT code)."
                },
                "currency": {
                    "type": "string",
                    "description": "The bank account currency. An alphabetic code based on the ISO 4217."
                },
                "iban": {
                    "type": "string",
                    "description": "The international bank account number."
                }
            },
            "description": "The bank account at invoice."
        },
        "Bill": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique identification of the bill within Billing Processor service."
                },
                "invoice": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification, unique only for specified order."
                },
                "order": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique identification of the order associated with the invoice."
                },
                "receipt": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique identification of the receipt within Product Billing service."
                }
            },
            "description": "Identification of the bill (receipt) or invoice document. Valid invoice identification includes order identification too."
        },
        "BillingUnit": {
            "type": "object",
            "required": [
                "code",
                "label"
            ],
            "properties": {
                "code": {
                    "type": "string",
                    "description": "The billing unit code - unit of measure at invoice (time interval, items). It’s case insensitive.",
                    "default": "ITEM",
                    "enum": [
                        "ITEM",
                        "COUNT",
                        "SERVICE",
                        "SUBSCRIPTION"
                    ]
                },
                "label": {
                    "type": "string",
                    "description": "The localized billing unit short description."
                },
                "locale": {
                    "type": "string",
                    "description": "The label language. ISO 639 alpha-2 or alpha-3 language code."
                }
            },
            "description": "The billing unit of measure used as product unit at invoice."
        },
        "BillingUnitCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Billing unit collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/BillingUnit"
                    }
                }
            }
        },
        "Creditor": {
            "type": "object",
            "properties": {
                "account": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The account identification that represents a business at TurnOnline.biz Ecosystem."
                },
                "businessName": {
                    "type": "string",
                    "description": "The company business name. It's mandatory for business account sign-up."
                },
                "city": {
                    "type": "string",
                    "description": "The company domicile city."
                },
                "companyId": {
                    "type": "string",
                    "description": "The company business identification number."
                },
                "contact": {
                    "description": "The creditor public contact details.",
                    "$ref": "#/definitions/CreditorContactDetails"
                },
                "country": {
                    "type": "string",
                    "description": "The country of residence of the company, ISO 3166 alpha-2 country code. It's case insensitive."
                },
                "latitude": {
                    "type": "number",
                    "format": "double",
                    "description": "The company address latitude geographic coordinate, generated by the service."
                },
                "legalForm": {
                    "type": "string",
                    "description": "The company legal form. It's case insensitive.",
                    "default": "ltd"
                },
                "logoServingUrl": {
                    "type": "string",
                    "description": "The company logo, a full URL of the image served from the content delivery network (CDN)."
                },
                "longitude": {
                    "type": "number",
                    "format": "double",
                    "description": "The company address longitude geographic coordinate, generated by the service."
                },
                "postcode": {
                    "type": "string",
                    "description": "The company postal code."
                },
                "street": {
                    "type": "string",
                    "description": "The company street and street number."
                },
                "taxId": {
                    "type": "string",
                    "description": "The company tax payer identification number."
                },
                "vatId": {
                    "type": "string",
                    "description": "The company value added tax identification number (VAT ID). Mandatory if vatPayer property is true."
                },
                "vatPayer": {
                    "type": "boolean",
                    "description": "The boolean indication whether company is registered as VAT payer. The missing value or false means company it's not a VAT payer.",
                    "default": false
                }
            },
            "description": "The account that represents a business at TurnOnline.biz Ecosystem to whom money will be credited. But not necessarily, only if the account property has a valid identification."
        },
        "CreditorContactDetails": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string",
                    "description": "The public contact email address."
                },
                "name": {
                    "type": "string",
                    "description": "The public contact person name."
                },
                "phone": {
                    "type": "string",
                    "description": "The public contact phone number."
                },
                "website": {
                    "type": "string",
                    "description": "The company account website."
                }
            },
            "description": "The creditor public contact details."
        },
        "Customer": {
            "type": "object",
            "properties": {
                "account": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The user account identification of a business partner entity if any (TurnOnline.biz Ecosystem account ID)."
                },
                "businessName": {
                    "type": "string",
                    "description": "The company business name."
                },
                "ccEmail": {
                    "type": "string",
                    "description": "The contact email if defined, it will be used for notification purposes that will be used as 'CC' to copy email. Supports comma separated list."
                },
                "city": {
                    "type": "string",
                    "description": "The address city."
                },
                "companyId": {
                    "type": "string",
                    "description": "The company business identification number."
                },
                "contactEmail": {
                    "type": "string",
                    "description": "The contact email used either for notification purposes or for dealing with a potential issues, related only to the associated order."
                },
                "contactPhone": {
                    "type": "string",
                    "description": "The contact phone number used for dealing with potential issues related only to the associated order."
                },
                "country": {
                    "type": "string",
                    "description": "The address ISO 3166 alpha-2 country code. It’s case insensitive."
                },
                "email": {
                    "type": "string",
                    "description": "The contact email address as the unique identification within account's address book."
                },
                "firstName": {
                    "type": "string",
                    "description": "The personal first name."
                },
                "lastName": {
                    "type": "string",
                    "description": "The personal last name."
                },
                "locale": {
                    "type": "string",
                    "description": "The preferred language of the issued invoice. If supported, the value will override the seller's account default language. ISO 639 alpha-2 or alpha-3 language code."
                },
                "logoServingUrl": {
                    "type": "string",
                    "description": "The company logo, a full URL of the image served from the content delivery network (CDN)."
                },
                "postalAddress": {
                    "description": "The postal address details.",
                    "$ref": "#/definitions/CustomerPostalAddress"
                },
                "postcode": {
                    "type": "string",
                    "description": "The address post code."
                },
                "prefix": {
                    "type": "string",
                    "description": "The personal name prefix."
                },
                "street": {
                    "type": "string",
                    "description": "The street and street number."
                },
                "suffix": {
                    "type": "string",
                    "description": "The personal name suffix."
                },
                "taxId": {
                    "type": "string",
                    "description": "The company tax payer identification number."
                },
                "vatId": {
                    "type": "string",
                    "description": "The company value added tax identification number (VAT ID)."
                }
            },
            "description": "A customer to be invoiced. In order to have a valid customer at invoice provide either an email (as a contact identification within address book) or customer properties. If a customer with provided email will be found within account's address book the matched customer will be associated with this order.\n\nOnce an account identification is being provided, it will be used as a source of the customer public details.\n\nCustomer values provided here (except email property) will update corresponding record within address book if contactEmail will be matched."
        },
        "CustomerPostalAddress": {
            "type": "object",
            "properties": {
                "businessName": {
                    "type": "string",
                    "description": "The postal address business name."
                },
                "city": {
                    "type": "string",
                    "description": "The postal address city."
                },
                "country": {
                    "type": "string",
                    "description": "The postal address ISO 3166 alpha-2 country code. It’s case insensitive."
                },
                "firstName": {
                    "type": "string",
                    "description": "The postal address first name."
                },
                "lastName": {
                    "type": "string",
                    "description": "The postal address last name."
                },
                "postcode": {
                    "type": "string",
                    "description": "The postal address post code."
                },
                "prefix": {
                    "type": "string",
                    "description": "The postal address name prefix."
                },
                "street": {
                    "type": "string",
                    "description": "The postal address street and street number."
                },
                "suffix": {
                    "type": "string",
                    "description": "The postal address name suffix."
                }
            }
        },
        "Error": {
            "type": "object",
            "required": [
                "error"
            ],
            "properties": {
                "error": {
                    "description": "Error body wrapper.",
                    "$ref": "#/definitions/ErrorBody"
                }
            }
        },
        "ErrorBody": {
            "type": "object",
            "required": [
                "code",
                "errors",
                "message"
            ],
            "properties": {
                "code": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The HTTP status code."
                },
                "errors": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ErrorReason"
                    }
                },
                "message": {
                    "type": "string",
                    "description": "The error message."
                }
            }
        },
        "ErrorReason": {
            "type": "object",
            "required": [
                "domain",
                "message",
                "reason"
            ],
            "properties": {
                "domain": {
                    "type": "string",
                    "description": "The overall scope of the error message."
                },
                "message": {
                    "type": "string",
                    "description": "The detailed error message."
                },
                "reason": {
                    "type": "string",
                    "description": "The error reason (error key)."
                }
            }
        },
        "Event": {
            "type": "object",
            "properties": {
                "begin": {
                    "description": "The event start day definition.",
                    "$ref": "#/definitions/EventBegin"
                },
                "deadline": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last day to register. If not provided, the one day before begin.on will be set. Incl. time part, as an automated processing might be scheduled based on that time."
                },
                "end": {
                    "description": "The event last day definition.",
                    "$ref": "#/definitions/EventEnd"
                },
                "location": {
                    "description": "An address where event will take place.",
                    "$ref": "#/definitions/EventLocation"
                },
                "seats": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The number of seats available for sale."
                }
            },
            "description": "The event as a product definition extension."
        },
        "EventBegin": {
            "type": "object",
            "properties": {
                "from": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The event start time."
                },
                "on": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The event start date."
                },
                "show": {
                    "type": "boolean",
                    "description": "The boolean indication whether to publish (if defined) From - To time or not.",
                    "default": true
                },
                "to": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The event end time of the 1st day."
                }
            }
        },
        "EventEnd": {
            "type": "object",
            "properties": {
                "from": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The event start time of the last day."
                },
                "on": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The event end date."
                },
                "show": {
                    "type": "boolean",
                    "description": "The boolean indication whether to publish (if defined) From - To time or not.",
                    "default": false
                },
                "to": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The event end time of the last day."
                }
            }
        },
        "EventLocation": {
            "type": "object",
            "properties": {
                "city": {
                    "type": "string",
                    "description": "The event place city."
                },
                "country": {
                    "type": "string",
                    "description": "The event place ISO 3166 alpha-2 country code. It’s case insensitive."
                },
                "infoEmail": {
                    "type": "string",
                    "description": "The contact email in order to provide more information regarding event."
                },
                "infoPhone": {
                    "type": "string",
                    "description": "The contact phone in order to provide more information regarding event."
                },
                "latitude": {
                    "type": "number",
                    "format": "double",
                    "description": "The event place address latitude geographic coordinate, generated by the service."
                },
                "longitude": {
                    "type": "number",
                    "format": "double",
                    "description": "The event place address longitude geographic coordinate, generated by the service."
                },
                "name": {
                    "type": "string",
                    "description": "The event place name or very short description."
                },
                "postcode": {
                    "type": "string",
                    "description": "The event place post code."
                },
                "street": {
                    "type": "string",
                    "description": "The event place street and street number."
                }
            }
        },
        "Expenditure": {
            "type": "object",
            "properties": {
                "bill": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique bill identification within Billing Processor service."
                },
                "billNumber": {
                    "type": "string",
                    "description": "Bill (receipt) number, or in case of incoming invoice its invoice number."
                },
                "dateOfIssue": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The bill issue date. RFC 3339"
                },
                "dateOfTaxable": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of taxable supplies. If not provided the date of issue will be used."
                },
                "payment": {
                    "description": "Expenditure payment details.",
                    "$ref": "#/definitions/ExpenditurePayment"
                },
                "pricing": {
                    "description": "Expenditure pricing details.",
                    "$ref": "#/definitions/ExpenditurePricing"
                },
                "supplier": {
                    "description": "A business that delivered a product or service. Defined outside of the Ecosystem.",
                    "$ref": "#/definitions/Supplier"
                },
                "type": {
                    "type": "string",
                    "description": "The bill document type. It's case insensitive.",
                    "default": "INVOICE",
                    "enum": [
                        "INVOICE",
                        "RECEIPT"
                    ]
                }
            },
            "description": "Expenditure that represents a purchase outside of the Ecosystem."
        },
        "ExpenditurePayment": {
            "type": "object",
            "properties": {
                "bankAccount": {
                    "description": "Creditor's bank account. The optional bank and IBAN that has been (or expected to be) used to transfer money.",
                    "$ref": "#/definitions/BankAccount"
                },
                "dueDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The optional bill due date."
                },
                "totalAmount": {
                    "type": "number",
                    "format": "double",
                    "description": "The total amount due. Zero value means the bill has been already paid (in this case the Transaction ID is mandatory).",
                    "default": 0
                },
                "transactionId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The identification of the transaction within Product Billing service associated with this expenditure if it has been already matched."
                },
                "type": {
                    "type": "string",
                    "description": "The payment type that has been (or expected to be) used.",
                    "default": "CARD_PAYMENT",
                    "enum": [
                        "CARD_PAYMENT",
                        "CASH",
                        "REFUND",
                        "TRANSFER"
                    ]
                }
            }
        },
        "ExpenditurePricing": {
            "type": "object",
            "properties": {
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217."
                },
                "items": {
                    "type": "array",
                    "description": "The optional list of billing items at bill (always BillingItem 'itemType')",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "totalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price as stated at bill.",
                    "default": 0
                },
                "totalVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The total VAT as stated at bill (in case the supplier is a VAT payer).",
                    "default": 0
                },
                "totalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The total VAT base as stated at bill (in case the supplier is a VAT payer).",
                    "default": 0
                },
                "vatRows": {
                    "type": "array",
                    "description": "Summary per VAT rate.",
                    "items": {
                        "$ref": "#/definitions/VatRateRow"
                    }
                }
            }
        },
        "Expense": {
            "type": "object",
            "properties": {
                "bill": {
                    "description": "Identification of the bill (receipt or invoice) document.",
                    "$ref": "#/definitions/Bill"
                },
                "billNumber": {
                    "type": "string",
                    "description": "Bill (receipt) number, or in case of incoming invoice its invoice number."
                },
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217."
                },
                "dateOfIssue": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The bill issue date. RFC 3339"
                },
                "dateOfTaxable": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of taxable supplies. If not provided the date of issue will be used."
                },
                "items": {
                    "type": "array",
                    "description": "Expense pricing item list.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "payment": {
                    "description": "Expense payment details.",
                    "$ref": "#/definitions/BillPayment"
                },
                "pin": {
                    "type": "string",
                    "description": "The secret hash associated solely with this bill that has to be used to download original PDF."
                },
                "servingUrl": {
                    "type": "string",
                    "description": "The full URL of the bill picture as it appears in accounting system. Served from the CDN."
                },
                "supplier": {
                    "description": "A business that delivered a product or service. It might be an account at Ecosystem but not necessarily.",
                    "$ref": "#/definitions/Creditor"
                },
                "through": {
                    "type": "string",
                    "description": "A purchase that has been made through: ECOSYSTEM represents a purchase between business accounts of the Ecosystem. EXTERNAL represents a purchase outside of the Ecosystem.",
                    "default": "ECOSYSTEM",
                    "enum": [
                        "ECOSYSTEM",
                        "EXTERNAL"
                    ]
                },
                "totalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price as a sum of all checked in pricing items and its amount including target rounding mode. Including VAT."
                },
                "totalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price as a sum of all checked in pricing items and its amount including target rounding mode. The price is excluding VAT in case company is VAT payer, otherwise price is final and same as value of totalPrice property."
                },
                "totalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The total VAT base as a sum of all checked in pricing items and its amount."
                }
            },
            "description": "Expense that represents any purchase either inside or outside of the Ecosystem."
        },
        "ExpenseCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Expense collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/Expense"
                    }
                }
            }
        },
        "IncomingInvoice": {
            "type": "object",
            "properties": {
                "createdDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "A date when incoming invoice has been created."
                },
                "creditor": {
                    "description": "The account that represents a business at TurnOnline.biz Ecosystem to whom money will be credited.",
                    "$ref": "#/definitions/Creditor"
                },
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217."
                },
                "dateOfIssue": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The invoice date of issue. RFC 3339"
                },
                "dateOfTaxable": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The invoice date of taxable supplies. RFC 3339"
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The incoming invoice identification. Unique only as a composition with parent order."
                },
                "invoiceNumber": {
                    "type": "string",
                    "description": "The incoming invoice number identification within accounting system. Generated by the underlying accounting system."
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of the last modification of incoming invoice values. RFC 3339"
                },
                "orderId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The associated order identification"
                },
                "payment": {
                    "description": "Payment instruction for the debtor, all of the necessary information to make a payment.",
                    "$ref": "#/definitions/BillPayment"
                },
                "pin": {
                    "type": "string",
                    "description": "The incoming invoice secret hash that has to be used to download original PDF invoice."
                },
                "pricing": {
                    "description": "Incoming invoice pricing details.",
                    "$ref": "#/definitions/BillPricing"
                },
                "servingUrl": {
                    "type": "string",
                    "description": "The full URL of the incoming invoice picture served from the CDN."
                },
                "type": {
                    "type": "string",
                    "description": "The accounting invoice type. It's case insensitive.",
                    "default": "PROFORMA",
                    "enum": [
                        "TAX_DOCUMENT",
                        "PROFORMA"
                    ]
                }
            }
        },
        "IncomingInvoiceCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Incoming invoice collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/IncomingInvoice"
                    }
                }
            }
        },
        "Increment": {
            "type": "object",
            "properties": {
                "current": {
                    "type": "string",
                    "description": "The current value of the increment. In case of the new definition means a starting value. If not provided, the on-premise accounting system default will be applied."
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique number series increment identification, provided by the service."
                },
                "length": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The number of characters or digits of the increment. If not provided, the on-premise accounting system default will be applied."
                },
                "postfix": {
                    "type": "string",
                    "description": "The number series postfix. Possible format either as static text or dynamic: for example %YY% (accounting system specific)."
                },
                "prefix": {
                    "type": "string",
                    "description": "The number series prefix. Possible format either as static text or dynamic: for example %YY% (accounting system specific)."
                },
                "year": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The accounting period defined as a year by 4 digits code the number series belongs to. For example '2018'."
                }
            },
            "description": "The resource that represents a definition of the invoice number increment for current accounting period."
        },
        "Invoice": {
            "type": "object",
            "properties": {
                "createdDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "A date when invoice has been created. Populated by the service."
                },
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217. The value is being based on the billing item that is first within the list. If list is empty, none currency will be set."
                },
                "customer": {
                    "description": "The invoiced customer (business partner).",
                    "$ref": "#/definitions/Customer"
                },
                "dateOfIssue": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of issue. If not provided, the current date will be used. RFC 3339"
                },
                "dateOfTaxable": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of taxable supplies. If not provided, the current date will be used. RFC 3339"
                },
                "finalText": {
                    "type": "string",
                    "description": "The optional final text placed at invoice usually at the bottom."
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The invoice identification. Unique only as a composition with parent order."
                },
                "introductoryText": {
                    "type": "string",
                    "description": "The optional introductory text placed at invoice usually at top of the billing items."
                },
                "invoiceNumber": {
                    "type": "string",
                    "description": "The invoice number identification within accounting system. Generated by the underlying accounting system based on the configuration of the number series."
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of the last modification of invoice values. Managed solely by the service. RFC 3339"
                },
                "numberSeries": {
                    "description": "The number series to be used to increment the invoice number. In order to assign an existing number series provide one of the code from the number series codebook. Omit this property or use DEFAULT value in order to use accounting system default.",
                    "$ref": "#/definitions/NumberSeries"
                },
                "orderId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The order identification, based on which this invoice was issued."
                },
                "payment": {
                    "description": "Payment instruction for the debtor, all of the necessary information to make a payment. If none bank account selected, a bank account in creditor's account marked as primary will be set if any.\n\nIf provided a bank account Id as a header while creating or updating the bill, the bank account will be set by the service and the details will be taken from the Payment Processor.",
                    "$ref": "#/definitions/BillPayment"
                },
                "pin": {
                    "type": "string",
                    "description": "The invoice secret hash that's assigned to this invoice. Generated by the service."
                },
                "pricing": {
                    "description": "Invoice pricing details.",
                    "$ref": "#/definitions/BillPricing"
                },
                "servingUrl": {
                    "type": "string",
                    "description": "The full URL of the invoice picture. Provided by the service."
                },
                "status": {
                    "type": "string",
                    "description": "The current invoice status. Managed by the service.",
                    "default": "NEW",
                    "enum": [
                        "NEW",
                        "SENT",
                        "PAID",
                        "CANCELED"
                    ]
                },
                "type": {
                    "type": "string",
                    "description": "The accounting invoice type. It's case insensitive.",
                    "default": "PROFORMA",
                    "enum": [
                        "TAX_DOCUMENT",
                        "PROFORMA"
                    ]
                }
            }
        },
        "InvoiceCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Invoice collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/Invoice"
                    }
                }
            }
        },
        "BillPayment": {
            "type": "object",
            "properties": {
                "bankAccount": {
                    "description": "Creditor's bank account. The account listed at invoice as a target bank account to pay the invoice.",
                    "$ref": "#/definitions/BankAccount"
                },
                "dueDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The invoice due date. If not provided, the on-premise accounting system default will be applied. RFC 3339"
                },
                "key": {
                    "type": "string",
                    "description": "The payment key as an ID to identify incoming payment related to this invoice. Might be generated at the client side. It may be the same value as the variable symbol, but not necessarily."
                },
                "totalAmount": {
                    "type": "number",
                    "format": "double",
                    "description": "The total amount due. It will have a zero value once bill is fully settled.",
                    "default": 0
                },
                "type": {
                    "type": "string",
                    "description": "The intended payment method type. It's case insensitive.",
                    "default": "TRANSFER",
                    "enum": [
                        "CARD_PAYMENT",
                        "CASH",
                        "REFUND",
                        "TRANSFER"
                    ]
                },
                "variableSymbol": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The variable symbol generated by accounting system. The ID to identify incoming payment limited to 10 digits."
                }
            },
            "description": "Payment instruction for the debtor, all of the necessary information to make a payment."
        },
        "BillPricing": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "The list of billing items placed at bill (pricing item with 'itemType' property value BillingItem, OrderItem or Standard for new item). Otherwise validation error will be returned as a bad request.\n\nOnce processed by the service it will be always returned as a flat structure of billing items (no tree), a simple list of items listed at bill. \n\nAll of the values as a snapshot of the calculated values at the time of the billing item creation. Billing item values might change while invoice has a status NEW.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "rounding": {
                    "type": "string",
                    "description": "The sum rounding mode used to calculate the prices. It's case insensitive.",
                    "default": "HUNDREDTHS",
                    "enum": [
                        "THOUSANDTHS",
                        "HUNDREDTHS",
                        "TENTHS",
                        "ONES"
                    ]
                },
                "totalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The invoice total price as a sum of all billing items presented at invoice. Including VAT.",
                    "default": 0
                },
                "totalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The invoice total price as a sum of all billing items presented at invoice. The price is excluding VAT in case company is VAT payer, otherwise price is final and same as value of totalPrice property.",
                    "default": 0
                },
                "totalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The invoice total VAT base as a sum of all billing items and its amount including target rounding mode.",
                    "default": 0
                }
            }
        },
        "InvoiceStatus": {
            "type": "object",
            "required": [
                "status"
            ],
            "properties": {
                "status": {
                    "type": "string",
                    "description": "The current status of the invoice."
                }
            }
        },
        "JsonMap": {
            "type": "object"
        },
        "Merchant": {
            "type": "object",
            "properties": {
                "category": {
                    "type": "string",
                    "description": "The merchant category."
                },
                "city": {
                    "type": "string",
                    "description": "The merchant city."
                },
                "name": {
                    "type": "string",
                    "description": "The merchant name."
                }
            },
            "description": "The merchant details, available only for card payments."
        },
        "NumberSeries": {
            "type": "object",
            "required": [
                "code"
            ],
            "properties": {
                "code": {
                    "type": "string",
                    "description": "The unique type name (code) of the number series. It’s case insensitive.",
                    "default": "DEFAULT",
                    "enum": [
                        "DEFAULT",
                        "CODE_YY",
                        "YY_7_DIGITS",
                        "DIGITS",
                        "PREFIX_7_DIGITS_YY"
                    ]
                },
                "increment": {
                    "description": "The increment assigned to this number series.",
                    "$ref": "#/definitions/Increment"
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last modification date of the product properties. Populated by the service."
                },
                "symbol": {
                    "type": "string",
                    "description": "A country specific symbol for further identification of the payment (category). Completion of this property is not a generally binding obligation."
                }
            },
            "description": "The accounting number series as a definition of the invoice increment."
        },
        "NumberSeriesCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Number series collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/NumberSeries"
                    }
                }
            }
        },
        "Order": {
            "type": "object",
            "properties": {
                "beginOn": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of first invoice issue. Might be selected by the user."
                },
                "createdDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "A date when order has been created. Populated by the service."
                },
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217. The value is being based on the order item that is first within the list. If list is empty, none currency will be set."
                },
                "customer": {
                    "description": "A customer to be invoiced.",
                    "$ref": "#/definitions/Customer"
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique order identification."
                },
                "invoices": {
                    "type": "array",
                    "description": "List of already issued invoices based on this Order, where number of records is limited by value from the query parameter. By default no invoices will be included in the response until the query parameter 'invoices' will be present with a positive integer value (check whether it's supported by endpoint). This number represents a limit of max number of expected invoices to be included in the result.\n\nIf no invoice yet has been issued, the property 'invoices' will be missing in the result whatever was the value of query parameter.\n\nOrdered by invoice modification date (descending).",
                    "items": {
                        "$ref": "#/definitions/Invoice"
                    }
                },
                "invoiceType": {
                    "type": "string",
                    "default": "PROFORMA",
                    "enum": [
                        "TAX_DOCUMENT",
                        "PROFORMA"
                    ]
                },
                "items": {
                    "type": "array",
                    "description": "The list of order items to be placed at invoice. Taken either as a product from the product catalog or a custom definition.\n\nThe root pricing item of the pricing tree structure must be either type of OrderItem or Standard (PricingItem ‘itemType’ property value). Otherwise validation error will be returned as a bad request.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "lastBillingDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last billing date. An invoicing that has been already executed.  Set by the service."
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of the last modification of order values. Managed solely by the service. RFC 3339"
                },
                "nextBillingDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The next (future) billing date. A concrete value is being based on the periodicity and evaluated by the service."
                },
                "numberOfDays": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The number of days to calculate due date. An user defined value.",
                    "default": 14
                },
                "periodicity": {
                    "type": "string",
                    "description": "The current periodicity of the order.",
                    "default": "MANUALLY",
                    "enum": [
                        "ANNUALLY",
                        "SEMI_ANNUALLY",
                        "QUARTERLY",
                        "MONTHLY",
                        "WEEKLY",
                        "MANUALLY"
                    ]
                },
                "status": {
                    "type": "string",
                    "description": "The current status of the order.\n\nClient is allowed to set only one of the following value:\nTRIALING, ACTIVE, SUSPENDED.",
                    "default": "SUSPENDED",
                    "enum": [
                        "TRIALING",
                        "ACTIVE",
                        "SUSPENDED",
                        "ISSUE",
                        "FINISHED"
                    ]
                },
                "totalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The order total price as a sum of all checked in order items and its amount including target rounding mode. Including VAT."
                },
                "totalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The order total price as a sum of all checked in order items and its amount including target rounding mode. The price is excluding VAT in case company is VAT payer, otherwise price is final and same as value of totalPrice property."
                },
                "totalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The order total VAT base as a sum of all checked in order items and its amount."
                }
            },
            "description": "**Recurring order possibilities**\n* ANNUALLY - Annually recurring billing\n* SEMI_ANNUALLY - Semi-annually recurring billing\n* QUARTERLY - Quarterly recurring billing. A three-month period on a financial calendar.\n* MONTHLY - Monthly recurring billing\n* WEEKLY - Weekly recurring billing\n* MANUALLY - Executed on user action. It issues an invoice based on the current Order.\n\n**Order statuses**\n* TRIALING - A service or subscription in trialing state, a trial run.\n* ACTIVE - A new or active order. It is not in a trial and there is no overdue payment.\n* SUSPENDED - Either creditor or debtor has paused the execution.\n* ISSUE - Set by system if there is an overdue payment. The most recent payment for some reason has failed or debtor has refused the purchase order.\n* FINISHED - A non recurring purchase order that has been completed. Generally it means an ordered product has been paid. A subscription that has been expired due to running its normal life cycle.\n\nThe root elements of the Order pricing item list will be automatically converted the itemType in to OrderItem, so incoming value of the property 'itemType' will not be taken into account.\n\n**Prerequisites to delete order**\n* Order cannot have already issued invoices.\n* Order has not FINISHED status."
        },
        "OrderCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Order collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/Order"
                    }
                }
            }
        },
        "OrderStatus": {
            "type": "object",
            "required": [
                "status"
            ],
            "properties": {
                "status": {
                    "type": "string",
                    "description": "The current status of the order.",
                    "enum": [
                        "TRIALING",
                        "ACTIVE",
                        "SUSPENDED",
                        "ISSUE",
                        "FINISHED"
                    ]
                }
            },
            "description": "Client is allowed to change and set only these values:\n* TRIALING\n* ACTIVE\n* SUSPENDED"
        },
        "Pricing": {
            "type": "object",
            "properties": {
                "appliedReverseCharge": {
                    "type": "boolean",
                    "description": "The boolean indication whether these pricing items are subject to the reverse charge - VAT to be accounted for by the recipient as per Article 196 of Council Directive 2006/112/EC.",
                    "default": false
                },
                "customer": {
                    "description": "The customer details mainly for the purpose of the reverse charge evaluation.",
                    "$ref": "#/definitions/PricingCustomer"
                },
                "discountApplied": {
                    "type": "boolean",
                    "description": "True if any of the pricing item has successfully applied for discounted price.",
                    "default": false
                },
                "discountDefined": {
                    "type": "boolean",
                    "description": "The boolean indication whether any of the pricing item has defined a discount.",
                    "default": false
                },
                "items": {
                    "type": "array",
                    "description": "The list of the pricing items to be considered for calculation. The pricing items represents a tree and price is calculated recursively.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "noDiscountTotalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price including VAT as it would be if no discount would be applied. If property discountApplied is false or missing, the sum will be the same as totalPrice.",
                    "default": 0
                },
                "noDiscountTotalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price excluding VAT as it would be if no discount would be applied. If property discountApplied is false or missing, the sum will be the same as totalPriceExclVat.",
                    "default": 0
                },
                "totalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price as a sum of all checked in pricing items and its amount. Including VAT.",
                    "default": 0
                },
                "totalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price as a sum of all checked in pricing items and its amount. The price is excluding VAT in case company is VAT payer, otherwise price is final and same as value of totalPrice property.",
                    "default": 0
                },
                "totalVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The total VAT as a result of the calculation of all checked in pricing items and its amount including target rounding mode.",
                    "default": 0
                },
                "totalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The total VAT base as a result of the calculation of all checked in pricing items and its amount including target rounding mode.",
                    "default": 0
                }
            },
            "description": "The root pricing as a top level item for all pricing item children."
        },
        "PricingCustomer": {
            "type": "object",
            "properties": {
                "country": {
                    "type": "string",
                    "description": "The customer country code (ISO 3166 alpha-2). It’s case insensitive."
                },
                "email": {
                    "type": "string",
                    "description": "The login email address within address book as the customer's identification."
                },
                "vatPayer": {
                    "type": "boolean",
                    "description": "The boolean indication whether customer's company is registered as VAT payer. The missing value or false means company it’s not a VAT payer.",
                    "default": false
                }
            }
        },
        "PricingItem": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "number",
                    "format": "double",
                    "description": "The requested amount (quantity) of this item to be invoiced. For non leaf items only the integer of amount is being taken into account as it reflects number of child items. Higher precision is suitable only for leaf items.",
                    "default": 1
                },
                "checkedIn": {
                    "type": "boolean",
                    "description": "The boolean indication whether this pricing item to include in to final price calculation or not.",
                    "default": true
                },
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217. If not set, the account's default currency will be set."
                },
                "discountApplied": {
                    "type": "boolean",
                    "description": "The boolean indication whether this pricing item has already successfully applied for discounted price.",
                    "default": false
                },
                "discountCode": {
                    "type": "string",
                    "description": "The discount code provided by the client in order to apply for price discount. If discount has been defined and there is a match, the property discountApplied will return true."
                },
                "discountCodeDefined": {
                    "type": "boolean",
                    "description": "The boolean indication whether associated product has defined a discount code.",
                    "default": false
                },
                "discountDefined": {
                    "type": "boolean",
                    "description": "The boolean indication whether associated product has defined a discount.",
                    "default": false
                },
                "finalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The final price including VAT as a result of the calculation of the item price excluding VAT (VAT base), selected VAT and amount."
                },
                "finalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The final price excluding VAT as the result of the calculation of the item price (excluding VAT) and amount."
                },
                "finalValueAddedTax": {
                    "type": "number",
                    "format": "double",
                    "description": "The VAT value, associated with the final VAT rate."
                },
                "finalVat": {
                    "type": "string",
                    "description": "The context sensitive (customer country etc) VAT code, taken from the VAT rate code book. The final VAT to be used for final price calculation."
                },
                "finalVatAmount": {
                    "type": "number",
                    "format": "double",
                    "description": "The final amount of VAT as a result of the calculation of this item and its amount including target rounding mode."
                },
                "finalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The final VAT base as the result of the calculation of the item price excluding VAT and amount including rounding based on the rounding mode value."
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The pricing item identification. Unique only with combination of the parent key.\n\nThe pricing resource might be a calculated in memory, thus no corresponding ID will be provided in this case."
                },
                "inline": {
                    "type": "string",
                    "description": "The inline item placed as a line at invoice, solely assembled by the service. Optionally, the content is language (Accept-Language) sensitive, but not for price. Will be present only for relevant 'itemType' (OrderItem , BillingItem)."
                },
                "itemName": {
                    "type": "string",
                    "description": "The product name, a very short summary that will be used at invoice. By default taken from the associated product if any. If provided by the client, it will take precedence. However, specific behaviour might be different based on the concrete type of 'itemType' property."
                },
                "items": {
                    "type": "array",
                    "description": "The pricing items tree. A non empty list defines a price of this item by its children as a sum of all its items. The price is calculated recursively.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "itemType": {
                    "type": "string",
                    "description": "The one of the supported item type. The type has an impact how item will be handled and might have a various configuration and properties (by subsidiary).\n\nThe root pricing item of the pricing tree structure must be one of the type: Standard, OrderItem, or BillingItem. Otherwise validation error will be returned as a bad request.",
                    "default": "Standard",
                    "enum": [
                        "Standard",
                        "EventPart",
                        "Attendee",
                        "Webinar",
                        "OrderItem",
                        "BillingItem"
                    ]
                },
                "itemUrl": {
                    "type": "string",
                    "description": "The product page URL once associated product has been published."
                },
                "metaFields": {
                    "description": "The product specific metadata fields configuration. It's read only. Values are taken from the associated product if any. Product is the master, if you need different values, change those values at product level.",
                    "$ref": "#/definitions/ProductMetaFields"
                },
                "order": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The order number of the item within list if defined. Managed by the client only."
                },
                "parentKey": {
                    "type": "string",
                    "description": "The unique identification either of the parent pricing item or parent Order (Invoice etc). Pricing item resource might be imbedded item of another pricing item infinitely.\n\nThe pricing resource might be a calculated in memory, thus no corresponding ID will be provided in this case.",
                    "example": "Order:6184291495038218::Invoice:6119330379491200::PricingItem:4868955402750444"
                },
                "priceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The product price for a single unit (meaning amount 1.0 as a quantity). The price is excluding VAT in case company is VAT payer, otherwise price is final.",
                    "default": 0
                },
                "product": {
                    "description": "The matching product from the product catalog (solely identified by ID). If found, product's properties will be used to populate this pricing item. If not found or missing, the provided pricing item properties will be processed as a non catalog product. Note, for this 'product' property only subset of the product's properties will be placed here (at least ID).",
                    "$ref": "#/definitions/PricingProduct"
                },
                "snippet": {
                    "type": "string",
                    "description": "The product short description, a brief overview (not appearing at invoice). The plain text only. Values taken from the associated product if any."
                },
                "subsidiary": {
                    "description": "An optional subsidiary properties with single level (flat) structure - Map of values. Initial values taken from the associated product if any. Client is free to change it and manage it.",
                    "$ref": "#/definitions/JsonMap"
                },
                "thumbnailUrl": {
                    "type": "string",
                    "description": "The thumbnail URL of the associated product picture once product has been published. Served from the content delivery network (CDN)."
                },
                "unit": {
                    "type": "string",
                    "description": "The code from the billing unit codebook - unit of measure at invoice.",
                    "default": "ITEM"
                },
                "valueAddedTax": {
                    "type": "number",
                    "format": "double",
                    "description": "The current numeric representation of the value added tax (VAT) codebook item."
                },
                "vat": {
                    "type": "string",
                    "description": "The VAT rate codebook value to be applied to calculate the final price of the product for domestic (seller) to domestic customer sale.",
                    "default": "STANDARD"
                }
            },
            "description": "These properties are allowed to be modified by the client\n* product.id\n* itemName\n* priceExclVat\n* amount\n* vat\n* unit\n* currency\n* checkedIn\n* discountCode\n* order\n* subsidiary\n* items\n* itemType"
        },
        "PricingItemCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Pricing item collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                }
            }
        },
        "PricingProduct": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique product identification within product catalog, provided by the client to populate this pricing item if any. If not found, the response won't contain the product property at all."
                },
                "templateId": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The identification of the structure template item (PricingStructureTemplate) if defined. Unique only within product. If template ID is present, this pricing item will be initialized based on values of the corresponding structure item that serves as a template."
                }
            },
            "description": "The matching product from the product catalog (solely identified by ID)."
        },
        "PricingStructureTemplate": {
            "type": "object",
            "required": [
                "itemType"
            ],
            "properties": {
                "amount": {
                    "type": "number",
                    "format": "double",
                    "description": "The initial amount (quantity) of the pricing item property.",
                    "default": 1
                },
                "checkedIn": {
                    "type": "boolean",
                    "description": "The initial state of the pricing item property. If not provided, true will be used as a default value.",
                    "default": false
                },
                "id": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The identification of the structure item, unique only within product."
                },
                "itemName": {
                    "type": "string",
                    "description": "The product partial item name, a very short summary that might be placed at invoice. The plain text only. Overrides the product itemName if defined."
                },
                "items": {
                    "type": "array",
                    "description": "Pricing item tree structure definition.\nImportant note; once you provide the structure, an update on items property must always provide the full expected structure, it does not support the PATCH semantics. However if items property won't be provided at all, the backend structure remains.",
                    "items": {
                        "$ref": "#/definitions/PricingStructureTemplate"
                    }
                },
                "itemType": {
                    "type": "string",
                    "description": "The expected item's type of the pricing item property."
                },
                "order": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The initial order number of the item within list if defined."
                },
                "priceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The partial price for a single unit (meaning amount 1.0 as a quantity). The price is excluding VAT in case company is VAT payer, otherwise price is final. Only the leaf items defines the price, the rest are being calculated recursively based on the children (items property) if defined.",
                    "default": 0
                },
                "subsidiary": {
                    "description": "An initial (and optional) subsidiary properties of the product item. A flat, single level structure (Map of values) in JSON format that will be saved as it is given. It will be returned as part of the pricing item if defined.",
                    "$ref": "#/definitions/JsonMap"
                },
                "unit": {
                    "type": "string",
                    "description": "The billing unit code. If not provided, parent's item value will be used."
                }
            },
            "description": "The initial tree definition of the complex product pricing structure that serves as a template. VAT values will be inherited from the product."
        },
        "Product": {
            "type": "object",
            "required": [
                "itemName"
            ],
            "properties": {
                "createdDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "A date when the product has been created. Populated by the service."
                },
                "event": {
                    "description": "The product extension by event specification.",
                    "$ref": "#/definitions/Event"
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique product identification."
                },
                "invoicing": {
                    "description": "The set of invoicing rules to be used once product will be placed at the invoice.",
                    "$ref": "#/definitions/ProductInvoicing"
                },
                "itemName": {
                    "type": "string",
                    "description": "The product name, very short summary that might be placed at invoice as a billing item or used as a title at web page if published."
                },
                "metaFields": {
                    "description": "The product specific metadata fields configuration.",
                    "$ref": "#/definitions/ProductMetaFields"
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last modification date of the product properties. Populated by the service."
                },
                "overview": {
                    "description": "Product overview, a highlighted properties that might be taken from the sub resources.",
                    "$ref": "#/definitions/ProductOverview"
                },
                "pricing": {
                    "description": "The product pricing.",
                    "$ref": "#/definitions/ProductPricing"
                },
                "publishing": {
                    "description": "The product's additional configuration for public use.",
                    "$ref": "#/definitions/ProductPublishing"
                },
                "snippet": {
                    "type": "string",
                    "description": "The product short description, a brief overview (not appearing at invoice). The plain text only."
                }
            },
            "description": "The product definition within product catalog. It might be listed at invoice as a billing item with corresponding billing unit and amount or used anywhere publicly as a web page or content for a mobile app if published."
        },
        "ProductCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Product collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/Product"
                    }
                }
            }
        },
        "ProductDiscount": {
            "type": "object",
            "properties": {
                "codes": {
                    "type": "array",
                    "description": "The list of possible codes to be used by user to apply for the discount.",
                    "items": {
                        "type": "string"
                    }
                },
                "enabled": {
                    "type": "boolean",
                    "description": "The boolean indication whether to enable discount application. If definition is valid the client provided value will be applied, otherwise false.",
                    "default": false
                },
                "off": {
                    "type": "number",
                    "format": "double",
                    "description": "The discount rate. The final discount value will be deducted based on the unit of the discount during price calculation.",
                    "default": 0
                },
                "rule": {
                    "type": "string",
                    "description": "The unique name of the discount rule to be used to evaluate whether to apply defined discount or not.",
                    "default": "DiscountCode"
                },
                "unit": {
                    "type": "string",
                    "description": "The discount unit. It’s case insensitive.",
                    "default": "PERCENTAGE",
                    "enum": [
                        "PERCENTAGE",
                        "AMOUNT"
                    ]
                }
            },
            "description": "The optional discount definition."
        },
        "ProductDomain": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "domain": {
                    "type": "string",
                    "description": "The domain unique across the globe associated with the account. As a composition of the domain name and TLD. Populated by the service."
                },
                "name": {
                    "type": "string",
                    "description": "The name that represents an unique domain specification. Only this is the client value required to be present, the rest will be populated by the service."
                },
                "subdomain": {
                    "type": "string",
                    "description": "The optional sub-domain. If missing, this Domain represents a naked domain. Populated by the service."
                },
                "uri": {
                    "type": "string",
                    "description": "The optional path of a product. Service makes sure the final URL is unique. The client might provide a relative product path as an URI. If there is a collision with an existing record a generated postfix will be appended. If not provided by client, the product link will be fully generated by the service based on the product’s ‘itemName’ property."
                },
                "url": {
                    "type": "string",
                    "description": "The final unique URL, rendered by the service."
                }
            },
            "description": "The domain where a product will be publicly available, once published."
        },
        "ProductInvoicing": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string",
                    "description": "The product code, unique only for product catalog within associated accounting system (the value generated by the service)."
                },
                "numberSeries": {
                    "description": "The number series to be used to increment the invoice number. In order to assign an existing number series provide one of the code from the number series codebook. Omit this property or use DEFAULT value in order to use accounting system default.",
                    "$ref": "#/definitions/NumberSeries"
                },
                "trialPeriod": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The number of days of the trial period. The period to postpone invoicing."
                },
                "unit": {
                    "type": "string",
                    "description": "The billing unit code - unit of measure at invoice (time interval, items). It’s case insensitive.",
                    "default": "ITEM",
                    "enum": [
                        "ITEM",
                        "COUNT",
                        "SERVICE",
                        "SUBSCRIPTION"
                    ]
                }
            }
        },
        "ProductMetaFields": {
            "type": "object",
            "properties": {
                "available": {
                    "type": "array",
                    "description": "The list of available fields (supplied by client).",
                    "items": {
                        "type": "string"
                    }
                },
                "mandatory": {
                    "type": "array",
                    "description": "The list of mandatory fields as subset of the available fields (supplied by client).",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "description": "The product specific metadata fields configuration."
        },
        "ProductOverview": {
            "type": "object",
            "properties": {
                "about": {
                    "type": "string",
                    "description": "The short summary about the product, generated by the service as a plain text."
                },
                "productUrl": {
                    "type": "string",
                    "description": "The product URL where this product is publicly available once has been published. Available if published property is true."
                },
                "published": {
                    "type": "boolean",
                    "description": "The boolean indication whether this product already has been published or not.",
                    "default": false
                },
                "thumbnailUrl": {
                    "type": "string",
                    "description": "The full URL of the product main picture served from the content delivery network (CDN). It's one of the product's publishing.pictures[x].servingUrl. It might be available even product is not published yet."
                }
            },
            "description": "Product overview, a highlighted properties that might be taken from the sub resources."
        },
        "ProductPicture": {
            "type": "object",
            "required": [
                "storageName"
            ],
            "properties": {
                "order": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The order number how pictures should be organised. If it's not supplied by the client, it will be numbered in the order as it was provided. Order number must be unique within list."
                },
                "servingUrl": {
                    "type": "string",
                    "description": "The full URL of the picture served from the content delivery network (CDN). Provided by the service once an image ('storageName') has been uploaded."
                },
                "storageName": {
                    "type": "string",
                    "description": "The full path to the picture. It's an identification in the underlying storage. This property acts as a list item identification."
                }
            }
        },
        "ProductPricing": {
            "type": "object",
            "properties": {
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217. If no value has been provided the seller's domicile default will be set."
                },
                "discounts": {
                    "type": "array",
                    "description": "The optional list of discount definition. The one which will match will be applied. Currently only single discount can be applied to discount item price.",
                    "items": {
                        "$ref": "#/definitions/ProductDiscount"
                    }
                },
                "domesticDelivery": {
                    "type": "boolean",
                    "description": "The boolean indication whether the product is marked as 'domestic delivery'. It might have an impact how is the VAT handled in the final price.",
                    "default": false
                },
                "items": {
                    "description": "An extra property with recalculated pricing item tree based on the current product's values with default structure. It will be recalculated on demand, see header 'vnd.turnon.cloud.calc-pricing-items'. However in case the product is being delivered as a Pub / Sub event, this pricing item tree will be included by default. Root itemType will be always 'Standard'.",
                    "$ref": "#/definitions/PricingItem"
                },
                "priceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The product catalog price for a single unit (meaning amount 1.0 as a quantity). The price is excluding VAT in case company is VAT payer, otherwise price is final."
                },
                "subsidiary": {
                    "description": "An initial (and optional) subsidiary properties of the product item. A flat, single level structure (Map of values) in JSON format that will be saved as it is given. It will be returned as part of the pricing item if defined.",
                    "$ref": "#/definitions/JsonMap"
                },
                "template": {
                    "type": "array",
                    "description": "An additional product pricing if more complex pricing structure is being required. A non empty list will define the price of this pricing priceExclVat property. Only the leaf items defines the price, the rest are being calculated recursively from the leaf item to root item.",
                    "items": {
                        "$ref": "#/definitions/PricingStructureTemplate"
                    }
                },
                "vat": {
                    "type": "string",
                    "description": "The VAT rate codebook value to be applied to calculate the final price of the product for domestic (seller) to domestic customer sale."
                },
                "vatEU": {
                    "type": "string",
                    "description": "The VAT rate codebook value to be applied to calculate the final price of the product  for domestic (seller) to EU based customer sale."
                },
                "vatNonEU": {
                    "type": "string",
                    "description": "The VAT rate codebook value to be applied to calculate the final price of the product  for domestic (seller) to non EU based customer sale."
                }
            }
        },
        "ProductPublishing": {
            "type": "object",
            "properties": {
                "at": {
                    "description": "The domain where a product will be publicly available, once published. If no value has been provided the seller’s default domain will be set. The client might select only from existing domains provided by associated account.",
                    "$ref": "#/definitions/ProductDomain"
                },
                "comingSoon": {
                    "type": "boolean",
                    "description": "The boolean indication whether to communicate publicly the product availability as 'coming soon'.",
                    "default": false
                },
                "createdDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "A date when product's publishing has been created. Populated by the service."
                },
                "description": {
                    "type": "string",
                    "description": "The product description for public use. It might be any plain text or HTML document."
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last modification date of the product properties. Populated by the service."
                },
                "pictures": {
                    "type": "array",
                    "description": "The list of the pictures associated with this product.",
                    "items": {
                        "$ref": "#/definitions/ProductPicture"
                    }
                },
                "published": {
                    "type": "boolean",
                    "description": "The boolean indication whether to publish this product or not.",
                    "default": false
                }
            },
            "description": "The product configuration for public use."
        },
        "PurchaseOrder": {
            "type": "object",
            "properties": {
                "beginOn": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of first invoice issue. Might be selected by the user."
                },
                "createdDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "A date when purchase order has been created. Populated by the service."
                },
                "creditor": {
                    "description": "The account that represents a business at TurnOnline.biz Ecosystem to whom money will be credited.",
                    "$ref": "#/definitions/Creditor"
                },
                "currency": {
                    "type": "string",
                    "description": "The currency alphabetic code based on the ISO 4217. The value is being based on the order item that is first within the list. If list is empty, none currency will be set."
                },
                "customer": {
                    "description": "Invoiced customer.",
                    "$ref": "#/definitions/Customer"
                },
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The unique purchase order identification."
                },
                "invoices": {
                    "type": "array",
                    "description": "List of already issued invoices based on this Order, where number of records is limited by value from the query parameter. By default no invoices will be included in the response until the query parameter 'invoices' will be present with a positive integer value. This number represents a limit of max number of expected incoming invoices to be included in the result.\n\nIf no incoming invoice yet has been issued, the property 'invoices' will be missing in the result whatever was the value of query parameter.\n\nOrdered by incoming invoice modification date (descending).",
                    "items": {
                        "$ref": "#/definitions/IncomingInvoice"
                    }
                },
                "invoiceType": {
                    "type": "string",
                    "default": "PROFORMA",
                    "enum": [
                        "TAX_DOCUMENT",
                        "PROFORMA"
                    ]
                },
                "items": {
                    "type": "array",
                    "description": "The list of order items to be placed at invoice. Taken either as a product from the product catalog or a custom definition.\n\nThe root pricing item of the pricing tree structure must be either type of OrderItem or Standard (PricingItem ‘itemType’ property value). Otherwise validation error will be returned as a bad request.",
                    "items": {
                        "$ref": "#/definitions/PricingItem"
                    }
                },
                "lastBillingDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last billing date. An invoicing that has been already executed.  Set by the service."
                },
                "modificationDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date of the last modification of purchase order values. Managed solely by the service. RFC 3339"
                },
                "nextBillingDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The next (future) billing date. A concrete value is being based on the periodicity and evaluated by the service."
                },
                "numberOfDays": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The number of days to calculate due date. An user defined value.",
                    "default": 14
                },
                "periodicity": {
                    "type": "string",
                    "description": "The current periodicity of the purchase order.",
                    "default": "MANUALLY",
                    "enum": [
                        "ANNUALLY",
                        "SEMI_ANNUALLY",
                        "QUARTERLY",
                        "MONTHLY",
                        "WEEKLY",
                        "MANUALLY"
                    ]
                },
                "status": {
                    "type": "string",
                    "description": "The current status of the purchase order.\n\nClient is allowed to set only one of the following value:\nTRIALING, ACTIVE, SUSPENDED.",
                    "default": "SUSPENDED",
                    "enum": [
                        "TRIALING",
                        "ACTIVE",
                        "SUSPENDED",
                        "ISSUE",
                        "FINISHED"
                    ]
                },
                "totalPrice": {
                    "type": "number",
                    "format": "double",
                    "description": "The purchase order total price as a sum of all checked in order items and its amount including target rounding mode. Including VAT."
                },
                "totalPriceExclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The purchase order total price as a sum of all checked in order items and its amount including target rounding mode. The price is excluding VAT in case company is VAT payer, otherwise price is final and same as value of totalPrice property."
                },
                "totalVatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The purchase order total VAT base as a sum of all checked in order items and its amount."
                }
            },
            "description": "Purchase order."
        },
        "PurchaseOrderCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "Purchase order collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/PurchaseOrder"
                    }
                }
            }
        },
        "Supplier": {
            "type": "object",
            "properties": {
                "businessName": {
                    "type": "string",
                    "description": "Supplier business name."
                },
                "companyId": {
                    "type": "string",
                    "description": "Supplier business identification number."
                },
                "taxId": {
                    "type": "string",
                    "description": "Supplier tax payer identification number."
                },
                "vatId": {
                    "type": "string",
                    "description": "Supplier vat payer identification number."
                },
                "street": {
                    "type": "string",
                    "description": "The street and street number."
                },
                "city": {
                    "type": "string",
                    "description": "The address city."
                },
                "country": {
                    "type": "string",
                    "description": "The address ISO 3166 alpha-2 country code. It’s case insensitive."
                },
                "postcode": {
                    "type": "string",
                    "description": "The address post code."
                }
            }
        },
        "Transaction": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "number",
                    "format": "double",
                    "description": "The transaction amount absolute value.",
                    "default": 0
                },
                "balance": {
                    "type": "number",
                    "format": "double",
                    "description": "The balance after the transaction."
                },
                "bankAccount": {
                    "description": "The bank account associated with this transaction.",
                    "$ref": "#/definitions/TransactionBank"
                },
                "bill": {
                    "description": "Identification of the bill (receipt) or invoice document settled by this transaction.",
                    "$ref": "#/definitions/Bill"
                },
                "billAmount": {
                    "type": "number",
                    "format": "double",
                    "description": "The billing amount for cross-currency payment. If missing the transaction represents a single currency payment."
                },
                "billCurrency": {
                    "type": "string",
                    "description": "The billing currency for cross-currency payment. If missing the transaction represents a single currency payment."
                },
                "completedAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date when the transaction was completed (status COMPLETED)."
                },
                "credit": {
                    "type": "boolean",
                    "description": "The boolean indicating whether the payment has positive or negative amount; true - credit, false - debit.",
                    "default": false
                },
                "currency": {
                    "type": "string",
                    "description": "The payment currency alphabetic code based on the ISO 4217.",
                    "default": "EUR"
                },
                "key": {
                    "type": "string",
                    "description": "The unique payment identification related to the associated bill."
                },
                "merchant": {
                    "$ref": "#/definitions/Merchant"
                },
                "reference": {
                    "type": "string",
                    "description": "A user provided payment reference."
                },
                "status": {
                    "type": "string",
                    "description": "The transaction status.",
                    "default": "CREATED",
                    "enum": [
                        "CREATED",
                        "PENDING",
                        "COMPLETED",
                        "DECLINED",
                        "FAILED"
                    ]
                },
                "transactionId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The identification of the transaction within payment processor service unique for single Ecosystem account."
                },
                "type": {
                    "type": "string",
                    "description": "The payment type that has been used to make this payment.",
                    "default": "TRANSFER",
                    "enum": [
                        "CARD_PAYMENT",
                        "CASH",
                        "REFUND",
                        "TRANSFER"
                    ]
                }
            },
            "description": "Transaction that represents either a credit or debit operation.\n\nTwo transactions are being considered the same if the following properties are same:\n* The ID of the authenticated account\n* Transaction ID"
        },
        "TransactionBank": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string",
                    "description": "The bank identified by a bank code."
                },
                "iban": {
                    "type": "string",
                    "description": "The international bank account number."
                }
            },
            "description": "The bank account associated with this transaction."
        },
        "VatRate": {
            "type": "object",
            "required": [
                "code",
                "label"
            ],
            "properties": {
                "code": {
                    "type": "string",
                    "description": "The VAT rate code. It's case insensitive.",
                    "default": "STANDARD",
                    "enum": [
                        "STANDARD",
                        "REDUCED",
                        "ZERO"
                    ]
                },
                "domicile": {
                    "type": "string",
                    "description": "The ISO 3166 alpha-2 country code. The country of the VAT rate that belongs to."
                },
                "label": {
                    "type": "string",
                    "description": "The codebook value, VAT rate short name."
                },
                "locale": {
                    "type": "string",
                    "description": "The label language. ISO 639 alpha-2 or alpha-3 language code."
                },
                "value": {
                    "type": "number",
                    "format": "double",
                    "description": "The VAT rate as a number value."
                }
            },
            "description": "The VAT rate definition to be applied to calculate the final price."
        },
        "VatRateCollection": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "description": "VAT rate collection wrapper.",
                    "items": {
                        "$ref": "#/definitions/VatRate"
                    }
                }
            }
        },
        "VatRateRow": {
            "type": "object",
            "properties": {
                "priceInclVat": {
                    "type": "number",
                    "format": "double",
                    "description": "The total price per rate as stated at bill."
                },
                "vat": {
                    "type": "number",
                    "format": "double",
                    "description": "The sum of VAT per rate as stated at bill."
                },
                "vatBase": {
                    "type": "number",
                    "format": "double",
                    "description": "The sum of VAT base per rate as stated at bill."
                },
                "vatRate": {
                    "type": "number",
                    "format": "double",
                    "description": "VAT rate (in percentage) as stated at bill."
                }
            },
            "description": "Summary per VAT rate."
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy