> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erp.arukz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create refund

> Create a new vendor refund



## OpenAPI

````yaml /api-reference/openapi.json post /admin/api/v1/accounts/refunds
openapi: 3.0.3
info:
  title: ARUKZ ERP API
  version: v1
  description: >-
    The REST API of ARUKZ ERP: sales, purchases, inventory, products, partners,
    accounts, projects and reference data. Every call acts as the user whose
    token it carries and sees only that user's company.
servers:
  - url: https://erp.arukz.com
    description: ARUKZ ERP (hosted)
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Sign in for a token and sign out.
  - name: Sales
    description: Quotations, sales orders and their lines, deliveries and invoices.
  - name: Purchases
    description: Purchase orders, receipts, bills, agreements and vendor price lists.
  - name: Inventory
    description: >-
      Warehouses, locations, lots, stock quantities, receipts, deliveries,
      transfers and scrap.
  - name: Products
    description: 'The product catalogue: categories, attributes, variants and packaging.'
  - name: Partners
    description: Customers, vendors, contacts, addresses and bank accounts.
  - name: Accounts
    description: >-
      Invoices, bills, credit notes, refunds, taxes, journals and the chart of
      accounts.
  - name: Projects
    description: Projects, tasks, stages and milestones.
  - name: Reference data
    description: Currencies and rates, banks, countries, states and units of measure.
paths:
  /admin/api/v1/accounts/refunds:
    post:
      tags:
        - Accounts
      summary: Create refund
      description: Create a new vendor refund
      operationId: accounts-refunds-create-refund
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                partner_id:
                  type: integer
                  description: >-
                    The vendor/partner ID. The `id` of an existing record in the
                    partners_partners table.
                  example: 1
                currency_id:
                  type: integer
                  description: >-
                    The currency ID. The `id` of an existing record in the
                    currencies table.
                  example: 1
                journal_id:
                  type: integer
                  description: >-
                    The journal ID for bills. The `id` of an existing record in
                    the accounts_journals table.
                  example: 1
                invoice_date:
                  type: string
                  description: The invoice date. Must be a valid date.
                  example: '2026-02-16'
                invoice_date_due:
                  type: string
                  description: >-
                    The invoice due date. Cannot be provided if
                    invoice_payment_term_id is specified. Must be a valid date.
                  nullable: true
                  example: '2026-03-16'
                invoice_payment_term_id:
                  type: integer
                  description: >-
                    The payment term ID. Cannot be provided if invoice_date_due
                    is specified. The `id` of an existing record in the
                    accounts_payment_terms table.
                  nullable: true
                  example: 1
                fiscal_position_id:
                  type: integer
                  description: >-
                    The fiscal position ID. The `id` of an existing record in
                    the accounts_fiscal_positions table.
                  nullable: true
                  example: 1
                invoice_user_id:
                  type: integer
                  description: >-
                    The salesperson/user ID. The `id` of an existing record in
                    the users table.
                  nullable: true
                  example: 1
                partner_bank_id:
                  type: integer
                  description: >-
                    The recipient bank account ID. The `id` of an existing
                    record in the partners_bank_accounts table.
                  nullable: true
                  example: 1
                invoice_incoterm_id:
                  type: integer
                  description: >-
                    The incoterm ID. The `id` of an existing record in the
                    accounts_incoterms table.
                  nullable: true
                  example: 1
                invoice_cash_rounding_id:
                  type: integer
                  description: >-
                    The cash rounding ID. The `id` of an existing record in the
                    accounts_cash_roundings table.
                  nullable: true
                  example: 1
                preferred_payment_method_line_id:
                  type: integer
                  description: >-
                    The preferred payment method line ID. The `id` of an
                    existing record in the accounts_payment_method_lines table.
                  nullable: true
                  example: 1
                reference:
                  type: string
                  description: >-
                    The vendor bill reference. Must not be greater than 255
                    characters.
                  nullable: true
                  example: INV-2026-001
                payment_reference:
                  type: string
                  description: >-
                    The payment reference. Must not be greater than 255
                    characters.
                  nullable: true
                  example: PAY-001
                narration:
                  type: string
                  description: Terms and conditions / Internal notes.
                  nullable: true
                  example: Additional information
                incoterm_location:
                  type: string
                  description: >-
                    The incoterm location. Must not be greater than 255
                    characters.
                  nullable: true
                  example: New York
                delivery_date:
                  type: string
                  description: The delivery date. Must be a valid date.
                  nullable: true
                  example: '2026-02-20'
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      product_id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          products_products table.
                        example: 16
                      quantity:
                        type: number
                        description: Must be at least 0.0001.
                        example: 39
                      uom_id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the unit_of_measures
                          table.
                        example: 16
                      price_unit:
                        type: number
                        example: 4326.41688
                      discount:
                        type: number
                        description: Must be at least 0. Must not be greater than 100.
                        nullable: true
                        example: 17
                      taxes:
                        type: array
                        items:
                          type: integer
                        description: >-
                          The `id` of an existing record in the accounts_taxes
                          table.
                        example:
                          - 16
                      id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_account_move_lines table.
                        nullable: true
                        example: 16
                    required:
                      - price_unit
                      - product_id
                      - quantity
                      - uom_id
                  description: >-
                    Array of invoice line items with product details,
                    quantities, prices, and taxes. Must have at least 1 items.
                  example:
                    - product_id: 1
                      quantity: 2
                      uom_id: 1
                      price_unit: 100
                      discount: 10
                      taxes:
                        - 1
                        - 2
                date:
                  type: string
                  description: The accounting date. Must be a valid date.
                  nullable: true
                  example: '2026-02-17'
              required:
                - currency_id
                - invoice_date
                - invoice_lines
                - journal_id
                - partner_id
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                data:
                  id: 1
                  sort: 1
                  journal_id: 2
                  company_id: 1
                  campaign_id: null
                  tax_cash_basis_origin_move_id: null
                  auto_post_origin_id: null
                  origin_payment_id: null
                  secure_sequence_number: null
                  invoice_payment_term_id: null
                  partner_id: 41
                  commercial_partner_id: 41
                  partner_shipping_id: 41
                  partner_bank_id: null
                  fiscal_position_id: null
                  currency_id: 1
                  reversed_entry_id: null
                  invoice_user_id: null
                  invoice_incoterm_id: null
                  invoice_cash_rounding_id: null
                  preferred_payment_method_line_id: null
                  creator_id: 1
                  sequence_prefix: BILL/2026
                  access_token: null
                  name: BILL/2026/1
                  reference: null
                  state: draft
                  move_type: in_invoice
                  auto_post: 0
                  inalterable_hash: null
                  payment_reference: null
                  qr_code_method: null
                  payment_state: not_paid
                  invoice_source_email: null
                  invoice_partner_display_name: Eden Hebert -Supplier
                  invoice_origin: PO/1
                  incoterm_location: null
                  date: '2026-01-08T00:00:00.000000Z'
                  auto_post_until: null
                  invoice_date: null
                  invoice_date_due: null
                  delivery_date: null
                  sending_data: null
                  narration: null
                  invoice_currency_rate: '1.0000'
                  amount_untaxed: '35000.0000'
                  amount_tax: '0.0000'
                  amount_total: '35000.0000'
                  amount_residual: '35000.0000'
                  amount_untaxed_signed: '-35000.0000'
                  amount_untaxed_in_currency_signed: '-35000.0000'
                  amount_tax_signed: '0.0000'
                  amount_total_signed: '-35000.0000'
                  amount_total_in_currency_signed: '-35000.0000'
                  amount_residual_signed: '-35000.0000'
                  quick_edit_total_amount: null
                  is_storno: 0
                  always_tax_exigible: 0
                  checked: false
                  posted_before: 0
                  made_sequence_gap: 0
                  is_manually_modified: 0
                  is_move_sent: 0
                  source_id: null
                  medium_id: null
                  created_at: '2026-01-08T12:56:46.000000Z'
                  updated_at: '2026-01-08T12:56:47.000000Z'
                message: Refund created successfully.
        '401':
          description: Unauthenticated
          content:
            application/json:
              example:
                message: Unauthenticated.
        '422':
          description: Validation error
          content:
            application/json:
              example:
                message: The given data was invalid.
                errors:
                  partner_id:
                    - The partner id field is required.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API token from [Sign in](/api-reference/authentication), sent as
        `Authorization: Bearer <token>`. Tokens last 30 days.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.