# Customize product display fields

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.cata.sg/pos-integration-service-api/api/v-1/products/item-code/llms.txt.
> For full documentation content, see https://apidocs.cata.sg/pos-integration-service-api/api/v-1/products/item-code/llms-full.txt.

PATCH http://localhost:8080/api/v1/products/{itemCode}
Content-Type: application/json

Partial update of product display fields (name, description, image) via Menu Manager.
This is separate from the POS sync flow: POS writes original values, merchants write display fields.
Only provided fields are updated; omitted fields remain unchanged.


Reference: https://apidocs.cata.sg/pos-integration-service-api/api/v-1/products/item-code/customize-product-display-fields

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/products/{itemCode}:
    patch:
      operationId: customize-product-display-fields
      summary: Customize product display fields
      description: >
        Partial update of product display fields (name, description, image) via
        Menu Manager.

        This is separate from the POS sync flow: POS writes original values,
        merchants write display fields.

        Only provided fields are updated; omitted fields remain unchanged.
      tags:
        - >-
          subpackage_api.subpackage_api/v1.subpackage_api/v1/products.subpackage_api/v1/products/itemCode
      parameters:
        - name: itemCode
          in: path
          description: Unique product item code
          required: true
          schema:
            type: string
        - name: X-Api-Key
          in: header
          required: true
          schema:
            type: string
        - name: X-Tenant-ID
          in: header
          description: Tenant identifier
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api_v1_products_{itemCode}_Customize
                  product display fields_Response_200
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PatchApiV1ProductsItemcodeRequestUnauthorizedError
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                shortDescription:
                  type: string
                description:
                  type: string
                mainImageUrl:
                  type: string
              required:
                - name
                - shortDescription
                - description
                - mainImageUrl
servers:
  - url: http://localhost:8080
components:
  schemas:
    ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaModifierGroupsItemsOptionsItems:
      type: object
      properties:
        id:
          type: string
        itemCode:
          type: string
        name:
          type: string
        additionalPrice:
          type: number
          format: double
        sortNum:
          type: integer
        asDefault:
          type: boolean
        visible:
          type: boolean
        taxOverride:
          type: number
          format: double
      required:
        - id
        - itemCode
        - name
        - additionalPrice
        - sortNum
        - asDefault
        - visible
        - taxOverride
      title: >-
        ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaModifierGroupsItemsOptionsItems
    ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaModifierGroupsItems:
      type: object
      properties:
        id:
          type: string
        itemCode:
          type: string
        name:
          type: string
        inputType:
          type: string
        sortNum:
          type: integer
        minSelect:
          type: integer
        maxSelect:
          type: integer
        allowMultipleQty:
          type: boolean
        options:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaModifierGroupsItemsOptionsItems
      required:
        - id
        - itemCode
        - name
        - inputType
        - sortNum
        - minSelect
        - maxSelect
        - allowMultipleQty
        - options
      title: >-
        ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaModifierGroupsItems
    ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaBundleSectionsItemsItemsItems:
      type: object
      properties:
        itemCode:
          type: string
        price:
          type: number
          format: double
        sortNum:
          type: integer
      required:
        - itemCode
        - price
        - sortNum
      title: >-
        ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaBundleSectionsItemsItemsItems
    ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaBundleSectionsItems:
      type: object
      properties:
        id:
          type: string
        itemCode:
          type: string
        name:
          type: string
        sortNum:
          type: integer
        minSelection:
          type: integer
        maxSelection:
          type: integer
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaBundleSectionsItemsItemsItems
      required:
        - id
        - itemCode
        - name
        - sortNum
        - minSelection
        - maxSelection
        - items
      title: >-
        ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaBundleSectionsItems
    api_v1_products_{itemCode}_Customize product display fields_Response_200:
      type: object
      properties:
        id:
          type: string
        itemCode:
          type: string
        name:
          type: string
        originalName:
          type: string
        internalName:
          type: string
        shortDescription:
          type: string
        originalShortDescription:
          type: string
        description:
          type: string
        originalDescription:
          type: string
        slug:
          type: string
        mainImageUrl:
          type: string
        externalImageUrl:
          type: string
        basePrice:
          type: number
          format: double
        specialPrice:
          type: number
          format: double
        visible:
          type: boolean
        pickupAvailable:
          type: boolean
        deliveryAvailable:
          type: boolean
        eatInAvailable:
          type: boolean
        sortNum:
          type: integer
        publishStatus:
          type: string
        productType:
          type: integer
        isBundle:
          type: boolean
        isVariant:
          type: boolean
        taxOverride:
          type: number
          format: double
        taxOverrideDelivery:
          type: number
          format: double
        taxOverrideEatIn:
          type: number
          format: double
        provider:
          type: string
        posCategory:
          type: string
        modifierGroups:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaModifierGroupsItems
        bundleSections:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaBundleSectionsItems
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - itemCode
        - name
        - originalName
        - internalName
        - shortDescription
        - originalShortDescription
        - description
        - originalDescription
        - slug
        - mainImageUrl
        - externalImageUrl
        - basePrice
        - specialPrice
        - visible
        - pickupAvailable
        - deliveryAvailable
        - eatInAvailable
        - sortNum
        - publishStatus
        - productType
        - isBundle
        - isVariant
        - taxOverride
        - taxOverrideDelivery
        - taxOverrideEatIn
        - provider
        - posCategory
        - modifierGroups
        - bundleSections
        - createdAt
        - updatedAt
      title: api_v1_products_{itemCode}_Customize product display fields_Response_200
    ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        details:
          type: string
        field:
          type: string
      required:
        - code
        - message
        - details
        - field
      title: ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaError
    PatchApiV1ProductsItemcodeRequestUnauthorizedError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/ApiV1ProductsItemCodePatchResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: PatchApiV1ProductsItemcodeRequestUnauthorizedError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

```

## SDK Code Examples

```python api_v1_products_{itemCode}_Customize product display fields_example
import requests

url = "http://localhost:8080/api/v1/products/string"

payload = {
    "name": "Chicken Burger",
    "shortDescription": "Juicy chicken patty",
    "description": "Our signature chicken burger with fresh ingredients",
    "mainImageUrl": "products/abc123.jpg"
}
headers = {
    "X-Tenant-ID": "string",
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript api_v1_products_{itemCode}_Customize product display fields_example
const url = 'http://localhost:8080/api/v1/products/string';
const options = {
  method: 'PATCH',
  headers: {
    'X-Tenant-ID': 'string',
    'X-Api-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Chicken Burger","shortDescription":"Juicy chicken patty","description":"Our signature chicken burger with fresh ingredients","mainImageUrl":"products/abc123.jpg"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go api_v1_products_{itemCode}_Customize product display fields_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/products/string"

	payload := strings.NewReader("{\n  \"name\": \"Chicken Burger\",\n  \"shortDescription\": \"Juicy chicken patty\",\n  \"description\": \"Our signature chicken burger with fresh ingredients\",\n  \"mainImageUrl\": \"products/abc123.jpg\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Tenant-ID", "string")
	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby api_v1_products_{itemCode}_Customize product display fields_example
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/products/string")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Patch.new(url)
request["X-Tenant-ID"] = 'string'
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Chicken Burger\",\n  \"shortDescription\": \"Juicy chicken patty\",\n  \"description\": \"Our signature chicken burger with fresh ingredients\",\n  \"mainImageUrl\": \"products/abc123.jpg\"\n}"

response = http.request(request)
puts response.read_body
```

```java api_v1_products_{itemCode}_Customize product display fields_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("http://localhost:8080/api/v1/products/string")
  .header("X-Tenant-ID", "string")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Chicken Burger\",\n  \"shortDescription\": \"Juicy chicken patty\",\n  \"description\": \"Our signature chicken burger with fresh ingredients\",\n  \"mainImageUrl\": \"products/abc123.jpg\"\n}")
  .asString();
```

```php api_v1_products_{itemCode}_Customize product display fields_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'http://localhost:8080/api/v1/products/string', [
  'body' => '{
  "name": "Chicken Burger",
  "shortDescription": "Juicy chicken patty",
  "description": "Our signature chicken burger with fresh ingredients",
  "mainImageUrl": "products/abc123.jpg"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
    'X-Tenant-ID' => 'string',
  ],
]);

echo $response->getBody();
```

```csharp api_v1_products_{itemCode}_Customize product display fields_example
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/products/string");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-Tenant-ID", "string");
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Chicken Burger\",\n  \"shortDescription\": \"Juicy chicken patty\",\n  \"description\": \"Our signature chicken burger with fresh ingredients\",\n  \"mainImageUrl\": \"products/abc123.jpg\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift api_v1_products_{itemCode}_Customize product display fields_example
import Foundation

let headers = [
  "X-Tenant-ID": "string",
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Chicken Burger",
  "shortDescription": "Juicy chicken patty",
  "description": "Our signature chicken burger with fresh ingredients",
  "mainImageUrl": "products/abc123.jpg"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/products/string")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```