How create a product or catalog item by api

Lester Howard

Hello team,

I am trying to create a catalog item but I am having trouble making the request.

I was making the request from Postman and I already have set a private token and organization id.

Following the docs, the request from Postman look like this:

Where data.json is:

I got a response that is a misunderstanding to me

Could you help me with this?

 
 

para resolver esto

 

Comments

2 comments

  • Comment author
    William Thompson

    Hi Lester, 

    Your API call is missing the /api/ part of the URL, see the endpoint here: https://{ENV}.threekit.com/api/products/import?orgId={ORG_ID}

    Second, you can find an example of working JSON below, thanks for pointing out a gap in our docs, we will update them in the future to make it clearer. 

    [
      {
        "product": {
          "name": "Soprano Corner Bed",
          "description": "Moderation is the quintessence of elegance; etc...",
          "tags": ["Bed", "Corner"],
          "keywords": ["Soprano"],
          "metadata": [
            {
              "name": "Brand",
              "type": "String",
              "defaultValue": "Testing"
            },
            {
              "name": "SKU",
              "type": "String",
              "defaultValue": "3NSZPL-1,5NWP"
            },
            {
              "name": "Threehub Category",
              "type": "String",
              "defaultValue": "Furniture"
            },
            {
              "name": "Product Family",
              "type": "String",
              "defaultValue": "Another test"
            },
            {
              "name": "Collection",
              "type": "String",
              "defaultValue": "Soprano"
            },
            {
              "name": "Availability",
              "type": "String",
              "defaultValue": "Europe, Russia,Georgia"
            },
            {
              "name": "URL",
              "type": "String",
              "defaultValue": "https://www.kler.eu/pl/katalog-mebli/salon/soprano-v1"
            },
            {
              "name": "Height (cm)",
              "type": "Number",
              "defaultValue": 120
            },
            {
              "name": "Width (cm)",
              "type": "Number",
              "defaultValue": 327
            }
          ]
        }
      }
    ]
    0
  • Comment author
    Lester Howard

    Thanks, William Thompson it works now

    0

Please sign in to leave a comment.