For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer.shipbob.com/v2.0/api/products/llms.txt. For full documentation content, see https://developer.shipbob.com/v2.0/api/products/llms-full.txt.

# Used to Create a new Channel Metadata Entry for a given Variant


POST https://api.shipbob.com/2.0/variant/{variantId}/channel-metadata
Content-Type: application/json

Reference: https://developer.shipbob.com/v2.0/api/products/used-to-create-a-new-channel-metadata-entry-for-a-given-variant

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2.0
  version: 1.0.0
paths:
  /2.0/variant/{variantId}/channel-metadata:
    post:
      operationId: used-to-create-a-new-channel-metadata-entry-for-a-given-variant
      summary: |
        Used to Create a new Channel Metadata Entry for a given Variant
      tags:
        - subpackage_products
      parameters:
        - name: variantId
          in: path
          description: ''
          required: true
          schema:
            type: string
            format: int64
        - name: Authorization
          in: header
          description: Authentication using Personal Access Token (PAT) token
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Products.ProductViewModel'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Products.Post.Api.Variant.VariantId.ChannelMetadata.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel
servers:
  - url: https://api.shipbob.com
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    Products.AmazonChannelMetadataRequestModel:
      type: object
      properties:
        channel_id:
          type:
            - integer
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type:
            - integer
            - 'null'
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
        asin:
          type:
            - string
            - 'null'
        fnsku:
          type:
            - string
            - 'null'
        fulfillment_channel:
          type:
            - string
            - 'null'
      description: Amazon Sales Channel Information with custom Amazon Fields
      title: Products.AmazonChannelMetadataRequestModel
    Products.BaseChannelMetadataRequestModel:
      type: object
      properties:
        channel_id:
          type:
            - integer
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type:
            - integer
            - 'null'
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
      description: Standard Channel Metadata Record to store SellerSKU for a Sales Channel
      title: Products.BaseChannelMetadataRequestModel
    Products.BigCommerceChannelMetadataRequestModel:
      type: object
      properties:
        channel_id:
          type:
            - integer
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type:
            - integer
            - 'null'
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
        platform_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform_variant_id:
          type:
            - integer
            - 'null'
          format: int64
      description: BigCommerce Sales Channel Information with custom Amazon Fields
      title: Products.BigCommerceChannelMetadataRequestModel
    Products.ShopifyChannelMetadataRequestModel:
      type: object
      properties:
        channel_id:
          type:
            - integer
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type:
            - integer
            - 'null'
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
      description: Shopify Sales Channel Information
      title: Products.ShopifyChannelMetadataRequestModel
    Products.Post.Api.Variant.VariantId.ChannelMetadata.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel:
      oneOf:
        - $ref: '#/components/schemas/Products.AmazonChannelMetadataRequestModel'
        - $ref: '#/components/schemas/Products.BaseChannelMetadataRequestModel'
        - $ref: '#/components/schemas/Products.BigCommerceChannelMetadataRequestModel'
        - $ref: '#/components/schemas/Products.ShopifyChannelMetadataRequestModel'
      title: >-
        Products.Post.Api.Variant.VariantId.ChannelMetadata.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel
    Products.EnumViewModel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type:
            - string
            - 'null'
      title: Products.EnumViewModel
    Products.AssociatedBundlesViewModel:
      type: object
      properties:
        product_id:
          type: integer
          format: int64
        product_name:
          type:
            - string
            - 'null'
        quantity:
          type: integer
        variant_id:
          type: integer
          format: int64
        variant_sku:
          type:
            - string
            - 'null'
      title: Products.AssociatedBundlesViewModel
    Products.BundleDefinitionViewModel:
      type: object
      properties:
        product_id:
          type: integer
          format: int64
        quantity:
          type: integer
        variant_id:
          type: integer
          format: int64
        variant_name:
          type:
            - string
            - 'null'
        variant_sku:
          type:
            - string
            - 'null'
      title: Products.BundleDefinitionViewModel
    Products.CustomsViewModel:
      type: object
      properties:
        country_code_of_origin:
          type:
            - string
            - 'null'
        currency:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        hs_tariff_code:
          type:
            - string
            - 'null'
        is321_eligible:
          type: boolean
        value:
          type:
            - integer
            - 'null'
      title: Products.CustomsViewModel
    Products.DimensionViewModel:
      type: object
      properties:
        height:
          type: number
          format: double
        length:
          type: number
          format: double
        unit:
          type:
            - string
            - 'null'
        width:
          type: number
          format: double
      title: Products.DimensionViewModel
    Products.SerialScanViewModel:
      type: object
      properties:
        exact_character_length:
          type:
            - integer
            - 'null'
        is_enabled:
          type: boolean
        prefix:
          type:
            - string
            - 'null'
        suffix:
          type:
            - string
            - 'null'
      title: Products.SerialScanViewModel
    Products.FulfillmentSettingsViewModel:
      type: object
      properties:
        dangerous_goods:
          type: boolean
        is_bpm_parcel:
          type: boolean
        is_case_pick:
          type: boolean
        msds_url:
          type:
            - string
            - 'null'
        requires_prop65:
          type: boolean
        serial_scan:
          $ref: '#/components/schemas/Products.SerialScanViewModel'
      title: Products.FulfillmentSettingsViewModel
    Products.InventoryViewModel:
      type: object
      properties:
        inventory_id:
          type:
            - integer
            - 'null'
        on_hand_qty:
          type: integer
      title: Products.InventoryViewModel
    Products.LotInformationViewModel:
      type: object
      properties:
        is_lot:
          type: boolean
        minimum_shelf_life_days:
          type:
            - integer
            - 'null'
      title: Products.LotInformationViewModel
    Products.ReturnPreferencesViewModel:
      type: object
      properties:
        backup_action:
          $ref: '#/components/schemas/Products.EnumViewModel'
        instructions:
          type:
            - string
            - 'null'
        primary_action:
          $ref: '#/components/schemas/Products.EnumViewModel'
        return_to_sender_backup_action:
          $ref: '#/components/schemas/Products.EnumViewModel'
        return_to_sender_primary_action:
          $ref: '#/components/schemas/Products.EnumViewModel'
      title: Products.ReturnPreferencesViewModel
    Products.WeightViewModel:
      type: object
      properties:
        unit:
          type:
            - string
            - 'null'
        weight:
          type: number
          format: double
      title: Products.WeightViewModel
    Products.ChannelMetadataViewModel:
      type: object
      properties:
        channel_id:
          type: integer
          format: int64
        channel_name:
          type:
            - string
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type: integer
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
      title: Products.ChannelMetadataViewModel
    Products.AmazonChannelMetadataViewModel:
      type: object
      properties:
        channel_id:
          type: integer
          format: int64
        channel_name:
          type:
            - string
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type: integer
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
        asin:
          type:
            - string
            - 'null'
        fnsku:
          type:
            - string
            - 'null'
        fulfillment_channel:
          type:
            - string
            - 'null'
      title: Products.AmazonChannelMetadataViewModel
    Products.BigCommerceChannelMetadataViewModel:
      type: object
      properties:
        channel_id:
          type: integer
          format: int64
        channel_name:
          type:
            - string
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type: integer
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
        platform_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform_variant_id:
          type:
            - integer
            - 'null'
          format: int64
      title: Products.BigCommerceChannelMetadataViewModel
    Products.ShopifyChannelMetadataViewModel:
      type: object
      properties:
        channel_id:
          type: integer
          format: int64
        channel_name:
          type:
            - string
            - 'null'
        currency:
          type:
            - string
            - 'null'
        id:
          type: integer
          format: int64
        is_inventory_sync_enabled:
          type: boolean
        legacy_product_id:
          type:
            - integer
            - 'null'
          format: int64
        platform:
          type:
            - string
            - 'null'
        platform_identifier:
          type:
            - string
            - 'null'
        platform_inventory_item_id:
          type:
            - string
            - 'null'
        price:
          type: number
          format: double
        seller_sku:
          type:
            - string
            - 'null'
      title: Products.ShopifyChannelMetadataViewModel
    ProductsVariantViewModelChannelMetadataItems:
      oneOf:
        - $ref: '#/components/schemas/Products.ChannelMetadataViewModel'
        - $ref: '#/components/schemas/Products.AmazonChannelMetadataViewModel'
        - $ref: '#/components/schemas/Products.BigCommerceChannelMetadataViewModel'
        - $ref: '#/components/schemas/Products.ShopifyChannelMetadataViewModel'
      title: ProductsVariantViewModelChannelMetadataItems
    Products.VariantViewModel:
      type: object
      properties:
        associated_bundles:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Products.AssociatedBundlesViewModel'
        barcode:
          type:
            - string
            - 'null'
        bundle_definition:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Products.BundleDefinitionViewModel'
        created_on:
          type: string
          format: date-time
        customs:
          $ref: '#/components/schemas/Products.CustomsViewModel'
        dimension:
          $ref: '#/components/schemas/Products.DimensionViewModel'
        fulfillment_settings:
          $ref: '#/components/schemas/Products.FulfillmentSettingsViewModel'
        gtin:
          type:
            - string
            - 'null'
        id:
          type: integer
          format: int64
        inventory:
          $ref: '#/components/schemas/Products.InventoryViewModel'
        is_digital:
          type: boolean
        lot_information:
          $ref: '#/components/schemas/Products.LotInformationViewModel'
        name:
          type:
            - string
            - 'null'
        packaging_material_type:
          $ref: '#/components/schemas/Products.EnumViewModel'
        packaging_requirement:
          $ref: '#/components/schemas/Products.EnumViewModel'
        return_preferences:
          $ref: '#/components/schemas/Products.ReturnPreferencesViewModel'
        sku:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
        upc:
          type:
            - string
            - 'null'
        updated_on:
          type:
            - string
            - 'null'
          format: date-time
        weight:
          $ref: '#/components/schemas/Products.WeightViewModel'
        channel_metadata:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ProductsVariantViewModelChannelMetadataItems'
      title: Products.VariantViewModel
    Products.ProductViewModel:
      type: object
      properties:
        category:
          $ref: '#/components/schemas/Products.EnumViewModel'
        created_on:
          type: string
          format: date-time
        id:
          type: integer
          format: int64
        name:
          type:
            - string
            - 'null'
        sub_category:
          $ref: '#/components/schemas/Products.EnumViewModel'
        type:
          type:
            - string
            - 'null'
        updated_on:
          type:
            - string
            - 'null'
          format: date-time
        user_id:
          type: integer
          format: int64
        variants:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Products.VariantViewModel'
      title: Products.ProductViewModel
  securitySchemes:
    PAT:
      type: http
      scheme: bearer
      description: Authentication using Personal Access Token (PAT) token
    OAuth2:
      type: http
      scheme: bearer
      description: OAuth2 authentication using JWT tokens

```

## SDK Code Examples

```python Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
import requests

url = "https://api.shipbob.com/2.0/variant/variantId/channel-metadata"

payload = {
    "asin": "string",
    "fnsku": "string",
    "fulfillment_channel": "string",
    "channel_id": 0,
    "currency": "string",
    "id": 0,
    "is_inventory_sync_enabled": True,
    "platform": "string",
    "platform_identifier": "string",
    "platform_inventory_item_id": "string",
    "price": 0.1,
    "seller_sku": "string"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
const url = 'https://api.shipbob.com/2.0/variant/variantId/channel-metadata';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"asin":"string","fnsku":"string","fulfillment_channel":"string","channel_id":0,"currency":"string","id":0,"is_inventory_sync_enabled":true,"platform":"string","platform_identifier":"string","platform_inventory_item_id":"string","price":0.1,"seller_sku":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.shipbob.com/2.0/variant/variantId/channel-metadata"

	payload := strings.NewReader("{\n  \"asin\": \"string\",\n  \"fnsku\": \"string\",\n  \"fulfillment_channel\": \"string\",\n  \"channel_id\": 0,\n  \"currency\": \"string\",\n  \"id\": 0,\n  \"is_inventory_sync_enabled\": true,\n  \"platform\": \"string\",\n  \"platform_identifier\": \"string\",\n  \"platform_inventory_item_id\": \"string\",\n  \"price\": 0.1,\n  \"seller_sku\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
require 'uri'
require 'net/http'

url = URI("https://api.shipbob.com/2.0/variant/variantId/channel-metadata")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"asin\": \"string\",\n  \"fnsku\": \"string\",\n  \"fulfillment_channel\": \"string\",\n  \"channel_id\": 0,\n  \"currency\": \"string\",\n  \"id\": 0,\n  \"is_inventory_sync_enabled\": true,\n  \"platform\": \"string\",\n  \"platform_identifier\": \"string\",\n  \"platform_inventory_item_id\": \"string\",\n  \"price\": 0.1,\n  \"seller_sku\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.shipbob.com/2.0/variant/variantId/channel-metadata")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"asin\": \"string\",\n  \"fnsku\": \"string\",\n  \"fulfillment_channel\": \"string\",\n  \"channel_id\": 0,\n  \"currency\": \"string\",\n  \"id\": 0,\n  \"is_inventory_sync_enabled\": true,\n  \"platform\": \"string\",\n  \"platform_identifier\": \"string\",\n  \"platform_inventory_item_id\": \"string\",\n  \"price\": 0.1,\n  \"seller_sku\": \"string\"\n}")
  .asString();
```

```php Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.shipbob.com/2.0/variant/variantId/channel-metadata', [
  'body' => '{
  "asin": "string",
  "fnsku": "string",
  "fulfillment_channel": "string",
  "channel_id": 0,
  "currency": "string",
  "id": 0,
  "is_inventory_sync_enabled": true,
  "platform": "string",
  "platform_identifier": "string",
  "platform_inventory_item_id": "string",
  "price": 0.1,
  "seller_sku": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
using RestSharp;

var client = new RestClient("https://api.shipbob.com/2.0/variant/variantId/channel-metadata");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"asin\": \"string\",\n  \"fnsku\": \"string\",\n  \"fulfillment_channel\": \"string\",\n  \"channel_id\": 0,\n  \"currency\": \"string\",\n  \"id\": 0,\n  \"is_inventory_sync_enabled\": true,\n  \"platform\": \"string\",\n  \"platform_identifier\": \"string\",\n  \"platform_inventory_item_id\": \"string\",\n  \"price\": 0.1,\n  \"seller_sku\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Products_usedToCreateANewChannelMetadataEntryForAGivenVariant_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "asin": "string",
  "fnsku": "string",
  "fulfillment_channel": "string",
  "channel_id": 0,
  "currency": "string",
  "id": 0,
  "is_inventory_sync_enabled": true,
  "platform": "string",
  "platform_identifier": "string",
  "platform_inventory_item_id": "string",
  "price": 0.1,
  "seller_sku": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/2.0/variant/variantId/channel-metadata")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```