MENU navbar-image

Introduction

Welcome to our API documentation!

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

CRM

List Follow ups

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/crm/follow-ups?start_date=2020-12-16&end_date=2020-12-16&status=voluptatem&follow_up_type=deserunt&followup_category_id=rem&order_by=start_datetime&direction=desc&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/follow-ups"
);

const params = {
    "start_date": "2020-12-16",
    "end_date": "2020-12-16",
    "status": "voluptatem",
    "follow_up_type": "deserunt",
    "followup_category_id": "rem",
    "order_by": "start_datetime",
    "direction": "desc",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "contact_id": 50,
            "title": "Test Follow up",
            "status": "scheduled",
            "start_datetime": "2020-12-16 15:15:00",
            "end_datetime": "2020-12-16 15:15:00",
            "description": "<p>tst</p>",
            "schedule_type": "call",
            "allow_notification": 0,
            "notify_via": {
                "sms": 0,
                "mail": 1
            },
            "notify_before": null,
            "notify_type": "minute",
            "created_by": 1,
            "followup_additional_info": null,
            "created_at": "2020-12-16 03:15:23",
            "updated_at": "2020-12-16 15:46:34",
            "customer": {
                "id": 50,
                "business_id": 1,
                "type": "lead",
                "supplier_business_name": null,
                "name": " Lead 4  ",
                "prefix": null,
                "first_name": "Lead 4",
                "middle_name": null,
                "last_name": null,
                "email": null,
                "contact_id": "CO0011",
                "contact_status": "active",
                "tax_number": null,
                "city": null,
                "state": null,
                "country": null,
                "address_line_1": null,
                "address_line_2": null,
                "zip_code": null,
                "dob": null,
                "mobile": "234567",
                "landline": null,
                "alternate_number": null,
                "pay_term_number": null,
                "pay_term_type": null,
                "credit_limit": null,
                "created_by": 1,
                "balance": "0.0000",
                "total_rp": 0,
                "total_rp_used": 0,
                "total_rp_expired": 0,
                "is_default": 0,
                "shipping_address": null,
                "position": null,
                "customer_group_id": null,
                "crm_source": "55",
                "crm_life_stage": "62",
                "custom_field1": null,
                "custom_field2": null,
                "custom_field3": null,
                "custom_field4": null,
                "custom_field5": null,
                "custom_field6": null,
                "custom_field7": null,
                "custom_field8": null,
                "custom_field9": null,
                "custom_field10": null,
                "deleted_at": null,
                "created_at": "2020-12-15 23:14:48",
                "updated_at": "2021-01-07 15:32:52",
                "remember_token": null,
                "password": null
            }
        },
        {
            "id": 2,
            "business_id": 1,
            "contact_id": 50,
            "title": "Test Follow up 1",
            "status": "completed",
            "start_datetime": "2020-12-16 15:46:00",
            "end_datetime": "2020-12-16 15:46:00",
            "description": "<p>Test Follow up</p>",
            "schedule_type": "call",
            "allow_notification": 0,
            "notify_via": {
                "sms": 0,
                "mail": 1
            },
            "notify_before": null,
            "notify_type": "minute",
            "created_by": 1,
            "followup_additional_info": null,
            "created_at": "2020-12-16 15:46:57",
            "updated_at": "2020-12-17 10:24:11",
            "customer": {
                "id": 50,
                "business_id": 1,
                "type": "lead",
                "supplier_business_name": null,
                "name": " Lead 4  ",
                "prefix": null,
                "first_name": "Lead 4",
                "middle_name": null,
                "last_name": null,
                "email": null,
                "contact_id": "CO0011",
                "contact_status": "active",
                "tax_number": null,
                "city": null,
                "state": null,
                "country": null,
                "address_line_1": null,
                "address_line_2": null,
                "zip_code": null,
                "dob": null,
                "mobile": "234567",
                "landline": null,
                "alternate_number": null,
                "pay_term_number": null,
                "pay_term_type": null,
                "credit_limit": null,
                "created_by": 1,
                "balance": "0.0000",
                "total_rp": 0,
                "total_rp_used": 0,
                "total_rp_expired": 0,
                "is_default": 0,
                "shipping_address": null,
                "position": null,
                "customer_group_id": null,
                "crm_source": "55",
                "crm_life_stage": "62",
                "custom_field1": null,
                "custom_field2": null,
                "custom_field3": null,
                "custom_field4": null,
                "custom_field5": null,
                "custom_field6": null,
                "custom_field7": null,
                "custom_field8": null,
                "custom_field9": null,
                "custom_field10": null,
                "deleted_at": null,
                "created_at": "2020-12-15 23:14:48",
                "updated_at": "2021-01-07 15:32:52",
                "remember_token": null,
                "password": null
            }
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/crm/follow-ups?page=1",
        "last": "http://local.pos.com/connector/api/crm/follow-ups?page=21",
        "prev": null,
        "next": "http://local.pos.com/connector/api/crm/follow-ups?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 21,
        "path": "http://local.pos.com/connector/api/crm/follow-ups",
        "per_page": "2",
        "to": 2,
        "total": 42
    }
}
 

Request      

GET connector/api/crm/follow-ups

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

start_date   string  optional  

format: Y-m-d (Ex: 2020-12-16) Example: 2020-12-16

end_date   string  optional  

format: Y-m-d (Ex: 2020-12-16) Example: 2020-12-16

status   string  optional  

filter the result through status, get status from getFollowUpResources->statuses Example: voluptatem

follow_up_type   string  optional  

filter the result through follow_up_type, get follow_up_type from getFollowUpResources->follow_up_types Example: deserunt

followup_category_id   string  optional  

filter the result through followup_category_id Example: rem

order_by   string  optional  

Column name to sort the result, Column: start_datetime Example: start_datetime

direction   string  optional  

Direction to sort the result, Required if using 'order_by', direction: desc, asc Example: desc

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Add follow up

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/crm/follow-ups" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Meeting with client\",
    \"contact_id\": 2,
    \"description\": \"In sed ipsum amet.\",
    \"schedule_type\": \"at\",
    \"user_id\": [
        2,
        3,
        5
    ],
    \"notify_before\": 5,
    \"notify_type\": \"minute\",
    \"status\": \"open\",
    \"notify_via\": [
        \"vel\"
    ],
    \"start_datetime\": \"2021-01-06 13:05:00\",
    \"end_datetime\": \"2021-01-06 13:05:00\",
    \"followup_additional_info\": [
        \"hic\"
    ],
    \"allow_notification\": true
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/follow-ups"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Meeting with client",
    "contact_id": 2,
    "description": "In sed ipsum amet.",
    "schedule_type": "at",
    "user_id": [
        2,
        3,
        5
    ],
    "notify_before": 5,
    "notify_type": "minute",
    "status": "open",
    "notify_via": [
        "vel"
    ],
    "start_datetime": "2021-01-06 13:05:00",
    "end_datetime": "2021-01-06 13:05:00",
    "followup_additional_info": [
        "hic"
    ],
    "allow_notification": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "test",
        "contact_id": "1",
        "description": null,
        "schedule_type": "call",
        "followup_category_id": "1",
        "notify_before": null,
        "status": null,
        "start_datetime": "2021-01-06 15:27:00",
        "end_datetime": "2021-01-06 15:27:00",
        "allow_notification": 0,
        "notify_via": {
            "sms": 1,
            "mail": 1
        },
        "notify_type": "hour",
        "business_id": 1,
        "created_by": 1,
        "updated_at": "2021-01-06 17:04:54",
        "created_at": "2021-01-06 17:04:54",
        "id": 20
    }
}
 

Request      

POST connector/api/crm/follow-ups

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

Follow up title Example: Meeting with client

contact_id   integer   

Contact to be followed up Example: 2

description   text  optional  

Follow up description Example: In sed ipsum amet.

schedule_type   string   

Follow up type default get from getFollowUpResources->follow_up_types Example: at

user_id   string[]   

Integer ID; Follow up to be assigned Ex: [2,3,8]

notify_before   integer  optional  

Integer value will be used to send auto notification before follow up starts. Example: 5

notify_type   string  optional  

Notify type Ex: 'minute', 'hour', 'day'. default is hour Example: minute

status   string  optional  

Follow up status Example: open

notify_via   string[]  optional  

Will be used to send notification Ex: ['sms' => 0 ,'mail' => 1]

start_datetime   datetime   

Follow up start datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: 2021-01-06 13:05:00

end_datetime   datetime   

Follow up end datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: 2021-01-06 13:05:00

followup_additional_info   string[]  optional  

Follow up additional info Ex: ['call duration' => '1 hour']

allow_notification   boolean  optional  

0/1 : If notification will be send before follow up starts. default is 1(true) Example: true

Get the specified followup

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/crm/follow-ups/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/follow-ups/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 20,
            "business_id": 1,
            "contact_id": 1,
            "title": "Meeting with client",
            "status": null,
            "start_datetime": "2021-01-06 15:27:00",
            "end_datetime": "2021-01-06 15:27:00",
            "description": null,
            "schedule_type": "call",
            "allow_notification": 0,
            "notify_via": {
                "sms": 1,
                "mail": 1
            },
            "notify_before": null,
            "notify_type": "hour",
            "created_by": 1,
            "created_at": "2021-01-06 17:04:54",
            "updated_at": "2021-01-06 17:04:54",
            "customer": {
                "id": 1,
                "business_id": 1,
                "type": "customer",
                "supplier_business_name": null,
                "name": "Walk-In Customer",
                "prefix": null,
                "first_name": "Walk-In Customer",
                "middle_name": null,
                "last_name": null,
                "email": null,
                "contact_id": "CO0005",
                "contact_status": "active",
                "tax_number": null,
                "city": "Phoenix",
                "state": "Arizona",
                "country": "USA",
                "address_line_1": "Linking Street",
                "address_line_2": null,
                "zip_code": null,
                "dob": null,
                "mobile": "(378) 400-1234",
                "landline": null,
                "alternate_number": null,
                "pay_term_number": null,
                "pay_term_type": null,
                "credit_limit": null,
                "created_by": 1,
                "balance": "0.0000",
                "total_rp": 0,
                "total_rp_used": 0,
                "total_rp_expired": 0,
                "is_default": 1,
                "shipping_address": null,
                "position": null,
                "customer_group_id": null,
                "crm_source": null,
                "crm_life_stage": null,
                "custom_field1": null,
                "custom_field2": null,
                "custom_field3": null,
                "custom_field4": null,
                "custom_field5": null,
                "custom_field6": null,
                "custom_field7": null,
                "custom_field8": null,
                "custom_field9": null,
                "custom_field10": null,
                "deleted_at": null,
                "created_at": "2018-01-03 20:45:20",
                "updated_at": "2018-06-11 22:22:05",
                "remember_token": null,
                "password": null
            },
            "users": [
                {
                    "id": 2,
                    "user_type": "user",
                    "surname": "Mr",
                    "first_name": "Demo",
                    "last_name": "Cashier",
                    "username": "cashier",
                    "email": "[email protected]",
                    "language": "en",
                    "contact_no": null,
                    "address": null,
                    "business_id": 1,
                    "max_sales_discount_percent": null,
                    "allow_login": 1,
                    "essentials_department_id": null,
                    "essentials_designation_id": null,
                    "status": "active",
                    "crm_contact_id": null,
                    "is_cmmsn_agnt": 0,
                    "cmmsn_percent": "0.00",
                    "selected_contacts": 0,
                    "dob": null,
                    "gender": null,
                    "marital_status": null,
                    "blood_group": null,
                    "contact_number": null,
                    "fb_link": null,
                    "twitter_link": null,
                    "social_media_1": null,
                    "social_media_2": null,
                    "permanent_address": null,
                    "current_address": null,
                    "guardian_name": null,
                    "custom_field_1": null,
                    "custom_field_2": null,
                    "custom_field_3": null,
                    "custom_field_4": null,
                    "bank_details": null,
                    "id_proof_name": null,
                    "id_proof_number": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:20:58",
                    "updated_at": "2018-01-04 02:20:58",
                    "pivot": {
                        "schedule_id": 20,
                        "user_id": 2
                    }
                }
            ]
        }
    ]
}
 

Request      

GET connector/api/crm/follow-ups/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

follow_up   string   

comma separated ids of the follow_ups Example: 1,2

Update follow up

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/crm/follow-ups/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Meeting with client\",
    \"contact_id\": 2,
    \"description\": \"Quam impedit dolorem consequatur alias recusandae.\",
    \"schedule_type\": \"sit\",
    \"user_id\": [
        2,
        3,
        5
    ],
    \"notify_before\": 5,
    \"notify_type\": \"minute\",
    \"status\": \"open\",
    \"notify_via\": [
        \"occaecati\"
    ],
    \"followup_additional_info\": [
        \"enim\"
    ],
    \"start_datetime\": \"2021-01-06 13:05:00\",
    \"end_datetime\": \"2021-01-06 13:05:00\",
    \"allow_notification\": true
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/follow-ups/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Meeting with client",
    "contact_id": 2,
    "description": "Quam impedit dolorem consequatur alias recusandae.",
    "schedule_type": "sit",
    "user_id": [
        2,
        3,
        5
    ],
    "notify_before": 5,
    "notify_type": "minute",
    "status": "open",
    "notify_via": [
        "occaecati"
    ],
    "followup_additional_info": [
        "enim"
    ],
    "start_datetime": "2021-01-06 13:05:00",
    "end_datetime": "2021-01-06 13:05:00",
    "allow_notification": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 20,
        "business_id": 1,
        "contact_id": "1",
        "title": "Meeting with client",
        "status": null,
        "start_datetime": "2021-01-06 15:27:00",
        "end_datetime": "2021-01-06 15:27:00",
        "description": null,
        "schedule_type": "call",
        "allow_notification": 0,
        "notify_via": {
            "sms": 1,
            "mail": 0
        },
        "notify_before": null,
        "notify_type": "hour",
        "created_by": 1,
        "created_at": "2021-01-06 17:04:54",
        "updated_at": "2021-01-06 18:22:21"
    }
}
 

Request      

PUT connector/api/crm/follow-ups/{id}

PATCH connector/api/crm/follow-ups/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

follow_up   string   

id of the follow up to be updated Example: 20

Body Parameters

title   string   

Follow up title Example: Meeting with client

contact_id   integer   

Contact to be followed up Example: 2

description   text  optional  

Follow up description Example: Quam impedit dolorem consequatur alias recusandae.

schedule_type   string   

Follow up type default get from getFollowUpResources->follow_up_types Example: sit

user_id   string[]   

Integer ID; Follow up to be assigned Ex: [2,3,8]

notify_before   integer  optional  

Integer value will be used to send auto notification before follow up starts. Example: 5

notify_type   string  optional  

Notify type Ex: 'minute', 'hour', 'day'. default is hour Example: minute

status   string  optional  

Follow up status Example: open

notify_via   string[]  optional  

Will be used to send notification Ex: ['sms' => 0 ,'mail' => 1]

followup_additional_info   string[]  optional  

Follow up additional info Ex: ['call duration' => '1 hour']

start_datetime   datetime   

Follow up start datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: 2021-01-06 13:05:00

end_datetime   datetime   

Follow up end datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: 2021-01-06 13:05:00

allow_notification   boolean  optional  

0/1 : If notification will be send before follow up starts. default is 1(true) Example: true

Get follow up resources

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/crm/follow-up-resources" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/follow-up-resources"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "statuses": {
            "scheduled": "Scheduled",
            "open": "Open",
            "canceled": "Cancelled",
            "completed": "Completed"
        },
        "follow_up_types": {
            "call": "Call",
            "sms": "Sms",
            "meeting": "Meeting",
            "email": "Email"
        },
        "notify_type": {
            "minute": "Minute",
            "hour": "Hour",
            "day": "Day"
        },
        "notify_via": {
            "sms": "Sms",
            "mail": "Email"
        }
    }
}
 

Request      

GET connector/api/crm/follow-up-resources

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

List lead

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/crm/leads?assigned_to=1%2C2%2C3&name=nam&biz_name=aperiam&mobile_num=20&contact_id=dolorem&order_by=voluptatibus&direction=desc&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/leads"
);

const params = {
    "assigned_to": "1,2,3",
    "name": "nam",
    "biz_name": "aperiam",
    "mobile_num": "20",
    "contact_id": "dolorem",
    "order_by": "voluptatibus",
    "direction": "desc",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "contact_id": "CO0010",
            "name": "mr Lead 3 kr kr 2",
            "supplier_business_name": "POS",
            "email": null,
            "mobile": "9437638555",
            "tax_number": null,
            "created_at": "2020-12-15 23:14:30",
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "alternate_number": null,
            "landline": null,
            "dob": null,
            "contact_status": "active",
            "type": "lead",
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "id": 49,
            "business_id": 1,
            "crm_source": "55",
            "crm_life_stage": "60",
            "address_line_1": null,
            "address_line_2": null,
            "city": null,
            "state": null,
            "country": null,
            "zip_code": null,
            "last_follow_up_id": 18,
            "upcoming_follow_up_id": null,
            "last_follow_up": "2021-01-07 10:26:00",
            "upcoming_follow_up": null,
            "last_follow_up_additional_info": "{\"test\":\"test done\",\"call_duration\":\"1.5 Hour\",\"rand\":1}",
            "upcoming_follow_up_additional_info": null,
            "source": {
                "id": 55,
                "name": "Facebook",
                "business_id": 1,
                "short_code": null,
                "parent_id": 0,
                "created_by": 1,
                "category_type": "source",
                "description": "Facebook",
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2020-12-15 23:07:53",
                "updated_at": "2020-12-15 23:07:53"
            },
            "life_stage": {
                "id": 60,
                "name": "Open Deal",
                "business_id": 1,
                "short_code": null,
                "parent_id": 0,
                "created_by": 1,
                "category_type": "life_stage",
                "description": "Open Deal",
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2020-12-15 23:11:05",
                "updated_at": "2020-12-15 23:11:05"
            },
            "lead_users": [
                {
                    "id": 10,
                    "user_type": "user",
                    "surname": "Mr.",
                    "first_name": "WooCommerce",
                    "last_name": "User",
                    "username": "woocommerce_user",
                    "email": "[email protected]",
                    "language": "en",
                    "contact_no": null,
                    "address": null,
                    "business_id": 1,
                    "max_sales_discount_percent": null,
                    "allow_login": 1,
                    "essentials_department_id": null,
                    "essentials_designation_id": null,
                    "status": "active",
                    "crm_contact_id": null,
                    "is_cmmsn_agnt": 0,
                    "cmmsn_percent": "0.00",
                    "selected_contacts": 0,
                    "dob": null,
                    "gender": null,
                    "marital_status": null,
                    "blood_group": null,
                    "contact_number": null,
                    "fb_link": null,
                    "twitter_link": null,
                    "social_media_1": null,
                    "social_media_2": null,
                    "permanent_address": null,
                    "current_address": null,
                    "guardian_name": null,
                    "custom_field_1": null,
                    "custom_field_2": null,
                    "custom_field_3": null,
                    "custom_field_4": null,
                    "bank_details": null,
                    "id_proof_name": null,
                    "id_proof_number": null,
                    "deleted_at": null,
                    "created_at": "2018-08-02 04:05:55",
                    "updated_at": "2018-08-02 04:05:55",
                    "pivot": {
                        "contact_id": 49,
                        "user_id": 10
                    }
                }
            ]
        },
        {
            "contact_id": "CO0011",
            "name": " Lead 4  ",
            "supplier_business_name": null,
            "email": null,
            "mobile": "234567",
            "tax_number": null,
            "created_at": "2020-12-15 23:14:48",
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "alternate_number": null,
            "landline": null,
            "dob": null,
            "contact_status": "active",
            "type": "lead",
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "id": 50,
            "business_id": 1,
            "crm_source": "55",
            "crm_life_stage": "62",
            "address_line_1": null,
            "address_line_2": null,
            "city": null,
            "state": null,
            "country": null,
            "zip_code": null,
            "last_follow_up_id": 32,
            "upcoming_follow_up_id": null,
            "last_follow_up": "2021-01-08 16:06:00",
            "upcoming_follow_up": null,
            "last_follow_up_additional_info": "{\"call_durartion\":\"5 hour\"}",
            "upcoming_follow_up_additional_info": null,
            "source": {
                "id": 55,
                "name": "Facebook",
                "business_id": 1,
                "short_code": null,
                "parent_id": 0,
                "created_by": 1,
                "category_type": "source",
                "description": "Facebook",
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2020-12-15 23:07:53",
                "updated_at": "2020-12-15 23:07:53"
            },
            "life_stage": {
                "id": 62,
                "name": "New",
                "business_id": 1,
                "short_code": null,
                "parent_id": 0,
                "created_by": 1,
                "category_type": "life_stage",
                "description": "New",
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2020-12-15 23:11:26",
                "updated_at": "2020-12-15 23:11:26"
            },
            "lead_users": [
                {
                    "id": 11,
                    "user_type": "user",
                    "surname": "Mr",
                    "first_name": "Admin Essential",
                    "last_name": null,
                    "username": "admin-essentials",
                    "email": "[email protected]",
                    "language": "en",
                    "contact_no": null,
                    "address": null,
                    "business_id": 1,
                    "max_sales_discount_percent": null,
                    "allow_login": 1,
                    "essentials_department_id": null,
                    "essentials_designation_id": null,
                    "status": "active",
                    "crm_contact_id": null,
                    "is_cmmsn_agnt": 0,
                    "cmmsn_percent": "0.00",
                    "selected_contacts": 0,
                    "dob": null,
                    "gender": null,
                    "marital_status": null,
                    "blood_group": null,
                    "contact_number": null,
                    "fb_link": null,
                    "twitter_link": null,
                    "social_media_1": null,
                    "social_media_2": null,
                    "permanent_address": null,
                    "current_address": null,
                    "guardian_name": null,
                    "custom_field_1": null,
                    "custom_field_2": null,
                    "custom_field_3": null,
                    "custom_field_4": null,
                    "bank_details": null,
                    "id_proof_name": null,
                    "id_proof_number": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:15:19",
                    "updated_at": "2018-01-04 02:15:19",
                    "pivot": {
                        "contact_id": 50,
                        "user_id": 11
                    }
                }
            ]
        },
        {
            "contact_id": "CO0015",
            "name": " Lead kr  ",
            "supplier_business_name": null,
            "email": null,
            "mobile": "9437638555",
            "tax_number": null,
            "created_at": "2021-01-07 18:31:08",
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "alternate_number": null,
            "landline": null,
            "dob": "2021-01-07",
            "contact_status": "active",
            "type": "lead",
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "id": 82,
            "business_id": 1,
            "crm_source": null,
            "crm_life_stage": null,
            "address_line_1": null,
            "address_line_2": null,
            "city": null,
            "state": null,
            "country": null,
            "zip_code": null,
            "last_follow_up_id": 36,
            "upcoming_follow_up_id": null,
            "last_follow_up": "2021-01-07 18:31:08",
            "upcoming_follow_up": null,
            "last_follow_up_additional_info": "{\"call duration\":\"1 hour\",\"call descr\":\"talked to him and all okay\"}",
            "upcoming_follow_up_additional_info": null,
            "source": null,
            "life_stage": null,
            "lead_users": [
                {
                    "id": 11,
                    "user_type": "user",
                    "surname": "Mr",
                    "first_name": "Admin Essential",
                    "last_name": null,
                    "username": "admin-essentials",
                    "email": "[email protected]",
                    "language": "en",
                    "contact_no": null,
                    "address": null,
                    "business_id": 1,
                    "max_sales_discount_percent": null,
                    "allow_login": 1,
                    "essentials_department_id": null,
                    "essentials_designation_id": null,
                    "status": "active",
                    "crm_contact_id": null,
                    "is_cmmsn_agnt": 0,
                    "cmmsn_percent": "0.00",
                    "selected_contacts": 0,
                    "dob": null,
                    "gender": null,
                    "marital_status": null,
                    "blood_group": null,
                    "contact_number": null,
                    "fb_link": null,
                    "twitter_link": null,
                    "social_media_1": null,
                    "social_media_2": null,
                    "permanent_address": null,
                    "current_address": null,
                    "guardian_name": null,
                    "custom_field_1": null,
                    "custom_field_2": null,
                    "custom_field_3": null,
                    "custom_field_4": null,
                    "bank_details": null,
                    "id_proof_name": null,
                    "id_proof_number": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:15:19",
                    "updated_at": "2018-01-04 02:15:19",
                    "pivot": {
                        "contact_id": 82,
                        "user_id": 11
                    }
                }
            ]
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/crm/leads?page=1",
        "last": "http://local.pos.com/connector/api/crm/leads?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http://local.pos.com/connector/api/crm/leads",
        "per_page": "10",
        "to": 3,
        "total": 3
    }
}
 

Request      

GET connector/api/crm/leads

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

assigned_to   string  optional  

comma separated ids of users to whom lead is assigned (Ex: 1,2,3) Example: 1,2,3

name   string  optional  

Search term for lead name Example: nam

biz_name   string  optional  

Search term for lead's business name Example: aperiam

mobile_num   integer  optional  

Search term for lead's mobile number Example: 20

contact_id   string  optional  

Search term for lead's contact_id. Ex(CO0005) Example: dolorem

order_by   string  optional  

Column name to sort the result, Column: name, supplier_business_name Example: voluptatibus

direction   string  optional  

Direction to sort the result, Required if using 'order_by', direction: desc, asc Example: desc

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Save Call Logs

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/crm/call-logs" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
const url = new URL(
    "https://www.nerapos.com/np/connector/api/crm/call-logs"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST connector/api/crm/call-logs

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

call_logs   object  optional  
*   object  optional  
mobile_number   string   

Mobile number of the customer or user Example: tempore

mobile_name   string  optional  

Name of the contact saved in the mobile Example: eaque

call_type   string  optional  

Call type (call, sms) Example: call

start_time   string  optional  

Start datetime of the call in "Y-m-d H:i:s" format Example: et

end_time   string  optional  

End datetime of the call in "Y-m-d H:i:s" format Example: ut

duration   string  optional  

Duration of the call in seconds Example: perferendis

Types of service management

List types of service

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/types-of-service" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/types-of-service"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Home Delivery",
            "description": null,
            "business_id": 1,
            "location_price_group": {
                "1": "0"
            },
            "packing_charge": "10.0000",
            "packing_charge_type": "fixed",
            "enable_custom_fields": 0,
            "created_at": "2020-06-04 22:41:13",
            "updated_at": "2020-06-04 22:41:13"
        }
    ]
}
 

Request      

GET connector/api/types-of-service

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get the specified types of service

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/types-of-service/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/types-of-service/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Home Delivery",
            "description": null,
            "business_id": 1,
            "location_price_group": {
                "1": "0"
            },
            "packing_charge": "10.0000",
            "packing_charge_type": "fixed",
            "enable_custom_fields": 0,
            "created_at": "2020-06-04 22:41:13",
            "updated_at": "2020-06-04 22:41:13"
        }
    ]
}
 

Request      

GET connector/api/types-of-service/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

types_of_service   string   

comma separated ids of required types of services Example: 1

New end points

New List products

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/new_product?order_by=suscipit&order_direction=odit&location_custom_field_1=veritatis&category_id=voluptatum&sub_category_id=blanditiis&location_id=1&not_for_sell=occaecati&send_lot_detail=eos&name=laudantium&sku=aut&product_ids=1%2C2&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/new_product"
);

const params = {
    "order_by": "suscipit",
    "order_direction": "odit",
    "location_custom_field_1": "veritatis",
    "category_id": "voluptatum",
    "sub_category_id": "blanditiis",
    "location_id": "1",
    "not_for_sell": "occaecati",
    "send_lot_detail": "eos",
    "name": "laudantium",
    "sku": "aut",
    "product_ids": "1,2",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 2,
            "name": "Levis Men's Slimmy Fit Jeans",
            "business_id": 1,
            "type": "variable",
            "exemption_type_id": null,
            "enable_stock": 1,
            "sku": "AS0002",
            "product_custom_field1": null,
            "product_custom_field2": null,
            "product_custom_field3": null,
            "product_custom_field4": null,
            "woocommerce_media_id": null,
            "product_description": null,
            "is_inactive": 0,
            "repair_model_id": null,
            "not_for_selling": 0,
            "ecom_shipping_class_id": null,
            "ecom_active_in_store": 1,
            "woocommerce_product_id": 627,
            "woocommerce_disable_sync": 0,
            "image_url": "http://local.pos.com/uploads/img/1528727964_levis_jeans.jpg",
            "product_variations": [
                {
                    "id": 2,
                    "variation_template_id": 5,
                    "name": "Waist Size",
                    "product_id": 2,
                    "is_dummy": 0,
                    "variations": [
                        {
                            "id": 2,
                            "name": "28",
                            "product_id": 2,
                            "sub_sku": "AS0002-1",
                            "product_variation_id": 2,
                            "woocommerce_variation_id": 658,
                            "default_purchase_price": "70.0000",
                            "dpp_inc_tax": "77.0000",
                            "default_sell_price": "70.0000",
                            "sell_price_inc_tax": "77.0000",
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 1,
                                    "product_id": 2,
                                    "product_variation_id": 2,
                                    "variation_id": 2,
                                    "location_id": 1,
                                    "qty_available": "71.0000"
                                }
                            ],
                            "media": [],
                            "discounts": []
                        },
                        {
                            "id": 3,
                            "name": "30",
                            "product_id": 2,
                            "sub_sku": "AS0002-2",
                            "product_variation_id": 2,
                            "woocommerce_variation_id": 659,
                            "default_purchase_price": "70.0000",
                            "dpp_inc_tax": "77.0000",
                            "default_sell_price": "70.0000",
                            "sell_price_inc_tax": "77.0000",
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 2,
                                    "product_id": 2,
                                    "product_variation_id": 2,
                                    "variation_id": 3,
                                    "location_id": 1,
                                    "qty_available": "89.0000"
                                }
                            ],
                            "media": [],
                            "discounts": []
                        },
                        {
                            "id": 4,
                            "name": "32",
                            "product_id": 2,
                            "sub_sku": "AS0002-3",
                            "product_variation_id": 2,
                            "woocommerce_variation_id": 660,
                            "default_purchase_price": "70.0000",
                            "dpp_inc_tax": "77.0000",
                            "default_sell_price": "70.0000",
                            "sell_price_inc_tax": "77.0000",
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 3,
                                    "product_id": 2,
                                    "product_variation_id": 2,
                                    "variation_id": 4,
                                    "location_id": 1,
                                    "qty_available": "127.0000"
                                },
                                {
                                    "id": 1371,
                                    "product_id": 2,
                                    "product_variation_id": 2,
                                    "variation_id": 4,
                                    "location_id": 7,
                                    "qty_available": "-1.0000"
                                }
                            ],
                            "media": [],
                            "discounts": []
                        },
                        {
                            "id": 5,
                            "name": "34",
                            "product_id": 2,
                            "sub_sku": "AS0002-4",
                            "product_variation_id": 2,
                            "woocommerce_variation_id": 661,
                            "default_purchase_price": "72.0000",
                            "dpp_inc_tax": "79.2000",
                            "default_sell_price": "72.0000",
                            "sell_price_inc_tax": "79.2000",
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 4,
                                    "product_id": 2,
                                    "product_variation_id": 2,
                                    "variation_id": 5,
                                    "location_id": 1,
                                    "qty_available": "128.0000"
                                }
                            ],
                            "media": [],
                            "discounts": []
                        },
                        {
                            "id": 6,
                            "name": "36",
                            "product_id": 2,
                            "sub_sku": "AS0002-5",
                            "product_variation_id": 2,
                            "woocommerce_variation_id": 662,
                            "default_purchase_price": "72.0000",
                            "dpp_inc_tax": "79.2000",
                            "default_sell_price": "72.0000",
                            "sell_price_inc_tax": "79.2000",
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 5,
                                    "product_id": 2,
                                    "product_variation_id": 2,
                                    "variation_id": 6,
                                    "location_id": 1,
                                    "qty_available": "99.0000"
                                }
                            ],
                            "media": [],
                            "discounts": []
                        }
                    ]
                }
            ],
            "brand": {
                "id": 1,
                "business_id": 1,
                "name": "Levis",
                "description": null,
                "created_by": 1,
                "use_for_repair": 1,
                "use_for_carworkshop": 1,
                "deleted_at": null,
                "created_at": "2018-01-03 21:19:47",
                "updated_at": "2018-01-03 21:19:47"
            },
            "unit": {
                "id": 1,
                "business_id": 1,
                "actual_name": "Pieces",
                "short_name": "Pc(s)",
                "allow_decimal": 0,
                "base_unit_id": null,
                "base_unit_multiplier": null
            },
            "category": {
                "id": 1,
                "name": "Men's",
                "business_id": 1,
                "short_code": "sfefef",
                "parent_id": 0,
                "category_type": "product",
                "description": null,
                "slug": null,
                "woocommerce_cat_id": null
            },
            "sub_category": {
                "id": 4,
                "name": "Jeans",
                "business_id": 1,
                "short_code": null,
                "parent_id": 1,
                "category_type": "product",
                "description": null,
                "slug": null,
                "woocommerce_cat_id": null
            },
            "product_tax": {
                "id": 1,
                "business_id": 1,
                "name": "VAT@10%",
                "amount": 10,
                "is_tax_group": 0,
                "for_tax_group": 0,
                "created_by": 1,
                "woocommerce_tax_rate_id": null,
                "deleted_at": null,
                "created_at": "2018-01-04 02:40:07",
                "updated_at": "2018-01-04 02:40:07"
            },
            "product_locations": [
                {
                    "id": 1,
                    "business_id": 1,
                    "name": "Location 1",
                    "custom_field1": "gdgdgd88",
                    "custom_field2": null,
                    "custom_field3": null,
                    "custom_field4": null
                }
            ]
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/new_product?per_page=1&page=1",
        "last": "http://local.pos.com/connector/api/new_product?per_page=1&page=1088",
        "prev": null,
        "next": "http://local.pos.com/connector/api/new_product?per_page=1&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1088,
        "path": "http://local.pos.com/connector/api/new_product",
        "per_page": "1",
        "to": 1,
        "total": 1088
    }
}
 

Request      

GET connector/api/new_product

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

order_by   string  optional  

Values: product_name or newest Example: suscipit

order_direction   string  optional  

Values: asc or desc Example: odit

location_custom_field_1   string  optional  

Custom field 1 of the location Example: veritatis

category_id   string  optional  

comma separated ids of one or multiple category Example: voluptatum

sub_category_id   string  optional  

comma separated ids of one or multiple sub-category Example: blanditiis

location_id   string  optional  

Example: 1

not_for_sell   string  optional  

(1, 0) Example: occaecati

send_lot_detail   string  optional  

Send lot details in each variation location details(1, 0) Example: eos

name   string  optional  

Search term for product name Example: laudantium

sku   string  optional  

Search term for product sku Example: aut

product_ids   string  optional  

comma separated ids of products Example: 1,2

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

New List sells

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/new_sell?location_id=1&contact_id=expedita&payment_status=due%2Cpartial&start_date=2018-06-25&end_date=2018-06-25&user_id=praesentium&service_staff_id=fuga&shipping_status=ordered&source=illum&customer_group_id=delectus&product_name=sed&product_sku=rerum&product_custom_field_1=perspiciatis&location_custom_field_1=veniam&location_invoice_scheme_prefix=atque&product_category_id=aliquam&product_sub_category_id=voluptatem&sell_ids=55%2C64&only_subscriptions=et&send_purchase_details=exercitationem&order_by_date=desc&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/new_sell"
);

const params = {
    "location_id": "1",
    "contact_id": "expedita",
    "payment_status": "due,partial",
    "start_date": "2018-06-25",
    "end_date": "2018-06-25",
    "user_id": "praesentium",
    "service_staff_id": "fuga",
    "shipping_status": "ordered",
    "source": "illum",
    "customer_group_id": "delectus",
    "product_name": "sed",
    "product_sku": "rerum",
    "product_custom_field_1": "perspiciatis",
    "location_custom_field_1": "veniam",
    "location_invoice_scheme_prefix": "atque",
    "product_category_id": "aliquam",
    "product_sub_category_id": "voluptatem",
    "sell_ids": "55,64",
    "only_subscriptions": "et",
    "send_purchase_details": "exercitationem",
    "order_by_date": "desc",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 6,
            "business_id": 1,
            "location_id": 1,
            "res_table_id": null,
            "type": "sell",
            "status": "final",
            "is_quotation": 0,
            "payment_status": "paid",
            "contact_id": 4,
            "customer_group_id": null,
            "invoice_no": "AS0001",
            "ref_no": "",
            "source": null,
            "unique_hash": null,
            "hash_control": null,
            "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,
            "additional_notes": null,
            "staff_note": null,
            "round_off_amount": "0.0000",
            "final_total": "770.0000",
            "expense_sub_category_id": null,
            "is_direct_sale": 0,
            "is_suspend": 0,
            "total_amount_recovered": null,
            "crm_is_order_request": 0,
            "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,
            "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,
            "invoice_token": "00f79f7fd292225e8c303a6bf8626d06",
            "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": "2021-10-23 11:42:13",
            "location_name": "Location 1",
            "location_custom_field1": "gdgdgd88",
            "location_invoice_scheme_prefix": "AS",
            "table_name": null,
            "table_description": null,
            "contact": "Harry",
            "customer_group_name": "grp 2",
            "sell_lines": [
                {
                    "id": 1,
                    "transaction_id": 6,
                    "product_id": 2,
                    "quantity": 10,
                    "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,
                    "woocommerce_line_items_id": null,
                    "children_type": "",
                    "created_at": "2018-01-06 07:06:11",
                    "updated_at": "2018-01-06 07:06:11",
                    "product_name": "Levis Men's Slimmy Fit Jeans",
                    "product_custom_field_1": null,
                    "product_type": "variable",
                    "product_sku": "AS0002",
                    "category": {
                        "id": 1,
                        "name": "Men's",
                        "business_id": 1,
                        "short_code": "sfefef",
                        "parent_id": 0,
                        "created_by": 1,
                        "category_type": "product",
                        "description": null,
                        "slug": null,
                        "woocommerce_cat_id": null
                    },
                    "sub_category": {
                        "id": 4,
                        "name": "Jeans",
                        "business_id": 1,
                        "short_code": null,
                        "parent_id": 1,
                        "created_by": 1,
                        "category_type": "product",
                        "description": null,
                        "slug": null,
                        "woocommerce_cat_id": null
                    },
                    "product_variations": {
                        "id": 3,
                        "name": "30",
                        "product_id": 2,
                        "sub_sku": "AS0002-2",
                        "product_variation_id": 2,
                        "default_purchase_price": "70.0000",
                        "dpp_inc_tax": "77.0000",
                        "default_sell_price": "70.0000",
                        "sell_price_inc_tax": "77.0000"
                    }
                }
            ],
            "payment_lines": [
                {
                    "id": 1,
                    "transaction_id": 6,
                    "business_id": null,
                    "is_return": 0,
                    "amount": "770.0000",
                    "method": "cash",
                    "card_type": "visa",
                    "paid_on": "2018-01-09 17:30:35",
                    "payment_ref_no": null
                }
            ],
            "invoice_url": "http://local.pos.com/invoice/00f79f7fd292225e8c303a6bf8626d06",
            "payment_link": ""
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/new_sell?per_page=1&page=1",
        "last": "http://local.pos.com/connector/api/new_sell?per_page=1&page=213",
        "prev": null,
        "next": "http://local.pos.com/connector/api/new_sell?per_page=1&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 213,
        "path": "http://local.pos.com/connector/api/new_sell",
        "per_page": "1",
        "to": 1,
        "total": 213
    }
}
 

Request      

GET connector/api/new_sell

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

location_id   string  optional  

id of the location Example: 1

contact_id   string  optional  

id of the customer Example: expedita

payment_status   string  optional  

Comma separated values of payment statuses. Available values due, partial, paid, overdue Example: due,partial

start_date   string  optional  

format:Y-m-d Example: 2018-06-25

end_date   string  optional  

format:Y-m-d Example: 2018-06-25

user_id   string  optional  

id of the user who created the sale Example: praesentium

service_staff_id   string  optional  

id of the service staff assigned with the sale Example: fuga

shipping_status   string  optional  

Shipping Status of the sale ('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: ordered

source   string  optional  

Source of the sale Example: illum

customer_group_id   string  optional  

id of the customer group Example: delectus

product_name   string  optional  

name of the product Example: sed

product_sku   string  optional  

sku of the product or variation Example: rerum

product_custom_field_1   string  optional  

custome field 1 of the product Example: perspiciatis

location_custom_field_1   string  optional  

custome field 1 of the location Example: veniam

location_invoice_scheme_prefix   string  optional  

Invoice scheme prefix of the location Example: atque

product_category_id   string  optional  

category id of the product Example: aliquam

product_sub_category_id   string  optional  

Sub category id of the product Example: voluptatem

sell_ids   string  optional  

comma separated ids of the sells Example: 55,64

only_subscriptions   string  optional  

Filter only subcription invoices (1, 0) Example: et

send_purchase_details   string  optional  

Get purchase details of each sell line (1, 0) Example: exercitationem

order_by_date   string  optional  

Sort sell list by date ('asc', 'desc') Example: desc

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

New List contact

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/new_contactapi?type=quod&customer_group_id=fuga&custom_field_1=ipsam&contact_ids=2%2C3&name=sit&biz_name=voluptatem&mobile_num=18&contact_id=iure&order_by=qui&direction=ipsam&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/new_contactapi"
);

const params = {
    "type": "quod",
    "customer_group_id": "fuga",
    "custom_field_1": "ipsam",
    "contact_ids": "2,3",
    "name": "sit",
    "biz_name": "voluptatem",
    "mobile_num": "18",
    "contact_id": "iure",
    "order_by": "qui",
    "direction": "ipsam",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 18,
            "business_id": 1,
            "type": "customer",
            "name": "Mr. Rohit Kumar Agrawalla",
            "prefix": "Mr.",
            "first_name": "Rohit",
            "middle_name": "Kumar",
            "last_name": "Agrawalla",
            "email": null,
            "contact_status": "active",
            "mobile": "8596859647",
            "credit_limit": null,
            "converted_by": null,
            "converted_on": null,
            "balance": "40.0000",
            "total_rp": 0,
            "total_rp_used": 0,
            "total_rp_expired": 0,
            "customer_group_id": 1,
            "crm_source": null,
            "crm_life_stage": null,
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "remember_token": null,
            "password": null
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/new_contactapi?customer_group_id=1&page=1",
        "last": "http://local.pos.com/connector/api/new_contactapi?customer_group_id=1&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http://local.pos.com/connector/api/new_contactapi",
        "per_page": 10,
        "to": 1,
        "total": 1
    }
}
 

Request      

GET connector/api/new_contactapi

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

type   string   

Type of contact (supplier, customer) Example: quod

customer_group_id   string  optional  

id of the customer group Example: fuga

custom_field_1   string  optional  

Custom field 1 of the contact Example: ipsam

contact_ids   string  optional  

comma separated ids of contacts Example: 2,3

name   string  optional  

Search term for contact name Example: sit

biz_name   string  optional  

Search term for contact's business name Example: voluptatem

mobile_num   integer  optional  

Search term for contact's mobile number Example: 18

contact_id   string  optional  

Search term for contact's contact_id. Ex(CO0005) Example: iure

order_by   string  optional  

Column name to sort the result, Column: name, supplier_business_name Example: qui

direction   string  optional  

Direction to sort the result, Direction: desc, asc Example: ipsam

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Cash register management

List Cash Registers

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/cash-register?status=open&user_id=10&start_date=2018-06-25&end_date=2018-06-25&location_id=1&per_page=15" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/cash-register"
);

const params = {
    "status": "open",
    "user_id": "10",
    "start_date": "2018-06-25",
    "end_date": "2018-06-25",
    "location_id": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "location_id": 1,
            "user_id": 9,
            "status": "open",
            "closed_at": null,
            "closing_amount": "0.0000",
            "total_card_slips": 0,
            "total_cheques": 0,
            "closing_note": null,
            "created_at": "2020-07-02 12:03:00",
            "updated_at": "2020-07-02 12:03:19",
            "cash_register_transactions": [
                {
                    "id": 1,
                    "cash_register_id": 1,
                    "amount": "0.0000",
                    "pay_method": "cash",
                    "type": "credit",
                    "transaction_type": "initial",
                    "transaction_id": null,
                    "created_at": "2018-07-13 07:39:34",
                    "updated_at": "2018-07-13 07:39:34"
                },
                {
                    "id": 2,
                    "cash_register_id": 1,
                    "amount": "42.5000",
                    "pay_method": "cash",
                    "type": "credit",
                    "transaction_type": "sell",
                    "transaction_id": 41,
                    "created_at": "2018-07-13 07:44:40",
                    "updated_at": "2018-07-13 07:44:40"
                }
            ]
        },
        {
            "id": 2,
            "business_id": 1,
            "location_id": 1,
            "user_id": 1,
            "status": "",
            "closed_at": "2020-07-02 12:03:00",
            "closing_amount": "0.0000",
            "total_card_slips": 0,
            "total_cheques": 0,
            "closing_note": null,
            "created_at": "2020-07-06 15:38:23",
            "updated_at": "2020-07-06 15:38:23",
            "cash_register_transactions": [
                {
                    "id": 19,
                    "cash_register_id": 2,
                    "amount": "10.0000",
                    "pay_method": "cash",
                    "type": "credit",
                    "transaction_type": "initial",
                    "transaction_id": null,
                    "created_at": "2020-07-06 15:38:23",
                    "updated_at": "2020-07-06 15:38:23"
                }
            ]
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/cash-register?page=1",
        "last": null,
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "http://local.pos.com/connector/api/cash-register",
        "per_page": 10,
        "to": 2
    }
}
 

Request      

GET connector/api/cash-register

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

status   string  optional  

status of the register (open, close) Example: open

user_id   string  optional  

id of the user Example: 10

start_date   string  optional  

format:Y-m-d Example: 2018-06-25

end_date   string  optional  

format:Y-m-d Example: 2018-06-25

location_id   string  optional  

id of the location Example: 1

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 15

Create Cash Register

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/cash-register" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"location_id\": 1,
    \"initial_amount\": 28300.7,
    \"created_at\": \"2020-5-7 15:20:22\",
    \"closed_at\": \"2020-5-7 15:20:22\",
    \"status\": \"close\",
    \"closing_amount\": 710069.81,
    \"total_card_slips\": 6,
    \"total_cheques\": 10,
    \"closing_note\": \"qui\",
    \"transaction_ids\": \"1,2,3\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/cash-register"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "location_id": 1,
    "initial_amount": 28300.7,
    "created_at": "2020-5-7 15:20:22",
    "closed_at": "2020-5-7 15:20:22",
    "status": "close",
    "closing_amount": 710069.81,
    "total_card_slips": 6,
    "total_cheques": 10,
    "closing_note": "qui",
    "transaction_ids": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "status": "closed",
        "location_id": "1",
        "closed_at": "2020-07-02 12:03:00",
        "business_id": 1,
        "user_id": 1,
        "updated_at": "2020-07-06 16:28:42",
        "created_at": "2020-07-06 16:28:42",
        "id": 3
    }
}
 

Request      

POST connector/api/cash-register

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

location_id   integer   

id of the business location Example: 1

initial_amount   number  optional  

Initial amount Example: 28300.7

created_at   string  optional  

Register open datetime format:Y-m-d H:i:s, Example: 2020-5-7 15:20:22

closed_at   string  optional  

Register closed datetime format:Y-m-d H:i:s, Example: 2020-5-7 15:20:22

status   register  optional  

status (open, close) Example: close

closing_amount   number  optional  

Closing amount Example: 710069.81

total_card_slips   integer  optional  

total number of card slips Example: 6

total_cheques   integer  optional  

total number of checks Example: 10

closing_note   string  optional  

Closing note Example: qui

transaction_ids   string  optional  

Comma separated ids of sells associated with the register Example: 1,2,3

Get the specified Register

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/cash-register/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/cash-register/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "location_id": 1,
            "user_id": 9,
            "status": "open",
            "closed_at": null,
            "closing_amount": "0.0000",
            "total_card_slips": 0,
            "total_cheques": 0,
            "closing_note": null,
            "created_at": "2020-07-02 12:03:00",
            "updated_at": "2020-07-02 12:03:19",
            "cash_register_transactions": [
                {
                    "id": 1,
                    "cash_register_id": 1,
                    "amount": "0.0000",
                    "pay_method": "cash",
                    "type": "credit",
                    "transaction_type": "initial",
                    "transaction_id": null,
                    "created_at": "2018-07-13 07:39:34",
                    "updated_at": "2018-07-13 07:39:34"
                },
                {
                    "id": 2,
                    "cash_register_id": 1,
                    "amount": "42.5000",
                    "pay_method": "cash",
                    "type": "credit",
                    "transaction_type": "sell",
                    "transaction_id": 41,
                    "created_at": "2018-07-13 07:44:40",
                    "updated_at": "2018-07-13 07:44:40"
                }
            ]
        }
    ]
}
 

Request      

GET connector/api/cash-register/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

cash_register   string   

comma separated ids of the cash registers Example: 59

Closes currently opened register

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/close-cash-register" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"closing_amount\": 4737,
    \"total_card_slips\": 12,
    \"total_cheques\": 1,
    \"closing_note\": \"autem\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/close-cash-register"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "closing_amount": 4737,
    "total_card_slips": 12,
    "total_cheques": 1,
    "closing_note": "autem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "status": "closed",
        "location_id": "1",
        "closed_at": "2020-07-02 12:03:00",
        "business_id": 1,
        "user_id": 1,
        "updated_at": "2020-07-06 16:28:42",
        "created_at": "2020-07-06 16:28:42",
        "id": 3
    }
}
 

Request      

POST connector/api/close-cash-register

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

closing_amount   number   

Closing amount Example: 4737

total_card_slips   integer   

total number of card slips Example: 12

total_cheques   integer   

total number of checks Example: 1

closing_note   string  optional  

Closing note Example: autem

GET connector/api/open-register-details

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/open-register-details" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/open-register-details"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "The route np/connector/api/open-register-details could not be found."
}
 

Request      

GET connector/api/open-register-details

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

GET connector/api/opened-register

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/opened-register" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/opened-register"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "The route np/connector/api/opened-register could not be found."
}
 

Request      

GET connector/api/opened-register

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Table management

List tables

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/table?location_id=1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/table"
);

const params = {
    "location_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 5,
            "business_id": 1,
            "location_id": 1,
            "name": "Table 1",
            "description": null,
            "table_capacity": 4,
            "created_by": 9,
            "deleted_at": null,
            "created_at": "2020-06-04 22:36:37",
            "updated_at": "2020-06-04 22:36:37"
        }
    ]
}
 

Request      

GET connector/api/table

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

location_id   integer  optional  

id of the location Example: 1

Create Tables

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/table" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"location_id\": 1,
    \"name\": \"Table 1\",
    \"table_capacity\": 4,
    \"description\": \"Dolor officiis alias temporibus possimus ipsa.\",
    \"floor_id\": 1,
    \"position\": \"{\\\"top\\\":68,\\\"left\\\":8}\",
    \"is_available\": true,
    \"is_booked\": true,
    \"is_occupied\": false,
    \"table_shape\": \"voluptatem\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/table"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "location_id": 1,
    "name": "Table 1",
    "table_capacity": 4,
    "description": "Dolor officiis alias temporibus possimus ipsa.",
    "floor_id": 1,
    "position": "{\"top\":68,\"left\":8}",
    "is_available": true,
    "is_booked": true,
    "is_occupied": false,
    "table_shape": "voluptatem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "business_id": 1,
        "location_id": 1,
        "name": "Table 1",
        "description": null,
        "table_capacity": 4,
        "created_by": 9,
        "deleted_at": null,
        "created_at": "2020-06-04 22:36:37",
        "updated_at": "2020-06-04 22:36:37",
        "id": 5
    }
}
 

Request      

POST connector/api/table

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

location_id   integer   

id of the business location Example: 1

name   string   

Table name Example: Table 1

table_capacity   integer   

number of seats Example: 4

description   string  optional  

Table description Example: Dolor officiis alias temporibus possimus ipsa.

floor_id   integer  optional  

id of the floor Example: 1

position   string  optional  

position of the table Example: {"top":68,"left":8}

is_available   boolean  optional  

availability of the table Example: true

is_booked   boolean  optional  

booking status of the table Example: true

is_occupied   boolean  optional  

occupancy status of the table Example: false

table_shape   string  optional  

shape of the table Example: voluptatem

Show the specified table

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/table/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/table/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 5,
            "business_id": 1,
            "location_id": 1,
            "name": "Table 1",
            "description": null,
            "table_capacity": 4,
            "created_by": 9,
            "deleted_at": null,
            "created_at": "2020-06-04 22:36:37",
            "updated_at": "2020-06-04 22:36:37"
        }
    ]
}
 

Request      

GET connector/api/table/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

table   string   

comma separated ids of required tables Example: 5

Update table

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/table/{id}" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"location_id\": 1,
    \"name\": \"Table 1\",
    \"table_capacity\": 4,
    \"description\": \"Non voluptas repellendus officiis voluptatem.\",
    \"floor_id\": 1,
    \"position\": \"enim\",
    \"is_available\": false,
    \"is_booked\": true,
    \"is_occupied\": false,
    \"table_shape\": \"enim\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/table/{id}"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "location_id": 1,
    "name": "Table 1",
    "table_capacity": 4,
    "description": "Non voluptas repellendus officiis voluptatem.",
    "floor_id": 1,
    "position": "enim",
    "is_available": false,
    "is_booked": true,
    "is_occupied": false,
    "table_shape": "enim"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "business_id": 1,
        "location_id": 1,
        "name": "Table 1",
        "description": null,
        "table_capacity": 4,
        "created_by": 9,
        "deleted_at": null,
        "created_at": "2020-06-04 22:36:37",
        "updated_at": "2020-06-04 22:36:37",
        "id": 5
    }
}
 

Request      

PUT connector/api/table/{id}

PATCH connector/api/table/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

location_id   integer  optional  

id of the business location Example: 1

name   string  optional  

Table name Example: Table 1

table_capacity   integer  optional  

number of seats Example: 4

description   string  optional  

Table description Example: Non voluptas repellendus officiis voluptatem.

floor_id   integer  optional  

id of the floor Example: 1

position   string  optional  

position of the table Example: enim

is_available   boolean  optional  

availability of the table Example: false

is_booked   boolean  optional  

booking status of the table Example: true

is_occupied   boolean  optional  

occupancy status of the table Example: false

table_shape   string  optional  

shape of the table Example: enim

Delete Table

requires authentication

Example request:
curl --request DELETE \
    "https://www.nerapos.com/np/connector/api/table/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/table/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE connector/api/table/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

table   string   

id of the table to be deleted Example: sed

Get Floors

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/floor" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/floor"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "floor_no": 1,
            "floor_help": "Ground Floor",
            "business_id": 1,
            "is_active": 1,
            "updated_at": "2020-06-04 22:36:37",
            "created_at": "2020-06-04 22:36:37",
            "id": 1
        }
    ]
}
 

Request      

GET connector/api/floor

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get tables by floor

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/floor/1/get-tables" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/floor/1/get-tables"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 5,
            "business_id": 1,
            "location_id": 1,
            "name": "Table 1",
            "description": null,
            "table_capacity": 4,
            "created_by": 9,
            "deleted_at": null,
            "created_at": "2020-06-04 22:36:37",
            "updated_at": "2020-06-04 22:36:37"
        }
    ]
}
 

Request      

GET connector/api/floor/{id}/get-tables

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

floor_id   string   

id of the floor Example: 1

Create Floor

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/floor" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"floor_no\": 1,
    \"floor_help\": \"Ground Floor\",
    \"business_id\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/floor"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "floor_no": 1,
    "floor_help": "Ground Floor",
    "business_id": 1,
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "floor_no": 1,
        "floor_help": "Ground Floor",
        "business_id": 1,
        "is_active": 1,
        "updated_at": "2020-06-04 22:36:37",
        "created_at": "2020-06-04 22:36:37",
        "id": 1
    }
}
 

Request      

POST connector/api/floor

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

floor_no   integer   

Floor number Example: 1

floor_help   string  optional  

Floor help Example: Ground Floor

business_id   integer   

id of the business Example: 1

is_active   boolean  optional  

Floor status Example: true

Update Floor

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/floor/{id}" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"floor_no\": 1,
    \"floor_help\": \"Ground Floor\",
    \"business_id\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/floor/{id}"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "floor_no": 1,
    "floor_help": "Ground Floor",
    "business_id": 1,
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "floor_no": 1,
        "floor_help": "Ground Floor",
        "business_id": 1,
        "is_active": 1,
        "updated_at": "2020-06-04 22:36:37",
        "created_at": "2020-06-04 22:36:37",
        "id": 1
    }
}
 

Request      

PUT connector/api/floor/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

floor_no   integer  optional  

Floor number Example: 1

floor_help   string  optional  

Floor help Example: Ground Floor

business_id   integer  optional  

id of the business Example: 1

is_active   boolean  optional  

Floor status Example: true

Delete Floor

requires authentication

Example request:
curl --request DELETE \
    "https://www.nerapos.com/np/connector/api/floor/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/floor/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE connector/api/floor/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

floor   string   

id of the floor to be deleted Example: vitae

Sales management

List sells

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/sell?location_id=1&contact_id=quia&status=final&payment_status=due%2Cpartial&start_date=2018-06-25&end_date=2018-06-25&user_id=quibusdam&service_staff_id=autem&shipping_status=ordered&source=quibusdam&only_subscriptions=illo&is_suspend=quia&is_quotation=alias&send_purchase_details=beatae&order_by_date=desc&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell"
);

const params = {
    "location_id": "1",
    "contact_id": "quia",
    "status": "final",
    "payment_status": "due,partial",
    "start_date": "2018-06-25",
    "end_date": "2018-06-25",
    "user_id": "quibusdam",
    "service_staff_id": "autem",
    "shipping_status": "ordered",
    "source": "quibusdam",
    "only_subscriptions": "illo",
    "is_suspend": "quia",
    "is_quotation": "alias",
    "send_purchase_details": "beatae",
    "order_by_date": "desc",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.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": "",
            "source": null,
            "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"
                }
            ],
            "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f",
            "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f"
        }
    ],
    "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
    }
}
 

Request      

GET connector/api/sell

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

location_id   string  optional  

id of the location Example: 1

contact_id   string  optional  

id of the customer Example: quia

status   string  optional  

Sell status. Available values final, draft, quotation, proforma Example: final

payment_status   string  optional  

Comma separated values of payment statuses. Available values due, partial, paid, overdue Example: due,partial

start_date   string  optional  

format:Y-m-d Example: 2018-06-25

end_date   string  optional  

format:Y-m-d Example: 2018-06-25

user_id   string  optional  

id of the user who created the sale Example: quibusdam

service_staff_id   string  optional  

id of the service staff assigned with the sale Example: autem

shipping_status   string  optional  

Shipping Status of the sale ('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: ordered

source   string  optional  

Source of the sale Example: quibusdam

only_subscriptions   string  optional  

Filter only subcription invoices (1, 0) Example: illo

is_suspend   string  optional  

Filter only suspended invoices (1, 0) Example: quia

is_quotation   string  optional  

Filter only quotation invoices (1, 0) Example: alias

send_purchase_details   string  optional  

Get purchase details of each sell line (1, 0) Example: beatae

order_by_date   string  optional  

Sort sell list by date ('asc', 'desc') Example: desc

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Create sell

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/sell" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sells\": [
        \"voluptatem\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sells": [
        "voluptatem"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.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": "",
            "source": null,
            "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",
            "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f",
            "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f",
            "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"
                }
            ]
        }
    ]
}
 

Request      

POST connector/api/sell

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

sells   string[]   

sells details

*   object  optional  
location_id   integer   

id of the business location Example: 1

contact_id   integer   

id of the customer Example: 20

transaction_date   string  optional  

transaction date format:Y-m-d H:i:s, Example: 2020-07-22 15:48:29

invoice_no   string  optional  

Invoice number Example: dolores

source   string  optional  

Source of the invoice Example: api, phone, woocommerce

status   string  optional  

sale status (final, draft) Example: final

sub_status   string  optional  

sale sub status ("quotation" for quotation and "proforma" for proforma invoice) Example: null

is_quotation   boolean  optional  

Is sell quotation (0, 1), If 1 status should be draft Example: true

tax_rate_id   integer  optional  

id of the tax rate applicable to the sale Example: 18

discount_amount   number  optional  

discount amount applicable to the sale Example: 10

discount_type   string  optional  

type of the discount amount (fixed, percentage) Example: fixed

sale_note   string  optional  

Example: explicabo

staff_note   string  optional  

Example: suscipit

commission_agent   integer  optional  

commission agent id Example: 10

shipping_details   string  optional  

shipping details Example: Express Delivery

shipping_address   string  optional  

shipping address Example: modi

shipping_status   string  optional  

('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: ordered

delivered_to   string  optional  

Name of the person recieved the consignment Example: 'Mr robin'

shipping_charges   number  optional  

shipping amount Example: 10

packing_charge   number  optional  

packing charge Example: 10

exchange_rate   number  optional  

exchange rate for the currency used Example: 1

selling_price_group_id   integer  optional  

id of the selling price group Example: 14

pay_term_number   integer  optional  

pay term value Example: 3

pay_term_type   string  optional  

type of the pay term value ('days', 'months') Example: months

is_suspend   boolean  optional  

Is suspended sale (0, 1) Example: false

is_recurring   integer  optional  

whether the invoice is recurring (0, 1) Example: 0

recur_interval   integer  optional  

value of the interval invoice will be regenerated Example: 11

recur_interval_type   string  optional  

type of the recur interval ('days', 'months', 'years') Example: months

subscription_repeat_on   integer  optional  

day of the month on which invoice will be generated if recur interval type is months (1-30) Example: 15

subscription_no   string  optional  

subscription number Example: omnis

recur_repetitions   integer  optional  

total number of invoices to be generated Example: 11

rp_redeemed   integer  optional  

reward points redeemed Example: 5

rp_redeemed_amount   number  optional  

reward point redeemed amount after conversion Example: 13.5

types_of_service_id   integer  optional  

types of service id Example: 17

service_custom_field_1   string  optional  

types of service custom field 1 Example: quia

service_custom_field_2   string  optional  

types of service custom field 2 Example: architecto

service_custom_field_3   string  optional  

types of service custom field 3 Example: velit

service_custom_field_4   string  optional  

types of service custom field 4 Example: maiores

service_custom_field_5   string  optional  

types of service custom field 5 Example: veritatis

service_custom_field_6   string  optional  

types of service custom field 6 Example: repellat

round_off_amount   number  optional  

round off amount on total payable Example: 81.7447947

table_id   integer  optional  

id of the table Example: 6

service_staff_id   integer  optional  

id of the service staff assigned to the sale Example: 1

change_return   number  optional  

Excess paid amount Example: 0

products   string[]   

array of the products for the sale

*   object  optional  
product_id   integer   

product id Example: 17

variation_id   integer   

variation id Example: 58

quantity   number   

quantity Example: 1

unit_price   number  optional  

unit selling price Example: 437.5

tax_rate_id   integer  optional  

tax rate id applicable on the product Example: 0

discount_amount   number  optional  

discount amount applicable on the product Example: 0

discount_type   string  optional  

type of discount amount ('fixed', 'percentage') Example: percentage

sub_unit_id   integer  optional  

sub unit id Example: 4

note   string  optional  

note for the product Example: voluptatem

modifiers   string[]  optional  

modifiers for the product

*   object  optional  
modifier_id   integer  optional  

modifier id Example: 21

price   number  optional  

modifier price Example: 12.5

quantity   integer  optional  

modifier quantity Example: 2

set_id   integer  optional  

modifier set id Example: 19

payments   string[]  optional  

payment lines for the sale

*   object  optional  
amount   number   

amount of the payment Example: 453.13

method   string  optional  

payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: cash

account_id   integer  optional  

account id Example: 20

card_number   string  optional  

Example: error

card_holder_name   string  optional  

Example: assumenda

card_transaction_number   string  optional  

Example: nihil

card_type   string  optional  

Example: corporis

card_month   string  optional  

Example: eos

card_year   string  optional  

Example: error

card_security   string  optional  

Example: sunt

transaction_no_1   string  optional  

Example: dolores

transaction_no_2   string  optional  

Example: vitae

transaction_no_3   string  optional  

Example: recusandae

bank_account_number   string  optional  

Example: laboriosam

note   string  optional  

payment note Example: nobis

cheque_number   string  optional  

Example: similique

Get the specified sell

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/sell/1?send_purchase_details=nisi" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell/1"
);

const params = {
    "send_purchase_details": "nisi",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.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": "",
            "source": null,
            "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"
                }
            ],
            "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f",
            "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f"
        }
    ]
}
 

Request      

GET connector/api/sell/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

sell   string   

comma separated ids of the sells Example: 55

Query Parameters

send_purchase_details   string  optional  

Get purchase details of each sell line (1, 0) Example: nisi

Update sell

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/sell/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contact_id\": 13,
    \"transaction_date\": \"2020-5-7 15:20:22\",
    \"status\": \"final\",
    \"sub_status\": \"null\",
    \"is_quotation\": true,
    \"tax_rate_id\": 8,
    \"discount_amount\": 10,
    \"discount_type\": \"fixed\",
    \"sale_note\": \"eos\",
    \"source\": \"ut\",
    \"staff_note\": \"quae\",
    \"is_suspend\": false,
    \"commission_agent\": 3,
    \"shipping_details\": \"Express Delivery\",
    \"shipping_address\": \"voluptatum\",
    \"shipping_status\": \"ordered\",
    \"delivered_to\": \"Mr Robin\",
    \"shipping_charges\": 10,
    \"packing_charge\": 10,
    \"exchange_rate\": 1,
    \"selling_price_group_id\": 16,
    \"pay_term_number\": 7,
    \"pay_term_type\": \"months\",
    \"is_recurring\": 0,
    \"recur_interval\": 4,
    \"recur_interval_type\": \"days\",
    \"subscription_repeat_on\": 7,
    \"subscription_no\": \"voluptas\",
    \"recur_repetitions\": 10,
    \"rp_redeemed\": 14,
    \"rp_redeemed_amount\": 13.5,
    \"types_of_service_id\": 14,
    \"service_custom_field_1\": \"illo\",
    \"service_custom_field_2\": \"natus\",
    \"service_custom_field_3\": \"ea\",
    \"service_custom_field_4\": \"nam\",
    \"service_custom_field_5\": \"vel\",
    \"service_custom_field_6\": \"nulla\",
    \"round_off_amount\": 0.2,
    \"table_id\": 19,
    \"service_staff_id\": 4,
    \"change_return\": 0,
    \"change_return_id\": 4,
    \"products\": [
        \"rerum\"
    ],
    \"payments\": [
        \"praesentium\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contact_id": 13,
    "transaction_date": "2020-5-7 15:20:22",
    "status": "final",
    "sub_status": "null",
    "is_quotation": true,
    "tax_rate_id": 8,
    "discount_amount": 10,
    "discount_type": "fixed",
    "sale_note": "eos",
    "source": "ut",
    "staff_note": "quae",
    "is_suspend": false,
    "commission_agent": 3,
    "shipping_details": "Express Delivery",
    "shipping_address": "voluptatum",
    "shipping_status": "ordered",
    "delivered_to": "Mr Robin",
    "shipping_charges": 10,
    "packing_charge": 10,
    "exchange_rate": 1,
    "selling_price_group_id": 16,
    "pay_term_number": 7,
    "pay_term_type": "months",
    "is_recurring": 0,
    "recur_interval": 4,
    "recur_interval_type": "days",
    "subscription_repeat_on": 7,
    "subscription_no": "voluptas",
    "recur_repetitions": 10,
    "rp_redeemed": 14,
    "rp_redeemed_amount": 13.5,
    "types_of_service_id": 14,
    "service_custom_field_1": "illo",
    "service_custom_field_2": "natus",
    "service_custom_field_3": "ea",
    "service_custom_field_4": "nam",
    "service_custom_field_5": "vel",
    "service_custom_field_6": "nulla",
    "round_off_amount": 0.2,
    "table_id": 19,
    "service_staff_id": 4,
    "change_return": 0,
    "change_return_id": 4,
    "products": [
        "rerum"
    ],
    "payments": [
        "praesentium"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.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": "",
    "source": null,
    "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"
        }
    ],
    "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f",
    "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f"
}
 

Request      

PUT connector/api/sell/{id}

PATCH connector/api/sell/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

sell   string   

id of sell to update Example: 6

Body Parameters

contact_id   integer  optional  

id of the customer Example: 13

transaction_date   string  optional  

transaction date format:Y-m-d H:i:s, Example: 2020-5-7 15:20:22

status   string  optional  

sale status (final, draft) Example: final

sub_status   string  optional  

sale sub status ("quotation" for quotation and "proforma" for proforma invoice) Example: null

is_quotation   boolean  optional  

Is sell quotation (0, 1), If 1 status should be draft Example: true

tax_rate_id   integer  optional  

id of the tax rate applicable to the sale Example: 8

discount_amount   number  optional  

discount amount applicable to the sale Example: 10

discount_type   string  optional  

type of the discount amount (fixed, percentage) Example: fixed

sale_note   string  optional  

Example: eos

source   string  optional  

Source of the invoice Example: ut

staff_note   string  optional  

Example: quae

is_suspend   boolean  optional  

Is suspended sale (0, 1) Example: false

commission_agent   integer  optional  

commission agent id Example: 3

shipping_details   string  optional  

shipping details Example: Express Delivery

shipping_address   string  optional  

shipping address Example: voluptatum

shipping_status   string  optional  

('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: ordered

delivered_to   string  optional  

Name of the person recieved the consignment Example: Mr Robin

shipping_charges   number  optional  

shipping amount Example: 10

packing_charge   number  optional  

packing charge Example: 10

exchange_rate   number  optional  

exchange rate for the currency used Example: 1

selling_price_group_id   integer  optional  

id of the selling price group Example: 16

pay_term_number   integer  optional  

pay term value Example: 7

pay_term_type   string  optional  

type of the pay term value ('days', 'months') Example: months

is_recurring   integer  optional  

whether the invoice is recurring (0, 1) Example: 0

recur_interval   integer  optional  

value of the interval invoice will be regenerated Example: 4

recur_interval_type   string  optional  

type of the recur interval ('days', 'months', 'years') Example: days

subscription_repeat_on   integer  optional  

day of the month on which invoice will be generated if recur interval type is months (1-30) Example: 7

subscription_no   string  optional  

subscription number Example: voluptas

recur_repetitions   integer  optional  

total number of invoices to be generated Example: 10

rp_redeemed   integer  optional  

reward points redeemed Example: 14

rp_redeemed_amount   number  optional  

reward point redeemed amount after conversion Example: 13.5

types_of_service_id   integer  optional  

types of service id Example: 14

service_custom_field_1   string  optional  

types of service custom field 1 Example: illo

service_custom_field_2   string  optional  

types of service custom field 2 Example: natus

service_custom_field_3   string  optional  

types of service custom field 3 Example: ea

service_custom_field_4   string  optional  

types of service custom field 4 Example: nam

service_custom_field_5   string  optional  

types of service custom field 5 Example: vel

service_custom_field_6   string  optional  

types of service custom field 6 Example: nulla

round_off_amount   number  optional  

round off amount on total payable Example: 0.2

table_id   integer  optional  

id of the table Example: 19

service_staff_id   integer  optional  

id of the service staff assigned to the sale Example: 4

change_return   number  optional  

Excess paid amount Example: 0

change_return_id   integer  optional  

id of the change return payment if exists Example: 4

products   string[]   

array of the products for the sale

*   object  optional  
sell_line_id   integer  optional  

sell line id for existing item only Example: 14

product_id   integer  optional  

product id Example: 17

variation_id   integer  optional  

variation id Example: 58

quantity   number  optional  

quantity Example: 1

unit_price   number  optional  

unit selling price Example: 437.5

tax_rate_id   integer  optional  

tax rate id applicable on the product Example: 20

discount_amount   number  optional  

discount amount applicable on the product Example: 0

discount_type   string  optional  

type of discount amount ('fixed', 'percentage') Example: percentage

sub_unit_id   integer  optional  

sub unit id Example: 12

note   string  optional  

note for the product Example: quo

modifiers   string[]  optional  

modifiers for the product

*   object  optional  
modifier_id   integer  optional  

modifier id Example: 21

price   number  optional  

modifier price Example: 12.5

quantity   integer  optional  

modifier quantity Example: 2

set_id   integer  optional  

modifier set id Example: 19

payments   string[]  optional  

payment lines for the sale

*   object  optional  
payment_id   integer  optional  

payment id for existing payment line Example: 12

amount   number  optional  

amount of the payment Example: 453.13

method   string  optional  

payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: cash

account_id   integer  optional  

account id Example: 14

card_number   string  optional  

Example: dignissimos

card_holder_name   string  optional  

Example: sint

card_transaction_number   string  optional  

Example: aut

card_type   string  optional  

Example: magnam

card_month   string  optional  

Example: et

card_year   string  optional  

Example: veritatis

card_security   string  optional  

Example: at

transaction_no_1   string  optional  

Example: aliquid

transaction_no_2   string  optional  

Example: molestiae

transaction_no_3   string  optional  

Example: earum

note   string  optional  

payment note Example: atque

cheque_number   string  optional  

Example: corrupti

bank_account_number   string  optional  

Example: reprehenderit

Delete Sell

requires authentication

Example request:
curl --request DELETE \
    "https://www.nerapos.com/np/connector/api/sell/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE connector/api/sell/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

sell   string   

id of the sell to be deleted Example: omnis

Add Sell Return

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/sell-return" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"transaction_id\": 2,
    \"transaction_date\": \"2020-5-7 15:20:22\",
    \"invoice_no\": \"repellendus\",
    \"discount_amount\": 10,
    \"discount_type\": \"fixed\",
    \"products\": [
        \"voluptas\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell-return"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "transaction_id": 2,
    "transaction_date": "2020-5-7 15:20:22",
    "invoice_no": "repellendus",
    "discount_amount": 10,
    "discount_type": "fixed",
    "products": [
        "voluptas"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.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"
}
 

Request      

POST connector/api/sell-return

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

transaction_id   integer   

Id of the sell Example: 2

transaction_date   string  optional  

transaction date format:Y-m-d H:i:s, Example: 2020-5-7 15:20:22

invoice_no   string  optional  

Invoice number of the return Example: repellendus

discount_amount   number  optional  

discount amount applicable to the sale Example: 10

discount_type   string  optional  

type of the discount amount (fixed, percentage) Example: fixed

products   string[]   

array of the products for the sale

*   object  optional  
sell_line_id   integer   

sell line id Example: 6

quantity   number   

quantity to be returned from the sell line Example: 1

unit_price_inc_tax   number   

unit selling price of the returning item Example: 437.5

List Sell Return

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/list-sell-return" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/list-sell-return"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.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
    }
}
 

Request      

GET connector/api/list-sell-return

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

sell_id   string  optional  

Id of the sell for which return is added Example: veritatis

GET connector/api/sell/{id}/get-invoice-image

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/sell/{id}/get-invoice-image" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/sell/{id}/get-invoice-image"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "The route np/connector/api/sell/{id}/get-invoice-image could not be found."
}
 

Request      

GET connector/api/sell/{id}/get-invoice-image

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Update shipping status

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/update-shipping-status" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 11,
    \"shipping_status\": \"ordered\",
    \"delivered_to\": \"aliquam\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/update-shipping-status"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 11,
    "shipping_status": "ordered",
    "delivered_to": "aliquam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST connector/api/update-shipping-status

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

id of the sale Example: 11

shipping_status   string  optional  

('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: ordered

delivered_to   string  optional  

Name of the consignee Example: aliquam

Unit management

List units

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/unit" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/unit"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "actual_name": "Pieces",
            "short_name": "Pc(s)",
            "allow_decimal": 0,
            "base_unit_id": null,
            "base_unit_multiplier": null,
            "created_by": 1,
            "deleted_at": null,
            "created_at": "2018-01-03 15:15:20",
            "updated_at": "2018-01-03 15:15:20",
            "base_unit": null
        },
        {
            "id": 2,
            "business_id": 1,
            "actual_name": "Packets",
            "short_name": "packets",
            "allow_decimal": 0,
            "base_unit_id": null,
            "base_unit_multiplier": null,
            "created_by": 1,
            "deleted_at": null,
            "created_at": "2018-01-06 01:07:01",
            "updated_at": "2018-01-06 01:08:36",
            "base_unit": null
        },
        {
            "id": 15,
            "business_id": 1,
            "actual_name": "Dozen",
            "short_name": "dz",
            "allow_decimal": 0,
            "base_unit_id": 1,
            "base_unit_multiplier": "12.0000",
            "created_by": 9,
            "deleted_at": null,
            "created_at": "2020-07-20 13:11:09",
            "updated_at": "2020-07-20 13:11:09",
            "base_unit": {
                "id": 1,
                "business_id": 1,
                "actual_name": "Pieces",
                "short_name": "Pc(s)",
                "allow_decimal": 0,
                "base_unit_id": null,
                "base_unit_multiplier": null,
                "created_by": 1,
                "deleted_at": null,
                "created_at": "2018-01-03 15:15:20",
                "updated_at": "2018-01-03 15:15:20"
            }
        }
    ]
}
 

Request      

GET connector/api/unit

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get the specified unit

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/unit/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/unit/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "actual_name": "Pieces",
            "short_name": "Pc(s)",
            "allow_decimal": 0,
            "base_unit_id": null,
            "base_unit_multiplier": null,
            "created_by": 1,
            "deleted_at": null,
            "created_at": "2018-01-03 15:15:20",
            "updated_at": "2018-01-03 15:15:20",
            "base_unit": null
        }
    ]
}
 

Request      

GET connector/api/unit/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

unit   string   

comma separated ids of the units Example: 1

Brand management

List brands

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/brand" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/brand"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "name": "Levis",
            "description": null,
            "created_by": 1,
            "deleted_at": null,
            "created_at": "2018-01-03 21:19:47",
            "updated_at": "2018-01-03 21:19:47"
        },
        {
            "id": 2,
            "business_id": 1,
            "name": "Espirit",
            "description": null,
            "created_by": 1,
            "deleted_at": null,
            "created_at": "2018-01-03 21:19:58",
            "updated_at": "2018-01-03 21:19:58"
        }
    ]
}
 

Request      

GET connector/api/brand

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Create Brands

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/brand" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Table 1\",
    \"description\": \"Facilis necessitatibus et iste aut.\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/brand"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Table 1",
    "description": "Facilis necessitatibus et iste aut."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "business_id": 1,
        "name": "Levis",
        "description": null,
        "created_by": 1,
        "deleted_at": null,
        "created_at": "2018-01-03 21:19:47",
        "updated_at": "2018-01-03 21:19:47",
        "id": 1
    }
}
 

Request      

POST connector/api/brand

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Table name Example: Table 1

description   string  optional  

Table description Example: Facilis necessitatibus et iste aut.

Get the specified brand

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/brand/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/brand/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "name": "Levis",
            "description": null,
            "created_by": 1,
            "deleted_at": null,
            "created_at": "2018-01-03 21:19:47",
            "updated_at": "2018-01-03 21:19:47"
        }
    ]
}
 

Request      

GET connector/api/brand/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

brand   string   

comma separated ids of the brands Example: 1

Contact management

List contact

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/contactapi?type=iure&name=pariatur&biz_name=neque&mobile_num=12&contact_id=nihil&order_by=voluptates&direction=itaque&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/contactapi"
);

const params = {
    "type": "iure",
    "name": "pariatur",
    "biz_name": "neque",
    "mobile_num": "12",
    "contact_id": "nihil",
    "order_by": "voluptates",
    "direction": "itaque",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 2,
            "business_id": 1,
            "type": "supplier",
            "supplier_business_name": "Alpha Clothings",
            "name": "Michael",
            "prefix": null,
            "first_name": "Michael",
            "middle_name": null,
            "last_name": null,
            "email": null,
            "contact_id": "CO0001",
            "contact_status": "active",
            "tax_number": "4590091535",
            "city": "Phoenix",
            "state": "Arizona",
            "country": "USA",
            "address_line_1": "Linking Street",
            "address_line_2": null,
            "zip_code": null,
            "dob": null,
            "mobile": "(378) 400-1234",
            "landline": null,
            "alternate_number": null,
            "pay_term_number": 15,
            "pay_term_type": "days",
            "credit_limit": null,
            "created_by": 1,
            "balance": "0.0000",
            "total_rp": 0,
            "total_rp_used": 0,
            "total_rp_expired": 0,
            "is_default": 0,
            "shipping_address": null,
            "position": null,
            "customer_group_id": null,
            "crm_source": null,
            "crm_life_stage": null,
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "deleted_at": null,
            "created_at": "2018-01-03 20:59:38",
            "updated_at": "2018-06-11 22:21:03",
            "remember_token": null,
            "password": null
        },
        {
            "id": 3,
            "business_id": 1,
            "type": "supplier",
            "supplier_business_name": "Manhattan Clothing Ltd.",
            "name": "Philip",
            "prefix": null,
            "first_name": "Philip",
            "middle_name": null,
            "last_name": null,
            "email": null,
            "contact_id": "CO0003",
            "contact_status": "active",
            "tax_number": "54869310093",
            "city": "Phoenix",
            "state": "Arizona",
            "country": "USA",
            "address_line_1": "Linking Street",
            "address_line_2": null,
            "zip_code": null,
            "dob": null,
            "mobile": "(378) 400-1234",
            "landline": null,
            "alternate_number": null,
            "pay_term_number": 15,
            "pay_term_type": "days",
            "credit_limit": null,
            "created_by": 1,
            "balance": "0.0000",
            "total_rp": 0,
            "total_rp_used": 0,
            "total_rp_expired": 0,
            "is_default": 0,
            "shipping_address": null,
            "position": null,
            "customer_group_id": null,
            "crm_source": null,
            "crm_life_stage": null,
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "deleted_at": null,
            "created_at": "2018-01-03 21:00:55",
            "updated_at": "2018-06-11 22:21:36",
            "remember_token": null,
            "password": null
        },
        {
            "id": 5,
            "business_id": 1,
            "type": "supplier",
            "supplier_business_name": "Digital Ocean",
            "name": "Mike McCubbin",
            "prefix": null,
            "first_name": "Mike McCubbin",
            "middle_name": null,
            "last_name": null,
            "email": null,
            "contact_id": "CN0004",
            "contact_status": "active",
            "tax_number": "52965489001",
            "city": "Phoenix",
            "state": "Arizona",
            "country": "USA",
            "address_line_1": "Linking Street",
            "address_line_2": null,
            "zip_code": null,
            "dob": null,
            "mobile": "(378) 400-1234",
            "landline": null,
            "alternate_number": null,
            "pay_term_number": 30,
            "pay_term_type": "days",
            "credit_limit": null,
            "created_by": 1,
            "balance": "0.0000",
            "total_rp": 0,
            "total_rp_used": 0,
            "total_rp_expired": 0,
            "is_default": 0,
            "shipping_address": null,
            "position": null,
            "customer_group_id": null,
            "crm_source": null,
            "crm_life_stage": null,
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "deleted_at": null,
            "created_at": "2018-01-06 06:53:22",
            "updated_at": "2018-06-11 22:21:47",
            "remember_token": null,
            "password": null
        },
        {
            "id": 6,
            "business_id": 1,
            "type": "supplier",
            "supplier_business_name": "Univer Suppliers",
            "name": "Jackson Hill",
            "prefix": null,
            "first_name": "Jackson Hill",
            "middle_name": null,
            "last_name": null,
            "email": null,
            "contact_id": "CO0002",
            "contact_status": "active",
            "tax_number": "5459000655",
            "city": "Phoenix",
            "state": "Arizona",
            "country": "USA",
            "address_line_1": "Linking Street",
            "address_line_2": null,
            "zip_code": null,
            "dob": null,
            "mobile": "(378) 400-1234",
            "landline": null,
            "alternate_number": null,
            "pay_term_number": 45,
            "pay_term_type": "days",
            "credit_limit": null,
            "created_by": 1,
            "balance": "0.0000",
            "total_rp": 0,
            "total_rp_used": 0,
            "total_rp_expired": 0,
            "is_default": 0,
            "shipping_address": null,
            "position": null,
            "customer_group_id": null,
            "crm_source": null,
            "crm_life_stage": null,
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "custom_field5": null,
            "custom_field6": null,
            "custom_field7": null,
            "custom_field8": null,
            "custom_field9": null,
            "custom_field10": null,
            "deleted_at": null,
            "created_at": "2018-01-06 06:55:09",
            "updated_at": "2018-06-11 22:21:18",
            "remember_token": null,
            "password": null
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/contactapi?page=1",
        "last": "http://local.pos.com/connector/api/contactapi?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http://local.pos.com/connector/api/contactapi",
        "per_page": "10",
        "to": 4,
        "total": 4
    }
}
 

Request      

GET connector/api/contactapi

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

type   string   

Type of contact (supplier, customer) Example: iure

name   string  optional  

Search term for contact name Example: pariatur

biz_name   string  optional  

Search term for contact's business name Example: neque

mobile_num   integer  optional  

Search term for contact's mobile number Example: 12

contact_id   string  optional  

Search term for contact's contact_id. Ex(CO0005) Example: nihil

order_by   string  optional  

Column name to sort the result, Column: name, supplier_business_name Example: voluptates

direction   string  optional  

Direction to sort the result, Direction: desc, asc Example: itaque

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Create contact

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/contactapi" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"customer\",
    \"supplier_business_name\": \"illo\",
    \"prefix\": \"iste\",
    \"first_name\": \"earum\",
    \"middle_name\": \"voluptas\",
    \"last_name\": \"aut\",
    \"tax_number\": \"8787fefef\",
    \"pay_term_number\": 3,
    \"pay_term_type\": \"months\",
    \"mobile\": \"4578691009\",
    \"landline\": \"5487-8454-4145\",
    \"alternate_number\": \"841847541222\",
    \"address_line_1\": \"consequatur\",
    \"address_line_2\": \"est\",
    \"city\": \"quis\",
    \"state\": \"praesentium\",
    \"country\": \"est\",
    \"zip_code\": \"inventore\",
    \"customer_group_id\": \"ut\",
    \"contact_id\": \"voluptas\",
    \"dob\": \"2000-06-13\",
    \"custom_field1\": \"quia\",
    \"custom_field2\": \"quidem\",
    \"custom_field3\": \"animi\",
    \"custom_field4\": \"velit\",
    \"email\": \"[email protected]\",
    \"shipping_address\": \"sed\",
    \"position\": \"hic\",
    \"opening_balance\": 0,
    \"source_id\": 12,
    \"life_stage_id\": 1,
    \"assigned_to\": [
        \"repellendus\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/contactapi"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "customer",
    "supplier_business_name": "illo",
    "prefix": "iste",
    "first_name": "earum",
    "middle_name": "voluptas",
    "last_name": "aut",
    "tax_number": "8787fefef",
    "pay_term_number": 3,
    "pay_term_type": "months",
    "mobile": "4578691009",
    "landline": "5487-8454-4145",
    "alternate_number": "841847541222",
    "address_line_1": "consequatur",
    "address_line_2": "est",
    "city": "quis",
    "state": "praesentium",
    "country": "est",
    "zip_code": "inventore",
    "customer_group_id": "ut",
    "contact_id": "voluptas",
    "dob": "2000-06-13",
    "custom_field1": "quia",
    "custom_field2": "quidem",
    "custom_field3": "animi",
    "custom_field4": "velit",
    "email": "[email protected]",
    "shipping_address": "sed",
    "position": "hic",
    "opening_balance": 0,
    "source_id": 12,
    "life_stage_id": 1,
    "assigned_to": [
        "repellendus"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "type": "customer",
        "name": "test customer",
        "tax_number": "75879BHF",
        "mobile": "7878825008",
        "business_id": 1,
        "created_by": 9,
        "credit_limit": null,
        "contact_id": "CO0007",
        "updated_at": "2020-06-04 21:59:21",
        "created_at": "2020-06-04 21:59:21",
        "id": 17
    }
}
 

Request      

POST connector/api/contactapi

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   string   

Type of contact (supplier, customer, both, lead) Example: customer

supplier_business_name   string   

Required if type is supplier Example: illo

prefix   string  optional  

Prefix for the name of the contact Example: iste

first_name   string   

Name of the contact Example: earum

middle_name   string  optional  

Example: voluptas

last_name   string  optional  

Example: aut

tax_number   string  optional  

Example: 8787fefef

pay_term_number   number  optional  

Example: 3

pay_term_type   string  optional  

(months ,days) Example: months

mobile   string   

Example: 4578691009

landline   string  optional  

Example: 5487-8454-4145

alternate_number   string  optional  

Example: 841847541222

address_line_1   string  optional  

Example: consequatur

address_line_2   string  optional  

Example: est

city   string  optional  

Example: quis

state   string  optional  

Example: praesentium

country   string  optional  

Example: est

zip_code   string  optional  

Example: inventore

customer_group_id   string  optional  

Example: ut

contact_id   string  optional  

Example: voluptas

dob   string  optional  

Fromat: Y-m-d Example: 2000-06-13

custom_field1   string  optional  

Example: quia

custom_field2   string  optional  

Example: quidem

custom_field3   string  optional  

Example: animi

custom_field4   string  optional  

Example: velit

email   string  optional  

Example: [email protected]

shipping_address   string  optional  

Example: sed

position   string  optional  

Example: hic

opening_balance   number  optional  

Example: 0

source_id   integer  optional  

Id of the source. Applicable only if the type is lead Example: 12

life_stage_id   integer  optional  

Id of the Life stage. Applicable only if the type is lead Example: 1

assigned_to   string[]  optional  

Ids of the users the lead is assigned to. Applicable only if the type is lead

Get the specified contact

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/contactapi/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/contactapi/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "business_id": 1,
            "type": "customer",
            "supplier_business_name": null,
            "name": " Walk-In Customer  ",
            "prefix": null,
            "first_name": "Walk-In Customer",
            "middle_name": null,
            "last_name": null,
            "email": "[email protected]",
            "contact_id": "CO0005",
            "contact_status": "active",
            "tax_number": null,
            "city": "Phoenix",
            "state": "Arizona",
            "country": "USA",
            "address_line_1": "Linking Street",
            "address_line_2": null,
            "zip_code": "85001",
            "dob": null,
            "mobile": "(378) 400-1234",
            "landline": null,
            "alternate_number": null,
            "pay_term_number": null,
            "pay_term_type": null,
            "credit_limit": "0.0000",
            "created_by": 1,
            "balance": "0.0000",
            "total_rp": 0,
            "total_rp_used": 0,
            "total_rp_expired": 0,
            "is_default": 1,
            "shipping_address": null,
            "position": null,
            "customer_group_id": null,
            "crm_source": null,
            "crm_life_stage": null,
            "custom_field1": null,
            "custom_field2": null,
            "custom_field3": null,
            "custom_field4": null,
            "deleted_at": null,
            "created_at": "2018-01-03 20:45:20",
            "updated_at": "2020-08-10 10:26:45",
            "remember_token": null,
            "password": null,
            "customer_group": null,
            "opening_balance": "0.0000",
            "opening_balance_paid": "0.0000",
            "total_purchase": "0.0000",
            "purchase_paid": "0.0000",
            "total_purchase_return": "0.0000",
            "purchase_return_paid": "0.0000",
            "total_invoice": "2050.0000",
            "invoice_received": "1987.5000",
            "total_sell_return": "0.0000",
            "sell_return_paid": "0.0000",
            "purchase_due": 0,
            "sell_due": 62.5,
            "purchase_return_due": 0,
            "sell_return_due": 0
        }
    ]
}
 

Request      

GET connector/api/contactapi/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact   string   

comma separated ids of contacts Example: 2

Update contact

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/contactapi/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"customer\",
    \"supplier_business_name\": \"ipsam\",
    \"prefix\": \"error\",
    \"first_name\": \"corporis\",
    \"middle_name\": \"quod\",
    \"last_name\": \"totam\",
    \"tax_number\": \"488744dwd\",
    \"pay_term_number\": 3,
    \"pay_term_type\": \"months\",
    \"mobile\": \"8795461009\",
    \"landline\": \"65484-848-848\",
    \"alternate_number\": \"9898795220\",
    \"address_line_1\": \"corporis\",
    \"address_line_2\": \"occaecati\",
    \"city\": \"sapiente\",
    \"state\": \"ut\",
    \"country\": \"consequatur\",
    \"zip_code\": \"totam\",
    \"customer_group_id\": \"eius\",
    \"contact_id\": \"vel\",
    \"dob\": \"2000-06-13\",
    \"custom_field1\": \"iste\",
    \"custom_field2\": \"aspernatur\",
    \"custom_field3\": \"impedit\",
    \"custom_field4\": \"ea\",
    \"email\": \"[email protected]\",
    \"shipping_address\": \"dolore\",
    \"position\": \"odio\",
    \"opening_balance\": 10.3,
    \"source_id\": 20,
    \"life_stage_id\": 12,
    \"assigned_to\": [
        \"hic\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/contactapi/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "customer",
    "supplier_business_name": "ipsam",
    "prefix": "error",
    "first_name": "corporis",
    "middle_name": "quod",
    "last_name": "totam",
    "tax_number": "488744dwd",
    "pay_term_number": 3,
    "pay_term_type": "months",
    "mobile": "8795461009",
    "landline": "65484-848-848",
    "alternate_number": "9898795220",
    "address_line_1": "corporis",
    "address_line_2": "occaecati",
    "city": "sapiente",
    "state": "ut",
    "country": "consequatur",
    "zip_code": "totam",
    "customer_group_id": "eius",
    "contact_id": "vel",
    "dob": "2000-06-13",
    "custom_field1": "iste",
    "custom_field2": "aspernatur",
    "custom_field3": "impedit",
    "custom_field4": "ea",
    "email": "[email protected]",
    "shipping_address": "dolore",
    "position": "odio",
    "opening_balance": 10.3,
    "source_id": 20,
    "life_stage_id": 12,
    "assigned_to": [
        "hic"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 21,
        "business_id": 1,
        "type": "customer",
        "supplier_business_name": null,
        "name": "created from api",
        "prefix": null,
        "first_name": "created from api",
        "middle_name": null,
        "last_name": null,
        "email": null,
        "contact_id": "CO0009",
        "contact_status": "active",
        "tax_number": null,
        "city": null,
        "state": null,
        "country": null,
        "address_line_1": "test address",
        "address_line_2": null,
        "zip_code": "54878787",
        "dob": "2000-06-13",
        "mobile": "8754154872154",
        "landline": null,
        "alternate_number": null,
        "pay_term_number": null,
        "pay_term_type": null,
        "credit_limit": null,
        "created_by": 1,
        "balance": "0.0000",
        "total_rp": 0,
        "total_rp_used": 0,
        "total_rp_expired": 0,
        "is_default": 0,
        "shipping_address": null,
        "position": null,
        "customer_group_id": null,
        "crm_source": null,
        "crm_life_stage": null,
        "custom_field1": null,
        "custom_field2": null,
        "custom_field3": null,
        "custom_field4": null,
        "deleted_at": null,
        "created_at": "2020-08-10 10:41:42",
        "updated_at": "2020-08-10 10:41:42",
        "remember_token": null,
        "password": null
    }
}
 

Request      

PUT connector/api/contactapi/{id}

PATCH connector/api/contactapi/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact   string   

id of the contact to be updated Example: 17

Body Parameters

type   string  optional  

Type of contact (supplier, customer, both) Example: customer

supplier_business_name   string  optional  

required* Required if type is supplier Example: ipsam

prefix   string  optional  

Prefix for the name of the contact Example: error

first_name   string   

Name of the contact Example: corporis

middle_name   string  optional  

Example: quod

last_name   string  optional  

Example: totam

tax_number   string  optional  

Example: 488744dwd

pay_term_number   number  optional  

Example: 3

pay_term_type   string  optional  

(months ,days) Example: months

mobile   string   

Example: 8795461009

landline   string  optional  

Example: 65484-848-848

alternate_number   string  optional  

Example: 9898795220

address_line_1   string  optional  

Example: corporis

address_line_2   string  optional  

Example: occaecati

city   string  optional  

Example: sapiente

state   string  optional  

Example: ut

country   string  optional  

Example: consequatur

zip_code   string  optional  

Example: totam

customer_group_id   string  optional  

Example: eius

contact_id   string  optional  

Example: vel

dob   string  optional  

Fromat: Y-m-d Example: 2000-06-13

custom_field1   string  optional  

Example: iste

custom_field2   string  optional  

Example: aspernatur

custom_field3   string  optional  

Example: impedit

custom_field4   string  optional  

Example: ea

email   string  optional  

Example: [email protected]

shipping_address   string  optional  

Example: dolore

position   string  optional  

Example: odio

opening_balance   number  optional  

Example: 10.3

source_id   integer  optional  

Id of the source. Applicable only if the type is lead Example: 20

life_stage_id   integer  optional  

Id of the Life stage. Applicable only if the type is lead Example: 12

assigned_to   string[]  optional  

Ids of the users the lead is assigned to. Applicable only if the type is lead

Contact payment

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/contactapi-payment" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contact_id\": 17,
    \"amount\": 453.13,
    \"method\": \"cash\",
    \"paid_on\": \"2020-07-22 15:48:29\",
    \"account_id\": 2,
    \"card_number\": \"aut\",
    \"card_holder_name\": \"consequatur\",
    \"card_transaction_number\": \"est\",
    \"card_type\": \"animi\",
    \"card_month\": \"esse\",
    \"card_year\": \"itaque\",
    \"card_security\": \"eligendi\",
    \"transaction_no_1\": \"in\",
    \"transaction_no_2\": \"corporis\",
    \"transaction_no_3\": \"in\",
    \"cheque_number\": \"adipisci\",
    \"bank_account_number\": \"corrupti\",
    \"note\": \"sint\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/contactapi-payment"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contact_id": 17,
    "amount": 453.13,
    "method": "cash",
    "paid_on": "2020-07-22 15:48:29",
    "account_id": 2,
    "card_number": "aut",
    "card_holder_name": "consequatur",
    "card_transaction_number": "est",
    "card_type": "animi",
    "card_month": "esse",
    "card_year": "itaque",
    "card_security": "eligendi",
    "transaction_no_1": "in",
    "transaction_no_2": "corporis",
    "transaction_no_3": "in",
    "cheque_number": "adipisci",
    "bank_account_number": "corrupti",
    "note": "sint"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "amount": "20",
        "method": "cash",
        "paid_on": "2020-07-22 15:48:29",
        "created_by": 1,
        "payment_for": "19",
        "business_id": 1,
        "is_advance": 1,
        "payment_ref_no": "SP2020/0127",
        "document": null,
        "updated_at": "2020-07-22 15:48:29",
        "created_at": "2020-07-22 15:48:29",
        "id": 215
    }
}
 

Request      

POST connector/api/contactapi-payment

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

contact_id   integer   

id of the contact Example: 17

amount   number   

amount of the payment Example: 453.13

method   string  optional  

payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: cash

paid_on   string  optional  

transaction date format:Y-m-d H:i:s, Example: 2020-07-22 15:48:29

account_id   integer  optional  

account id Example: 2

card_number   string  optional  

Example: aut

card_holder_name   string  optional  

Example: consequatur

card_transaction_number   string  optional  

Example: est

card_type   string  optional  

Example: animi

card_month   string  optional  

Example: esse

card_year   string  optional  

Example: itaque

card_security   string  optional  

Example: eligendi

transaction_no_1   string  optional  

Example: in

transaction_no_2   string  optional  

Example: corporis

transaction_no_3   string  optional  

Example: in

cheque_number   string  optional  

Example: adipisci

bank_account_number   string  optional  

Example: corrupti

note   string  optional  

payment note Example: sint

Product management

List products

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/product?order_by=quasi&order_direction=non&brand_id=ut&category_id=quia&sub_category_id=illo&location_id=1&selling_price_group=quia&send_lot_detail=ullam&name=expedita&sku=non&type=quas&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/product"
);

const params = {
    "order_by": "quasi",
    "order_direction": "non",
    "brand_id": "ut",
    "category_id": "quia",
    "sub_category_id": "illo",
    "location_id": "1",
    "selling_price_group": "quia",
    "send_lot_detail": "ullam",
    "name": "expedita",
    "sku": "non",
    "type": "quas",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Men's Reverse Fleece Crew",
            "business_id": 1,
            "type": "single",
            "sub_unit_ids": null,
            "enable_stock": 1,
            "alert_quantity": "5.0000",
            "sku": "AS0001",
            "barcode_type": "C128",
            "expiry_period": null,
            "expiry_period_type": null,
            "enable_sr_no": 0,
            "weight": null,
            "product_custom_field1": null,
            "product_custom_field2": null,
            "product_custom_field3": null,
            "product_custom_field4": null,
            "image": null,
            "woocommerce_media_id": null,
            "product_description": null,
            "created_by": 1,
            "warranty_id": null,
            "is_inactive": 0,
            "repair_model_id": null,
            "not_for_selling": 0,
            "ecom_shipping_class_id": null,
            "ecom_active_in_store": 1,
            "woocommerce_product_id": 356,
            "woocommerce_disable_sync": 0,
            "image_url": "http://local.pos.com/img/default.png",
            "product_variations": [
                {
                    "id": 1,
                    "variation_template_id": null,
                    "name": "DUMMY",
                    "product_id": 1,
                    "is_dummy": 1,
                    "created_at": "2018-01-03 21:29:08",
                    "updated_at": "2018-01-03 21:29:08",
                    "variations": [
                        {
                            "id": 1,
                            "name": "DUMMY",
                            "product_id": 1,
                            "sub_sku": "AS0001",
                            "product_variation_id": 1,
                            "woocommerce_variation_id": null,
                            "variation_value_id": null,
                            "default_purchase_price": "130.0000",
                            "dpp_inc_tax": "143.0000",
                            "profit_percent": "0.0000",
                            "default_sell_price": "130.0000",
                            "sell_price_inc_tax": "143.0000",
                            "created_at": "2018-01-03 21:29:08",
                            "updated_at": "2020-06-09 00:23:22",
                            "deleted_at": null,
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 56,
                                    "product_id": 1,
                                    "product_variation_id": 1,
                                    "variation_id": 1,
                                    "location_id": 1,
                                    "qty_available": "20.0000",
                                    "created_at": "2020-06-08 23:46:40",
                                    "updated_at": "2020-06-08 23:46:40"
                                }
                            ],
                            "media": [
                                {
                                    "id": 1,
                                    "business_id": 1,
                                    "file_name": "1591686466_978227300_nn.jpeg",
                                    "description": null,
                                    "uploaded_by": 9,
                                    "model_type": "App\\Variation",
                                    "woocommerce_media_id": null,
                                    "model_id": 1,
                                    "created_at": "2020-06-09 00:07:46",
                                    "updated_at": "2020-06-09 00:07:46",
                                    "display_name": "nn.jpeg",
                                    "display_url": "http://local.pos.com/uploads/media/1591686466_978227300_nn.jpeg"
                                }
                            ],
                            "discounts": [
                                {
                                    "id": 2,
                                    "name": "FLAT 10%",
                                    "business_id": 1,
                                    "brand_id": null,
                                    "category_id": null,
                                    "location_id": 1,
                                    "priority": 2,
                                    "discount_type": "fixed",
                                    "discount_amount": "5.0000",
                                    "starts_at": "2021-09-01 11:45:00",
                                    "ends_at": "2021-09-30 11:45:00",
                                    "is_active": 1,
                                    "spg": null,
                                    "applicable_in_cg": 1,
                                    "created_at": "2021-09-01 11:46:00",
                                    "updated_at": "2021-09-01 12:12:55",
                                    "formated_starts_at": " 11:45",
                                    "formated_ends_at": " 11:45"
                                }
                            ],
                            "selling_price_group": [
                                {
                                    "id": 2,
                                    "variation_id": 1,
                                    "price_group_id": 1,
                                    "price_inc_tax": "140.0000",
                                    "created_at": "2020-06-09 00:23:31",
                                    "updated_at": "2020-06-09 00:23:31"
                                }
                            ]
                        }
                    ]
                }
            ],
            "brand": {
                "id": 1,
                "business_id": 1,
                "name": "Levis",
                "description": null,
                "created_by": 1,
                "deleted_at": null,
                "created_at": "2018-01-03 21:19:47",
                "updated_at": "2018-01-03 21:19:47"
            },
            "unit": {
                "id": 1,
                "business_id": 1,
                "actual_name": "Pieces",
                "short_name": "Pc(s)",
                "allow_decimal": 0,
                "base_unit_id": null,
                "base_unit_multiplier": null,
                "created_by": 1,
                "deleted_at": null,
                "created_at": "2018-01-03 15:15:20",
                "updated_at": "2018-01-03 15:15:20"
            },
            "category": {
                "id": 1,
                "name": "Men's",
                "business_id": 1,
                "short_code": null,
                "parent_id": 0,
                "created_by": 1,
                "category_type": "product",
                "description": null,
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2018-01-03 21:06:34",
                "updated_at": "2018-01-03 21:06:34"
            },
            "sub_category": {
                "id": 5,
                "name": "Shirts",
                "business_id": 1,
                "short_code": null,
                "parent_id": 1,
                "created_by": 1,
                "category_type": "product",
                "description": null,
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2018-01-03 21:08:18",
                "updated_at": "2018-01-03 21:08:18"
            },
            "product_tax": {
                "id": 1,
                "business_id": 1,
                "name": "VAT@10%",
                "amount": 10,
                "is_tax_group": 0,
                "created_by": 1,
                "woocommerce_tax_rate_id": null,
                "deleted_at": null,
                "created_at": "2018-01-04 02:40:07",
                "updated_at": "2018-01-04 02:40:07"
            },
            "product_locations": [
                {
                    "id": 1,
                    "business_id": 1,
                    "location_id": null,
                    "name": "Awesome Shop",
                    "landmark": "Linking Street",
                    "country": "USA",
                    "state": "Arizona",
                    "city": "Phoenix",
                    "zip_code": "85001",
                    "invoice_scheme_id": 1,
                    "invoice_layout_id": 1,
                    "selling_price_group_id": null,
                    "print_receipt_on_invoice": 1,
                    "receipt_printer_type": "browser",
                    "printer_id": null,
                    "mobile": null,
                    "alternate_number": null,
                    "email": null,
                    "website": null,
                    "featured_products": [
                        "5",
                        "71"
                    ],
                    "is_active": 1,
                    "default_payment_accounts": "{\"cash\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"card\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"cheque\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"other\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":\"3\"}}",
                    "custom_field1": null,
                    "custom_field2": null,
                    "custom_field3": null,
                    "custom_field4": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:15:20",
                    "updated_at": "2020-06-09 01:07:05",
                    "pivot": {
                        "product_id": 2,
                        "location_id": 1
                    }
                }
            ],
            "modifier_sets": [
                {
                    "id": 10,
                    "name": "Extras",
                    "business_id": 1,
                    "type": "modifier",
                    "unit_id": null,
                    "secondary_unit_id": null,
                    "sub_unit_ids": null,
                    "brand_id": null,
                    "category_id": null,
                    "sub_category_id": null,
                    "tax": null,
                    "tax_type": "inclusive",
                    "enable_stock": 0,
                    "alert_quantity": null,
                    "sku": "256366",
                    "barcode_type": "C128",
                    "expiry_period": null,
                    "expiry_period_type": null,
                    "enable_sr_no": 0,
                    "mandatory_sr_no": 0,
                    "weight": null,
                    "weight_type": "kg",
                    "product_custom_field1": null,
                    "product_custom_field2": null,
                    "product_custom_field3": null,
                    "product_custom_field4": null,
                    "image": null,
                    "salla_media_id": null,
                    "woocommerce_media_id": null,
                    "product_description": null,
                    "created_by": 1,
                    "woocommerce_product_id": null,
                    "woocommerce_disable_sync": 0,
                    "warranty_id": null,
                    "modifier_product_id": null,
                    "is_inactive": 0,
                    "not_for_selling": 0,
                    "kds_stations": null,
                    "created_at": "2023-10-26T09:33:14.000000Z",
                    "updated_at": "2023-10-26T09:33:14.000000Z",
                    "image_url": "https://www.nerapos.com/np/img/default.png",
                    "pivot": {
                        "product_id": 1,
                        "modifier_set_id": 10
                    },
                    "variations": [
                        {
                            "id": 12,
                            "name": "Ketchup",
                            "product_id": 1,
                            "sub_sku": "1-2",
                            "product_variation_id": 15,
                            "variation_value_id": null,
                            "default_purchase_price": "0.00000",
                            "dpp_inc_tax": "0.00000",
                            "default_purchase_unit": null,
                            "profit_percent": "0.0000",
                            "default_sell_price": "0.00000",
                            "sell_price_inc_tax": "0.00000",
                            "default_sell_unit": null,
                            "is_inactive": 0,
                            "created_at": "2023-10-26T09:33:14.000000Z",
                            "updated_at": "2023-10-26T09:33:14.000000Z",
                            "deleted_at": null,
                            "combo_variations": null
                        },
                        {
                            "id": 13,
                            "name": "Extra Cheese",
                            "product_id": 1,
                            "sub_sku": "1-3",
                            "product_variation_id": 15,
                            "variation_value_id": null,
                            "default_purchase_price": "2.00000",
                            "dpp_inc_tax": "2.00000",
                            "default_purchase_unit": null,
                            "profit_percent": "0.0000",
                            "default_sell_price": "2.00000",
                            "sell_price_inc_tax": "2.00000",
                            "default_sell_unit": null,
                            "is_inactive": 0,
                            "created_at": "2023-10-26T09:33:14.000000Z",
                            "updated_at": "2023-10-26T09:33:14.000000Z",
                            "deleted_at": null,
                            "combo_variations": null
                        }
                    ]
                }
            ]
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/product?page=1",
        "last": "http://local.pos.com/connector/api/product?page=32",
        "prev": null,
        "next": "http://local.pos.com/connector/api/product?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "http://local.pos.com/connector/api/product",
        "per_page": 10,
        "to": 10
    }
}
 

Request      

GET connector/api/product

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

order_by   string  optional  

Values: product_name or newest Example: quasi

order_direction   string  optional  

Values: asc or desc Example: non

brand_id   string  optional  

comma separated ids of one or multiple brands Example: ut

category_id   string  optional  

comma separated ids of one or multiple category Example: quia

sub_category_id   string  optional  

comma separated ids of one or multiple sub-category Example: illo

location_id   string  optional  

Example: 1

selling_price_group   string  optional  

(1, 0) Example: quia

send_lot_detail   string  optional  

Send lot details in each variation location details(1, 0) Example: ullam

name   string  optional  

Search term for product name Example: expedita

sku   string  optional  

Search term for product sku Example: non

type   string  optional  

Search term for product type Values comma separated: single, variable, combo or modifier Example: quas

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Create a new product

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/product" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=autem"\
    --form "type=quis"\
    --form "selling_price=121957279.845"\
    --form "purchase_price=12.371"\
    --form "sku=vitae"\
    --form "brand_id=17"\
    --form "category_id=10"\
    --form "sub_category_id=13"\
    --form "unit_id=10"\
    --form "tax=19"\
    --form "enable_stock=17"\
    --form "alert_quantity=19"\
    --form "barcode_type=vero"\
    --form "expiry_period=9"\
    --form "expiry_period_type=et"\
    --form "enable_sr_no=1"\
    --form "weight=6"\
    --form "product_custom_field1=est"\
    --form "product_custom_field2=alias"\
    --form "product_custom_field3=quia"\
    --form "product_custom_field4=voluptatem"\
    --form "product_description=vitae"\
    --form "warranty_id=2"\
    --form "is_inactive=6"\
    --form "not_for_selling=11"\
    --form "kds_stations[]=unde"\
    --form "product_locations[]=neque"\
    --form "product_menus[]=mollitia"\
    --form "product_variations[]=aut"\
    --form "product_combo[]=fuga"\
    --form "product_modifier_sets[]=et"\
    --form "image=@/tmp/phpjjJjyg" 
const url = new URL(
    "https://www.nerapos.com/np/connector/api/product"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'autem');
body.append('type', 'quis');
body.append('selling_price', '121957279.845');
body.append('purchase_price', '12.371');
body.append('sku', 'vitae');
body.append('brand_id', '17');
body.append('category_id', '10');
body.append('sub_category_id', '13');
body.append('unit_id', '10');
body.append('tax', '19');
body.append('enable_stock', '17');
body.append('alert_quantity', '19');
body.append('barcode_type', 'vero');
body.append('expiry_period', '9');
body.append('expiry_period_type', 'et');
body.append('enable_sr_no', '1');
body.append('weight', '6');
body.append('product_custom_field1', 'est');
body.append('product_custom_field2', 'alias');
body.append('product_custom_field3', 'quia');
body.append('product_custom_field4', 'voluptatem');
body.append('product_description', 'vitae');
body.append('warranty_id', '2');
body.append('is_inactive', '6');
body.append('not_for_selling', '11');
body.append('kds_stations[]', 'unde');
body.append('product_locations[]', 'neque');
body.append('product_menus[]', 'mollitia');
body.append('product_variations[]', 'aut');
body.append('product_combo[]', 'fuga');
body.append('product_modifier_sets[]', 'et');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
"id": 1,
"business_id": 1,
"name
"sku": "AS0001",
"type": "single",
"sub_unit_ids": null,
"enable_stock": 1,
"alert_quantity": "5.0000",
"barcode_type": "C128",
"expiry_period": null,
"expiry_period_type": null,
"enable_sr_no": 0,
"weight": null,
"product_custom_field1": null,
"product_custom_field2": null,
"product_custom_field3": null,
"product_custom_field4": null,
"image": null,
"woocommerce_media_id": null,
"product_description": null,
"created_by": 1,
"warranty_id": null,
"is_inactive": 0,
"repair_model_id": null,
"not_for_selling": 0,
"ecom_shipping_class_id": null,
"ecom_active_in_store": 1,
"woocommerce_product_id": 356,
"woocommerce_disable_sync": 0,
"image_url": "http://local.pos.com/img/default.png",
"product_variations": [
{
"id": 1,
"variation_template_id": null,
"name": "DUMMY",
"product_id": 1,
"is_dummy": 1,
"created_at": "2018-01-03 21:29:08",
"updated_at": "2018-01-03 21:29:08",
"variations": [
{
"id": 1,
"name": "DUMMY",
"product_id": 1,
"sub_sku": "AS0001",
"product_variation_id": 1,
"woocommerce_variation_id": null,
"variation_value_id": null,
"default_purchase_price": "130.0000",
"dpp_inc_tax": "143.0000",
"profit_percent": "0.0000",
"default_sell_price": "130.0000",
"sell_price_inc_tax": "143.0000",
"created_at": "2018-01-03 21:29:08",
"updated_at": "2020-06-09 00:23:22",
"deleted_at": null,
"combo_variations": null,
"variation_location_details": [
{
"id": 56,
"product_id": 1,
"product_variation_id": 1,
"variation_id": 1,
"location_id": 1,
"qty_available": "20.0000",
"created_at": "2020-06-08 23:46:40",
"updated_at": "2020-06-08 23:46:40"
}
],
"media": [
{
"id": 1,
"business_id": 1,
"file_name": "1591686466_978227300_nn.jpeg",
"description": null,
"uploaded_by": 9,
"model_type": "App\\Variation",
"woocommerce_media_id": null,
"model_id": 1,
"created_at": "2020-06-09 00:07:46",
"updated_at": "2020-06-09 00:07:46",
"display_name": "nn.jpeg",
"display_url": "http://local.pos.com/uploads/media/1591686466_978227300_nn.jpeg"
}
],
"discounts": [
{
"id": 2,
"name": "FLAT 10%",
"business_id": 1,
"brand_id": null,
"category_id": null,
"location_id": 1,
"priority": 2,
"discount_type": "fixed",
"discount_amount": "5.0000",
"starts_at": "2021-09-01 11:45:00",
"ends_at": "2021-09-30 11:45:00",
"is_active": 1,
"spg": null,
"applicable_in_cg": 1,
"created_at": "2021-09-01 11:46:00",
"updated_at": "2021-09-01 12:12:55",
"formated_starts_at": " 11:45",
"formated_ends_at": " 11:45"
}
],
"selling_price_group": [
{
"id": 2,
"variation_id": 1,
"price_group_id": 1,
"price_inc_tax": "140.0000",
"created_at": "2020-06-09 00:23:31",
"updated_at": "2020-06-09 00:23:31"
}
]
}
]
}
]
}
 

Request      

POST connector/api/product

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

The name of the product Example: autem

type   string   

The type of the product (single, variable, combo) Example: quis

selling_price   number   

The default selling price excluding tax of the product Example: 121957279.845

purchase_price   number   

The default purchase price excluding tax of the product Example: 12.371

sku   string  optional  

The sku of the product Example: vitae

brand_id   integer  optional  

The brand id of the product Example: 17

category_id   integer  optional  

The category id of the product Example: 10

sub_category_id   integer  optional  

The sub category id of the product Example: 13

unit_id   integer   

The unit id of the product Example: 10

tax   integer  optional  

The tax id of the product Example: 19

enable_stock   integer  optional  

Is stock enabled for the product Example: 17

alert_quantity   integer  optional  

The low stock alert quantity of the product Example: 19

barcode_type   string  optional  

The barcode type of the product Example: vero

expiry_period   integer  optional  

The expiry period of the product Example: 9

expiry_period_type   string  optional  

The expiry period type of the product Example: et

enable_sr_no   integer  optional  

The enable sr no of the product Example: 1

weight   integer  optional  

The weight of the product Example: 6

product_custom_field1   string  optional  

The product custom field1 of the product Example: est

product_custom_field2   string  optional  

The product custom field2 of the product Example: alias

product_custom_field3   string  optional  

The product custom field3 of the product Example: quia

product_custom_field4   string  optional  

The product custom field4 of the product Example: voluptatem

product_description   string  optional  

The product description of the product Example: vitae

warranty_id   integer  optional  

The warranty id of the product Example: 2

is_inactive   integer  optional  

The is inactive of the product Example: 6

not_for_selling   integer  optional  

The not for selling of the product Example: 11

image   file  optional  

Upload Photo as a file of the product if any or base64 encoded image Example: /tmp/phpjjJjyg

kds_stations   string[]  optional  

Array list of product kds stations id's

product_locations   string[]  optional  

Array list of product locations id's

product_menus   string[]  optional  

Array list of product menus id's

product_variations   string[]  optional  

required_if type=variable The variations list of the product

*   object  optional  
name   string   

The name of the variation Example: voluptas

variation_template_id   integer   

The variation template id Example: 15

variations   string[]   

The default purchase price of the variation

*   object  optional  
sku   string  optional  

The sku of the variation Example: sequi

value   string  optional  

The value of the variation Example: repellendus

variation_value_id   integer   

The variation value id of the variation Example: 10

selling_price   number   

The default sell price of the variation Example: 37.49

purchase_price   number   

The default purchase price of the variation Example: 262339.65605065

product_combo   string[]  optional  

required_if type=combo The combo list of the product

*   object  optional  
variation_id   integer   

The variation id Example: 11

quantity   number   

The quantity of the variation Example: 18991933.559766

unit_id   integer   

The unit id for the variation Example: 20

product_modifier_sets   string[]  optional  

Array list of product modifier set ids

Get the specified product

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/product/1?selling_price_group=possimus&send_lot_detail=velit" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/product/1"
);

const params = {
    "selling_price_group": "possimus",
    "send_lot_detail": "velit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Men's Reverse Fleece Crew",
            "business_id": 1,
            "type": "single",
            "sub_unit_ids": null,
            "enable_stock": 1,
            "alert_quantity": "5.0000",
            "sku": "AS0001",
            "barcode_type": "C128",
            "expiry_period": null,
            "expiry_period_type": null,
            "enable_sr_no": 0,
            "weight": null,
            "product_custom_field1": null,
            "product_custom_field2": null,
            "product_custom_field3": null,
            "product_custom_field4": null,
            "image": null,
            "woocommerce_media_id": null,
            "product_description": null,
            "created_by": 1,
            "warranty_id": null,
            "is_inactive": 0,
            "repair_model_id": null,
            "not_for_selling": 0,
            "ecom_shipping_class_id": null,
            "ecom_active_in_store": 1,
            "woocommerce_product_id": 356,
            "woocommerce_disable_sync": 0,
            "image_url": "http://local.pos.com/img/default.png",
            "product_variations": [
                {
                    "id": 1,
                    "variation_template_id": null,
                    "name": "DUMMY",
                    "product_id": 1,
                    "is_dummy": 1,
                    "created_at": "2018-01-03 21:29:08",
                    "updated_at": "2018-01-03 21:29:08",
                    "variations": [
                        {
                            "id": 1,
                            "name": "DUMMY",
                            "product_id": 1,
                            "sub_sku": "AS0001",
                            "product_variation_id": 1,
                            "woocommerce_variation_id": null,
                            "variation_value_id": null,
                            "default_purchase_price": "130.0000",
                            "dpp_inc_tax": "143.0000",
                            "profit_percent": "0.0000",
                            "default_sell_price": "130.0000",
                            "sell_price_inc_tax": "143.0000",
                            "created_at": "2018-01-03 21:29:08",
                            "updated_at": "2020-06-09 00:23:22",
                            "deleted_at": null,
                            "combo_variations": null,
                            "variation_location_details": [
                                {
                                    "id": 56,
                                    "product_id": 1,
                                    "product_variation_id": 1,
                                    "variation_id": 1,
                                    "location_id": 1,
                                    "qty_available": "20.0000",
                                    "created_at": "2020-06-08 23:46:40",
                                    "updated_at": "2020-06-08 23:46:40"
                                }
                            ],
                            "media": [
                                {
                                    "id": 1,
                                    "business_id": 1,
                                    "file_name": "1591686466_978227300_nn.jpeg",
                                    "description": null,
                                    "uploaded_by": 9,
                                    "model_type": "App\\Variation",
                                    "woocommerce_media_id": null,
                                    "model_id": 1,
                                    "created_at": "2020-06-09 00:07:46",
                                    "updated_at": "2020-06-09 00:07:46",
                                    "display_name": "nn.jpeg",
                                    "display_url": "http://local.pos.com/uploads/media/1591686466_978227300_nn.jpeg"
                                }
                            ],
                            "discounts": [
                                {
                                    "id": 2,
                                    "name": "FLAT 10%",
                                    "business_id": 1,
                                    "brand_id": null,
                                    "category_id": null,
                                    "location_id": 1,
                                    "priority": 2,
                                    "discount_type": "fixed",
                                    "discount_amount": "5.0000",
                                    "starts_at": "2021-09-01 11:45:00",
                                    "ends_at": "2021-09-30 11:45:00",
                                    "is_active": 1,
                                    "spg": null,
                                    "applicable_in_cg": 1,
                                    "created_at": "2021-09-01 11:46:00",
                                    "updated_at": "2021-09-01 12:12:55",
                                    "formated_starts_at": " 11:45",
                                    "formated_ends_at": " 11:45"
                                }
                            ],
                            "selling_price_group": [
                                {
                                    "id": 2,
                                    "variation_id": 1,
                                    "price_group_id": 1,
                                    "price_inc_tax": "140.0000",
                                    "created_at": "2020-06-09 00:23:31",
                                    "updated_at": "2020-06-09 00:23:31"
                                }
                            ]
                        }
                    ]
                }
            ],
            "brand": {
                "id": 1,
                "business_id": 1,
                "name": "Levis",
                "description": null,
                "created_by": 1,
                "deleted_at": null,
                "created_at": "2018-01-03 21:19:47",
                "updated_at": "2018-01-03 21:19:47"
            },
            "unit": {
                "id": 1,
                "business_id": 1,
                "actual_name": "Pieces",
                "short_name": "Pc(s)",
                "allow_decimal": 0,
                "base_unit_id": null,
                "base_unit_multiplier": null,
                "created_by": 1,
                "deleted_at": null,
                "created_at": "2018-01-03 15:15:20",
                "updated_at": "2018-01-03 15:15:20"
            },
            "category": {
                "id": 1,
                "name": "Men's",
                "business_id": 1,
                "short_code": null,
                "parent_id": 0,
                "created_by": 1,
                "category_type": "product",
                "description": null,
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2018-01-03 21:06:34",
                "updated_at": "2018-01-03 21:06:34"
            },
            "sub_category": {
                "id": 5,
                "name": "Shirts",
                "business_id": 1,
                "short_code": null,
                "parent_id": 1,
                "created_by": 1,
                "category_type": "product",
                "description": null,
                "slug": null,
                "woocommerce_cat_id": null,
                "deleted_at": null,
                "created_at": "2018-01-03 21:08:18",
                "updated_at": "2018-01-03 21:08:18"
            },
            "product_tax": {
                "id": 1,
                "business_id": 1,
                "name": "VAT@10%",
                "amount": 10,
                "is_tax_group": 0,
                "created_by": 1,
                "woocommerce_tax_rate_id": null,
                "deleted_at": null,
                "created_at": "2018-01-04 02:40:07",
                "updated_at": "2018-01-04 02:40:07"
            },
            "product_locations": [
                {
                    "id": 1,
                    "business_id": 1,
                    "location_id": null,
                    "name": "Awesome Shop",
                    "landmark": "Linking Street",
                    "country": "USA",
                    "state": "Arizona",
                    "city": "Phoenix",
                    "zip_code": "85001",
                    "invoice_scheme_id": 1,
                    "invoice_layout_id": 1,
                    "selling_price_group_id": null,
                    "print_receipt_on_invoice": 1,
                    "receipt_printer_type": "browser",
                    "printer_id": null,
                    "mobile": null,
                    "alternate_number": null,
                    "email": null,
                    "website": null,
                    "featured_products": [
                        "5",
                        "71"
                    ],
                    "is_active": 1,
                    "default_payment_accounts": "{\"cash\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"card\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"cheque\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"other\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":\"3\"}}",
                    "custom_field1": null,
                    "custom_field2": null,
                    "custom_field3": null,
                    "custom_field4": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:15:20",
                    "updated_at": "2020-06-09 01:07:05",
                    "pivot": {
                        "product_id": 2,
                        "location_id": 1
                    }
                }
            ],
            "modifier_sets": [
                {
                    "id": 10,
                    "name": "Extras",
                    "business_id": 1,
                    "type": "modifier",
                    "unit_id": null,
                    "secondary_unit_id": null,
                    "sub_unit_ids": null,
                    "brand_id": null,
                    "category_id": null,
                    "sub_category_id": null,
                    "tax": null,
                    "tax_type": "inclusive",
                    "enable_stock": 0,
                    "alert_quantity": null,
                    "sku": "256366",
                    "barcode_type": "C128",
                    "expiry_period": null,
                    "expiry_period_type": null,
                    "enable_sr_no": 0,
                    "mandatory_sr_no": 0,
                    "weight": null,
                    "weight_type": "kg",
                    "product_custom_field1": null,
                    "product_custom_field2": null,
                    "product_custom_field3": null,
                    "product_custom_field4": null,
                    "image": null,
                    "salla_media_id": null,
                    "woocommerce_media_id": null,
                    "product_description": null,
                    "created_by": 1,
                    "woocommerce_product_id": null,
                    "woocommerce_disable_sync": 0,
                    "warranty_id": null,
                    "modifier_product_id": null,
                    "is_inactive": 0,
                    "not_for_selling": 0,
                    "kds_stations": null,
                    "created_at": "2023-10-26T09:33:14.000000Z",
                    "updated_at": "2023-10-26T09:33:14.000000Z",
                    "image_url": "https://www.nerapos.com/np/img/default.png",
                    "pivot": {
                        "product_id": 1,
                        "modifier_set_id": 10
                    },
                    "variations": [
                        {
                            "id": 12,
                            "name": "Ketchup",
                            "product_id": 1,
                            "sub_sku": "1-2",
                            "product_variation_id": 15,
                            "variation_value_id": null,
                            "default_purchase_price": "0.00000",
                            "dpp_inc_tax": "0.00000",
                            "default_purchase_unit": null,
                            "profit_percent": "0.0000",
                            "default_sell_price": "0.00000",
                            "sell_price_inc_tax": "0.00000",
                            "default_sell_unit": null,
                            "is_inactive": 0,
                            "created_at": "2023-10-26T09:33:14.000000Z",
                            "updated_at": "2023-10-26T09:33:14.000000Z",
                            "deleted_at": null,
                            "combo_variations": null
                        },
                        {
                            "id": 13,
                            "name": "Extra Cheese",
                            "product_id": 1,
                            "sub_sku": "1-3",
                            "product_variation_id": 15,
                            "variation_value_id": null,
                            "default_purchase_price": "2.00000",
                            "dpp_inc_tax": "2.00000",
                            "default_purchase_unit": null,
                            "profit_percent": "0.0000",
                            "default_sell_price": "2.00000",
                            "sell_price_inc_tax": "2.00000",
                            "default_sell_unit": null,
                            "is_inactive": 0,
                            "created_at": "2023-10-26T09:33:14.000000Z",
                            "updated_at": "2023-10-26T09:33:14.000000Z",
                            "deleted_at": null,
                            "combo_variations": null
                        }
                    ]
                }
            ]
        }
    ]
}
 

Request      

GET connector/api/product/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

product   string   

comma separated ids of products Example: 1

Query Parameters

selling_price_group   string  optional  

(1, 0) Example: possimus

send_lot_detail   string  optional  

Send lot details in each variation location details(1, 0) Example: velit

Update a product

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/product/necessitatibus" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=aut"\
    --form "selling_price=773924.69690448"\
    --form "purchase_price=1.99867345"\
    --form "sku=sed"\
    --form "brand_id=16"\
    --form "category_id=3"\
    --form "sub_category_id=1"\
    --form "unit_id=14"\
    --form "tax=20"\
    --form "enable_stock=4"\
    --form "alert_quantity=3"\
    --form "barcode_type=quas"\
    --form "expiry_period=12"\
    --form "expiry_period_type=et"\
    --form "enable_sr_no=15"\
    --form "weight=4"\
    --form "product_custom_field1=perspiciatis"\
    --form "product_custom_field2=quaerat"\
    --form "product_custom_field3=aut"\
    --form "product_custom_field4=voluptatem"\
    --form "product_description=in"\
    --form "warranty_id=16"\
    --form "is_inactive=10"\
    --form "not_for_selling=17"\
    --form "kds_stations[]=porro"\
    --form "product_locations[]=qui"\
    --form "product_menus[]=corrupti"\
    --form "product_variations[]=atque"\
    --form "product_combo[]=asperiores"\
    --form "image=@/tmp/phpst5kbh" 
const url = new URL(
    "https://www.nerapos.com/np/connector/api/product/necessitatibus"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'aut');
body.append('selling_price', '773924.69690448');
body.append('purchase_price', '1.99867345');
body.append('sku', 'sed');
body.append('brand_id', '16');
body.append('category_id', '3');
body.append('sub_category_id', '1');
body.append('unit_id', '14');
body.append('tax', '20');
body.append('enable_stock', '4');
body.append('alert_quantity', '3');
body.append('barcode_type', 'quas');
body.append('expiry_period', '12');
body.append('expiry_period_type', 'et');
body.append('enable_sr_no', '15');
body.append('weight', '4');
body.append('product_custom_field1', 'perspiciatis');
body.append('product_custom_field2', 'quaerat');
body.append('product_custom_field3', 'aut');
body.append('product_custom_field4', 'voluptatem');
body.append('product_description', 'in');
body.append('warranty_id', '16');
body.append('is_inactive', '10');
body.append('not_for_selling', '17');
body.append('kds_stations[]', 'porro');
body.append('product_locations[]', 'qui');
body.append('product_menus[]', 'corrupti');
body.append('product_variations[]', 'atque');
body.append('product_combo[]', 'asperiores');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
"id": 1,
"business_id": 1,
"name":
"sku": "AS0001",
"type": "single",
"sub_unit_ids": null,
"enable_stock": 1,
"alert_quantity": "5.0000",
"barcode_type": "C128",
"expiry_period": null,
"expiry_period_type": null,
"enable_sr_no": 0,
"weight": null,
"product_custom_field1": null,
"product_custom_field2": null,
"product_custom_field3": null,
"product_custom_field4": null,
"image": null,
"woocommerce_media_id": null,
"product_description": null,
"created_by": 1,
"warranty_id": null,
"is_inactive": 0,
"repair_model_id": null,
"not_for_selling": 0,
"ecom_shipping_class_id": null,
"ecom_active_in_store": 1,
"woocommerce_product_id": 356,
"woocommerce_disable_sync": 0,
"image_url": "http://local.pos.com/img/default.png",
"product_variations": [
{
"id": 1,
"variation_template_id": null,
"name": "DUMMY",
"product_id": 1,
"is_dummy": 1,
"created_at": "2018-01-03 21:29:08",
"updated_at": "2018-01-03 21:29:08",
"variations": [
{
"id": 1,
"name": "DUMMY",
"product_id": 1,
"sub_sku": "AS0001",
"product_variation_id": 1,
"woocommerce_variation_id": null,
"variation_value_id": null,
"default_purchase_price": "130.0000",
"dpp_inc_tax": "143.0000",
"profit_percent": "0.0000",
"default_sell_price": "130.0000",
"sell_price_inc_tax": "143.0000",
"created_at": "2018-01-03 21:29:08",
"updated_at": "2020-06-09 00:23:22",
"deleted_at": null,
"combo_variations": null,
"variation_location_details": [
{
"id": 56,
"product_id": 1,
"product_variation_id": 1,
"variation_id": 1,
"location_id": 1,
"qty_available": "20.0000",
"created_at": "2020-06-08 23:46:40",
"updated_at": "2020-06-08 23:46:40"
}
],
"media": [
{
"id": 1,
"business_id": 1,
"file_name": "1591686466_978227300_nn.jpeg",
"description": null,
"uploaded_by": 9,
"model_type": "App\\Variation",
"woocommerce_media_id": null,
"model_id": 1,
"created_at": "2020-06-09 00:07:46",
"updated_at": "2020-06-09 00:07:46",
"display_name": "nn.jpeg",
"display_url
"http://local.pos.com/uploads/media/1591686466_978227300_nn.jpeg"
}
],
"discounts": [
{
"id": 2,
"name": "FLAT 10%",
"business_id": 1,
"brand_id": null,
"category_id": null,
"location_id": 1,
"priority": 2,
"discount_type": "fixed",
"discount_amount": "5.0000",
"starts_at": "2021-09-01 11:45:00",
"ends_at": "2021-09-30 11:45:00",
"is_active": 1,
"spg": null,
"applicable_in_cg": 1,
"created_at": "2021-09-01 11:46:00",
"updated_at": "2021-09-01 12:12:55",
"formated_starts_at": " 11:45",
"formated_ends_at": " 11:45"
}
],
"selling_price_group": [
{
"id": 2,
"variation_id": 1,
"price_group_id": 1,
"price_inc_tax": "140.0000",
"created_at": "2020-06-09 00:23:31",
"updated_at": "2020-06-09 00:23:31"
}
]
}
]
}
]
}
 

Request      

PUT connector/api/product/{id}

PATCH connector/api/product/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The id of the product Example: necessitatibus

Body Parameters

name   string   

The name of the product Example: aut

selling_price   number   

The default selling price excluding tax of the product Example: 773924.69690448

purchase_price   number   

The default purchase price excluding tax of the product Example: 1.99867345

sku   string   

The sku of the product Example: sed

brand_id   integer  optional  

The brand id of the product Example: 16

category_id   integer  optional  

The category id of the product Example: 3

sub_category_id   integer  optional  

The sub category id of the product Example: 1

unit_id   integer   

The unit id of the product Example: 14

tax   integer  optional  

The tax id of the product Example: 20

enable_stock   integer  optional  

The enable stock of the product Example: 4

alert_quantity   integer  optional  

The alert quantity of the product Example: 3

barcode_type   string  optional  

The barcode type of the product Example: quas

expiry_period   integer  optional  

The expiry period of the product Example: 12

expiry_period_type   string  optional  

The expiry period type of the product Example: et

enable_sr_no   integer  optional  

The enable sr no of the product Example: 15

weight   integer  optional  

The weight of the product Example: 4

product_custom_field1   string  optional  

The product custom field1 of the product Example: perspiciatis

product_custom_field2   string  optional  

The product custom field2 of the product Example: quaerat

product_custom_field3   string  optional  

The product custom field3 of the product Example: aut

product_custom_field4   string  optional  

The product custom field4 of the product Example: voluptatem

product_description   string  optional  

The product description of the product Example: in

warranty_id   integer  optional  

The warranty id of the product Example: 16

is_inactive   integer  optional  

The is inactive of the product Example: 10

not_for_selling   integer  optional  

The not for selling of the product Example: 17

image   file  optional  

Upload Photo as a file of the product if any or base64 encoded image Example: /tmp/phpst5kbh

kds_stations   string[]  optional  

Array list of product kds stations id's

product_locations   string[]  optional  

Array list of product locations id's

product_menus   string[]  optional  

Array list of product menus id's

product_variations   string[]  optional  

required_if type=variable The variations list of the product

*   object  optional  
product_variation_id   integer  optional  

The id of the variation to edit, when empty it will create a new variation Example: 17

name   string   

The name of the variation Example: mollitia

variation_template_id   string   

The variation template id Example: aut

variations   string[]   

The default purchase price of the variation

*   object  optional  
variation_id   integer  optional  

The id of the variation to edit, when empty it will create a new variation Example: 9

sku   number  optional  

The sku of the variation Example: 139.04995

value   string   

The name of the variation Example: adipisci

variation_value_id   number  optional  

The variation value id of the variation Example: 2071975.9

selling_price   number   

The default sell price of the variation Example: 53

purchase_price   number   

The default purchase price of the variation Example: 0.28336947

product_combo   string[]  optional  

required_if type=combo The combo list of the product

*   object  optional  
variation_id   integer   

The variation id Example: 10

quantity   number   

The quantity of the variation Example: 45.1

unit_id   integer   

The unit id for the variation Example: 19

List Selling Price Group

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/selling-price-group" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/selling-price-group"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Retail",
            "description": null,
            "business_id": 1,
            "is_active": 1,
            "deleted_at": null,
            "created_at": "2020-10-21 04:30:06",
            "updated_at": "2020-11-16 18:23:15"
        },
        {
            "id": 2,
            "name": "Wholesale",
            "description": null,
            "business_id": 1,
            "is_active": 1,
            "deleted_at": null,
            "created_at": "2020-10-21 04:30:21",
            "updated_at": "2020-11-16 18:23:00"
        }
    ]
}
 

Request      

GET connector/api/selling-price-group

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

List Vartiation Templates

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/variation-template" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/variation-template"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
"data": [
{
"id": 1,
"name": "Size",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 1,
"variation_template_id": 1,
"name": "S",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 2,
"variation_template_id": 1,
"name": "M",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 3,
"variation_template_id": 1,
"name": "L",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
},
{
"id": 2,
"name": "Color",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 4,
"variation_template_id": 2,
"name": "Red",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 5,
"variation_template_id": 2,
"name": "Blue",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
}
]
}
 

Request      

GET connector/api/variation-template

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

List Modifiers

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/modifier" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/modifier"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
"data": [
{
"id": 1,
"name": "Size",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 1,
"variation_template_id": 1,
"name": "S",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 2,
"variation_template_id": 1,
"name": "M",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 3,
"variation_template_id": 1,
"name": "L",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
},
{
"id": 2,
"name": "Color",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 4,
"variation_template_id": 2,
"name": "Red",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 5,
"variation_template_id": 2,
"name": "Blue",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
}
]
}
 

Request      

GET connector/api/modifier

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Create a new modifier

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/modifier" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"in\",
    \"modifiers\": [
        \"enim\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/modifier"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "in",
    "modifiers": [
        "enim"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"data": [
{
"id": 1,
"name": "Size",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 1,
"variation_template_id": 1,
"name": "S",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 2,
"variation_template_id": 1,
"name": "M",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 3,
"variation_template_id": 1,
"name": "L",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
},
{
"id": 2,
"name": "Color",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 4,
"variation_template_id": 2,
"name": "Red",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 5,
"variation_template_id": 2,
"name": "Blue",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
}
]
}
 

Request      

POST connector/api/modifier

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the modifier Example: in

modifiers   string[]   

The modifiers list of the modifier

*   object  optional  
value   string   

The value of the modifier Example: officia

price   number   

The price of the modifier Example: 6699.753

Update a modifier

requires authentication

Example request:
curl --request PUT \
    "https://www.nerapos.com/np/connector/api/modifier/qui" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"perferendis\",
    \"modifiers\": [
        \"est\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/modifier/qui"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "perferendis",
    "modifiers": [
        "est"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"data": [
{
"id": 1,
"name": "Size",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 1,
"variation_template_id": 1,
"name": "S",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 2,
"variation_template_id": 1,
"name": "M",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 3,
"variation_template_id": 1,
"name": "L",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
},
{
"id": 2,
"name": "Color",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 4,
"variation_template_id": 2,
"name": "Red",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 5,
"variation_template_id": 2,
"name": "Blue",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
}
]
}
 

Request      

PUT connector/api/modifier/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The id of the modifier set Example: qui

Body Parameters

name   string   

The name of the modifier set Example: perferendis

modifiers   string[]   

The modifiers list of the modifier set

*   object  optional  
modifier_id   integer  optional  

The id of the modifier to edit, when empty it will create a new modifier Example: 5

value   string   

The value of the modifier Example: voluptatum

price   number   

The price of the modifier Example: 30863.986

Attach a product to modifiers

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/product/ut/attach-modifiers" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"modifier_sets\": [
        \"illo\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/product/ut/attach-modifiers"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "modifier_sets": [
        "illo"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"data": [
{
"id": 1,
"name": "Size",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 1,
"variation_template_id": 1,
"name": "S",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 2,
"variation_template_id": 1,
"name": "M",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 3,
"variation_template_id": 1,
"name": "L",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
},
{
"id": 2,
"name": "Color",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 4,
"variation_template_id": 2,
"name": "Red",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 5,
"variation_template_id": 2,
"name": "Blue",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
}
]
}
 

Request      

POST connector/api/product/{id}/attach-modifiers

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The id of the product Example: ut

Body Parameters

modifier_sets   string[]   

The modifier set ids list of the product

Detach a product from modifiers

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/product/sit/detach-modifiers" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"modifier_sets\": [
        \"fuga\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/product/sit/detach-modifiers"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "modifier_sets": [
        "fuga"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"data": [
{
"id": 1,
"name": "Size",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 1,
"variation_template_id": 1,
"name": "S",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 2,
"variation_template_id": 1,
"name": "M",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 3,
"variation_template_id": 1,
"name": "L",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
},
{
"id": 2,
"name": "Color",
"business_id": 1,
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
"values": [
{
"id": 4,
"variation_template_id": 2,
"name": "Red",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
},
{
"id": 5,
"variation_template_id": 2,
"name": "Blue",
"created_at": "2020-10-21 04:30:06",
"updated_at": "2020-11-16 18:23:15"
}
]
}
]
}
 

Request      

POST connector/api/product/{id}/detach-modifiers

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The id of the product Example: sit

Body Parameters

modifier_sets   string[]   

The modifier set ids list of the product

List Variations

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/variation/2?product_id=quas&location_id=1&brand_id=sed&category_id=dolores&sub_category_id=nulla&not_for_selling=officia&name=rem&sku=tempore&per_page=10" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/variation/2"
);

const params = {
    "product_id": "quas",
    "location_id": "1",
    "brand_id": "sed",
    "category_id": "dolores",
    "sub_category_id": "nulla",
    "not_for_selling": "officia",
    "name": "rem",
    "sku": "tempore",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "variation_id": 1,
            "variation_name": "",
            "sub_sku": "AS0001",
            "product_id": 1,
            "product_name": "Men's Reverse Fleece Crew",
            "sku": "AS0001",
            "type": "single",
            "business_id": 1,
            "barcode_type": "C128",
            "expiry_period": null,
            "expiry_period_type": null,
            "enable_sr_no": 0,
            "weight": null,
            "product_custom_field1": null,
            "product_custom_field2": null,
            "product_custom_field3": null,
            "product_custom_field4": null,
            "product_image": "1528728059_fleece_crew.jpg",
            "product_description": null,
            "warranty_id": null,
            "brand_id": 1,
            "brand_name": "Levis",
            "unit_id": 1,
            "enable_stock": 1,
            "not_for_selling": 0,
            "unit_name": "Pc(s)",
            "unit_allow_decimal": 0,
            "category_id": 1,
            "category": "Men's",
            "sub_category_id": 5,
            "sub_category": "Shirts",
            "tax_id": 1,
            "tax_type": "exclusive",
            "tax_name": "VAT@10%",
            "tax_amount": 10,
            "product_variation_id": 1,
            "default_purchase_price": "130.0000",
            "dpp_inc_tax": "143.0000",
            "profit_percent": "0.0000",
            "default_sell_price": "130.0000",
            "sell_price_inc_tax": "143.0000",
            "product_variation_name": "",
            "variation_location_details": [],
            "media": [],
            "selling_price_group": [],
            "product_image_url": "http://local.pos.com/uploads/img/1528728059_fleece_crew.jpg",
            "product_locations": [
                {
                    "id": 1,
                    "business_id": 1,
                    "location_id": null,
                    "name": "Awesome Shop",
                    "landmark": "Linking Street",
                    "country": "USA",
                    "state": "Arizona",
                    "city": "Phoenix",
                    "zip_code": "85001",
                    "invoice_scheme_id": 1,
                    "invoice_layout_id": 1,
                    "selling_price_group_id": null,
                    "print_receipt_on_invoice": 1,
                    "receipt_printer_type": "browser",
                    "printer_id": null,
                    "mobile": null,
                    "alternate_number": null,
                    "email": null,
                    "website": null,
                    "featured_products": null,
                    "is_active": 1,
                    "default_payment_accounts": "",
                    "custom_field1": null,
                    "custom_field2": null,
                    "custom_field3": null,
                    "custom_field4": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:15:20",
                    "updated_at": "2019-12-11 04:53:39",
                    "pivot": {
                        "product_id": 1,
                        "location_id": 1
                    }
                }
            ]
        },
        {
            "variation_id": 2,
            "variation_name": "28",
            "sub_sku": "AS0002-1",
            "product_id": 2,
            "product_name": "Levis Men's Slimmy Fit Jeans",
            "sku": "AS0002",
            "type": "variable",
            "business_id": 1,
            "barcode_type": "C128",
            "expiry_period": null,
            "expiry_period_type": null,
            "enable_sr_no": 0,
            "weight": null,
            "product_custom_field1": null,
            "product_custom_field2": null,
            "product_custom_field3": null,
            "product_custom_field4": null,
            "product_image": "1528727964_levis_jeans.jpg",
            "product_description": null,
            "warranty_id": null,
            "brand_id": 1,
            "brand_name": "Levis",
            "unit_id": 1,
            "enable_stock": 1,
            "not_for_selling": 0,
            "unit_name": "Pc(s)",
            "unit_allow_decimal": 0,
            "category_id": 1,
            "category": "Men's",
            "sub_category_id": 4,
            "sub_category": "Jeans",
            "tax_id": 1,
            "tax_type": "exclusive",
            "tax_name": "VAT@10%",
            "tax_amount": 10,
            "product_variation_id": 2,
            "default_purchase_price": "70.0000",
            "dpp_inc_tax": "77.0000",
            "profit_percent": "0.0000",
            "default_sell_price": "70.0000",
            "sell_price_inc_tax": "77.0000",
            "product_variation_name": "Waist Size",
            "variation_location_details": [
                {
                    "id": 1,
                    "product_id": 2,
                    "product_variation_id": 2,
                    "variation_id": 2,
                    "location_id": 1,
                    "qty_available": "50.0000",
                    "created_at": "2018-01-06 06:57:11",
                    "updated_at": "2020-08-04 04:11:27"
                }
            ],
            "media": [
                {
                    "id": 1,
                    "business_id": 1,
                    "file_name": "1596701997_743693452_test.jpg",
                    "description": null,
                    "uploaded_by": 9,
                    "model_type": "App\\Variation",
                    "woocommerce_media_id": null,
                    "model_id": 2,
                    "created_at": "2020-08-06 13:49:57",
                    "updated_at": "2020-08-06 13:49:57",
                    "display_name": "test.jpg",
                    "display_url": "http://local.pos.com/uploads/media/1596701997_743693452_test.jpg"
                }
            ],
            "selling_price_group": [],
            "product_image_url": "http://local.pos.com/uploads/img/1528727964_levis_jeans.jpg",
            "product_locations": [
                {
                    "id": 1,
                    "business_id": 1,
                    "location_id": null,
                    "name": "Awesome Shop",
                    "landmark": "Linking Street",
                    "country": "USA",
                    "state": "Arizona",
                    "city": "Phoenix",
                    "zip_code": "85001",
                    "invoice_scheme_id": 1,
                    "invoice_layout_id": 1,
                    "selling_price_group_id": null,
                    "print_receipt_on_invoice": 1,
                    "receipt_printer_type": "browser",
                    "printer_id": null,
                    "mobile": null,
                    "alternate_number": null,
                    "email": null,
                    "website": null,
                    "featured_products": null,
                    "is_active": 1,
                    "default_payment_accounts": "",
                    "custom_field1": null,
                    "custom_field2": null,
                    "custom_field3": null,
                    "custom_field4": null,
                    "deleted_at": null,
                    "created_at": "2018-01-04 02:15:20",
                    "updated_at": "2019-12-11 04:53:39",
                    "pivot": {
                        "product_id": 2,
                        "location_id": 1
                    }
                }
            ],
            "discounts": [
                {
                    "id": 2,
                    "name": "FLAT 10%",
                    "business_id": 1,
                    "brand_id": null,
                    "category_id": null,
                    "location_id": 1,
                    "priority": 2,
                    "discount_type": "fixed",
                    "discount_amount": "5.0000",
                    "starts_at": "2021-09-01 11:45:00",
                    "ends_at": "2021-09-30 11:45:00",
                    "is_active": 1,
                    "spg": null,
                    "applicable_in_cg": 1,
                    "created_at": "2021-09-01 11:46:00",
                    "updated_at": "2021-09-01 12:12:55",
                    "formated_starts_at": " 11:45",
                    "formated_ends_at": " 11:45"
                }
            ]
        }
    ],
    "links": {
        "first": "http://local.pos.com/connector/api/variation?page=1",
        "last": null,
        "prev": null,
        "next": "http://local.pos.com/connector/api/variation?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "http://local.pos.com/connector/api/variation",
        "per_page": "2",
        "to": 2
    }
}
 

Request      

GET connector/api/variation/{id?}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

comma separated ids of variations Example: 2

Query Parameters

product_id   string  optional  

Filter by comma separated products ids Example: quas

location_id   string  optional  

Example: 1

brand_id   string  optional  

Example: sed

category_id   string  optional  

Example: dolores

sub_category_id   string  optional  

Example: nulla

not_for_selling   string  optional  

Values: 0 or 1 Example: officia

name   string  optional  

Search term for product name Example: rem

sku   string  optional  

Search term for product sku Example: tempore

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 10

Field Force

List visits

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/field-force?contact_id=numquam&assigned_to=aut&status=optio&start_date=2018-06-25&end_date=2018-06-25&per_page=15&order_by_date=0" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/field-force"
);

const params = {
    "contact_id": "numquam",
    "assigned_to": "aut",
    "status": "optio",
    "start_date": "2018-06-25",
    "end_date": "2018-06-25",
    "per_page": "15",
    "order_by_date": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "The route np/connector/api/field-force could not be found."
}
 

Request      

GET connector/api/field-force

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

contact_id   string  optional  

id of the contact Example: numquam

assigned_to   string  optional  

id of the assigned user Example: aut

status   string  optional  

status of the visit (assigned, finished) Example: optio

start_date   string  optional  

Start date filter for visit on format:Y-m-d Example: 2018-06-25

end_date   string  optional  

End date filter for visit on format:Y-m-d Example: 2018-06-25

per_page   integer  optional  

Total records per page. default: 10, Set -1 for no pagination Example: 15

order_by_date   integer  optional  

Sort visit by visit on date ('asc', 'desc') Example: 0

Create Visit

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/field-force/create" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contact_id\": 13,
    \"visit_to\": \"sed\",
    \"visit_address\": \"voluptatibus\",
    \"assigned_to\": 2,
    \"visit_on\": \"2021-12-28 17:23:00\",
    \"visit_for\": \"sapiente\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/field-force/create"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contact_id": 13,
    "visit_to": "sed",
    "visit_address": "voluptatibus",
    "assigned_to": 2,
    "visit_on": "2021-12-28 17:23:00",
    "visit_for": "sapiente"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "contact_id": "6",
        "assigned_to": "9",
        "visit_on": "2022-01-15 17:23:00",
        "visit_for": "",
        "meet_with": "",
        "meet_with2": "",
        "meet_with3": "",
        "meet_with_mobileno": "",
        "meet_with_mobileno2": "",
        "meet_with_mobileno3": "",
        "meet_with_designation": "",
        "meet_with_designation2": "",
        "meet_with_designation3": "",
        "visit_id": "2021/0031",
        "status": "assigned",
        "business_id": 1,
        "updated_at": "2021-12-30 11:00:47",
        "created_at": "2021-12-30 11:00:47",
        "id": 3
    }
}
 

Request      

POST connector/api/field-force/create

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

contact_id   integer  optional  

id of the contact Example: 13

visit_to   string  optional  

Name of the visiting person or company if contact_id is not given Example: sed

visit_address   string  optional  

Address of the visiting person or company if contact_id is not given Example: voluptatibus

assigned_to   integer   

id of the assigned user Example: 2

visit_on   format:Y-m-d  optional  

H:i:s Example: 2021-12-28 17:23:00

visit_for   string  optional  

Purpose of visiting Example: sapiente

Update Visit status

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/field-force/update-visit-status/17" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "status=finished"\
    --form "reason_to_not_meet_contact=laborum"\
    --form "visited_on=2021-12-28 17:23:00"\
    --form "visited_address=Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India"\
    --form "latitude=41.40338"\
    --form "longitude=2.17403"\
    --form "comments=beatae"\
    --form "meet_with=nihil"\
    --form "meet_with_mobileno=aut"\
    --form "photo=@/tmp/phpL0uvvj" 
const url = new URL(
    "https://www.nerapos.com/np/connector/api/field-force/update-visit-status/17"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('status', 'finished');
body.append('reason_to_not_meet_contact', 'laborum');
body.append('visited_on', '2021-12-28 17:23:00');
body.append('visited_address', 'Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India');
body.append('latitude', '41.40338');
body.append('longitude', '2.17403');
body.append('comments', 'beatae');
body.append('meet_with', 'nihil');
body.append('meet_with_mobileno', 'aut');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 10,
        "business_id": 1,
        "contact_id": 6,
        "assigned_to": 9,
        "latitude": "23.6101808",
        "longitude": "85.2799354",
        "visited_address": "New address",
        "status": "finished",
        "visit_on": "2021-12-28 17:23:00",
        "visit_for": "assigned from api",
        "meet_with": "Name",
        "meet_with2": "Name",
        "meet_with3": "Name",
        "meet_with_mobileno": "123456789",
        "meet_with_mobileno2": "123456789",
        "meet_with_mobileno3": "123456789",
        "meet_with_designation": "dr",
        "meet_with_designation2": "dr",
        "meet_with_designation3": "dr",
        "comments": "Users comment",
        "created_at": "2021-12-28 17:35:13",
        "updated_at": "2021-12-28 18:06:03"
    }
}
 

Request      

POST connector/api/field-force/update-visit-status/{id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

id of the visit to be updated Example: 17

Body Parameters

status   string  optional  

Current status of the visit (assigned, finished, met_contact, did_not_meet_contact) Example: finished

reason_to_not_meet_contact   string  optional  

Reason if status is did_not_meet_contact Example: laborum

visited_on   format:Y-m-d  optional  

H:i:s Example: 2021-12-28 17:23:00

visited_address   string  optional  

Full address of the contact Example: Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India

latitude   decimal  optional  

Lattitude of the user location if full address is not given Example: 41.40338

longitude   decimal  optional  

Longitude of the user location if full address is not given Example: 2.17403

comments   string  optional  

Extra comments Example: beatae

photo   file  optional  

Upload Photo as a file of the visit if any or base64 encoded image Example: /tmp/phpL0uvvj

meet_with   required  optional  

name of person field force meet with Example: nihil

meet_with_mobileno   required  optional  

mobile number of the person field force meet with Example: aut

Attendance management

Get Attendance

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/get-attendance/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/get-attendance/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 4,
        "user_id": 1,
        "business_id": 1,
        "clock_in_time": "2020-09-12 13:13:00",
        "clock_out_time": "2020-09-12 13:15:00",
        "essentials_shift_id": 3,
        "ip_address": null,
        "clock_in_note": "test clock in from api",
        "clock_out_note": "test clock out from api",
        "created_at": "2020-09-12 13:14:39",
        "updated_at": "2020-09-12 13:15:39"
    }
}
 

Request      

GET connector/api/get-attendance/{user_id}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   string   

id of the user Example: 1

Clock In

requires authentication

[User must have "essentials.allow_users_for_attendance_from_api" permission to Clock in]

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/clock-in" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 1,
    \"clock_in_time\": \"2000-06-13 13:13:00\",
    \"clock_in_note\": \"voluptas\",
    \"ip_address\": \"eligendi\",
    \"latitude\": \"omnis\",
    \"longitude\": \"rem\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/clock-in"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 1,
    "clock_in_time": "2000-06-13 13:13:00",
    "clock_in_note": "voluptas",
    "ip_address": "eligendi",
    "latitude": "omnis",
    "longitude": "rem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "msg": "Clocked In successfully",
    "type": "clock_in"
}
 

Request      

POST connector/api/clock-in

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user_id   integer   

id of the user Example: 1

clock_in_time   string  optional  

Clock in time.If not given current date time will be used Fromat: Y-m-d H:i:s Example: 2000-06-13 13:13:00

clock_in_note   string  optional  

Clock in note. Example: voluptas

ip_address   string  optional  

IP address. Example: eligendi

latitude   string  optional  

Latitude of the clock in location. Example: omnis

longitude   string  optional  

Longitude of the clock in location. Example: rem

Clock Out

requires authentication

[User must have "essentials.allow_users_for_attendance_from_api" permission to Clock out]

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/clock-out" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 1,
    \"clock_out_time\": \"2000-06-13 13:13:00\",
    \"clock_out_note\": \"eum\",
    \"latitude\": \"quis\",
    \"longitude\": \"et\"
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/clock-out"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 1,
    "clock_out_time": "2000-06-13 13:13:00",
    "clock_out_note": "eum",
    "latitude": "quis",
    "longitude": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "msg": "Clocked Out successfully",
    "type": "clock_out"
}
 

Request      

POST connector/api/clock-out

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user_id   integer   

id of the user Example: 1

clock_out_time   string  optional  

Clock out time.If not given current date time will be used Fromat: Y-m-d H:i:s Example: 2000-06-13 13:13:00

clock_out_note   string  optional  

Clock out note. Example: eum

latitude   string  optional  

Latitude of the clock out location. Example: quis

longitude   string  optional  

Longitude of the clock out location. Example: et

List Holidays

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/holidays?location_id=1&start_date=2020-06-25&end_date=2020-06-25" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/holidays"
);

const params = {
    "location_id": "1",
    "start_date": "2020-06-25",
    "end_date": "2020-06-25",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 2,
            "name": "Independence Day",
            "start_date": "2020-08-15",
            "end_date": "2020-09-15",
            "business_id": 1,
            "location_id": null,
            "note": "test holiday",
            "created_at": "2020-09-15 11:25:56",
            "updated_at": "2020-09-15 11:25:56"
        }
    ]
}
 

Request      

GET connector/api/holidays

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

location_id   string  optional  

id of the location Example: 1

start_date   string  optional  

format:Y-m-d Example: 2020-06-25

end_date   string  optional  

format:Y-m-d Example: 2020-06-25

User management

Get the loggedin user details.

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/user/loggedin" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/user/loggedin"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "user_type": "user",
        "surname": "Mr",
        "first_name": "Admin",
        "last_name": null,
        "username": "admin",
        "email": "[email protected]",
        "language": "en",
        "contact_no": null,
        "address": null,
        "business_id": 1,
        "max_sales_discount_percent": null,
        "allow_login": 1,
        "essentials_department_id": null,
        "essentials_designation_id": null,
        "status": "active",
        "crm_contact_id": null,
        "is_cmmsn_agnt": 0,
        "cmmsn_percent": "0.00",
        "selected_contacts": 0,
        "dob": null,
        "gender": null,
        "marital_status": null,
        "blood_group": null,
        "contact_number": null,
        "fb_link": null,
        "twitter_link": null,
        "social_media_1": null,
        "social_media_2": null,
        "permanent_address": null,
        "current_address": null,
        "guardian_name": null,
        "custom_field_1": null,
        "custom_field_2": null,
        "custom_field_3": null,
        "custom_field_4": null,
        "bank_details": null,
        "id_proof_name": null,
        "id_proof_number": null,
        "deleted_at": null,
        "created_at": "2018-01-04 02:15:19",
        "updated_at": "2018-01-04 02:15:19"
    }
}
 

Request      

GET connector/api/user/loggedin

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Register User

requires authentication

Example request:
curl --request POST \
    "https://www.nerapos.com/np/connector/api/user-registration" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"surname\": \"voluptas\",
    \"first_name\": \"qui\",
    \"last_name\": \"aut\",
    \"email\": \"[email protected]\",
    \"is_active\": \"magnam\",
    \"user_type\": \"dolorem\",
    \"crm_contact_id\": 3,
    \"allow_login\": false,
    \"username\": \"inventore\",
    \"password\": \"0OcPt9JdyR|\",
    \"role\": 11,
    \"access_all_locations\": false,
    \"location_permissions\": [
        \"est\"
    ],
    \"cmmsn_percent\": \"vitae\",
    \"max_sales_discount_percent\": \"dignissimos\",
    \"selected_contacts\": false,
    \"selected_contact_ids\": [
        \"occaecati\"
    ],
    \"dob\": \"iusto\",
    \"gender\": \"quas\",
    \"marital_status\": \"eveniet\",
    \"blood_group\": \"quae\",
    \"contact_number\": \"aliquid\",
    \"alt_number\": \"earum\",
    \"family_number\": \"animi\",
    \"fb_link\": \"impedit\",
    \"twitter_link\": \"nam\",
    \"social_media_1\": \"minima\",
    \"social_media_2\": \"aliquam\",
    \"custom_field_1\": \"doloremque\",
    \"custom_field_2\": \"non\",
    \"custom_field_3\": \"tenetur\",
    \"custom_field_4\": \"minima\",
    \"guardian_name\": \"qui\",
    \"id_proof_name\": \"ad\",
    \"id_proof_number\": \"pariatur\",
    \"permanent_address\": \"labore\",
    \"current_address\": \"est\",
    \"bank_details\": [
        \"dicta\"
    ]
}"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/user-registration"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "surname": "voluptas",
    "first_name": "qui",
    "last_name": "aut",
    "email": "[email protected]",
    "is_active": "magnam",
    "user_type": "dolorem",
    "crm_contact_id": 3,
    "allow_login": false,
    "username": "inventore",
    "password": "0OcPt9JdyR|",
    "role": 11,
    "access_all_locations": false,
    "location_permissions": [
        "est"
    ],
    "cmmsn_percent": "vitae",
    "max_sales_discount_percent": "dignissimos",
    "selected_contacts": false,
    "selected_contact_ids": [
        "occaecati"
    ],
    "dob": "iusto",
    "gender": "quas",
    "marital_status": "eveniet",
    "blood_group": "quae",
    "contact_number": "aliquid",
    "alt_number": "earum",
    "family_number": "animi",
    "fb_link": "impedit",
    "twitter_link": "nam",
    "social_media_1": "minima",
    "social_media_2": "aliquam",
    "custom_field_1": "doloremque",
    "custom_field_2": "non",
    "custom_field_3": "tenetur",
    "custom_field_4": "minima",
    "guardian_name": "qui",
    "id_proof_name": "ad",
    "id_proof_number": "pariatur",
    "permanent_address": "labore",
    "current_address": "est",
    "bank_details": [
        "dicta"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": 1,
    "msg": "User added successfully",
    "user": {
        "surname": "Mr",
        "first_name": "Test",
        "last_name": "kumar",
        "email": "[email protected]",
        "user_type": "user_customer",
        "crm_contact_id": "2",
        "allow_login": 1,
        "username": "0017",
        "cmmsn_percent": "25",
        "max_sales_discount_percent": "52",
        "dob": "1997-10-12",
        "gender": "male",
        "marital_status": "unmarried",
        "blood_group": "0+",
        "contact_number": "4578451245",
        "alt_number": "7474747474",
        "family_number": "7474147414",
        "fb_link": "fb.com/username",
        "twitter_link": "twitter.com/username",
        "social_media_1": "test",
        "social_media_2": "test",
        "custom_field_1": "test",
        "custom_field_2": "test",
        "custom_field_3": "test",
        "custom_field_4": "test",
        "guardian_name": "test",
        "id_proof_name": "uid",
        "id_proof_number": "747845120124",
        "permanent_address": "test permanent adrress",
        "current_address": "test current address",
        "bank_details": "{\"account_holder_name\":\"test\",\"account_number\":\"test\",\"bank_name\":\"test\",\"bank_code\":\"test\",\"branch\":\"test\",\"tax_payer_id\":\"test\"}",
        "selected_contacts": "1",
        "status": "active",
        "business_id": 1,
        "updated_at": "2021-08-12 18:03:58",
        "created_at": "2021-08-12 18:03:58",
        "id": 140
    }
}
 

Request      

POST connector/api/user-registration

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

surname   string  optional  

prefix like Mr, Mrs,Dr Example: voluptas

first_name   string   

Example: qui

last_name   string  optional  

Example: aut

email   string   

Example: [email protected]

is_active   string   

'active', 'inactive', 'terminated' Example: magnam

user_type   string   

'user_customer' for contact/customer login & 'user' for general user Example: dolorem

crm_contact_id   integer  optional  

if user_type is 'user_customer' then required Example: 3

allow_login   boolean  optional  

1 to allow login & 0 to disable login Example: false

username   string  optional  

minimum 5 characters Example: inventore

password   string  optional  

minimum 6 characters & required if 'allow_login' is 1 Example: 0OcPt9JdyR|

role   integer  optional  

id of role to be assigned to user & required if user_type is 'user' Example: 11

access_all_locations   boolean  optional  

1 if user has access all location else 0 & required if user_type is 'user' Example: false

location_permissions   string[]  optional  

array of location ids to be assigned to user & required if user_type is 'user' and 'access_all_locations' is 0

cmmsn_percent   decimal  optional  

Example: vitae

max_sales_discount_percent   decimal  optional  

Example: dignissimos

selected_contacts   boolean  optional  

1 or 0 Example: false

selected_contact_ids   string[]  optional  

array of contact ids & required if 'selected_contacts' is 1

dob   date  optional  

dob of user in "Y-m-d" format Ex: 1997-10-29 Example: iusto

gender   string  optional  

if user is 'male', 'female', 'others' Example: quas

marital_status   string  optional  

if user is 'married', 'unmarried', 'divorced' Example: eveniet

blood_group   string  optional  

Example: quae

contact_number   string  optional  

Example: aliquid

alt_number   string  optional  

Example: earum

family_number   string  optional  

Example: animi

fb_link   string  optional  

Example: impedit

twitter_link   string  optional  

Example: nam

social_media_1   string  optional  

Example: minima

social_media_2   string  optional  

Example: aliquam

custom_field_1   string  optional  

Example: doloremque

custom_field_2   string  optional  

Example: non

custom_field_3   string  optional  

Example: tenetur

custom_field_4   string  optional  

Example: minima

guardian_name   string  optional  

Example: qui

id_proof_name   string  optional  

ID proof of user like Adhar No. Example: ad

id_proof_number   string  optional  

Id Number like adhar number Example: pariatur

permanent_address   string  optional  

Example: labore

current_address   string  optional  

Example: est

bank_details   string[]  optional  
*   object  optional  
account_holder_name   string  optional  

Example: aperiam

account_number   string  optional  

Example: dolores

bank_name   string  optional  

Example: nulla

bank_code   string  optional  

Example: deserunt

branch   string  optional  

Example: quam

tax_payer_id   string  optional  

Example: omnis

List users

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/user?service_staff=" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/user"
);

const params = {
    "service_staff": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "user_type": "user",
            "surname": "Mr",
            "first_name": "Admin",
            "last_name": null,
            "username": "admin",
            "email": "[email protected]",
            "language": "en",
            "contact_no": null,
            "address": null,
            "business_id": 1,
            "max_sales_discount_percent": null,
            "allow_login": 1,
            "essentials_department_id": null,
            "essentials_designation_id": null,
            "status": "active",
            "crm_contact_id": null,
            "is_cmmsn_agnt": 0,
            "cmmsn_percent": "0.00",
            "selected_contacts": 0,
            "dob": null,
            "gender": null,
            "marital_status": null,
            "blood_group": null,
            "contact_number": null,
            "fb_link": null,
            "twitter_link": null,
            "social_media_1": null,
            "social_media_2": null,
            "permanent_address": null,
            "current_address": null,
            "guardian_name": null,
            "custom_field_1": null,
            "custom_field_2": null,
            "custom_field_3": null,
            "custom_field_4": null,
            "bank_details": null,
            "id_proof_name": null,
            "id_proof_number": null,
            "deleted_at": null,
            "created_at": "2018-01-04 02:15:19",
            "updated_at": "2018-01-04 02:15:19"
        }
    ]
}
 

Request      

GET connector/api/user

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

service_staff   boolean  optional  

Filter service staffs from users list (0, 1) Example: false

Get the specified user

requires authentication

Example request:
curl --request GET \
    --get "https://www.nerapos.com/np/connector/api/user/1" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.nerapos.com/np/connector/api/user/1"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "user_type": "user",
            "surname": "Mr",
            "first_name": "Admin",
            "last_name": null,
            "username": "admin",
            "email": "[email protected]",
            "language": "en",
            "contact_no": null,
            "address": null,
            "business_id": 1,
            "max_sales_discount_percent": null,
            "allow_login": 1,
            "essentials_department_id": null,
            "essentials_designation_id": null,
            "status": "active",
            "crm_contact_id": null,
            "is_cmmsn_agnt": 0,
            "cmmsn_percent": "0.00",
            "selected_contacts": 0,
            "dob": null,
            "gender": null,
            "marital_status": null,
            "blood_group": null,
            "contact_number": null,
            "fb_link": null,
            "twitter_link": null,
            "social_media_1": null,
            "social_media_2": null,
            "permanent_address": null,
            "current_address": null,
            "guardian_name": null,
            "custom_field_1": null,
            "custom_field_2": null,
            "custom_field_3": null,
            "custom_field_4": null,
            "bank_details": null,
            "id_proof_name": null,
            "id_proof_number": null,
            "deleted_at": null,
            "created_at": "2018-01-04 02:15:19",
            "updated_at": "2018-01-04 02:15:19"
        }
    ]
}
 

Request