Field is not defined on AttributeInput

Balla
New Member
1 0 0

I'm trying to add custom attributes to a checkout but I'm getting this error,  "Field is not defined on AttributeInput". Where do I define this attribute? 

Here's what my code looks like:

const input = {
        customAttributes: [
          {
            is_third_party: false,
            delivery_window: '',
            delivery_date: '',
          },
        ],
      };
      client.checkout.create(input).then(checkout => {
        setCookie('cart', checkout.id, { path: '/' });
        dispatch({
          contextData: {
            ...contextData,
            checkoutId: checkout.id,
          },
          type: 'set',
        });
      });

 

0 Likes
ksangee
New Member
1 0 0

 

 

const input = {
     customAttributes: [
          {
              'key': 'is_third_party',
              'value': false,
          },
          {
              'key': 'delivery_window',
              'value': '',
          },
          {
              'key': 'delivery_date',
              'value': '',
          },
        ],
      };

 

Please refer https://www.npmjs.com/package/shopify-buy

 

0 Likes