Departments
API Key and Store id that can be used in staging environment.
Store_id: 5c5981496bcf7500013afeb0
API Key: rna4etAXd11XRqbMTcNnWca216daxiFE
Getting departments of a store.
URL:https://api.lingaros.com/v1/lingapos/store/{store-id}/departments
curl -X GET -H "apikey: generated-api-key" \
"https://api.lingaros.com/v1/lingapos/store/{store-id}/departments"
queryParms
?page=1 => [paging no]
?search= => [null]
?status=true => [active deparments list]
?status=false => [inactive departments list]
Getting a department.
URL:https://api.lingaros.com/v1/lingapos/departments/{department-id}
curl -X GET -H "apikey: generated-api-key" \
"https://api.lingaros.com/v1/lingapos/departments/{department-id}"
Creating a new department.
Method | Type | Description |
---|---|---|
name | String | Department name. |
departmentCode | String | Department code. |
description | String | Description. |
store | bson.ObjectID | Store id. |
createdAt | Int | Which store created the department. |
createdFor | bson.String | Store id for which the department is created. |
ownedBy | bson.String | Account id related to the Store by whom the department is created. |
curl -X POST \
-H "apikey: generated-api-key" \
-H "Content-Type: application/json" \
-d '{"name":"PASTA",
"departmentCode":"PST",
"description":"PASTA",
"store":"5c5981496bcf7500013afeb0",
"createdAt":2,
"createdFor":"5c5981496bcf7500013afeb0",
"ownedBy":"5c5981496bcf7500013afeb2"}' \
"https://api.lingaros.com/v1/lingapos/department" \
Updating a department.
URL:http://api.lingaros.com/v1/lingapos/department/{department-id}
Method | Type | Description |
---|---|---|
id | bson.ObjectID | Department id. |
originalID | bson.ObjectID | Original id of the department. |
name | String | Department name. |
description | String | Description. |
departmentCode | String | Department code. |
createdAt | Int | Which store created the department. |
createdFor | bson.String | Store id for which the department is created. |
ownedBy | bson.String | Account id related to the Store by whom the department is created. |
createdBy | bson.String | Unique Id of the user by whom the department is created. |
dateCreated | Time.Time | Department creation date. |
modifiedBy | bson.String | Unique Id of the user by whom the department is modified. |
lastUpdated | Time.Time | Department last update date. |
syncWithInventory | Bool | Is account having inventory or not. |
activeStatus | Bool | True if department is active. |
isDelete | Bool |
curl -X POST \
-H "apikey: generated-api-key" \
-H "Content-Type: application/json" \
-d '{"id":"5e0f236ed7dac90001760868",
"originalID":"5e0f236ed7dac90001760868",
"name":"PASTA",
"description":"PASTAS",
"departmentCode":"PST",
"createdAt":2,
"createdFor":"5c5981496bcf7500013afeb0",
"ownedBy":"5c5981496bcf7500013afeb2",
"createdBy":"5c5981496bcf7500013afeb1",
"dateCreated":"2020-01-03T11:20:14.176Z",
"modifiedBy":"5c5981496bcf7500013afeb1",
"lastUpdated":"2020-01-03T11:20:14.328Z",
"syncWithInventory":true,
"activeStatus":true,
"isDelete":false} \
"https://api.lingaros.com/v1/lingapos/deparment/{department-id}" \
Inactivating a department.
URL:http://api.lingaros.com/v1/lingapos/department/{department-id}/inactivate
Method | Type | Description |
---|---|---|
entity | String | Name of the entity. |
id | String | Department id. |
curl -X PUT \
-H "apikey: generated-api-key" \
-H "Content-Type: application/json" \
-d '{"entity":"category",
"id":"5dfce192fe7e0f00018c864a"}' \
"https://api.lingaros.com/v1/lingapos/department/{department-id}/inactivate" \