Create Tag Bulk

This end point is use for create tags

[POST] /ruangkerja/tags/create-bulk

Information

This API is a function for create multiple tags in single operation.

Headers

NameTypeExampleRequiredDescription
Authorizationstringaccess_tokenYESToken of authentication. Get from Authentication API
Acceptstringapplication/jsonYESDefines the message format that is expected by the client
Content-Typestringapplication/jsonYESDefines the message format of the request body that is sent by the client

Parameter

NameTypeRequiredLocationDescription
namestringYESbodyName of tag

Example cURL Request

curl --location --request POST 'https://api.ruangkerja.id/ruangkerja/tags/create-bulk' \
--header 'Authorization: access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "items": [
        {
            "name": "Intern"
        },
        {
            "name": "Fulltime"
        }
    ]
}'

Example Success Response

{
    "data": {
        "failedItems": [],
        "successItems": [
            {
                "payload": {
                    "name": "Intern"
                },
                "response": {
                    "serial": "RUKRTAG-Q7KXEPJO"
                }
            },
            {
                "payload": {
                    "name": "Fulltime"
                },
                "response": {
                    "serial": "RUKRTAG-OWTBC9OZ"
                }
            }
        ]
    },
    "status": "success",
    "message": "success"
}

Example Failed Response

{
    "data": {
        "failedItems": [
            {
                "error": {
                    "detail": "tag name already been taken",
                    "errorCode": 11101,
                    "message": "TAG_NAME_EXISTS"
                },
                "payload": {
                    "name": "Intern"
                }
            }
        ],
        "successItems": []
    },
    "status": "success",
    "message": "success"
}

See also: Error Dictionary.