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 invoice 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: invoice paths: /accounting/{connection_id}/invoice: get: operationId: listAccountingInvoices 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 contact ID to filter by (reference to AccountingContact) in: query name: contact_id required: false schema: type: string - description: The org ID to filter by (reference to AccountingOrganization) in: query name: org_id required: false schema: type: string - in: query name: type 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: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - due_at - paid_at - refunded_at - cancelled_at - posted_at - total_amount - paid_amount - refund_amount - tax_amount - discount_amount - balance_amount - invoice_number - reference - contact_id - currency - notes - refund_reason - lineitems - status - url - payment_collection_method - type - attachments - send - organization_id - 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/AccountingInvoices' description: Successful security: - jwt: [] summary: List all invoices tags: - invoice post: operationId: createAccountingInvoice parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - due_at - paid_at - refunded_at - cancelled_at - posted_at - total_amount - paid_amount - refund_amount - tax_amount - discount_amount - balance_amount - invoice_number - reference - contact_id - currency - notes - refund_reason - lineitems - status - url - payment_collection_method - type - attachments - send - organization_id - 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 requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' description: Successful security: - jwt: [] summary: Create an invoice tags: - invoice /accounting/{connection_id}/invoice/{id}: delete: operationId: removeAccountingInvoice parameters: - description: ID of the connection in: path name: connection_id required: true schema: type: string - description: ID of the Invoice in: path name: id required: true schema: type: string responses: '200': description: Successful default: content: {} description: Successful headers: Content-Type: required: false schema: type: string security: - jwt: [] summary: Remove an invoice tags: - invoice get: operationId: getAccountingInvoice parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - due_at - paid_at - refunded_at - cancelled_at - posted_at - total_amount - paid_amount - refund_amount - tax_amount - discount_amount - balance_amount - invoice_number - reference - contact_id - currency - notes - refund_reason - lineitems - status - url - payment_collection_method - type - attachments - send - organization_id - 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 Invoice in: path name: id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' description: Successful security: - jwt: [] summary: Retrieve an invoice tags: - invoice patch: operationId: patchAccountingInvoice parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - due_at - paid_at - refunded_at - cancelled_at - posted_at - total_amount - paid_amount - refund_amount - tax_amount - discount_amount - balance_amount - invoice_number - reference - contact_id - currency - notes - refund_reason - lineitems - status - url - payment_collection_method - type - attachments - send - organization_id - 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 Invoice in: path name: id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' description: Successful security: - jwt: [] summary: Update an invoice tags: - invoice put: operationId: updateAccountingInvoice parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - due_at - paid_at - refunded_at - cancelled_at - posted_at - total_amount - paid_amount - refund_amount - tax_amount - discount_amount - balance_amount - invoice_number - reference - contact_id - currency - notes - refund_reason - lineitems - status - url - payment_collection_method - type - attachments - send - organization_id - 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 Invoice in: path name: id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingInvoice' description: Successful security: - jwt: [] summary: Update an invoice tags: - invoice components: schemas: AccountingLineitem: properties: account_id: type: string category_ids: $ref: '#/components/schemas/property_AccountingLineitem_category_ids' created_at: format: date-time type: string discount_amount: type: number id: type: string item_description: type: string item_id: type: string item_name: type: string item_sku: type: string item_variants: $ref: '#/components/schemas/property_AccountingLineitem_item_variants' locations: $ref: '#/components/schemas/property_AccountingLineitem_locations' notes: type: string refund_amount: type: number refunded_at: format: date-time type: string tax_amount: type: number taxrate_id: type: string total_amount: type: number unit_amount: type: number unit_quantity: type: number updated_at: format: date-time type: string type: object AccountingAttachment: properties: download_url: type: string id: type: string mime_type: type: string name: type: string type: object property_AccountingLineitem_item_variants: items: $ref: '#/components/schemas/AccountingReference' type: array AccountingInvoices: items: $ref: '#/components/schemas/AccountingInvoice' type: array property_AccountingLineitem_locations: items: $ref: '#/components/schemas/AccountingReference' type: array AccountingInvoice: properties: attachments: $ref: '#/components/schemas/property_AccountingInvoice_attachments' balance_amount: type: number cancelled_at: format: date-time type: string contact_id: type: string created_at: format: date-time type: string currency: type: string discount_amount: type: number due_at: format: date-time type: string id: type: string invoice_number: type: string lineitems: $ref: '#/components/schemas/property_AccountingInvoice_lineitems' notes: type: string organization_id: type: string paid_amount: type: number paid_at: format: date-time type: string payment_collection_method: enum: - send_invoice - charge_automatically type: string x-speakeasy-unknown-values: allow posted_at: format: date-time type: string raw: additionalProperties: true type: object reference: type: string refund_amount: type: number refund_reason: type: string refunded_at: format: date-time type: string send: type: boolean status: enum: - DRAFT - VOIDED - AUTHORIZED - PAID - PARTIALLY_PAID - PARTIALLY_REFUNDED - REFUNDED - SUBMITTED - DELETED - OVERDUE type: string x-speakeasy-unknown-values: allow tax_amount: type: number total_amount: type: number type: enum: - BILL - INVOICE - CREDITMEMO type: string x-speakeasy-unknown-values: allow updated_at: format: date-time type: string url: type: string type: object property_AccountingInvoice_attachments: items: $ref: '#/components/schemas/AccountingAttachment' type: array AccountingReference: properties: id: type: string name: type: string type: object property_AccountingInvoice_lineitems: items: $ref: '#/components/schemas/AccountingLineitem' type: array property_AccountingLineitem_category_ids: items: type: string type: array securitySchemes: jwt: in: header name: authorization type: apiKey externalDocs: description: API Documentation url: https://docs.unified.to