# Create Service

POST https://services.leadconnectorhq.com/calendars/services/catalog

Create new service in a location.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `calendars.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/calendars/services/catalog": {
      "post": {
        "summary": "Create Service",
        "operationId": "createService",
        "description": "Create new service in a location.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServiceDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Service created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceResponseWrapperDTO"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "User not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "calendars.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CreateServiceDTO": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "description": "Location ID",
            "example": "0007BWpSzSwfiuSl0tR2"
          },
          "name": {
            "type": "string",
            "description": "Service name",
            "example": "Hair Styling"
          },
          "slug": {
            "type": "string",
            "description": "Unique URL-friendly identifier",
            "example": "hair-styling"
          },
          "staff": {
            "description": "Assigned staff members (at least one required)",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Staff ID",
                  "example": "65e5f6dfacf123513228d384"
                }
              },
              "required": [
                "id"
              ],
              "title": "StaffDTO"
            },
            "example": [
              {
                "id": "65e5f6dfacf123513228d384"
              }
            ]
          },
          "description": {
            "type": "string",
            "description": "Service description",
            "example": "Full hair styling session"
          },
          "eventColor": {
            "type": "string",
            "description": "Service event color (hex)",
            "example": "#66C61C"
          },
          "coverImage": {
            "type": "string",
            "description": "Service cover image URL",
            "example": "https://example.com/cover.jpg"
          },
          "serviceCategoryId": {
            "type": "string",
            "description": "Service category ID (uses default category if not provided)",
            "example": "65e5f6dfacf123513228d381"
          },
          "payment": {
            "description": "Payment details (default amount is 0, currency configured in Service Global Settings is used.)",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Service price",
                    "example": 50
                  },
                  "deposit": {
                    "type": "number",
                    "description": "Deposit amount or percentage value",
                    "example": 20
                  },
                  "depositType": {
                    "type": "string",
                    "description": "Deposit type",
                    "example": "amount",
                    "enum": [
                      "percentage",
                      "amount"
                    ]
                  }
                },
                "title": "PaymentDTO"
              }
            ],
            "example": {
              "amount": 50,
              "deposit": 20,
              "depositType": "amount"
            }
          },
          "serviceDuration": {
            "type": "number",
            "description": "This controls the duration of the appointment",
            "example": 30
          },
          "serviceDurationUnit": {
            "type": "string",
            "description": "Duration unit",
            "example": "mins",
            "enum": [
              "mins",
              "hours"
            ]
          },
          "preBuffer": {
            "type": "number",
            "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready",
            "example": 10
          },
          "preBufferUnit": {
            "type": "string",
            "description": "Pre-buffer unit",
            "example": "mins",
            "enum": [
              "mins",
              "hours"
            ]
          },
          "postBuffer": {
            "type": "number",
            "description": "Post-buffer: Additional time that can be added after an appointment, allowing for extra time to wrap up",
            "example": 15
          },
          "postBufferUnit": {
            "type": "string",
            "description": "Post-buffer unit",
            "example": "mins",
            "enum": [
              "mins",
              "hours"
            ]
          },
          "isPrivate": {
            "type": "boolean",
            "description": "Whether service is private (not shown publicly)",
            "example": false
          },
          "formId": {
            "type": "string",
            "description": "Custom form ID (will be used to display the custom form on the booking page, if only one service is selected)",
            "example": "65e5f6dfacf123513228d390"
          },
          "variations": {
            "description": "Service variations (pass empty array for no variations)",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "serviceDuration": {
                  "type": "number",
                  "description": "This controls the duration of the appointment",
                  "example": 30
                },
                "serviceDurationUnit": {
                  "type": "string",
                  "description": "Duration unit",
                  "example": "mins",
                  "enum": [
                    "mins",
                    "hours"
                  ]
                },
                "preBuffer": {
                  "type": "number",
                  "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready",
                  "example": 10
                },
                "preBufferUnit": {
                  "type": "string",
                  "description": "Pre-buffer unit",
                  "example": "mins",
                  "enum": [
                    "mins",
                    "hours"
                  ]
                },
                "postBuffer": {
                  "type": "number",
                  "description": "Post-buffer: Additional time that can be added after an appointment, allowing for extra time to wrap up",
                  "example": 15
                },
                "postBufferUnit": {
                  "type": "string",
                  "description": "Post-buffer unit",
                  "example": "mins",
                  "enum": [
                    "mins",
                    "hours"
                  ]
                },
                "payment": {
                  "description": "Payment details",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number",
                          "description": "Service price",
                          "example": 50
                        },
                        "deposit": {
                          "type": "number",
                          "description": "Deposit amount or percentage value",
                          "example": 20
                        },
                        "depositType": {
                          "type": "string",
                          "description": "Deposit type",
                          "example": "amount",
                          "enum": [
                            "percentage",
                            "amount"
                          ]
                        }
                      },
                      "title": "PaymentDTO"
                    }
                  ],
                  "example": {
                    "amount": 50,
                    "deposit": 20,
                    "depositType": "amount"
                  }
                },
                "name": {
                  "type": "string",
                  "description": "Variation name",
                  "example": "Standard Haircut"
                }
              },
              "required": [
                "name"
              ],
              "title": "CreateServiceVariationDTO"
            },
            "example": [
              {
                "name": "Standard Haircut",
                "serviceDuration": 30,
                "payment": {
                  "amount": 50
                }
              }
            ]
          }
        },
        "required": [
          "locationId",
          "name",
          "slug",
          "staff"
        ],
        "title": "CreateServiceDTO"
      },
      "ServiceResponseWrapperDTO": {
        "type": "object",
        "properties": {
          "service": {
            "description": "Service details",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Service ID",
                    "example": "65e5f6dfacf123513228d384"
                  },
                  "locationId": {
                    "type": "string",
                    "description": "Location ID",
                    "example": "0007BWpSzSwfiuSl0tR2"
                  },
                  "name": {
                    "type": "string",
                    "description": "Service name",
                    "example": "Hair Styling"
                  },
                  "description": {
                    "type": "string",
                    "description": "Service description",
                    "example": "Full hair styling session"
                  },
                  "slug": {
                    "type": "string",
                    "description": "Unique URL-friendly identifier",
                    "example": "hair-styling"
                  },
                  "eventColor": {
                    "type": "string",
                    "description": "Service event color (hex)",
                    "example": "#66C61C"
                  },
                  "coverImage": {
                    "type": "string",
                    "description": "Service cover image URL",
                    "example": "https://example.com/cover.jpg"
                  },
                  "serviceCategoryId": {
                    "type": "string",
                    "description": "Service category ID",
                    "example": "65e5f6dfacf123513228d381"
                  },
                  "payment": {
                    "description": "Payment details",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "number",
                            "description": "Service price",
                            "example": 50
                          },
                          "deposit": {
                            "type": "number",
                            "description": "Deposit amount or percentage value",
                            "example": 20
                          },
                          "depositType": {
                            "type": "string",
                            "description": "Deposit type",
                            "example": "amount",
                            "enum": [
                              "percentage",
                              "amount"
                            ]
                          }
                        },
                        "title": "PaymentDTO"
                      }
                    ],
                    "example": {
                      "amount": 50,
                      "deposit": 20,
                      "depositType": "amount"
                    }
                  },
                  "serviceDuration": {
                    "type": "number",
                    "description": "This controls the duration of the appointment",
                    "example": 60
                  },
                  "serviceDurationUnit": {
                    "type": "string",
                    "description": "Duration unit",
                    "example": "mins",
                    "enum": [
                      "mins",
                      "hours"
                    ]
                  },
                  "preBuffer": {
                    "type": "number",
                    "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready",
                    "example": 10
                  },
                  "preBufferUnit": {
                    "type": "string",
                    "description": "Pre-buffer unit",
                    "example": "mins",
                    "enum": [
                      "mins",
                      "hours"
                    ]
                  },
                  "postBuffer": {
                    "type": "number",
                    "description": "Post-buffer: Additional time that can be added after an appointment, allowing for extra time to wrap up",
                    "example": 15
                  },
                  "postBufferUnit": {
                    "type": "string",
                    "description": "Post-buffer unit",
                    "example": "mins",
                    "enum": [
                      "mins",
                      "hours"
                    ]
                  },
                  "isPrivate": {
                    "type": "boolean",
                    "description": "Whether service is private (not shown publicly)",
                    "example": false,
                    "default": false
                  },
                  "formId": {
                    "type": "string",
                    "description": "Custom form ID (will be used to display the custom form on the booking page, if only one service is selected)",
                    "example": "65e5f6dfacf123513228d390"
                  },
                  "variations": {
                    "description": "Service variations",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Variation ID",
                          "example": "65e5f6dfacf123513228d384"
                        },
                        "name": {
                          "type": "string",
                          "description": "Variation name",
                          "example": "Standard Haircut"
                        },
                        "serviceDuration": {
                          "type": "number",
                          "description": "This controls the duration of the appointment",
                          "example": 30
                        },
                        "serviceDurationUnit": {
                          "type": "string",
                          "description": "Duration unit",
                          "example": "mins",
                          "enum": [
                            "mins",
                            "hours"
                          ]
                        },
                        "payment": {
                          "description": "Payment details",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "number",
                                  "description": "Service price",
                                  "example": 50
                                },
                                "deposit": {
                                  "type": "number",
                                  "description": "Deposit amount or percentage value",
                                  "example": 20
                                },
                                "depositType": {
                                  "type": "string",
                                  "description": "Deposit type",
                                  "example": "amount",
                                  "enum": [
                                    "percentage",
                                    "amount"
                                  ]
                                }
                              },
                              "title": "PaymentDTO"
                            }
                          ],
                          "example": {
                            "amount": 50,
                            "deposit": 20,
                            "depositType": "amount"
                          }
                        },
                        "preBuffer": {
                          "type": "number",
                          "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready",
                          "example": 10
                        },
                        "preBufferUnit": {
                          "type": "string",
                          "description": "Pre-buffer unit",
                          "example": "mins",
                          "enum": [
                            "mins",
                            "hours"
                          ]
                        },
                        "postBuffer": {
                          "type": "number",
                          "description": "Post-buffer: Additional time that can be added after an appointment, allowing for extra time to wrap up",
                          "example": 15
                        },
                        "postBufferUnit": {
                          "type": "string",
                          "description": "Post-buffer unit",
                          "example": "mins",
                          "enum": [
                            "mins",
                            "hours"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "title": "ServiceVariationDTO"
                    },
                    "example": [
                      {
                        "id": "65e5f6dfacf123513228d384",
                        "name": "Standard Haircut",
                        "serviceDuration": 30,
                        "payment": {
                          "amount": 50
                        }
                      }
                    ]
                  },
                  "staff": {
                    "description": "Assigned staff members",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Staff ID",
                          "example": "65e5f6dfacf123513228d384"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "StaffDTO"
                    },
                    "example": [
                      {
                        "id": "65e5f6dfacf123513228d384"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "locationId",
                  "name"
                ],
                "title": "ServiceResponseDTO"
              }
            ],
            "example": {
              "id": "65e5f6dfacf123513228d384",
              "locationId": "0007BWpSzSwfiuSl0tR2",
              "name": "Hair Styling"
            }
          }
        },
        "required": [
          "service"
        ],
        "title": "ServiceResponseWrapperDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/calendars/services/catalog' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "locationId": "0007BWpSzSwfiuSl0tR2",
  "name": "Hair Styling",
  "slug": "hair-styling",
  "staff": [
    {
      "id": "65e5f6dfacf123513228d384"
    }
  ],
  "description": "Full hair styling session",
  "eventColor": "#66C61C",
  "coverImage": "https://example.com/cover.jpg",
  "serviceCategoryId": "65e5f6dfacf123513228d381",
  "payment": {
    "amount": 50,
    "deposit": 20,
    "depositType": "amount"
  },
  "serviceDuration": 30,
  "serviceDurationUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "postBuffer": 15,
  "postBufferUnit": "mins",
  "isPrivate": false,
  "formId": "65e5f6dfacf123513228d390",
  "variations": [
    {
      "name": "Standard Haircut",
      "serviceDuration": 30,
      "payment": {
        "amount": 50
      }
    }
  ]
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "locationId": "0007BWpSzSwfiuSl0tR2",
      "name": "Hair Styling",
      "slug": "hair-styling",
      "staff": [
        {
          "id": "65e5f6dfacf123513228d384"
        }
      ],
      "description": "Full hair styling session",
      "eventColor": "#66C61C",
      "coverImage": "https://example.com/cover.jpg",
      "serviceCategoryId": "65e5f6dfacf123513228d381",
      "payment": {
        "amount": 50,
        "deposit": 20,
        "depositType": "amount"
      },
      "serviceDuration": 30,
      "serviceDurationUnit": "mins",
      "preBuffer": 10,
      "preBufferUnit": "mins",
      "postBuffer": 15,
      "postBufferUnit": "mins",
      "isPrivate": false,
      "formId": "65e5f6dfacf123513228d390",
      "variations": [
        {
          "name": "Standard Haircut",
          "serviceDuration": 30,
          "payment": {
            "amount": 50
          }
        }
      ]
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/calendars/services/catalog', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/calendars/services/catalog"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "locationId": "0007BWpSzSwfiuSl0tR2",
    "name": "Hair Styling",
    "slug": "hair-styling",
    "staff": [
        {
            "id": "65e5f6dfacf123513228d384"
        }
    ],
    "description": "Full hair styling session",
    "eventColor": "#66C61C",
    "coverImage": "https://example.com/cover.jpg",
    "serviceCategoryId": "65e5f6dfacf123513228d381",
    "payment": {
        "amount": 50,
        "deposit": 20,
        "depositType": "amount"
    },
    "serviceDuration": 30,
    "serviceDurationUnit": "mins",
    "preBuffer": 10,
    "preBufferUnit": "mins",
    "postBuffer": 15,
    "postBufferUnit": "mins",
    "isPrivate": false,
    "formId": "65e5f6dfacf123513228d390",
    "variations": [
        {
            "name": "Standard Haircut",
            "serviceDuration": 30,
            "payment": {
                "amount": 50
            }
        }
    ]
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/calendars/services/catalog',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "locationId": "0007BWpSzSwfiuSl0tR2",
  "name": "Hair Styling",
  "slug": "hair-styling",
  "staff": [
    {
      "id": "65e5f6dfacf123513228d384"
    }
  ],
  "description": "Full hair styling session",
  "eventColor": "#66C61C",
  "coverImage": "https://example.com/cover.jpg",
  "serviceCategoryId": "65e5f6dfacf123513228d381",
  "payment": {
    "amount": 50,
    "deposit": 20,
    "depositType": "amount"
  },
  "serviceDuration": 30,
  "serviceDurationUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "postBuffer": 15,
  "postBufferUnit": "mins",
  "isPrivate": false,
  "formId": "65e5f6dfacf123513228d390",
  "variations": [
    {
      "name": "Standard Haircut",
      "serviceDuration": 30,
      "payment": {
        "amount": 50
      }
    }
  ]
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/calendars/services/catalog")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"locationId\":\"0007BWpSzSwfiuSl0tR2\",\"name\":\"Hair Styling\",\"slug\":\"hair-styling\",\"staff\":[{\"id\":\"65e5f6dfacf123513228d384\"}],\"description\":\"Full hair styling session\",\"eventColor\":\"#66C61C\",\"coverImage\":\"https://example.com/cover.jpg\",\"serviceCategoryId\":\"65e5f6dfacf123513228d381\",\"payment\":{\"amount\":50,\"deposit\":20,\"depositType\":\"amount\"},\"serviceDuration\":30,\"serviceDurationUnit\":\"mins\",\"preBuffer\":10,\"preBufferUnit\":\"mins\",\"postBuffer\":15,\"postBufferUnit\":\"mins\",\"isPrivate\":false,\"formId\":\"65e5f6dfacf123513228d390\",\"variations\":[{\"name\":\"Standard Haircut\",\"serviceDuration\":30,\"payment\":{\"amount\":50}}]}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/calendars/services/catalog"
  payload := strings.NewReader(`{
  "locationId": "0007BWpSzSwfiuSl0tR2",
  "name": "Hair Styling",
  "slug": "hair-styling",
  "staff": [
    {
      "id": "65e5f6dfacf123513228d384"
    }
  ],
  "description": "Full hair styling session",
  "eventColor": "#66C61C",
  "coverImage": "https://example.com/cover.jpg",
  "serviceCategoryId": "65e5f6dfacf123513228d381",
  "payment": {
    "amount": 50,
    "deposit": 20,
    "depositType": "amount"
  },
  "serviceDuration": 30,
  "serviceDurationUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "postBuffer": 15,
  "postBufferUnit": "mins",
  "isPrivate": false,
  "formId": "65e5f6dfacf123513228d390",
  "variations": [
    {
      "name": "Standard Haircut",
      "serviceDuration": 30,
      "payment": {
        "amount": 50
      }
    }
  ]
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/calendars/services/catalog")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "locationId": "0007BWpSzSwfiuSl0tR2",
  "name": "Hair Styling",
  "slug": "hair-styling",
  "staff": [
    {
      "id": "65e5f6dfacf123513228d384"
    }
  ],
  "description": "Full hair styling session",
  "eventColor": "#66C61C",
  "coverImage": "https://example.com/cover.jpg",
  "serviceCategoryId": "65e5f6dfacf123513228d381",
  "payment": {
    "amount": 50,
    "deposit": 20,
    "depositType": "amount"
  },
  "serviceDuration": 30,
  "serviceDurationUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "postBuffer": 15,
  "postBufferUnit": "mins",
  "isPrivate": false,
  "formId": "65e5f6dfacf123513228d390",
  "variations": [
    {
      "name": "Standard Haircut",
      "serviceDuration": 30,
      "payment": {
        "amount": 50
      }
    }
  ]
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "locationId": "0007BWpSzSwfiuSl0tR2",
  "name": "Hair Styling",
  "slug": "hair-styling",
  "staff": [
    {
      "id": "65e5f6dfacf123513228d384"
    }
  ],
  "description": "Full hair styling session",
  "eventColor": "#66C61C",
  "coverImage": "https://example.com/cover.jpg",
  "serviceCategoryId": "65e5f6dfacf123513228d381",
  "payment": {
    "amount": 50,
    "deposit": 20,
    "depositType": "amount"
  },
  "serviceDuration": 30,
  "serviceDurationUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "postBuffer": 15,
  "postBufferUnit": "mins",
  "isPrivate": false,
  "formId": "65e5f6dfacf123513228d390",
  "variations": [
    {
      "name": "Standard Haircut",
      "serviceDuration": 30,
      "payment": {
        "amount": 50
      }
    }
  ]
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/calendars/services/catalog' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
