Skip to main content

Organization

Definition

organization.json
{
"id": 0,
"organizationName": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Organizations

curl -X GET "${baseUrl}/organization/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Organization

curl -X GET "${baseUrl}/organization/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Organization.ID

curl -X POST "${baseUrl}/apply/organization/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Organization

curl -X POST "${baseUrl}/organization/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @organization.json
info
organization.json
{
"organizationName": "",
"status": 0,
}
tip

success status: 201

Update Organization

#!/bin/bash
curl -X PUT "${baseUrl}/organization/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @organization.json
info
organization.json
{
"organizationName": "",
"status": 0,
}

Patch Organization

curl -X PATCH "${baseUrl}/organization/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: organizationName,status" \
-d @organization.json
info
organization.json
{
"organizationName": "",
"status": 0,
}

Update Organization Status

curl -X PATCH "${baseUrl}/organization/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @organization.json
info
organization.json
{
"status": 0
}

Destroy Organization

curl -X DELETE "${baseUrl}/organization/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "${baseUrl}/organization/${id}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"
curl -X DELETE "${baseUrl}/organization/${id}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"