Inventory

Sell item

Sell item.Sell inventory item.

post/admin/inventory/items-sell

Request

  • Base URL: https://demo.splynx.com/api/2.0
  • URL: https://demo.splynx.com/api/2.0/admin/inventory/items-sell
  • Auth: HTTP basic

Request body

customer_idnumber required

Customer ID

date_createdstring

Create date. Format: YYYY-MM-DD

date_updatedstring

Update date. Format: YYYY-MM-DD

date_tillstring

Pay till date. Format: YYYY-MM-DD

date_paymentstring

Payment date. Format: YYYY-MM-DD

statusstring

Status. Values: 'not_paid' for "Not paid", 'paid' for "Paid" and 'deleted' for "Deleted"

numberstring

Number

payment_idnumber

Payment ID.

payd_from_depositnumber

Set to 1 of invoice payd from deposit. Values: 0 or 1

create_invoicenumber

Create invoice or future items. . Values: 0 or 1. By default invoice will be created.

Example request

{
  "customer_id": 1,
  "date_created": "2016-01-01",
  "status": "not_paid",
  "number": "201601010003",
  "create_invoice": 1,
  "items": [
    {
      "item_id": 1,
      "description": "Desc of item",
      "quantity": 1,
      "price": 123,
      "period_from": "2016-01-01",
      "period_to": "2016-01-02",
      "categoryIdForTransaction": 1,
      "tax_included": true,
      "tax_id": 1
    }
  ]
}

Response

Example response

{
  "invoice": {
    "customer_id": 1,
    "date_created": "2016-01-01",
    "date_updated": "",
    "date_till": "",
    "use_transactions": "1",
    "note": "",
    "memo": "",
    "date_payment": "",
    "status": "not_paid",
    "number": "201601010003",
    "payment_id": 0,
    "type": "one_time",
    "payd_from_deposit": 0,
    "is_sent": "0",
    "items": [
      {
        "description": "Desc of item",
        "quantity": 1,
        "unit": 0,
        "price": 123,
        "tax": 0,
        "period_from": "2016-01-01",
        "period_to": "2016-01-02",
        "categoryIdForTransaction": 1,
        "sub_account_id": 0
      }
    ],
    "id": 1,
    "real_create_datetime": "2024-05-27 15:02:57",
    "total": 10,
    "due": 0,
    "added_by": "admin",
    "added_by_id": 1
  },
  "transactions": [
    {
      "type": "debit",
      "customer_id": 1,
      "quantity": 1,
      "unit": "",
      "price": 158.25,
      "tax_percent": 19,
      "remind_amount": 0,
      "date": "2016-01-01",
      "category": "1",
      "description": "Description",
      "period_from": "",
      "period_to": "",
      "service_id": null,
      "payment_id": null,
      "credit_note_id": 0,
      "invoice_id": null,
      "invoiced_by_id": null,
      "comment": "",
      "to_invoice": false,
      "service_type": "internet",
      "source": "manual",
      "tax_id": 1,
      "sub_account_id": 0,
      "id": 1,
      "total": 10
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.