Discussions

Ask a Question
Back to All

products > post 500 error - undefined permit

I am trying to post a new product on the API Reference page as below.

request:

import axios from 'axios';

const options = {
  method: 'POST',
  url: 'https://api.sellbrite.com/v1/products/aee20e3f-6352-4248-893b-0037e75fae29',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: 'Basic xxx
  },
  data: {
    package_unit_of_length: 'inches',
    package_unit_of_weight: 'pounds',
    custom_attributes: ['Restrictions: US sales only, US warranty', 'Packaging: Branded Box'],
    name: 'Lenovo FLEX 5 14ARE05 2-IN-1 CONVERTIBLE AMD Ryzen™ 7 4700U 2.0GHz 512GB SSD 16GB 14\" (1920x1080) TOUCHSCREEN BT WIN10 Webcam GRAPHITE GREY Backlit Keyboard FP Reader',
    description: 'Lenovo FLEX 5 14ARE05 2-IN-1 CONVERTIBLE AMD Ryzen™ 7 4700U 2.0GHz 512GB SSD 16GB 14\" (1920x1080) TOUCHSCREEN BT WIN10 Webcam GRAPHITE GREY Backlit Keyboard FP Reader',
    condition: 'Factory Refurbished',
    brand: 'Lenovo',
    manufacturer: 'Lenovo',
    manufacturer_model_number: '81X20001US',
    condition_note: 'Product may have minor cosmetic blemishes'
  }
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });

response:

{
  "error": {
    "message": "There was an error with your request. (undefined method `permit!' for #<Array:0x00007f55b58088f8>\nDid you mean?  permutation)"
  }
}

Help, please.