Table of Contents
List sells #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/sell"
);
let params = {
"location_id": "deserunt",
"contact_id": "ex",
"payment_status": "paid",
"start_date": "2018-06-25",
"end_date": "2018-06-25",
"user_id": "voluptatem",
"service_staff_id": "dolores",
"shipping_status": "ordered",
"only_subscriptions": "unde",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"business_id": 1,
"location_id": 1,
"res_table_id": null,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "paid",
"adjustment_type": null,
"contact_id": 4,
"customer_group_id": null,
"invoice_no": "AS0001",
"ref_no": "",
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "2018-04-10 13:23:21",
"total_before_tax": "770.0000",
"tax_id": null,
"tax_amount": "0.0000",
"discount_type": "percentage",
"discount_amount": "0.0000",
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": null,
"shipping_address": null,
"shipping_status": null,
"delivered_to": null,
"shipping_charges": "0.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": "770.0000",
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": null,
"opening_stock_product_id": null,
"created_by": 1,
"import_batch": null,
"import_time": null,
"types_of_service_id": null,
"packing_charge": null,
"packing_charge_type": null,
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_updates_email": 0,
"repair_updates_sms": 0,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": null,
"recur_interval_type": null,
"recur_repetitions": null,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": null,
"created_at": "2018-01-06 07:06:11",
"updated_at": "2018-01-06 07:06:11",
"sell_lines": [
{
"id": 1,
"transaction_id": 6,
"product_id": 2,
"variation_id": 3,
"quantity": 10,
"mfg_waste_percent": "0.0000",
"quantity_returned": "0.0000",
"unit_price_before_discount": "70.0000",
"unit_price": "70.0000",
"line_discount_type": null,
"line_discount_amount": "0.0000",
"unit_price_inc_tax": "77.0000",
"item_tax": "7.0000",
"tax_id": 1,
"discount_id": null,
"lot_no_line_id": null,
"sell_line_note": null,
"res_service_staff_id": null,
"res_line_order_status": null,
"woocommerce_line_items_id": null,
"parent_sell_line_id": null,
"children_type": "",
"sub_unit_id": null,
"created_at": "2018-01-06 07:06:11",
"updated_at": "2018-01-06 07:06:11"
}
],
"payment_lines": [
{
"id": 1,
"transaction_id": 6,
"business_id": null,
"is_return": 0,
"amount": "770.0000",
"method": "cash",
"transaction_no": null,
"card_transaction_number": null,
"card_number": null,
"card_type": "visa",
"card_holder_name": null,
"card_month": null,
"card_year": null,
"card_security": null,
"cheque_number": null,
"bank_account_number": null,
"paid_on": "2018-01-09 17:30:35",
"created_by": 1,
"payment_for": null,
"parent_id": null,
"note": null,
"document": null,
"payment_ref_no": null,
"account_id": null,
"created_at": "2018-01-06 01:36:11",
"updated_at": "2018-01-06 01:36:11"
}
]
}
],
"links": {
"first": "http:\/\/local.pos.com\/connector\/api\/sell?page=1",
"last": "http:\/\/local.pos.com\/connector\/api\/sell?page=6",
"prev": null,
"next": "http:\/\/local.pos.com\/connector\/api\/sell?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"path": "http:\/\/local.pos.com\/connector\/api\/sell",
"per_page": 10,
"to": 10
}
}
HTTP Request #
GET connector/api/sell
Query Parameters #
| Parameter | Status | Description |
|---|---|---|
location_id |
optional | id of the location |
contact_id |
optional | id of the customer |
payment_status |
optional | payment status |
start_date |
optional | format:Y-m-d |
end_date |
optional | format:Y-m-d |
user_id |
optional | id of the user who created the sale |
service_staff_id |
optional | id of the service staff assigned with the sale |
shipping_status |
optional | Shipping Status of the sale (‘ordered’, ‘packed’, ‘shipped’, ‘delivered’, ‘cancelled’) |
only_subscriptions |
optional | Filter only subcription invoices (1, 0) |
per_page |
optional | Total records per page. default: 10, Set -1 for no pagination |
Create sell #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/sell"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"sells": [
{
"location_id": 15,
"contact_id": 7,
"transaction_date": "2020-07-22 15:48:29",
"invoice_no": "quaerat",
"status": "final",
"is_quotation": true,
"tax_rate_id": 4,
"discount_amount": 10,
"discount_type": "fixed",
"sale_note": "recusandae",
"staff_note": "nulla",
"commission_agent": 5,
"shipping_details": "Express Delivery",
"shipping_address": "laboriosam",
"shipping_status": "ordered",
"delivered_to": "'Mr robin'",
"shipping_charges": 10,
"packing_charge": 10,
"exchange_rate": 1,
"selling_price_group_id": 5,
"pay_term_number": 3,
"pay_term_type": "months",
"is_recurring": 0,
"recur_interval": 3,
"recur_interval_type": "months",
"subscription_repeat_on": 15,
"subscription_no": "nihil",
"recur_repetitions": 20,
"rp_redeemed": 1,
"rp_redeemed_amount": 13.5,
"types_of_service_id": 13,
"service_custom_field_1": "quia",
"service_custom_field_2": "ullam",
"service_custom_field_3": "distinctio",
"service_custom_field_4": "id",
"round_off_amount": 639.2552,
"table_id": 1,
"service_staff_id": 1,
"change_return": 0,
"products": [
{
"product_id": 17,
"variation_id": 58,
"quantity": 1,
"unit_price": 437.5,
"tax_rate_id": 0,
"discount_amount": 0,
"discount_type": "percentage",
"sub_unit_id": 11,
"note": "consectetur"
}
],
"payments": [
{
"amount": 453.13,
"method": "cash",
"account_id": 2,
"card_number": "rerum",
"card_holder_name": "molestias",
"card_transaction_number": "est",
"card_type": "explicabo",
"card_month": "earum",
"card_year": "in",
"card_security": "corrupti",
"transaction_no_1": "provident",
"transaction_no_2": "veritatis",
"transaction_no_3": "dolore",
"bank_account_number": "suscipit",
"note": "doloremque",
"cheque_number": "voluptate"
}
]
}
]
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"business_id": 1,
"location_id": 1,
"res_table_id": null,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "paid",
"adjustment_type": null,
"contact_id": 4,
"customer_group_id": null,
"invoice_no": "AS0001",
"ref_no": "",
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "2018-04-10 13:23:21",
"total_before_tax": "770.0000",
"tax_id": null,
"tax_amount": "0.0000",
"discount_type": "percentage",
"discount_amount": "0.0000",
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": null,
"shipping_address": null,
"shipping_status": null,
"delivered_to": null,
"shipping_charges": "0.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": "770.0000",
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": null,
"opening_stock_product_id": null,
"created_by": 1,
"import_batch": null,
"import_time": null,
"types_of_service_id": null,
"packing_charge": null,
"packing_charge_type": null,
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_updates_email": 0,
"repair_updates_sms": 0,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": null,
"recur_interval_type": null,
"recur_repetitions": null,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": null,
"created_at": "2018-01-06 07:06:11",
"updated_at": "2018-01-06 07:06:11",
"sell_lines": [
{
"id": 1,
"transaction_id": 6,
"product_id": 2,
"variation_id": 3,
"quantity": 10,
"mfg_waste_percent": "0.0000",
"quantity_returned": "0.0000",
"unit_price_before_discount": "70.0000",
"unit_price": "70.0000",
"line_discount_type": null,
"line_discount_amount": "0.0000",
"unit_price_inc_tax": "77.0000",
"item_tax": "7.0000",
"tax_id": 1,
"discount_id": null,
"lot_no_line_id": null,
"sell_line_note": null,
"res_service_staff_id": null,
"res_line_order_status": null,
"woocommerce_line_items_id": null,
"parent_sell_line_id": null,
"children_type": "",
"sub_unit_id": null,
"created_at": "2018-01-06 07:06:11",
"updated_at": "2018-01-06 07:06:11"
}
],
"payment_lines": [
{
"id": 1,
"transaction_id": 6,
"business_id": null,
"is_return": 0,
"amount": "770.0000",
"method": "cash",
"transaction_no": null,
"card_transaction_number": null,
"card_number": null,
"card_type": "visa",
"card_holder_name": null,
"card_month": null,
"card_year": null,
"card_security": null,
"cheque_number": null,
"bank_account_number": null,
"paid_on": "2018-01-09 17:30:35",
"created_by": 1,
"payment_for": null,
"parent_id": null,
"note": null,
"document": null,
"payment_ref_no": null,
"account_id": null,
"created_at": "2018-01-06 01:36:11",
"updated_at": "2018-01-06 01:36:11"
}
]
}
]
}
HTTP Request #
POST connector/api/sell
Body Parameters #
| Parameter | Type | Status | Description |
|---|---|---|---|
sells.*.location_id |
integer | required | id of the business location |
sells.*.contact_id |
integer | required | id of the customer |
sells.*.transaction_date |
string | optional | transaction date format:Y-m-d H:i:s, |
sells.*.invoice_no |
string | optional | Invoice number |
sells.*.status |
string | optional | sale status (final, draft) |
sells.*.is_quotation |
boolean | optional | Is sell quotation (0, 1), If 1 status should be draft |
sells.*.tax_rate_id |
integer | optional | id of the tax rate applicable to the sale |
sells.*.discount_amount |
float | optional | discount amount applicable to the sale |
sells.*.discount_type |
string | optional | type of the discount amount (fixed, percentage) |
sells.*.sale_note |
string | optional | |
sells.*.staff_note |
string | optional | |
sells.*.commission_agent |
integer | optional | commission agent id |
sells.*.shipping_details |
string | optional | shipping details |
sells.*.shipping_address |
string | optional | shipping address |
sells.*.shipping_status |
string | optional | (‘ordered’, ‘packed’, ‘shipped’, ‘delivered’, ‘cancelled’) |
sells.*.delivered_to |
string | optional | Name of the person recieved the consignment |
sells.*.shipping_charges |
float | optional | shipping amount |
sells.*.packing_charge |
float | optional | packing charge |
sells.*.exchange_rate |
float | optional | exchange rate for the currency used |
sells.*.selling_price_group_id |
integer | optional | id of the selling price group |
sells.*.pay_term_number |
integer | optional | pay term value |
sells.*.pay_term_type |
string | optional | type of the pay term value (‘days’, ‘months’) |
sells.*.is_recurring |
integer | optional | whether the invoice is recurring (0, 1) |
sells.*.recur_interval |
integer | optional | value of the interval invoice will be regenerated |
sells.*.recur_interval_type |
string | optional | type of the recur interval (‘days’, ‘months’, ‘years’) |
sells.*.subscription_repeat_on |
integer | optional | day of the month on which invoice will be generated if recur interval type is months (1-30) |
sells.*.subscription_no |
string | optional | subscription number |
sells.*.recur_repetitions |
integer | optional | total number of invoices to be generated |
sells.*.rp_redeemed |
integer | optional | reward points redeemed |
sells.*.rp_redeemed_amount |
float | optional | reward point redeemed amount after conversion |
sells.*.types_of_service_id |
integer | optional | types of service id |
sells.*.service_custom_field_1 |
string | optional | types of service custom field 1 |
sells.*.service_custom_field_2 |
string | optional | types of service custom field 2 |
sells.*.service_custom_field_3 |
string | optional | types of service custom field 3 |
sells.*.service_custom_field_4 |
string | optional | types of service custom field 4 |
sells.*.round_off_amount |
float | optional | round off amount on total payable |
sells.*.table_id |
integer | optional | id of the table |
sells.*.service_staff_id |
integer | optional | id of the service staff assigned to the sale |
sells.*.change_return |
float | optional | Excess paid amount |
sells.*.products |
array | required | array of the products for the sale |
sells.*.payments |
array | optional | payment lines for the sale |
sells.*.products.*.product_id |
integer | required | product id |
sells.*.products.*.variation_id |
integer | required | variation id |
sells.*.products.*.quantity |
float | required | quantity |
sells.*.products.*.unit_price |
float | optional | unit selling price |
sells.*.products.*.tax_rate_id |
integer | optional | tax rate id applicable on the product |
sells.*.products.*.discount_amount |
float | optional | discount amount applicable on the product |
sells.*.products.*.discount_type |
string | optional | type of discount amount (‘fixed’, ‘percentage’) |
sells.*.products.*.sub_unit_id |
integer | optional | sub unit id |
sells.*.products.*.note |
string | optional | note for the product |
sells.*.payments.*.amount |
float | required | amount of the payment |
sells.*.payments.*.method |
string | optional | payment methods (‘cash’, ‘card’, ‘cheque’, ‘bank_transfer’, ‘other’, ‘custom_pay_1’, ‘custom_pay_2’, ‘custom_pay_3’) |
sells.*.payments.*.account_id |
integer | optional | account id |
sells.*.payments.*.card_number |
string | optional | |
sells.*.payments.*.card_holder_name |
string | optional | |
sells.*.payments.*.card_transaction_number |
string | optional | |
sells.*.payments.*.card_type |
string | optional | |
sells.*.payments.*.card_month |
string | optional | |
sells.*.payments.*.card_year |
string | optional | |
sells.*.payments.*.card_security |
string | optional | |
sells.*.payments.*.transaction_no_1 |
string | optional | |
sells.*.payments.*.transaction_no_2 |
string | optional | |
sells.*.payments.*.transaction_no_3 |
string | optional | |
sells.*.payments.*.bank_account_number |
string | optional | |
sells.*.payments.*.note |
string | optional | payment note |
sells.*.payments.*.cheque_number |
string | optional |
Get the specified sell #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/sell/55"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 55,
"business_id": 1,
"location_id": 1,
"res_table_id": 5,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "paid",
"adjustment_type": null,
"contact_id": 1,
"customer_group_id": null,
"invoice_no": "AS0007",
"ref_no": "",
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "2020-06-04 23:29:36",
"total_before_tax": "437.5000",
"tax_id": 1,
"tax_amount": "39.3750",
"discount_type": "percentage",
"discount_amount": "10.0000",
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": "Express Delivery",
"shipping_address": null,
"shipping_status": "ordered",
"delivered_to": "Mr Robin",
"shipping_charges": "10.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": "453.1300",
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": null,
"opening_stock_product_id": null,
"created_by": 9,
"import_batch": null,
"import_time": null,
"types_of_service_id": 1,
"packing_charge": "10.0000",
"packing_charge_type": "fixed",
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_updates_email": 0,
"repair_updates_sms": 0,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": null,
"recur_interval_type": "days",
"recur_repetitions": 0,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": 0,
"created_at": "2020-06-04 23:29:36",
"updated_at": "2020-06-04 23:29:36",
"sell_lines": [
{
"id": 38,
"transaction_id": 55,
"product_id": 17,
"variation_id": 58,
"quantity": 1,
"mfg_waste_percent": "0.0000",
"quantity_returned": "0.0000",
"unit_price_before_discount": "437.5000",
"unit_price": "437.5000",
"line_discount_type": "fixed",
"line_discount_amount": "0.0000",
"unit_price_inc_tax": "437.5000",
"item_tax": "0.0000",
"tax_id": null,
"discount_id": null,
"lot_no_line_id": null,
"sell_line_note": "",
"res_service_staff_id": null,
"res_line_order_status": null,
"woocommerce_line_items_id": null,
"parent_sell_line_id": null,
"children_type": "",
"sub_unit_id": null,
"created_at": "2020-06-04 23:29:36",
"updated_at": "2020-06-04 23:29:36"
}
],
"payment_lines": [
{
"id": 37,
"transaction_id": 55,
"business_id": 1,
"is_return": 0,
"amount": "453.1300",
"method": "cash",
"transaction_no": null,
"card_transaction_number": null,
"card_number": null,
"card_type": "credit",
"card_holder_name": null,
"card_month": null,
"card_year": null,
"card_security": null,
"cheque_number": null,
"bank_account_number": null,
"paid_on": "2020-06-04 23:29:36",
"created_by": 9,
"payment_for": 1,
"parent_id": null,
"note": null,
"document": null,
"payment_ref_no": "SP2020\/0002",
"account_id": null,
"created_at": "2020-06-04 23:29:36",
"updated_at": "2020-06-04 23:29:36"
}
]
}
]
}
HTTP Request #
GET connector/api/sell/{sell}
URL Parameters #
| Parameter | Status | Description |
|---|---|---|
sell |
required | comma separated ids of the sells |
Update sell #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/sell/6"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"contact_id": 13,
"transaction_date": "2020-5-7 15:20:22",
"status": "final",
"is_quotation": true,
"tax_rate_id": 9,
"discount_amount": 10,
"discount_type": "fixed",
"sale_note": "impedit",
"staff_note": "quia",
"commission_agent": 17,
"shipping_details": "Express Delivery",
"shipping_address": "cum",
"shipping_status": "ordered",
"delivered_to": "Mr Robin",
"shipping_charges": 10,
"packing_charge": 10,
"exchange_rate": 1,
"selling_price_group_id": 7,
"pay_term_number": 3,
"pay_term_type": "months",
"is_recurring": 0,
"recur_interval": 9,
"recur_interval_type": "days",
"subscription_repeat_on": 7,
"subscription_no": "et",
"recur_repetitions": 13,
"rp_redeemed": 13,
"rp_redeemed_amount": 13.5,
"types_of_service_id": 5,
"service_custom_field_1": "reprehenderit",
"service_custom_field_2": "nobis",
"service_custom_field_3": "distinctio",
"service_custom_field_4": "nihil",
"round_off_amount": 93870.13096,
"table_id": 11,
"service_staff_id": 16,
"change_return": 0,
"change_return_id": 8,
"products": [
{
"sell_line_id": 8,
"product_id": 17,
"variation_id": 58,
"quantity": 1,
"unit_price": 437.5,
"tax_rate_id": 11,
"discount_amount": 0,
"discount_type": "percentage",
"sub_unit_id": 15,
"note": "doloremque"
}
],
"payments": [
{
"payment_id": 18,
"amount": 453.13,
"method": "cash",
"account_id": 19,
"card_number": "vitae",
"card_holder_name": "ex",
"card_transaction_number": "et",
"card_type": "aut",
"card_month": "et",
"card_year": "cupiditate",
"card_security": "odit",
"transaction_no_1": "iste",
"transaction_no_2": "eos",
"transaction_no_3": "tempore",
"note": "alias",
"cheque_number": "corporis",
"bank_account_number": "quasi"
}
]
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": 91,
"business_id": 1,
"location_id": 1,
"res_table_id": null,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "paid",
"adjustment_type": null,
"contact_id": 1,
"customer_group_id": 1,
"invoice_no": "AS0020",
"ref_no": "",
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "25-09-2020 15:22",
"total_before_tax": 962.5,
"tax_id": null,
"tax_amount": 0,
"discount_type": "fixed",
"discount_amount": "19.5000",
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": null,
"shipping_address": null,
"shipping_status": null,
"delivered_to": null,
"shipping_charges": "0.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": 943,
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": null,
"opening_stock_product_id": null,
"created_by": 9,
"import_batch": null,
"import_time": null,
"types_of_service_id": null,
"packing_charge": "0.0000",
"packing_charge_type": null,
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_production_cost_type": "percentage",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_job_sheet_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"repair_updates_notif": 0,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": 1,
"recur_interval_type": "days",
"recur_repetitions": 0,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": 0,
"created_at": "2020-09-23 20:16:19",
"updated_at": "2020-09-25 17:57:08",
"payment_lines": [
{
"id": 55,
"transaction_id": 91,
"business_id": 1,
"is_return": 0,
"amount": "461.7500",
"method": "cash",
"transaction_no": null,
"card_transaction_number": null,
"card_number": null,
"card_type": "credit",
"card_holder_name": null,
"card_month": null,
"card_year": null,
"card_security": null,
"cheque_number": null,
"bank_account_number": null,
"paid_on": "2020-09-23 20:16:19",
"created_by": 9,
"is_advance": 0,
"payment_for": 1,
"parent_id": null,
"note": null,
"document": null,
"payment_ref_no": "SP2020\/0018",
"account_id": null,
"created_at": "2020-09-23 20:16:19",
"updated_at": "2020-09-23 20:16:19"
}
]
}
HTTP Request #
PUT connector/api/sell/{sell}
PATCH connector/api/sell/{sell}
URL Parameters #
| Parameter | Status | Description |
|---|---|---|
sell |
required | id of sell to update |
Body Parameters #
| Parameter | Type | Status | Description |
|---|---|---|---|
contact_id |
integer | optional | id of the customer |
transaction_date |
string | optional | transaction date format:Y-m-d H:i:s, |
status |
string | optional | sale status (final, draft) |
is_quotation |
boolean | optional | Is sell quotation (0, 1), If 1 status should be draft |
tax_rate_id |
integer | optional | id of the tax rate applicable to the sale |
discount_amount |
float | optional | discount amount applicable to the sale |
discount_type |
string | optional | type of the discount amount (fixed, percentage) |
sale_note |
string | optional | |
staff_note |
string | optional | |
commission_agent |
integer | optional | commission agent id |
shipping_details |
string | optional | shipping details |
shipping_address |
string | optional | shipping address |
shipping_status |
string | optional | (‘ordered’, ‘packed’, ‘shipped’, ‘delivered’, ‘cancelled’) |
delivered_to |
string | optional | Name of the person recieved the consignment |
shipping_charges |
float | optional | shipping amount |
packing_charge |
float | optional | packing charge |
exchange_rate |
float | optional | exchange rate for the currency used |
selling_price_group_id |
integer | optional | id of the selling price group |
pay_term_number |
integer | optional | pay term value |
pay_term_type |
string | optional | type of the pay term value (‘days’, ‘months’) |
is_recurring |
integer | optional | whether the invoice is recurring (0, 1) |
recur_interval |
integer | optional | value of the interval invoice will be regenerated |
recur_interval_type |
string | optional | type of the recur interval (‘days’, ‘months’, ‘years’) |
subscription_repeat_on |
integer | optional | day of the month on which invoice will be generated if recur interval type is months (1-30) |
subscription_no |
string | optional | subscription number |
recur_repetitions |
integer | optional | total number of invoices to be generated |
rp_redeemed |
integer | optional | reward points redeemed |
rp_redeemed_amount |
float | optional | reward point redeemed amount after conversion |
types_of_service_id |
integer | optional | types of service id |
service_custom_field_1 |
string | optional | types of service custom field 1 |
service_custom_field_2 |
string | optional | types of service custom field 2 |
service_custom_field_3 |
string | optional | types of service custom field 3 |
service_custom_field_4 |
string | optional | types of service custom field 4 |
round_off_amount |
float | optional | round off amount on total payable |
table_id |
integer | optional | id of the table |
service_staff_id |
integer | optional | id of the service staff assigned to the sale |
change_return |
float | optional | Excess paid amount |
change_return_id |
integer | optional | id of the change return payment if exists |
products |
array | required | array of the products for the sale |
payments |
array | optional | payment lines for the sale |
products.*.sell_line_id |
integer | optional | sell line id for existing item only |
products.*.product_id |
integer | optional | product id |
products.*.variation_id |
integer | optional | variation id |
products.*.quantity |
float | optional | quantity |
products.*.unit_price |
float | optional | unit selling price |
products.*.tax_rate_id |
integer | optional | tax rate id applicable on the product |
products.*.discount_amount |
float | optional | discount amount applicable on the product |
products.*.discount_type |
string | optional | type of discount amount (‘fixed’, ‘percentage’) |
products.*.sub_unit_id |
integer | optional | sub unit id |
products.*.note |
string | optional | note for the product |
payments.*.payment_id |
integer | optional | payment id for existing payment line |
payments.*.amount |
float | optional | amount of the payment |
payments.*.method |
string | optional | payment methods (‘cash’, ‘card’, ‘cheque’, ‘bank_transfer’, ‘other’, ‘custom_pay_1’, ‘custom_pay_2’, ‘custom_pay_3’) |
payments.*.account_id |
integer | optional | account id |
payments.*.card_number |
string | optional | |
payments.*.card_holder_name |
string | optional | |
payments.*.card_transaction_number |
string | optional | |
payments.*.card_type |
string | optional | |
payments.*.card_month |
string | optional | |
payments.*.card_year |
string | optional | |
payments.*.card_security |
string | optional | |
payments.*.transaction_no_1 |
string | optional | |
payments.*.transaction_no_2 |
string | optional | |
payments.*.transaction_no_3 |
string | optional | |
payments.*.note |
string | optional | payment note |
payments.*.cheque_number |
string | optional | |
payments.*.bank_account_number |
string | optional |
Delete Sell #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/sell/odio"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request #
DELETE connector/api/sell/{sell}
URL Parameters #
| Parameter | Status | Description |
|---|---|---|
sell |
required | id of the sell to be deleted |
Add Sell Return #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/sell-return"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"transaction_id": 6,
"transaction_date": "2020-5-7 15:20:22",
"invoice_no": "qui",
"discount_amount": 10,
"discount_type": "fixed",
"products": [
{
"sell_line_id": 5,
"quantity": 1,
"unit_price_inc_tax": 437.5
}
]
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": 159,
"business_id": 1,
"location_id": 1,
"res_table_id": null,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell_return",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "paid",
"adjustment_type": null,
"contact_id": 1,
"customer_group_id": null,
"invoice_no": "CN2020\/0005",
"ref_no": null,
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "2020-11-17 00:00:00",
"total_before_tax": 3,
"tax_id": null,
"tax_amount": 0,
"discount_type": "percentage",
"discount_amount": 12,
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": null,
"shipping_address": null,
"shipping_status": null,
"delivered_to": null,
"shipping_charges": "0.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": 2.64,
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": 157,
"opening_stock_product_id": null,
"created_by": 9,
"import_batch": null,
"import_time": null,
"types_of_service_id": null,
"packing_charge": null,
"packing_charge_type": null,
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_production_cost_type": "percentage",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_job_sheet_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"repair_updates_notif": 0,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": null,
"recur_interval_type": null,
"recur_repetitions": null,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": null,
"created_at": "2020-11-17 12:05:11",
"updated_at": "2020-11-17 13:22:09"
}
HTTP Request #
POST connector/api/sell-return
Body Parameters #
| Parameter | Type | Status | Description |
|---|---|---|---|
transaction_id |
integer | required | Id of the sell |
transaction_date |
string | optional | transaction date format:Y-m-d H:i:s, |
invoice_no |
string | optional | Invoice number of the return |
discount_amount |
float | optional | discount amount applicable to the sale |
discount_type |
string | optional | type of the discount amount (fixed, percentage) |
products |
array | required | array of the products for the sale |
products.*.sell_line_id |
integer | required | sell line id |
products.*.quantity |
float | required | quantity to be returned from the sell line |
products.*.unit_price_inc_tax |
float | required | unit selling price of the returning item |
List Sell Return #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/list-sell-return"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 159,
"business_id": 1,
"location_id": 1,
"res_table_id": null,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell_return",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "partial",
"adjustment_type": null,
"contact_id": 1,
"customer_group_id": null,
"invoice_no": "CN2020\/0005",
"ref_no": null,
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "2020-11-17 00:00:00",
"total_before_tax": "3.0000",
"tax_id": null,
"tax_amount": "0.0000",
"discount_type": "percentage",
"discount_amount": "12.0000",
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": null,
"shipping_address": null,
"shipping_status": null,
"delivered_to": null,
"shipping_charges": "0.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": "2.6400",
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": 157,
"opening_stock_product_id": null,
"created_by": 9,
"import_batch": null,
"import_time": null,
"types_of_service_id": null,
"packing_charge": null,
"packing_charge_type": null,
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_production_cost_type": "percentage",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_job_sheet_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"repair_updates_notif": 0,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": null,
"recur_interval_type": null,
"recur_repetitions": null,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": null,
"created_at": "2020-11-17 12:05:11",
"updated_at": "2020-11-17 13:22:09",
"payment_lines": [
{
"id": 126,
"transaction_id": 159,
"business_id": 1,
"is_return": 0,
"amount": "1.8000",
"method": "cash",
"transaction_no": null,
"card_transaction_number": null,
"card_number": null,
"card_type": "credit",
"card_holder_name": null,
"card_month": null,
"card_year": null,
"card_security": null,
"cheque_number": null,
"bank_account_number": null,
"paid_on": "2020-11-17 12:05:00",
"created_by": 9,
"is_advance": 0,
"payment_for": 1,
"parent_id": null,
"note": null,
"document": null,
"payment_ref_no": "SP2020\/0078",
"account_id": null,
"created_at": "2020-11-17 12:05:58",
"updated_at": "2020-11-17 12:05:58"
}
],
"return_parent_sell": {
"id": 157,
"business_id": 1,
"location_id": 1,
"res_table_id": null,
"res_waiter_id": null,
"res_order_status": null,
"type": "sell",
"sub_type": null,
"status": "final",
"is_quotation": 0,
"payment_status": "paid",
"adjustment_type": null,
"contact_id": 1,
"customer_group_id": null,
"invoice_no": "AS0073",
"ref_no": "",
"subscription_no": null,
"subscription_repeat_on": null,
"transaction_date": "2020-11-13 12:42:17",
"total_before_tax": "6.2500",
"tax_id": null,
"tax_amount": "0.0000",
"discount_type": "percentage",
"discount_amount": "10.0000",
"rp_redeemed": 0,
"rp_redeemed_amount": "0.0000",
"shipping_details": null,
"shipping_address": null,
"shipping_status": null,
"delivered_to": null,
"shipping_charges": "0.0000",
"additional_notes": null,
"staff_note": null,
"round_off_amount": "0.0000",
"final_total": "5.6300",
"expense_category_id": null,
"expense_for": null,
"commission_agent": null,
"document": null,
"is_direct_sale": 0,
"is_suspend": 0,
"exchange_rate": "1.000",
"total_amount_recovered": null,
"transfer_parent_id": null,
"return_parent_id": null,
"opening_stock_product_id": null,
"created_by": 9,
"import_batch": null,
"import_time": null,
"types_of_service_id": null,
"packing_charge": "0.0000",
"packing_charge_type": null,
"service_custom_field_1": null,
"service_custom_field_2": null,
"service_custom_field_3": null,
"service_custom_field_4": null,
"mfg_parent_production_purchase_id": null,
"mfg_wasted_units": null,
"mfg_production_cost": "0.0000",
"mfg_production_cost_type": "percentage",
"mfg_is_final": 0,
"is_created_from_api": 0,
"essentials_duration": "0.00",
"essentials_duration_unit": null,
"essentials_amount_per_unit_duration": "0.0000",
"essentials_allowances": null,
"essentials_deductions": null,
"rp_earned": 0,
"repair_completed_on": null,
"repair_warranty_id": null,
"repair_brand_id": null,
"repair_status_id": null,
"repair_model_id": null,
"repair_job_sheet_id": null,
"repair_defects": null,
"repair_serial_no": null,
"repair_checklist": null,
"repair_security_pwd": null,
"repair_security_pattern": null,
"repair_due_date": null,
"repair_device_id": null,
"repair_updates_notif": 0,
"order_addresses": null,
"is_recurring": 0,
"recur_interval": 1,
"recur_interval_type": "days",
"recur_repetitions": 0,
"recur_stopped_on": null,
"recur_parent_id": null,
"invoice_token": null,
"pay_term_number": null,
"pay_term_type": null,
"pjt_project_id": null,
"pjt_title": null,
"woocommerce_order_id": null,
"selling_price_group_id": 0,
"created_at": "2020-11-13 12:42:17",
"updated_at": "2020-11-13 12:42:18",
"sell_lines": [
{
"id": 139,
"transaction_id": 157,
"product_id": 157,
"variation_id": 205,
"quantity": 5,
"mfg_waste_percent": "0.0000",
"quantity_returned": "3.0000",
"unit_price_before_discount": "1.2500",
"unit_price": "1.2500",
"line_discount_type": "fixed",
"line_discount_amount": "0.0000",
"unit_price_inc_tax": "1.2500",
"item_tax": "0.0000",
"tax_id": null,
"discount_id": null,
"lot_no_line_id": null,
"sell_line_note": "",
"res_service_staff_id": null,
"res_line_order_status": null,
"woocommerce_line_items_id": null,
"parent_sell_line_id": null,
"children_type": "",
"sub_unit_id": null,
"created_at": "2020-11-13 12:42:17",
"updated_at": "2020-11-17 13:22:09"
}
]
}
}
],
"links": {
"first": "http:\/\/local.pos.com\/connector\/api\/list-sell-return?sell_id=157&page=1",
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "http:\/\/local.pos.com\/connector\/api\/list-sell-return",
"per_page": 10,
"to": 1
}
}
HTTP Request #
GET connector/api/list-sell-return
URL Parameters #
| Parameter | Status | Description |
|---|---|---|
sell_id |
optional | Id of the sell for which return is added |
Update shipping status #
Requires authentication
Example request:
const url = new URL(
"https://pos.ultimatefosters.com/connector/api/update-shipping-status"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 20,
"shipping_status": "ordered",
"delivered_to": "beatae"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request #
POST connector/api/update-shipping-status
Body Parameters #
| Parameter | Type | Status | Description |
|---|---|---|---|
id |
integer | required | id of the sale |
shipping_status |
string | optional | (‘ordered’, ‘packed’, ‘shipped’, ‘delivered’, ‘cancelled’) |
delivered_to |
string | optional | Name of the consignee |
