Creates a new custom field definition.
Parameters:
mutation CreateCustomField($input: CustomFieldInput!) {
CreateCustomField(input: $input) {
id
label
identifier
input_type
model_type
metadata
weight
}
}
Updates an existing custom field.
Parameters:
Deletes a custom field.
Parameters:
| Parameter | Type | Description |
|---|
id | ID! | Custom field ID. |
Updates the sort order of multiple custom fields.
Parameters:
| Field | Type | Required | Description |
|---|
id | ID | Yes | Custom field ID. |
weight | Int | Yes | New weight value. |
When creating or updating an entity, you can pass custom field values using the custom_fields input:
mutation CreateProduct($input: ProductInput!) {
CreateProduct(input: $input) {
id
label
custom_fields {
custom_field {
identifier
label
}
values {
text_value
number_value
}
}
}
}
| Entity | Input Field |
|---|
| Customer | CustomerInput.custom_fields |
| Supplier | SupplierInput.custom_fields |
| Employee | EmployeeInput.custom_fields |
| Product | ProductInput.custom_fields |
| Variant | VariantInput.custom_fields |
| Order | OrderInput.custom_fields |
| Estimate | EstimateInput.custom_fields |
| Invoice | InvoiceInput.custom_fields |
| ShippingOrder | ShippingOrderInput.custom_fields |
| Purchase | PurchaseInput.custom_fields |
| PurchaseReceipt | PurchaseReceiptInput.custom_fields |
| ProductReturn | ProductReturnInput.custom_fields |
| Refund | RefundInput.custom_fields |
| CreditNote | CreditNoteInput.custom_fields |
| StockAdjustment | StockAdjustmentInput.custom_fields |
| Payment | PaymentInput.custom_fields |
| Subscription | SubscriptionInput.custom_fields |
| Field | Type | Description |
|---|
value | Mixed | The value to set. |
| Value | Description |
|---|
text | Text input. |
textarea | Textarea input. |
number | Number input. |
boolean | Boolean checkbox. |
date | Date picker. |
datetime | DateTime picker. |
select | Select dropdown. |
multiselect | Multi-select. |
| Value | Description |
|---|
Customer | Customer entity. |
Supplier | Supplier entity. |
Employee | Employee entity. |
Product | Product entity. |
Variant | Variant entity. |
Order | Sales order entity. |
Estimate | Estimate entity. |
Invoice | Invoice entity. |
ShippingOrder | Shipping order entity. |
Purchase | Purchase entity. |
PurchaseReceipt | Purchase receipt entity. |
ProductReturn | Product return entity. |
Refund | Refund entity. |
CreditNote | Credit note entity. |
StockAdjustment | Stock adjustment entity. |
Payment | Payment entity. |
Subscription | Subscription entity. |
| Field | Type | Description |
|---|
custom_field_identifier | String! | Custom field identifier (required). |
value | Mixed | Generic value. |
text_value | String | Text value. |
textarea_value | String | Textarea value. |
number_value | Float | Number value. |
boolean_value | Boolean | Boolean value. |
date_value | Date | Date value. |
datetime_value | DateTime | DateTime value. |