Get the specified sell

Requires authentication

HTTP Request

GET connector/api/sell/{sell}

URL Parameters

Parameter Status Description
sell required comma separated ids of the sells

Example request:

curl -X GET \
-G "http://erp.dstadvertising.com/connector/api/sell/55" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"

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"
}
]
}
]
}

javascript

const url = new URL(
"http://erp.dstadvertising.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));