Business Units

Operations for business units

Find All

GET /v1/networks/businessunits

cURL
curl --request GET 'https://api.eflow.team/v1/networks/businessunits' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
  "units": [
    {
      "network_business_unit_id": 1,
      "network_id": 1,
      "name": "Marketing"
    },
    {
      "network_business_unit_id": 2,
      "network_id": 1,
      "name": "Manufacturing"
    }
  ]
}

Find By ID

GET /v1/networks/businessunits/:businessUnitId

Path Parameters

Parameter Description
businessUnitId The ID of the business unit you want to find

cURL
curl --request GET 'https://api.eflow.team/v1/networks/businessunits/1' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
  "network_business_unit_id": 1,
  "network_id": 1,
  "name": "Marketing"
}

Create

POST /v1/networks/businessunits

name string

Name of the business unit.

{
    "name": "Manufacturing" 
}

cURL
curl --request POST \
  --url 'https://api.eflow.team/v1/networks/businessunits' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
    "network_business_unit_id": 1,
    "network_id": 1,
    "name": "Manufacturing",
    "time_created": 1603827008,
    "time_saved": 1603827008
}

Update

PUT /v1/networks/businessunits/:businessUnitId

You must specify all the fields, not only the ones you wish to update.
If you omit a field that is not marked as required, its default value will be used.

Path Parameters

Parameter Description
businessUnitId The ID of the business unit you want to update

name string

Name of the business unit.

{
  "name": "Marketing"
}

cURL
curl --request PUT \
  --url 'https://api.eflow.team/v1/networks/businessunits/<INSERT BUSINESS UNIT ID>' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
    "network_business_unit_id": 1,
    "network_id": 1,
    "name": "Marketing",
    "time_created": 1603827008,
    "time_saved": 1603827008
}