Update Product Custom Field

Updates a product custom field, if the requesting manager has access permissions to it.

PATCH /api/v1/product-custom-fields/{id}/

circle-info

Ensure the requesting manager possesses the required access permissions to update the custom field.

Example request

Request body (application/json)
{
    "name": "cf44",
    "default_value": "31232"
}

Example responses

chevron-right200 — Successhashtag
Response body (200)
{
    "id": 68,
    "name": "cf44",
    "data_type": null,
    "default_value": "31232",
    "description": null,
    "product": 1584723961091260
}
chevron-right404 — Not foundhashtag
Response body (404)
{
  "message": "Ain't no cake like that."
}

Request parameters

Path parameter:

  • id (in URL) — the ID of the product custom field to update

Body parameters (application/json):

Name
Required
Type
Description

name

required

string

Name of the custom field

default_value

required

string

Default value for the custom field

product

optional

integer

Product ID this custom field belongs to

data_type

optional

string

Choices: number, text, date/time

description

optional

string

Description of the custom field

Notes

  • URL: /api/v1/product-custom-fields/{id}/

  • Method: PATCH

  • Do not change query parameters or links.

Was this helpful?