Product

Get Single

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/product/:productid

URL Parameters:

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

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

productid=[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

{
  "name": "Bike Attitude - Kædelås",
  "attributedata": {
    "unit": "STK",
    "group": "12345",
    "ean": "57012121212",
    "weight": 770.0,
    "height": 7.5,
    "width": 11.0,
    "length": 22.0,
    "volume": 0.0,
    "related-products": [
      "AT2217001",
      "1801121"
    ],
    "erp-name": "Bike Attitude - Kædelås",
    "erp-weight": 770.0,
    "erp-unit": "STK",
    "las": [
      "Nøgle"
    ],
    "laasemekanisme": [
      "Nøgle"
    ],
    "montering": [
      "Aftagelig"
    ],
    "brand": "Bike Attitude",
    "forsikringsgodkendt": false
  },
  "localized_attributedata": {
    "da-DK": {
      "product-stock-days": "3",
      "name": "Bike Attitude - Kædelås",
      "long-description": "<p>Med denne Bike Attitude k&aelig;del&aring;s, kan du l&aring;se din cykel fast.</p>"
    },
    "sv-SE": {
      "name": "Bike Attitude - Kättinglås",
      "long-description": "<p> Med detta Bike Attitude-kedjelås kan du låsa din cykel när du inte använder den.</p>"
    },
    "nn-NO": {
      "name": "Bike Attitude - Kjettinglås",
      "long-description": "<p>Med denne kjedelåsen fra Bike Attitude kan du låse sykkelen når du ikke bruker den.</p>"
    }
  }
}

Get Multiple

This returns a represenation of a product.

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

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

[ "1000", "2000" ]

Response example

Success Response

Code: 200 OK

{
  "1000": {
    "name": "Bike Attitude - Kædelås",
    "attributedata": {
      "unit": "STK"
    },
    "localized_attributedata": {
      "da-DK": {
        "product-stock-days": "3",
        "name": "Bike Attitude - Kædelås",
        "long-description": "<p>Med denne Bike Attitude k&aelig;del&aring;s, kan du l&aring;se din cykel fast.</p>"
      }
    }
  },
  "2000": {
    "name": "Bike Attitude - Kædelås 2",
    "attributedata": {
      "unit": "STK"
    },
    "localized_attributedata": {
      "da-DK": {
        "product-stock-days": "5",
        "name": "Bike Attitude - Kædelås 2",
        "long-description": "<p>Med denne Bike Attitude k&aelig;del&aring;s, 2 kan du l&aring;se din cykel fast.</p>"
      }
    }
  }
}

Patch Single

URL : /:organizationid/:pimid/api/v0.1/product/:productid

URL Parameters:

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

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

productid=[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.

Request example

{
        "attributedata": {
            "brand": "Bike Attitude"
        }
}

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

Patch Multiple

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

URL Parameters:

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

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

Method: PATCH

Request headers:

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

Auth required: YES

Authorization required: write

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.

Request example

{
    "1000": {
        "attributedata": {
            "brand": "Bike Attitude"
        }
    },
    "2000": {
        "attributedata": {
            "brand": "Bike Attitude 2"
        }
    }
}

Error Responses

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

Condition: Referencing one or more invalid products. Code: 400 BAD REQUEST

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

Last updated

Logo

Copyright Chainbox 2008-2023