Add POS Invoice
Developing
Testing Env
https://taccounting.vodoerp.com
Testing Env
https://taccounting.vodoerp.com
POST
http://127.0.0.1:8000/api/pos/create_sales_invoice
Last modified:2025-04-27 21:07:12
Receipt Cases
1.
2.
3.
4.
to update item stock
note :must pass userToken in header get it from login request from here https://vodoerp.apidog.io/login-15235199e0
** Method** | POST |
---|
** Body Param** | description |
---|---|
customer_id | required string customer id from customer list from here https://vodoerp.apidog.io/get-customers-16043225e0 |
description | optional string receipt description |
discount_type | optional string if invoice have disount we have two type of discount 0 for percantage and 1 for exact amount |
user_id | required number id for user create invoice |
pos_id | required number pos where invoice created at it |
pos_session_id | required number pos session must exist in pos and opened where invoice created at it |
ecomm_order_id | optional number required if invoice related to ecommerce order |
cash_amount | required number if customer will pay invoice cash Default:0 |
visa_amount | required number if customer will pay invoice via network Default:0 |
customer_amount | required number if customer will pay on his account Default:0 |
item_id | required array must pass item from catlog and must exist in POS get POS Items from here https://vodoerp.apidog.io/all-inventory-item-15235789e0 |
item_price | required array catlog item price get item note:this price in tax inclusive price from here https://vodoerp.apidog.io/one-product-15235703e0 |
item_qty | required array item quantitiy |
item_discount | optional array item discount amount required if item have discount |
employee_id | optional array if item type service must pass employee id who provide this service |
item_att_id | optional array if item have specific attributes from ecommerce like color or size |
HEADERS | description |
--- | --- |
Accept-Language | required string ar,en |
secure-business-key | required string ex: 4765066450c0bd66325.48403130 from accounts system base on business |
apikey | required string ex: efe2db322a53 for make reuest more secure must add apikey in header |
platform-key | required string ex: 1234567 use this value as test |
platform | required string ex: web use this value as test |
userToken | required string get user token from login request from accounts system from here https://vodoerp.apidog.io/login-15235199e0 |
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:8000/api/pos/create_sales_invoice' \
--header 'Accept-Language: en' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--header 'apikey: efe2db322a53' \
--header 'platform-key: 1234567' \
--header 'platform: web' \
--header 'userToken;' \
--form 'customer_id=""' \
--form 'discount_type=""' \
--form 'description=""' \
--form 'user_id=""' \
--form 'pos_id=""' \
--form 'pos_session_id=""' \
--form 'ecomm_order_id=""' \
--form 'cash_amount=""' \
--form 'visa_amount=""' \
--form 'customer_amount=""' \
--form 'item_id[]=""' \
--form 'item_price[]=""' \
--form 'item_qty[]=""' \
--form 'item_discount[]=""' \
--form 'employee_id[]=""' \
--form 'item_att_id[]=""'
Response Response Example
{
"status": true,
"message": "invoice created",
"data": {
"uuid": "375d12bb-b60f-4ec0-aac1-f3cf1b56702c",
"user_id": 68,
"branch_id": 0,
"currency_id": 126,
"business_id": 259,
"reference": 488,
"order_number": null,
"quote_number": "",
"created_date": "2025-04-22",
"ecomm_order_id": "",
"due_date": null,
"description": "invoice from POS",
"billing_address": "",
"rounding": "0",
"tax_inclusive": "0",
"discount": null,
"custom_title": "",
"deduct_type": "",
"deduct_value": "",
"early_discount_type": "",
"early_discount_value": "",
"payment_fees": "",
"early_discount_days": "",
"hide_due_date": "0",
"total_amount_word": "0",
"invoice_status_days": "",
"total": 100,
"total_without_deduct": 100,
"due_balalnce": 100,
"rounding_value": 0,
"note": "",
"bank_id": "",
"created_by": "556",
"amount_total": 100,
"tax_amount_total": 0,
"qty_due_balance": 1,
"rate_value": 0,
"pos_session_id": "530",
"representative_id": "556",
"updated_at": "2025-04-22T15:30:44.000000Z",
"created_at": "2025-04-22T15:30:42.000000Z",
"id": 708
}
}
Request
Header Params
Accept-Language
stringÂ
optional
Example:
en
secure-business-key
stringÂ
optional
Example:
4765066450c0bd66325.48403130
apikey
stringÂ
optional
Example:
efe2db322a53
platform-key
stringÂ
optional
Example:
1234567
platform
stringÂ
optional
Example:
web
userToken
stringÂ
optional
Body Params multipart/form-data
customer_id
stringÂ
optional
discount_type
stringÂ
optional
description
stringÂ
optional
user_id
integerÂ
optional
pos_id
integerÂ
optional
pos_session_id
integerÂ
optional
ecomm_order_id
integerÂ
optional
cash_amount
integerÂ
optional
visa_amount
numberÂ
optional
customer_amount
numberÂ
optional
item_id[]
array[string]
optional
item_price[]
array[string]
optional
item_qty[]
array[string]
optional
item_discount[]
array[string]
optional
employee_id[]
array[string]
optional
item_att_id[]
array[string]
optional