openapi: 3.0.0 info: contact: email: hello@unified.to url: https://unified.to/contact description: One API to Rule Them All termsOfService: https://unified.to/tos title: Unified.to account profitloss API version: '1.0' servers: - description: North American data region url: https://api.unified.to - description: European data region url: https://api-eu.unified.to - description: Australian data region url: https://api-au.unified.to security: - jwt: [] tags: - name: profitloss paths: /accounting/{connection_id}/profitloss: get: operationId: listAccountingProfitlosses parameters: - in: query name: limit required: false schema: type: number - in: query name: offset required: false schema: type: number - description: Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) in: query name: updated_gte required: false schema: type: string - in: query name: sort required: false schema: type: string - in: query name: order required: false schema: type: string - description: Query string to search. eg. email address or name in: query name: query required: false schema: type: string - description: The start date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) in: query name: start_gte required: false schema: type: string - description: The end date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) in: query name: end_lt required: false schema: type: string - description: The category ID to filter by (reference to AccountingCategory) in: query name: category_id required: false schema: type: string - description: The contact ID to filter by (reference to AccountingContact) in: query name: contact_id required: false schema: type: string - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - category_ids - start_at - end_at - name - currency - income - expenses - cost_of_goods_sold - gross_profit_amount - net_profit_amount - income_total_amount - net_income_amount - expenses_total_amount - cost_of_goods_sold_total_amount - income_sections - expenses_sections - cost_of_goods_sold_sections - raw type: string type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingProfitlosses' description: Successful security: - jwt: [] summary: List all profitlosses tags: - profitloss /accounting/{connection_id}/profitloss/{id}: get: operationId: getAccountingProfitloss parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - category_ids - start_at - end_at - name - currency - income - expenses - cost_of_goods_sold - gross_profit_amount - net_profit_amount - income_total_amount - net_income_amount - expenses_total_amount - cost_of_goods_sold_total_amount - income_sections - expenses_sections - cost_of_goods_sold_sections - raw type: string type: array type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string - description: ID of the Profitloss in: path name: id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingProfitloss' description: Successful security: - jwt: [] summary: Retrieve a profitloss tags: - profitloss components: schemas: property_AccountingProfitloss_expenses: description: '@deprecated – use expenses_sections instead' items: $ref: '#/components/schemas/AccountingProfitlossCategory' type: array AccountingProfitlossAccount: properties: account_id: type: string account_name: type: string total_amount: type: number transaction_ids: $ref: '#/components/schemas/property_AccountingProfitlossAccount_transaction_ids' type: object property_AccountingProfitlossSubcategory_transaction_ids: items: type: string type: array property_AccountingProfitloss_income_sections: items: $ref: '#/components/schemas/AccountingProfitlossSection' type: array AccountingProfitlosses: items: $ref: '#/components/schemas/AccountingProfitloss' type: array property_AccountingProfitlossSection_accounts: items: $ref: '#/components/schemas/AccountingProfitlossAccount' type: array AccountingProfitlossCategory: description: '@deprecated' properties: amount: type: number name: type: string sub_items: $ref: '#/components/schemas/property_AccountingProfitlossCategory_sub_items' type: object AccountingProfitlossSubcategory: description: '@deprecated' properties: amount: type: number name: type: string transaction_ids: $ref: '#/components/schemas/property_AccountingProfitlossSubcategory_transaction_ids' type: object property_AccountingProfitlossCategory_sub_items: items: $ref: '#/components/schemas/AccountingProfitlossSubcategory' type: array AccountingProfitloss: properties: category_ids: $ref: '#/components/schemas/property_AccountingProfitloss_category_ids' cost_of_goods_sold: $ref: '#/components/schemas/property_AccountingProfitloss_cost_of_goods_sold' cost_of_goods_sold_sections: $ref: '#/components/schemas/property_AccountingProfitloss_cost_of_goods_sold_sections' cost_of_goods_sold_total_amount: type: number created_at: format: date-time type: string currency: type: string end_at: format: date-time type: string expenses: $ref: '#/components/schemas/property_AccountingProfitloss_expenses' expenses_sections: $ref: '#/components/schemas/property_AccountingProfitloss_expenses_sections' expenses_total_amount: type: number gross_profit_amount: type: number id: type: string income: $ref: '#/components/schemas/property_AccountingProfitloss_income' income_sections: $ref: '#/components/schemas/property_AccountingProfitloss_income_sections' income_total_amount: type: number name: type: string net_income_amount: type: number net_profit_amount: type: number raw: additionalProperties: true type: object start_at: format: date-time type: string updated_at: format: date-time type: string type: object AccountingProfitlossSection: properties: accounts: $ref: '#/components/schemas/property_AccountingProfitlossSection_accounts' section_name: type: string section_type: type: string total_amount: type: number type: object property_AccountingProfitloss_category_ids: items: type: string type: array property_AccountingProfitloss_cost_of_goods_sold_sections: items: $ref: '#/components/schemas/AccountingProfitlossSection' type: array property_AccountingProfitlossAccount_transaction_ids: items: type: string type: array property_AccountingProfitloss_cost_of_goods_sold: description: '@deprecated – use cost_of_goods_sold_sections instead' items: $ref: '#/components/schemas/AccountingProfitlossCategory' type: array property_AccountingProfitloss_expenses_sections: items: $ref: '#/components/schemas/AccountingProfitlossSection' type: array property_AccountingProfitloss_income: description: '@deprecated – use income_sections instead' items: $ref: '#/components/schemas/AccountingProfitlossCategory' type: array securitySchemes: jwt: in: header name: authorization type: apiKey externalDocs: description: API Documentation url: https://docs.unified.to