템플릿 등록 요청

Request

브랜드 내에서 사용할 구형 텍스트 템플릿을 등록합니다. 추가된 신규 템플릿 유형은 POST /brand/{brandId}/v2/messagebase 을 이용해야 합니다.

post

브랜드 내에서 사용할 텍스트 템플릿을 등록합니다.

등록된 템플릿은 RCS Biz Center 운영자의 승인 후 사용 가능합니다.

템플릿 등록 시 사용되는 messagebaseformId의 formattedString을 이용하여 템플릿의 formattedString을 등록해야 합니다.

추가된 신규 템플릿 유형은 POST /brand/{brandId}/v2/messagebase 을 이용해야 합니다.

[템플릿 등록을 위한 formattedString 처리 방법]

  1. messagebaseform 리스트 조회
  2. 템플릿 생성 시 사용하고자 하는 messagebaseformId 상세 조회를 통해 formattedString 확인(messagebaseform의 formattedString은 수시 업데이트 될 수 있음)
  3. Messagebaseform formattedString 의 각 widget Object 의 widgetPolicy.allowedAttributes 에 지정된 key의 value만 수정할 수 있음(이외 수정 시 오류)
  4. Cell의 경우, ROOT.regMessagebases[0].formattedString.RCSMessage.openrichcardMessage.layout.children[1].children 내 object 단위 제거 할 수 있음
    단, 1개 이상의 Object(LinearLayout)는 존재해야 함
  5. Cell의 경우, ROOT.regMessagebases[0].formattedString.RCSMessage.openrichcardMessage.layout.children[1].children[n].children 내 Object(TextView) 2개 중 1개는 삭제 가능함
  6. 타이틀 자유형(구 테마 강조형A) 제목 좌측 영역은 고정문자열 8자까지 허용(변수 사용 불가)
  7. 타이틀 자유형(구 테마 강조형A) 제목 우측 영역에 해당하는 ROOT.formattedString.RCSMessage.openrichcardMessage.layout.children[0].children[0].children[1] 삭제 가능
  8. 타이틀 자유형(구 테마 강조형A) 제목 우측 영역에 해당하는 ROOT.formattedString.RCSMessage.openrichcardMessage.layout.children[0].children[0].children[1].text 값(value)은 템플릿 내 정의된 변수만 입력 가능(예시 참조)
  • 계정 권한: 마스터, 매니저, 대행사
  • 브랜드 권한: 브랜드 대표운영자, 운영자
  • 지원 범위: 텍스트 템플릿(타이틀 선택형 / 타이틀 자유형)
Authorizations
Path parameters
brandIdstring · max: 13Required

maxLength: 13 - 브랜드 내 정보 접근시 사용되는 브랜드ID Path Parameter 입니다.

Header parameters
X-RCS-Brandkeystring · max: 18Optional

maxLength: 18 - RCS Biz Center에서 브랜드 등록 시 자동 생성되는 Key 입니다.

대행사가 해당 브랜드에 대한 권한 여부를 판단하는데 사용됩니다. 따라서, 대행사 계정으로 브랜드 내 정보를 조회/등록/수정 API 연동 시 Header에 설정되어야 합니다.

Body
post
POST /api/1.1/brand/{brandId}/messagebase HTTP/1.1
Host: api-qa.rcsbizcenter.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 234

{
  "regMessagebases": [
    {
      "messagebaseformId": "text",
      "custTmpltId": "text",
      "tmpltName": "text",
      "brandId": "text",
      "agencyId": "text",
      "formattedString": {
        "RCSMessage": {
          "trafficType": "advertisment",
          "openrichcardMessage": "[Circular Reference]"
        }
      }
    }
  ]
}

❖ request body sample

{
  "regMessagebases": [
    {
      "brandId": "BR.u720xwadx0",
      "custTmpltId": "test2024062101",
      "messagebaseformId": "TATA001C",
      "tmpltName": "타이틀자유형-스타일",
      "agencyId": "",
      "formattedString": {
        "RCSMessage": {
          "trafficType": "advertisement",
          "openrichcardMessage": {
            "card": "open_rich_card",
            "version": "1.0.0",
            "zoomAllowed": true,
            "scaleAllowed": true,
            "layout": {
              "widget": "LinearLayout",
              "width": "match",
              "height": "content",
              "orientation": "vertical",
              "children": [
                {
                  "widget": "LinearLayout",
                  "width": "match",
                  "height": "content",
                  "orientation": "vertical",
                  "padding": "20dp",
                  "children": [
                    {
                      "widget": "LinearLayout",
                      "width": "match",
                      "height": "content",
                      "orientation": "horizontal",
                      "visibility": "visible",
                      "children": [
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "text"
                            ]
                          },
                          "widget": "TextView",
                          "width": "match",
                          "height": "content",
                          "textStyle": "bold",
                          "textAlignment": "textStart",
                          "text": "제목",
                          "textColor": "#232323",
                          "textSize": "19dp",
                          "weight": "1"
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "text"
                            ]
                          },
                          "widget": "TextView",
                          "width": "match",
                          "height": "content",
                          "textStyle": "bold",
                          "textAlignment": "textEnd",
                          "text": "{{cell20}}",
                          "textColor": "#0094ff",
                          "textSize": "19dp",
                          "weight": "1",
                          "visibility": "visible"
                        }
                      ]
                    },
                    {
                      "width": "match",
                      "height": "3dp",
                      "widget": "View",
                      "background": "#232323",
                      "visibility": "visible",
                      "marginTop": "10dp",
                      "marginBottom": "12dp"
                    },
                    {
                      "width": "match",
                      "height": "content",
                      "widget": "LinearLayout",
                      "orientation": "vertical",
                      "children": [
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell1}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell2}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell3}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell4}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell5}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell6}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell7}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell8}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell9}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell10}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell11}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell12}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell13}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell14}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell15}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell16}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell17}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell18}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        },
                        {
                          "width": "match",
                          "height": "content",
                          "widget": "LinearLayout",
                          "visibility": "visible",
                          "orientation": "horizontal",
                          "children": [
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "총합",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textStart"
                            },
                            {
                              "widgetPolicy": {
                                "allowedAttributes": [
                                  "text",
                                  "textAlignment",
                                  "textColor",
                                  "textSize",
                                  "textStyle"
                                ]
                              },
                              "text": "{{cell20}}",
                              "width": "match",
                              "height": "content",
                              "weight": 1,
                              "widget": "TextView",
                              "textSize": "16dp",
                              "textColor": "#232323",
                              "textAlignment": "textEnd"
                            }
                          ]
                        },
                        {
                          "widgetPolicy": {
                            "allowedAttributes": [
                              "visibility"
                            ]
                          },
                          "width": "match",
                          "height": "1dp",
                          "widget": "View",
                          "background": "#232323",
                          "visibility": "gone",
                          "marginTop": "12dp",
                          "marginBottom": "12dp"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            "suggestions": [
              {}
            ]
          }
        }
      }
    }
  ]
}

Response

필드명
타입
길이
필수여부
기본값
설명

array<object>

O

등록된 템플릿ID(= messagebaseId)

code

string

5

O

20000000

status

integer

3

O

200

desc

string

O

result - array<object>

필드명
타입
길이
필수여부
기본값
설명

messagebaseId

string

O

등록된 템플릿ID(= messagebaseId)

❖ response body sample

{
    "code": "20000000",
    "desc": null,
    "result": [
        {
            "messagebaseId": "UBR.u720xwadx0-test2022072604"
        }
    ],
    "status": 200
}

Last updated