Limited time discount Book Smarter This Christmas
Up to 50%Off

How do I manage categories with the Amelia API

Use the categories endpoints to organize services into logical groups, control their visibility, and manage sorting. Categories help structure services in booking forms and admin views.

You can review all endpoints and examples in the Amelia API Postman collection.

Info Note
API endpoints are available only in Elite license plans. Using the API requires coding skills and is not covered by standard plugin support.

How do I add a category with the Amelia API?

Use this endpoint to create a new service category and define its visibility and sorting position.

  • Method: POST
  • Path: /categories

Base path

  • {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Authorization

  • All Amelia endpoints use API key authorization via a request header named Amelia.

Required properties

  • name (string); the name of the category
  • status (string); category status, possible values: visible, hidden
  • position (integer); sorting position of the category

Example

				
					curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/categories' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
  "status": "visible",
  "name": "Haircuts",
  "position": 1
}'
				
			
				
					{
  "message": "Successfully added new category.",
  "data": {
    "category": {
      "id": 5,
      "status": "visible",
      "name": "Haircuts",
      "serviceList": [],
      "position": 1,
      "translations": null
    }
  }
}
				
			

How do I update a category with the Amelia API?

Use this endpoint to update category details by sending only the properties you want to change.

  • Method: POST
  • Path: /categories/{{category_id}}

Base path

  • {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Authorization

  • All Amelia endpoints use API key authorization via a request header named Amelia.

Optional properties

  • name (string); the name of the category
  • status (string); category status, possible values: visible, hidden
  • position (integer); sorting position
  • translations (JSON encoded string); translated category names

Example

				
					curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/categories/4' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
  "name": "Massage Therapy",
  "translations": "{\"name\":{\"fr_FR\":\"Massages\"}}"
}'
				
			
				
					{
  "message": "Successfully updated bookable category.",
  "data": {
    "category": {
      "id": 4,
      "status": "visible",
      "name": "Massage Therapy",
      "serviceList": [],
      "position": 1,
      "translations": "{\"name\":{\"fr_FR\":\"Massages\"}}"
    }
  }
}
				
			

How do I retrieve a category with the Amelia API?

Use this endpoint to retrieve detailed information about a single category, including related services.

  • Method: GET
  • Path: /categories/{{category_id}}

Base path

  • {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Authorization

  • All Amelia endpoints use API key authorization via a request header named Amelia.

Example

				
					curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/categories/4' \
--header 'Amelia: YOUR_API_KEY'
				
			
				
					{
  "message": "Successfully retrieved category.",
  "data": {
    "category": {
      "id": 4,
      "status": "visible",
      "name": "Massage Therapy",
      "serviceList": [
        {
          "id": 8,
          "name": "Deep tissue massage",
          "price": 60,
          "duration": 3600,
          "status": "visible"
        },
        {
          "id": 10,
          "name": "Relaxation massage",
          "price": 45,
          "duration": 3600,
          "status": "visible"
        }
      ],
      "position": 1,
      "translations": "{\"name\":{\"fr_FR\":\"Massages\"}}"
    }
  }
}
				
			

How do I retrieve categories with the Amelia API?

Use this endpoint to retrieve all available categories along with their related services.

  • Method: GET
  • Path: /categories

Base path

  • {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Authorization

  • All Amelia endpoints use API key authorization via a request header named Amelia.

Example

				
					curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/categories' \
--header 'Amelia: YOUR_API_KEY'
				
			
				
					{
  "message": "Successfully retrieved categories.",
  "data": {
    "categories": [
      {
        "id": 1,
        "status": "visible",
        "name": "Haircuts",
        "serviceList": [
          {
            "id": 1,
            "name": "Men's haircut",
            "price": 25,
            "duration": 1800,
            "status": "visible"
          }
        ],
        "position": 1,
        "translations": null
      },
      {
        "id": 2,
        "status": "visible",
        "name": "Massage Therapy",
        "serviceList": [
          {
            "id": 4,
            "name": "Deep tissue massage",
            "price": 60,
            "duration": 3600,
            "status": "visible"
          },
          {
            "id": 5,
            "name": "Relaxation massage",
            "price": 45,
            "duration": 3600,
            "status": "visible"
          }
        ],
        "position": 2,
        "translations": null
      }
    ]
  }
}
				
			

How do I delete a category with the Amelia API?

Use this endpoint to permanently delete a category.

  • Method: POST
  • Path: /categories/delete/{{category_id}}

Base path

  • {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Authorization

  • All Amelia endpoints use API key authorization via a request header named Amelia.

Example

				
					curl --location --request POST 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/categories/delete/4' \
--header 'Amelia: YOUR_API_KEY'
				
			
				
					{
  "message": "Successfully deleted bookable category.",
  "data": null
}