Xero Python SDK

repository·master·Indexed 41 days ago

https://github.com/xeroapi/xero-python

Official SDK providing programmatic access to Xero's suite of APIs, including Accounting, Payroll, Projects, and Files. It enables developers to build integrations with small business accounting data using Python, featuring full support for OAuth 2.0 authentication, Machine-to-Machine (M2M) custom connections, and App Store subscription management.

Tokens
376K
Snippets
653
Records
997
Agent score
51%

What's inside Xero

  1. Understand the TimesheetObject model

    master

    The TimesheetObject is a container model used in the Xero Payroll NZ API. It acts as a wrapper that can contain pagination metadata, error details (problems), or the actual Timesheet data.

    Depending on the API response, one or more of the following properties may be present:

    • pagination: Metadata for handling paginated results.
    • problem: Details regarding API errors or issues encountered.
    • timesheet: The core Timesheet data object.
  2. Create a CreateUsageRecord model

    master

    The CreateUsageRecord model is used to define a new usage record for a product. It requires a quantity and a timestamp indicating when the consumption occurred.

    Properties

    PropertyTypeDescription
    quantityintThe initial quantity for the usage record. Must be a whole number $\ge$ 0.
    timestampdatetimeThe UTC DateTime of when the product was consumed or used.
  3. Understand the PayslipObject structure

    master

    The PayslipObject is a container used in the Xero Payroll UK API to return payslip data. It is a wrapper that may contain pagination metadata, error details, or the actual payslip data.

    Available properties:

    • pagination: [Optional] Contains pagination information if the response is a list of objects.
    • problem: [Optional] Contains error details if the request encountered a problem.
    • pay_slip: [Optional] Contains the actual Payslip data object.
  4. Understand the ReimbursementObject model

    master

    The ReimbursementObject is a container model used in the Payroll NZ API. It encapsulates the actual reimbursement data along with optional pagination and error information.

    Properties

    NameTypeDescriptionNotes
    paginationPaginationPagination metadata[optional]
    problemProblemError details if the request failed[optional]
    reimbursementReimbursementThe core reimbursement data[optional]
  5. Understand the EmployeeLeaveBalances model

    master

    The EmployeeLeaveBalances model is a container used in the Xero Payroll UK API to return a collection of leave balances for employees. It includes metadata for pagination, potential error details via the problem field, and the actual list of leave balances.

    Properties

    NameTypeDescription
    paginationPagination[optional] Metadata for paginating through results.
    problemProblem[optional] Details regarding any errors encountered.
    leave_balanceslist[EmployeeLeaveBalance][optional] A list of individual EmployeeLeaveBalance objects.
  6. Understand the EmployeeObject model structure

    master

    The EmployeeObject is a wrapper model used in the Payroll NZ API. It serves as a container that can hold an Employee resource, pagination metadata, or error information if the request encountered a problem.

    Possible properties include:

    • employee: The actual Employee resource data (optional).
    • pagination: Metadata for paginated responses (optional).
    • problem: Details regarding any errors or issues encountered (optional).
  7. Understand the TrackingCategories model structure

    master

    The TrackingCategories model is a container object used in the Xero Payroll NZ API to return a list of tracking categories. It contains the following properties:

    • tracking_categories: An optional list of TrackingCategory objects.
    • pagination: An optional Pagination object containing metadata about the result set.
    • problem: An optional Problem object used for error reporting.