openapi: 3.0.3 info: title: Distru Public Assemblies Invoices API version: v1 x-apievangelist-generated: '2026-07-18' x-apievangelist-method: generated x-apievangelist-source: https://apidocs.distru.dev description: 'The Distru Public API provides read and write access to a cannabis ERP: products, inventory, orders, invoices, purchases, companies, contacts, batches, packages, assemblies, strains, test results, locations, menus and more. Authentication uses a Bearer API key generated in the Distru app (Settings > Integrations > Distru API); keys expire one year from issue. Responses are JSON and list endpoints are paginated with page[number] and page[size] query parameters, returning a next_page URL when more pages exist. This specification was generated by API Evangelist from the published Distru API reference at https://apidocs.distru.dev — operation paths and methods are faithful to the documented surface; request/response schemas are intentionally generic where the reference does not publish a downloadable OpenAPI definition.' contact: name: Distru email: hello@distru.com url: https://www.distru.com/features/distru-api servers: - url: https://app.distru.com/public/v1 description: Production security: - bearerAuth: [] tags: - name: Invoices paths: /invoices: get: tags: - Invoices operationId: listInvoices summary: List invoices parameters: - $ref: '#/components/parameters/pageNumber' - $ref: '#/components/parameters/pageSize' responses: '200': $ref: '#/components/responses/Paged' post: tags: - Invoices operationId: createInvoice summary: Create an invoice requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Resource' responses: '200': $ref: '#/components/responses/OK' '422': $ref: '#/components/responses/Unprocessable' /invoices/{id}: get: tags: - Invoices operationId: getInvoice summary: Retrieve an invoice parameters: - name: id in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/OK' '404': $ref: '#/components/responses/NotFound' /invoices/{id}/payments: post: tags: - Invoices operationId: createInvoicePayment summary: Record a payment against an invoice parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Resource' responses: '200': $ref: '#/components/responses/OK' '422': $ref: '#/components/responses/Unprocessable' components: responses: NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Problem' OK: description: Success. content: application/json: schema: $ref: '#/components/schemas/Resource' Unprocessable: description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Problem' Paged: description: A page of results. content: application/json: schema: $ref: '#/components/schemas/Page' parameters: pageSize: name: page[size] in: query required: false schema: type: integer maximum: 500 description: Page size (max 500 for most collections). pageNumber: name: page[number] in: query required: false schema: type: integer minimum: 1 description: 1-based page number. schemas: Page: type: object properties: data: type: array items: type: object next_page: type: string nullable: true description: URL of the next page of results, or null on the last page. Resource: type: object Problem: type: object properties: error: type: string message: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: 'API key issued in the Distru app under Settings > Integrations > Distru API, sent as `Authorization: Bearer `. Keys expire one year from issue date.'