Skip to main content

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.

URL:http://api.lingaros.com/v1/lingapos/department

MethodTypeDescription
nameStringDepartment name.
departmentCodeStringDepartment code.
descriptionStringDescription.
storebson.ObjectIDStore id.
createdAtIntWhich store created the department.
createdForbson.StringStore id for which the department is created.
ownedBybson.StringAccount 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}

MethodTypeDescription
idbson.ObjectIDDepartment id.
originalIDbson.ObjectIDOriginal id of the department.
nameStringDepartment name.
descriptionStringDescription.
departmentCodeStringDepartment code.
createdAtIntWhich store created the department.
createdForbson.StringStore id for which the department is created.
ownedBybson.StringAccount id related to the Store by whom the department is created.
createdBybson.StringUnique Id of the user by whom the department is created.
dateCreatedTime.TimeDepartment creation date.
modifiedBybson.StringUnique Id of the user by whom the department is modified.
lastUpdatedTime.TimeDepartment last update date.
syncWithInventoryBoolIs account having inventory or not.
activeStatusBoolTrue if department is active.
isDeleteBool
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

MethodTypeDescription
entityStringName of the entity.
idStringDepartment 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" \