Billing API v1 (Current) ======================== This page contains all endpoints for the Billing API v1. Every call requires your API Key to be sent via the ``X-Reseller-Api-Key`` header. A ``401 UNAUTHORIZED`` status code will be sent back if credentials are missing. All the requests needs to have the port 9534. .. autoflask:: portal.app:get_app() :undoc-static: :blueprints: reseller_api_billing_v1 Ormuco objects types and descriptions ------------------------------------- A description of the different type of objects used in the Ormuco platform and returned by the API. **Invoice** +-------------------------------+---------+------------------------------------------------+ | Attribute | Type | Description | +-------------------------------+---------+------------------------------------------------+ | id | string | Main identifier of the invoice | +-------------------------------+---------+------------------------------------------------+ | client_id | string | Identifier of the client owner of the invoice | +-------------------------------+---------+------------------------------------------------+ | deleted | boolean | | Whether the invoice has been marked as | | | | | deleted because the owning client has been | | | | | deleted. | +-------------------------------+---------+------------------------------------------------+ | date_deleted | string | | The date of deletion (ISO format). Marked | | | | | as null if the owning client has not been | | | | | deleted. | +-------------------------------+---------+------------------------------------------------+ | processed | boolean | | Whether the invoice creation process has | | | | | been completed. | +-------------------------------+---------+------------------------------------------------+ | paid | boolean | | Whether the invoice has been paid by the | | | | | client. | +-------------------------------+---------+------------------------------------------------+ | data | object | | Contains more detailed information related | | | | | to the content of the invoice. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_period_start | string | | The starting date (ISO format) of the pay | | | | | period covered by the invoice. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_period_end | string | | The ending date (ISO format) of the pay | | | | | period covered by the invoice. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_subtotal | number | | The total of the invoice before taxes or | | | | | rebates. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_discount_percentage | number | | Show how much percentage of reduction is | | | | | applied to the invoice if a percentage | | | | | based coupon is associated with the client. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_discount | number | | The discounted amount from the invoice, if | | | | | a percentage based coupon is present. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_taxes | array | A list of applicable tax | +-------------------------------+---------+------------------------------------------------+ | | └ name | string | A short name for the t | +-------------------------------+---------+------------------------------------------------+ | | └ rate | number | The percentage the tax will app | +-------------------------------+---------+------------------------------------------------+ | | └ amount | number | | The amount of the tax after applying the | | | | | tax to the invoice. | +-------------------------------+---------+------------------------------------------------+ | | └ description | string | | A description of the tax, usually the full | | | | | name. | +-------------------------------+---------+------------------------------------------------+ | └ invoice_total | number | | The total of the invoice after taxes and | | | | | after the application of the rebate (if | | | | | any). | +-------------------------------+---------+------------------------------------------------+ | └ invoice_projects | array | | A list of projects belonging to the user at | | | | | the time of the invoice. | +-------------------------------+---------+------------------------------------------------+ | | └ id | string | An identifier for the proje | +-------------------------------+---------+------------------------------------------------+ | | └ name | string | The name of the proje | +-------------------------------+---------+------------------------------------------------+ | | └ region | string | | The name of the region the projects belongs | | | | | to, this is the region of the provider. | +-------------------------------+---------+------------------------------------------------+ | | └ total | number | | The total amount of money billed for the | | | | | project, before taxes and rebate. | +-------------------------------+---------+------------------------------------------------+ | | └ entities | array | | The resources billed for the project, | | | | | similar to a line item in an invoice. | +-------------------------------+---------+------------------------------------------------+ | | └ id | string | An identifier for the resour | +-------------------------------+---------+------------------------------------------------+ | | └ name | string | The name of the resour | +-------------------------------+---------+------------------------------------------------+ | | └ type | string | The type of the resour | +-------------------------------+---------+------------------------------------------------+ | | └ quantity | number | | The quantity of the resources, see | | | | | attribute 'unit'. | +-------------------------------+---------+------------------------------------------------+ | | └ description | string | | A short description to help identify the | | | | | resource. | +-------------------------------+---------+------------------------------------------------+ | | └ unit | string | | The unit type used in the calculation of | | | | | the cost of the resource. Example: 'hour'. | +-------------------------------+---------+------------------------------------------------+ | | └ uptime | string | | How long the resource was active during the | | | | | pay period. Organized as | | | | | days:hours:minutes:seconds. | +-------------------------------+---------+------------------------------------------------+ | | └ active | boolean | | Whether the resource was still active at | | | | | the end of the invoice period. | +-------------------------------+---------+------------------------------------------------+ | | └ rate | number | | The rate used in the calculation of the | | | | | cost of a resource. For most resources the | | | | | rate is multiplied by the quantity to know | | | | | the total. | +-------------------------------+---------+------------------------------------------------+ | | └ total | number | The total cost of the resour | +-------------------------------+---------+------------------------------------------------+