Categories API

Categories represent a list of all categories in a store, used for grouping products together.

Category object

Attribute Type Description
id string The unique identifier for the category.
name string The name of the category.
permalink string The unique permalink for the category.
position string The position in which the category is arranged.

Get all categories

Get all categories for an account.

GET /v1/accounts/{account-id}/categories
{
  "data": [
    {
      "id": "1",
      "type": "categories",
      "attributes": {
        "name": "Example Category 1",
        "permalink": "example-category-1",
        "position": 1
      },
      "links": {
        "self": "https://api.bigcartel.com/v1/accounts/1/categories/1"
      }
    },
    {
      "id": "2",
      "type": "categories",
      "attributes": {
        "name": "Example Category 2",
        "permalink": "example-category-2",
        "position": 2
      },
      "links": {
        "self": "https://api.bigcartel.com/v1/accounts/1/categories/2"
      }
    }
  ],
  "meta": {
    "count": "2"
  }
}

Parameters

None.

Get a category

Get a specific category for an account.

GET /v1/accounts/{account-id}/categories/{category-id}
{
  "data": {
    "id": "1",
    "type": "categories",
    "attributes": {
      "name": "Example Category 1",
      "permalink": "example-category-1",
      "position": 1
    },
    "links": {
      "self": "https://api.bigcartel.com/v1/accounts/1/categories/1"
    }
  }
}

Parameters

None.

Create a category

Creates a new category.

POST /v1/accounts/{account-id}/categories

Parameters

Name Type Required Description
type string true The only option right now is categories.
name string true The name of the category.

Example request

{
  "data": {
    "type": "categories",
    "attributes": {
      "name": "New Example Category"
    }
  }
}

Response

If successful, we’ll return a 201 Created with the location of the new category in the Location header and the same body as getting the category.

Update a category

Updates a specific category’s details.

PATCH /v1/accounts/{account-id}/categories/{category-id}

Parameters

Name Type Required Description
id string true The unique identifier for the category.
type string true The only option right now is categories.
name string true The name of the category.

Example request

{
  "data": {
    "id": "1",
    "type": "categories",
    "attributes": {
      "name": "Updated Example Category 1"
    }
  }
}

Response

If successful, we’ll return a 200 OK and the same body as getting the category.

Delete a category

Deletes a specific category.

DELETE /v1/accounts/{account-id}/categories/{category-id}

Parameters

Name Type Required Description
id string true The unique identifier for the category.
type string true The only option right now is categories.

If successful, we’ll return a 204 No Content response.

Reposition categories

Repositions the list of categories in the specified order.

PATCH /v1/accounts/{account-id}/relationships/categories

Parameters

Name Type Required Description
type string true The only option right now is categories.
id string true The unique identifier for the category.

Example request

Reposition a list of categories.

{
  "data": [
    {
      "type": "categories",
      "id": "1"
    },
    {
      "type": "categories",
      "id": "3"
    },
    {
      "type": "categories",
      "id": "2"
    }
  ]
}

If successful, we’ll return a 204 No Content response.