Business Unit API v2

From Memsource
Jump to: navigation, search

Create New Business Unit

action: api/v2/businessUnit/create
    token                       string
    name                        string                         

response: JSON
    {
      "id": 239                 // id of the new business unit
    }

Get Business Unit

action: api/v2/businessUnit/get
    token                       string
    businessUnit                domain(BusinessUnit)

response: JSON
   {
     "id":4,
     "name":"BU Name"
   }

List Business Units

action: api/v2/businessUnit/list
    token                       string
    page                        integer            O(0)
    name                        string             O

response: JSON
   [
     {
       "id":3,
       "name":"BU Name"
     }
   ]

Edit Business Unit

action: api/v2/businessUnit/edit
    token                       string
    businessUnit                domain(BusinessUnit)
    name                        string             0

response: empty

Delete Business Unit

action: api/v2/businessUnit/delete
    token                       string
    businessUnit                domain(BusinessUnit)

response: empty