Category

Get Single

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/category/:categoryid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

categoryid=[string] is the ID of the Product to be updated.

Method: GET

Auth required: YES

Authorization required: read

Response headers:

Last-Modified: Timestamp when the product was last modified

Response body example


{
  "parent": "root_12000",
  "label": "ROAD / RACE",
  "localized_attributedata": {
    "da-DK": {
      "name": "ROAD / RACE"
    }
  },
  "resources": [
    {
      "id": "0ba96650-ecc1-461c-b440-de1ae13f9362",
      "type": "image",
      "primary": true,
      "variants": [
        {
          "identifier": "categorydefault"
        },
        {
          "identifier": "categorysmall"
        }
      ]
    }
  ]
}

Get Multiple

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/categories

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: read

Request example

['root_12200', 'root_12120']

Response example

Success Response

Code: 200 OK

{
  "root_12120": {
    "parent": "root_12100",
    "label": "27,5",
    "localized_attributedata": {
      "da-DK": {
        "name": "27,5\""
      }
    },
    "resources": [
      {
        "id": "7d82539e-a80d-4fcf-b8ae-250535282a74",
        "type": "image",
        "primary": true,
        "variants": [
          {
            "identifier": "categorydefault"
          },
          {
            "identifier": "categorysmall"
          }
        ]
      }
    ]
  },
  "root_12200": {
    "parent": "root_12000",
    "label": "ROAD / RACE",
    "localized_attributedata": {
      "da-DK": {
        "name": "ROAD / RACE"
      }
    },
    "resources": [
      {
        "id": "0ba96650-ecc1-461c-b440-de1ae13f9362",
        "type": "image",
        "primary": true,
        "variants": [
          {
            "identifier": "categorydefault"
          },
          {
            "identifier": "categorysmall"
          }
        ]
      }
    ]
  }
}

Patch Single

URL : /:organizationid/:pimid/api/v0.1/category/:categoryid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

categoryid=[string] is the ID of the Product to be updated.

Method: PATCH

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Only the properties in the request are modified. If properties are included but has no value, it's value will be deleted, so make sure to only include properties that are to be modified.

Only attributedata attributes can be modified.

Request example

{
        "attributedata": {
            "type": "fall-lines"
        },
        "localized_attributedata": { "da-DK": { "name": "FALL LINE 30,9x350" } },
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Create new category

URL : /:organizationid/:pimappid/api/v0.1/category

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimappid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request example

{
    "code": "root_123",
    "parent": "root_root",
    "label": "Taken"
    "attributedata": {
        "testsection": "testvalue"
    },
     "localized_attributedata": { "da-DK": { "name": "FALL LINE 30,9x350" } },
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: The member email has a conflict with another member Code: 409 CONFLICT

Last updated