Unable to create custom fields for shipment order

Unable to create custom fields for shipment order

I'm unable to create custom fields for shipment orders, even though the custom fields are set up correctly. A request to the following endpoint:

https://www.zohoapis.com/inventory/v1/settings/preferences/customfields?organization_id=${ZOHO_ORGANIZATION_ID}&entity=shipment_order

returns the custom field successfully:

  1. {
  2.   code: 0,
  3.   message: "success",
  4.   customfields: [
  5.     {
  6.       customfield_id: "5416691000000146937",
  7.       customfield_sequence: 1,
  8.       label: "Ship method",
  9.       display_param: "",
  10.       related_entity_formatted: "",
  11.       data_type: "string",
  12.       entity: "shipment_order",
  13.       is_mandatory: false,
  14.       related_entity: "",
  15.       values: "",
  16.       is_active: true,
  17.       index: 1,
  18.       autocomplete_url: "",
  19.       placeholder: "cf_ship_method",
  20.       has_more_page: false,
  21.       is_dependent_field: false,
  22.       search_entity: "shipment_order",
  23.       dependent_fields: ""
  24.     }
  25.   ]
  26. }

I've tried using customfield_id, label, index, and API name, but none of these worked. After making a request to create a shipment order, I receive a response indicating that the shipment order was successfully created, but the custom_fields array is empty.

Here’s the response:

  1. {
  2.   data: {
  3.     code: 0,
  4.     message: "Shipment Order Created Successfully.",
  5.     shipmentorder: {
  6.       carrier: "manual",
  7.       custom_fields: [],
  8.       custom_field_hash: {},
  9.       template_id: "5416691000000088221",
  10.       template_name: "Standard Template",
  11.       template_type: "standard",
  12.       created_time: "2024-10-25T02:30:20+0530",
  13.       last_modified_time: "2024-10-25T02:30:20+0530",
  14.       packages: [...],
  15.       documents: [],
  16.       associated_packages_count: 1,
  17.       created_by_id: "5416691000000088297",
  18.       last_modified_by_id: "5416691000000088297"
  19.     }
  20.   }
  21. }

However, custom fields work fine for both Items and Sales Orders.