POST
/
ecommerce
/
products
import { Panora } from "@panora/sdk";

const panora = new Panora({
  apiKey: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await panora.ecommerce.products.create({
    xConnectionToken: "<value>",
    remoteData: false,
    unifiedEcommerceProductInput: {
      productUrl: "https://product_url/tee",
      productType: "teeshirt",
      productStatus: "ACTIVE",
      imagesUrls: [
        "https://myproduct/image",
      ],
      description: "best tee ever",
      vendor: "vendor_extern",
      variants: [
        {},
      ],
      tags: [
        "tag_1",
      ],
      fieldMappings: {},
    },
  });
  
  // Handle the result
  console.log(result)
}

run();
{
  "product_url": "https://product_url/tee",
  "product_type": "teeshirt",
  "product_status": "ACTIVE",
  "images_urls": [
    "https://myproduct/image"
  ],
  "description": "best tee ever",
  "vendor": "vendor_extern",
  "variants": [
    {
      "title": "teeshirt",
      "price": 20,
      "sku": "3",
      "options": null,
      "weight": 10,
      "inventory_quantity": 100
    }
  ],
  "tags": [
    "tag_1"
  ],
  "field_mappings": {
    "fav_dish": "broccoli",
    "fav_color": "red"
  },
  "id": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "remote_id": "id_1",
  "remote_data": {
    "fav_dish": "broccoli",
    "fav_color": "red"
  },
  "created_at": "2024-10-01T12:00:00Z",
  "modified_at": "2024-10-01T12:00:00Z"
}

Authorizations

x-api-key
string
header
required

Headers

x-connection-token
string
required

The connection token

Query Parameters

remote_data
boolean

Set to true to include data from the original Accounting software.

Body

application/json
product_url
string | null

The URL of the product

Example:

"https://product_url/tee"

product_type
string | null

The type of the product

Example:

"teeshirt"

product_status
string | null

The status of the product. Either ACTIVE, DRAFT OR ARCHIVED.

Example:

"ACTIVE"

images_urls
string[] | null

The URLs of the product images

Example:
["https://myproduct/image"]
description
string | null

The description of the product

Example:

"best tee ever"

vendor
string | null

The vendor of the product

Example:

"vendor_extern"

variants
object[]

The variants of the product

Example:
[
  {
    "title": "teeshirt",
    "price": 20,
    "sku": "3",
    "options": null,
    "weight": 10,
    "inventory_quantity": 100
  }
]
tags
string[] | null

The tags associated with the product

Example:
["tag_1"]
field_mappings
object | null

The custom field mappings of the object between the remote 3rd party & Panora

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}

Response

201 - application/json
product_url
string | null

The URL of the product

Example:

"https://product_url/tee"

product_type
string | null

The type of the product

Example:

"teeshirt"

product_status
string | null

The status of the product. Either ACTIVE, DRAFT OR ARCHIVED.

Example:

"ACTIVE"

images_urls
string[] | null

The URLs of the product images

Example:
["https://myproduct/image"]
description
string | null

The description of the product

Example:

"best tee ever"

vendor
string | null

The vendor of the product

Example:

"vendor_extern"

variants
object[]

The variants of the product

Example:
[
  {
    "title": "teeshirt",
    "price": 20,
    "sku": "3",
    "options": null,
    "weight": 10,
    "inventory_quantity": 100
  }
]
tags
string[] | null

The tags associated with the product

Example:
["tag_1"]
field_mappings
object | null

The custom field mappings of the object between the remote 3rd party & Panora

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}
id
string | null

The UUID of the product

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

remote_id
string | null

The remote ID of the product in the context of the 3rd Party

Example:

"id_1"

remote_data
object | null

The remote data of the customer in the context of the 3rd Party

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}
created_at
string | null

The created date of the object

Example:

"2024-10-01T12:00:00Z"

modified_at
string | null

The modified date of the object

Example:

"2024-10-01T12:00:00Z"