Glue API: Add service types

Edit on GitHub

This endpoint lets you add service types.

Installation

Install the Service Points feature

Add a service type


POST /service-types


Request

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string Alphanumeric string that authorizes the warehouse user to send requests to protected resources. Get it by authenticating as a warehouse user.

Request sample: POST https://glue-backend.mysprykershop.com/service-types

{
    "data": {
        "type": "service-types",
        "attributes": {
            "name": "Demo",
            "key": "demo"
        }
    }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
name String Name.
key String Unique identifier of the service type. You will use it when adding services.

Response

Response sample:

{
    "data": {
        "type": "service-types",
        "id": "7a263a50-12a3-5ef4-86f4-366f20783180",
        "attributes": {
            "name": "Demo",
            "key": "demo"
        },
        "links": {
            "self": "https://glue-backend.mysprykershop.com/service-types/7a263a50-12a3-5ef4-86f4-366f20783180"
        }
    }
}
RESOURCE ATTRIBUTE TYPE DESCRIPTION
service-types name String Name.
service-types key String Unique key of the service type. You will use it as a reference when adding services of this type.

Possible errors

CODE REASON
5425 A service type with the same name already exists.
5419 A service type with the same key already exists.

To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.