Chilkat Online Tools

SQL Server / Support API / Update a Brand

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    EXEC sp_OASetProperty @http, 'BasicAuth', 1
    EXEC sp_OASetProperty @http, 'Login', 'login'
    EXEC sp_OASetProperty @http, 'Password', 'password'

    -- Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    -- The following JSON is sent in the request body.

    -- {
    --   "brand": {
    --     "name": "<string>",
    --     "subdomain": "<string>",
    --     "active": "<boolean>",
    --     "brand_url": "<string>",
    --     "created_at": "<dateTime>",
    --     "default": "<boolean>",
    --     "has_help_center": "<boolean>",
    --     "help_center_state": "enabled",
    --     "host_mapping": "<string>",
    --     "id": "<integer>",
    --     "is_deleted": "<boolean>",
    --     "logo": {
    --       "content_type": "<string>",
    --       "content_url": "<string>",
    --       "deleted": "<boolean>",
    --       "file_name": "<string>",
    --       "height": "<string>",
    --       "id": "<integer>",
    --       "inline": "<boolean>",
    --       "malware_access_override": "<boolean>",
    --       "malware_scan_result": "<string>",
    --       "mapped_content_url": "<string>",
    --       "size": "<integer>",
    --       "url": "<string>",
    --       "width": "<string>",
    --       "thumbnails": [
    --         {
    --           "content_type": "<string>",
    --           "content_url": "<string>",
    --           "deleted": "<boolean>",
    --           "file_name": "<string>",
    --           "height": "<string>",
    --           "id": "<integer>",
    --           "inline": "<boolean>",
    --           "malware_access_override": "<boolean>",
    --           "malware_scan_result": "<string>",
    --           "mapped_content_url": "<string>",
    --           "size": "<integer>",
    --           "url": "<string>",
    --           "width": "<string>"
    --         },
    --         {
    --           "content_type": "<string>",
    --           "content_url": "<string>",
    --           "deleted": "<boolean>",
    --           "file_name": "<string>",
    --           "height": "<string>",
    --           "id": "<integer>",
    --           "inline": "<boolean>",
    --           "malware_access_override": "<boolean>",
    --           "malware_scan_result": "<string>",
    --           "mapped_content_url": "<string>",
    --           "size": "<integer>",
    --           "url": "<string>",
    --           "width": "<string>"
    --         }
    --       ]
    --     },
    --     "signature_template": "<string>",
    --     "ticket_form_ids": "<array>",
    --     "updated_at": "<dateTime>",
    --     "url": "<string>"
    --   }
    -- }

    DECLARE @json int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.subdomain', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.active', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.brand_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.created_at', '<dateTime>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.default', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.has_help_center', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.help_center_state', 'enabled'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.host_mapping', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.id', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.is_deleted', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.content_type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.content_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.deleted', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.file_name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.height', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.id', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.inline', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.malware_access_override', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.malware_scan_result', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.mapped_content_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.size', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.width', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].content_type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].content_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].deleted', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].file_name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].height', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].id', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].inline', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].malware_access_override', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].malware_scan_result', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].mapped_content_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].size', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[0].width', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].content_type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].content_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].deleted', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].file_name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].height', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].id', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].inline', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].malware_access_override', '<boolean>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].malware_scan_result', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].mapped_content_url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].size', '<integer>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].url', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.logo.thumbnails[1].width', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.signature_template', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.ticket_form_ids', '<array>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.updated_at', '<dateTime>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'brand.url', '<string>'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'

    DECLARE @sbRequestBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbRequestBody OUT

    EXEC sp_OAMethod @json, 'EmitSb', @success OUT, @sbRequestBody

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PTextSb', @resp OUT, 'PUT', 'https://example.zendesk.com/api/v2/brands/:brand_id', @sbRequestBody, 'utf-8', 'application/json', 0, 0
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        RETURN
      END

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "brand": {
    --     "name": "<string>",
    --     "subdomain": "<string>",
    --     "active": "<boolean>",
    --     "brand_url": "<string>",
    --     "created_at": "<dateTime>",
    --     "default": "<boolean>",
    --     "has_help_center": "<boolean>",
    --     "help_center_state": "enabled",
    --     "host_mapping": "<string>",
    --     "id": "<integer>",
    --     "is_deleted": "<boolean>",
    --     "logo": {
    --       "content_type": "<string>",
    --       "content_url": "<string>",
    --       "deleted": "<boolean>",
    --       "file_name": "<string>",
    --       "height": "<string>",
    --       "id": "<integer>",
    --       "inline": "<boolean>",
    --       "malware_access_override": "<boolean>",
    --       "malware_scan_result": "<string>",
    --       "mapped_content_url": "<string>",
    --       "size": "<integer>",
    --       "url": "<string>",
    --       "width": "<string>",
    --       "thumbnails": [
    --         {
    --           "content_type": "<string>",
    --           "content_url": "<string>",
    --           "deleted": "<boolean>",
    --           "file_name": "<string>",
    --           "height": "<string>",
    --           "id": "<integer>",
    --           "inline": "<boolean>",
    --           "malware_access_override": "<boolean>",
    --           "malware_scan_result": "<string>",
    --           "mapped_content_url": "<string>",
    --           "size": "<integer>",
    --           "url": "<string>",
    --           "width": "<string>"
    --         },
    --         {
    --           "content_type": "<string>",
    --           "content_url": "<string>",
    --           "deleted": "<boolean>",
    --           "file_name": "<string>",
    --           "height": "<string>",
    --           "id": "<integer>",
    --           "inline": "<boolean>",
    --           "malware_access_override": "<boolean>",
    --           "malware_scan_result": "<string>",
    --           "mapped_content_url": "<string>",
    --           "size": "<integer>",
    --           "url": "<string>",
    --           "width": "<string>"
    --         }
    --       ]
    --     },
    --     "signature_template": "<string>",
    --     "ticket_form_ids": "<array>",
    --     "updated_at": "<dateTime>",
    --     "url": "<string>"
    --   }
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @content_type nvarchar(4000)

    DECLARE @content_url nvarchar(4000)

    DECLARE @deleted nvarchar(4000)

    DECLARE @file_name nvarchar(4000)

    DECLARE @height nvarchar(4000)

    DECLARE @id nvarchar(4000)

    DECLARE @inline nvarchar(4000)

    DECLARE @malware_access_override nvarchar(4000)

    DECLARE @malware_scan_result nvarchar(4000)

    DECLARE @mapped_content_url nvarchar(4000)

    DECLARE @size nvarchar(4000)

    DECLARE @url nvarchar(4000)

    DECLARE @width nvarchar(4000)

    DECLARE @Name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'brand.name'
    DECLARE @Subdomain nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Subdomain OUT, 'brand.subdomain'
    DECLARE @Active nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Active OUT, 'brand.active'
    DECLARE @Brand_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Brand_url OUT, 'brand.brand_url'
    DECLARE @Created_at nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Created_at OUT, 'brand.created_at'
    DECLARE @Default nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Default OUT, 'brand.default'
    DECLARE @Has_help_center nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Has_help_center OUT, 'brand.has_help_center'
    DECLARE @Help_center_state nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Help_center_state OUT, 'brand.help_center_state'
    DECLARE @Host_mapping nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Host_mapping OUT, 'brand.host_mapping'
    DECLARE @Id nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Id OUT, 'brand.id'
    DECLARE @Is_deleted nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Is_deleted OUT, 'brand.is_deleted'
    DECLARE @Content_type nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Content_type OUT, 'brand.logo.content_type'
    DECLARE @Content_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Content_url OUT, 'brand.logo.content_url'
    DECLARE @Deleted nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Deleted OUT, 'brand.logo.deleted'
    DECLARE @File_name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @File_name OUT, 'brand.logo.file_name'
    DECLARE @Height nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Height OUT, 'brand.logo.height'
    DECLARE @LogoId nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @LogoId OUT, 'brand.logo.id'
    DECLARE @Inline nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Inline OUT, 'brand.logo.inline'
    DECLARE @Malware_access_override nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Malware_access_override OUT, 'brand.logo.malware_access_override'
    DECLARE @Malware_scan_result nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Malware_scan_result OUT, 'brand.logo.malware_scan_result'
    DECLARE @Mapped_content_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Mapped_content_url OUT, 'brand.logo.mapped_content_url'
    DECLARE @Size nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Size OUT, 'brand.logo.size'
    DECLARE @v_Url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @v_Url OUT, 'brand.logo.url'
    DECLARE @Width nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Width OUT, 'brand.logo.width'
    DECLARE @Signature_template nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Signature_template OUT, 'brand.signature_template'
    DECLARE @Ticket_form_ids nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Ticket_form_ids OUT, 'brand.ticket_form_ids'
    DECLARE @Updated_at nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Updated_at OUT, 'brand.updated_at'
    DECLARE @brandUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @brandUrl OUT, 'brand.url'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'brand.logo.thumbnails'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @content_type OUT, 'brand.logo.thumbnails[i].content_type'
        EXEC sp_OAMethod @jResp, 'StringOf', @content_url OUT, 'brand.logo.thumbnails[i].content_url'
        EXEC sp_OAMethod @jResp, 'StringOf', @deleted OUT, 'brand.logo.thumbnails[i].deleted'
        EXEC sp_OAMethod @jResp, 'StringOf', @file_name OUT, 'brand.logo.thumbnails[i].file_name'
        EXEC sp_OAMethod @jResp, 'StringOf', @height OUT, 'brand.logo.thumbnails[i].height'
        EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'brand.logo.thumbnails[i].id'
        EXEC sp_OAMethod @jResp, 'StringOf', @inline OUT, 'brand.logo.thumbnails[i].inline'
        EXEC sp_OAMethod @jResp, 'StringOf', @malware_access_override OUT, 'brand.logo.thumbnails[i].malware_access_override'
        EXEC sp_OAMethod @jResp, 'StringOf', @malware_scan_result OUT, 'brand.logo.thumbnails[i].malware_scan_result'
        EXEC sp_OAMethod @jResp, 'StringOf', @mapped_content_url OUT, 'brand.logo.thumbnails[i].mapped_content_url'
        EXEC sp_OAMethod @jResp, 'StringOf', @size OUT, 'brand.logo.thumbnails[i].size'
        EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'brand.logo.thumbnails[i].url'
        EXEC sp_OAMethod @jResp, 'StringOf', @width OUT, 'brand.logo.thumbnails[i].width'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbRequestBody
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl  -u login:password -X PUT
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "brand": {
    "name": "<string>",
    "subdomain": "<string>",
    "active": "<boolean>",
    "brand_url": "<string>",
    "created_at": "<dateTime>",
    "default": "<boolean>",
    "has_help_center": "<boolean>",
    "help_center_state": "enabled",
    "host_mapping": "<string>",
    "id": "<integer>",
    "is_deleted": "<boolean>",
    "logo": {
      "content_type": "<string>",
      "content_url": "<string>",
      "deleted": "<boolean>",
      "file_name": "<string>",
      "height": "<string>",
      "id": "<integer>",
      "inline": "<boolean>",
      "malware_access_override": "<boolean>",
      "malware_scan_result": "<string>",
      "mapped_content_url": "<string>",
      "size": "<integer>",
      "url": "<string>",
      "width": "<string>",
      "thumbnails": [
        {
          "content_type": "<string>",
          "content_url": "<string>",
          "deleted": "<boolean>",
          "file_name": "<string>",
          "height": "<string>",
          "id": "<integer>",
          "inline": "<boolean>",
          "malware_access_override": "<boolean>",
          "malware_scan_result": "<string>",
          "mapped_content_url": "<string>",
          "size": "<integer>",
          "url": "<string>",
          "width": "<string>"
        },
        {
          "content_type": "<string>",
          "content_url": "<string>",
          "deleted": "<boolean>",
          "file_name": "<string>",
          "height": "<string>",
          "id": "<integer>",
          "inline": "<boolean>",
          "malware_access_override": "<boolean>",
          "malware_scan_result": "<string>",
          "mapped_content_url": "<string>",
          "size": "<integer>",
          "url": "<string>",
          "width": "<string>"
        }
      ]
    },
    "signature_template": "<string>",
    "ticket_form_ids": "<array>",
    "updated_at": "<dateTime>",
    "url": "<string>"
  }
}'
https://example.zendesk.com/api/v2/brands/:brand_id

Postman Collection Item JSON

{
  "name": "Update a Brand",
  "request": {
    "method": "PUT",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"brand\": {\n    \"name\": \"<string>\",\n    \"subdomain\": \"<string>\",\n    \"active\": \"<boolean>\",\n    \"brand_url\": \"<string>\",\n    \"created_at\": \"<dateTime>\",\n    \"default\": \"<boolean>\",\n    \"has_help_center\": \"<boolean>\",\n    \"help_center_state\": \"enabled\",\n    \"host_mapping\": \"<string>\",\n    \"id\": \"<integer>\",\n    \"is_deleted\": \"<boolean>\",\n    \"logo\": {\n      \"content_type\": \"<string>\",\n      \"content_url\": \"<string>\",\n      \"deleted\": \"<boolean>\",\n      \"file_name\": \"<string>\",\n      \"height\": \"<string>\",\n      \"id\": \"<integer>\",\n      \"inline\": \"<boolean>\",\n      \"malware_access_override\": \"<boolean>\",\n      \"malware_scan_result\": \"<string>\",\n      \"mapped_content_url\": \"<string>\",\n      \"size\": \"<integer>\",\n      \"url\": \"<string>\",\n      \"width\": \"<string>\",\n      \"thumbnails\": [\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\"\n        },\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\"\n        }\n      ]\n    },\n    \"signature_template\": \"<string>\",\n    \"ticket_form_ids\": \"<array>\",\n    \"updated_at\": \"<dateTime>\",\n    \"url\": \"<string>\"\n  }\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v2/brands/:brand_id",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "brands",
        ":brand_id"
      ],
      "variable": [
        {
          "key": "brand_id",
          "value": "<integer>"
        }
      ]
    },
    "description": "Returns an updated brand.\n\n#### Allowed for\n* Admins\n\n#### Updating a Brand's Image\nA brand image can be updated by uploading a local file using the update brand endpoint. See the **Using curl** sections below for more information."
  },
  "response": [
    {
      "name": "Successful response",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"brand\": {\n    \"name\": \"<string>\",\n    \"subdomain\": \"<string>\",\n    \"active\": \"<boolean>\",\n    \"brand_url\": \"<string>\",\n    \"created_at\": \"<dateTime>\",\n    \"default\": \"<boolean>\",\n    \"has_help_center\": \"<boolean>\",\n    \"help_center_state\": \"enabled\",\n    \"host_mapping\": \"<string>\",\n    \"id\": \"<integer>\",\n    \"is_deleted\": \"<boolean>\",\n    \"logo\": {\n      \"content_type\": \"<string>\",\n      \"content_url\": \"<string>\",\n      \"deleted\": \"<boolean>\",\n      \"file_name\": \"<string>\",\n      \"height\": \"<string>\",\n      \"id\": \"<integer>\",\n      \"inline\": \"<boolean>\",\n      \"malware_access_override\": \"<boolean>\",\n      \"malware_scan_result\": \"<string>\",\n      \"mapped_content_url\": \"<string>\",\n      \"size\": \"<integer>\",\n      \"url\": \"<string>\",\n      \"width\": \"<string>\",\n      \"thumbnails\": [\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\"\n        },\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\"\n        }\n      ]\n    },\n    \"signature_template\": \"<string>\",\n    \"ticket_form_ids\": \"<array>\",\n    \"updated_at\": \"<dateTime>\",\n    \"url\": \"<string>\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/brands/:brand_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "brands",
            ":brand_id"
          ],
          "variable": [
            {
              "key": "brand_id"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"brand\": {\n    \"name\": \"<string>\",\n    \"subdomain\": \"<string>\",\n    \"active\": \"<boolean>\",\n    \"brand_url\": \"<string>\",\n    \"created_at\": \"<dateTime>\",\n    \"default\": \"<boolean>\",\n    \"has_help_center\": \"<boolean>\",\n    \"help_center_state\": \"enabled\",\n    \"host_mapping\": \"<string>\",\n    \"id\": \"<integer>\",\n    \"is_deleted\": \"<boolean>\",\n    \"logo\": {\n      \"content_type\": \"<string>\",\n      \"content_url\": \"<string>\",\n      \"deleted\": \"<boolean>\",\n      \"file_name\": \"<string>\",\n      \"height\": \"<string>\",\n      \"id\": \"<integer>\",\n      \"inline\": \"<boolean>\",\n      \"malware_access_override\": \"<boolean>\",\n      \"malware_scan_result\": \"<string>\",\n      \"mapped_content_url\": \"<string>\",\n      \"size\": \"<integer>\",\n      \"url\": \"<string>\",\n      \"width\": \"<string>\",\n      \"thumbnails\": [\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\"\n        },\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\"\n        }\n      ]\n    },\n    \"signature_template\": \"<string>\",\n    \"ticket_form_ids\": \"<array>\",\n    \"updated_at\": \"<dateTime>\",\n    \"url\": \"<string>\"\n  }\n}"
    }
  ]
}