Skip to content

Latest commit

 

History

History
149 lines (130 loc) · 3.23 KB

product-library.adoc

File metadata and controls

149 lines (130 loc) · 3.23 KB

Product Library API

Service description

The Product Library API provides information about products that a merchant have for selling. Using the Product Library API you can add, manage and delete items in a product library.

URL

Service endpoint URL: https://products.izettle.com

API documentation

Scopes

The Product Library API implements the following scopes:

  • READ:PRODUCT

  • WRITE:PRODUCT


Example requests

Create product

POST /organizations/self/products

Request payload

{
  "uuid": "89f9d200-fb8a-11ea-adc1-0242ac120002",
  "name": "Jeans",
  "description": "Description of product.",
    "presentation": {
        "imageUrl": "https://image.izettletest.com/product/sTop9DEqEemOix6FMP9b9Q-JsvDJPuJEequ57W3cjPOlg.png"
    },
  "variants": [
    {
      "uuid": "1a590664-fb8a-11ea-adc1-0242ac120002",
      "name": "small",
      "description": "Small pants.",
      "sku": "SKU",
      "barcode": "Barcode",
      "price": {
        "amount": 10000,
        "currencyId": "SEK"
      },
      "costPrice": {
        "amount": 500,
        "currencyId": "SEK"
      },
      "vatPercentage": "25",
      "options": [
        {
          "name": "SizeOption",
          "value": "small"
        }
      ]
    },
    {
      "uuid": "1ee20a82-fb8a-11ea-adc1-0242ac120002",
      "name": "medium",
      "description": "Medium pants.",
      "sku": "SKU",
      "barcode": "Barcode",
      "price": {
        "amount": 10000,
        "currencyId": "SEK"
      },
      "costPrice": {
        "amount": 500,
        "currencyId": "SEK"
      },
      "vatPercentage": "25",
      "options": [
        {
          "name": "SizeOption",
          "value": "medium"
        }
      ]
    }
  ],
  "vatPercentage": "25",
  "variantOptionDefinitions": {
    "definitions": [
      {
        "name": "SizeOption",
        "properties": [
          {
            "value": "small"
          },
          {
            "value": "medium"
          }
        ]
      }
    ]
  },
  "category": {
    "uuid": "1ee20a82-fb8a-11ea-adc1-0242ac120002",
    "name": "clothing"
  }
}

Update product

PUT /organizations/self/products/v2/{productUuid}

Updates a product entity using JSON merge patch (https://tools.ietf.org/html/rfc7396). This means that only included fields will be changed. "Null" values remove the field on the target entity. Other values update the field. Uses the same format as Create product.

Request payload

{
  "description": "New description.",
  "variants": [
    {
      "uuid": "1a590664-fb8a-11ea-adc1-0242ac120002",
      "name": "New name"
    },
    {
      "uuid": "1ee20a82-fb8a-11ea-adc1-0242ac120002"
    }
  ]
}

Fetch product categories

GET /organizations/self/categories/v2

Returns all the product categories in the product library.

Response

{
  "categories": [
    {
      "uuid": "1ee20a82-fb8a-11ea-adc1-0242ac120002",
      "name": "clothing"
    }
  ]
}