PUT

Trademark - 04.Update

Updates an existing trademark.

Request URL

Request headers

string
Subscription key which provides access to this API.

Request body

Request payload to update the trademark.

  • string Required id: Trademark GUID.
  • string Required registry_id: Registry GUID for the trademark. To get a list of all registries available here.
  • string Required mark_text: Text of the trademark, for example "LawPanel".
  • string Required application_number: Applicattion number for the trademark. It may contains any character, not only numbers.
  • string Optional application_date: Application/filing date in ISO-8601 (UTC) format.
  • string Optional registration_number: Registration number for the trademark. It may contains any character, not only numbers.
  • string Optional registration_date: Registration date in ISO-8601 (UTC) format.
  • string Optional status_date: Current status date in ISO-8601 (UTC) format.
  • string Optional mark_feature: Trademark feature text.
  • string Optional status: Current trademark status.
  • string Optional registration_type_id: Registration type GUID. To get a list of all registration types available click here.
  • string Optional trademark_type_id: Trademark type GUID. To get a list of all trademark types available click here.
  • string Optional expiry_date: Expiry date for the trademark in ISO-8601 (UTC) format.
  • string Optional publication_date: Publication date for the trademark in ISO-8601 (UTC) format.
  • string Optional declaration_date: Declaration date for the trademark in ISO-8601 (UTC) format.
  • string Optional office_action_date: Office action date for the trademark in ISO-8601 (UTC) format.
  • string Optional grant_date: Grant date for the trademark in ISO-8601 (UTC) format.
  • string Optional client_agent_id: Legal entity (aka "Company", "Client") GUID to assign as Agent for this trademark. Client must be of type Agent. Click here to get a list of all client types available. To get a list of all legal entities available click here.
  • string Optional publication_notes: Notes about trademark publication.
  • array Optionalgood_and_services: An array of objects to update Good And Services for the trademark.
    Object properties are:
    • string Required id: Good and Service GUID to update. If you set this value to null a new one will be created.
    • string Required language_id: Registry GUID for the trademark. To get a list of all languages available click here.
    • string Required text: Text for the Good And Service.
    • string Required search_class_id: Search class GUID for the Good and Service. To get a list of all search class available click here.
  • string Optional image_url: An URL for the trademark image .
  • string Optional notes: Notes about trademark.
  • bool Optional do_not_create_file: If true the system will not create a Case for this trademark.

Loading...
                  {
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "registry_id": {
      "type": "string"
    },
    "mark_text": {
      "type": "string"
    },
    "application_number": {
      "type": "string"
    },
    "application_date": {
      "type": "string"
    },
    "registration_number": {
      "type": "integer"
    },
    "registration_date": {
      "type": "string"
    },
    "status_date": {
      "type": "string"
    },
    "mark_feature": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "registration_type_id": {
      "type": "string"
    },
    "trademark_type_id": {
      "type": "string"
    },
    "expiry_date": {
      "type": "string"
    },
    "publication_date": {
      "type": "string"
    },
    "declaration_date": {
      "type": "string"
    },
    "office_action_date": {
      "type": "string"
    },
    "final_office_action_date": {
      "type": "string"
    },
    "grant_date": {
      "type": "string"
    },
    "client_agent_id": {
      "type": "string"
    },
    "publication_notes": {
      "type": "string"
    },
    "good_and_services": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "language_id": {
            "type": "string"
          },
          "search_class_id": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "language_id",
          "search_class_id",
          "text"
        ]
      }
    },
    "image_url": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    }
  }
}
                  
              

Response 200

Loading...
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "successful": {
      "type": "boolean"
    }
  }
}

Code samples

@ECHO OFF

curl -v -X PUT "https://api.lawpanel.com/v1/firms/trademark"
-H "Content-Type: application/json"
-H "subscription-key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("subscription-key", "{subscription key}");

            var uri = "https://api.lawpanel.com/v1/firms/trademark?" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
                content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
                response = await client.PutAsync(uri, content);
            }
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://api.lawpanel.com/v1/firms/trademark");


            URI uri = builder.build();
            HttpPut request = new HttpPut(uri);
            request.setHeader("Content-Type", "application/json");
            request.setHeader("subscription-key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://api.lawpanel.com/v1/firms/trademark?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("subscription-key","{subscription key}");
            },
            type: "PUT",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://api.lawpanel.com/v1/firms/trademark";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"PUT"];
    // Request headers
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"subscription-key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://api.lawpanel.com/v1/firms/trademark');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Content-Type' => 'application/json',
    'subscription-key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_PUT);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'subscription-key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('api.lawpanel.com')
    conn.request("PUT", "/v1/firms/trademark?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'subscription-key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('api.lawpanel.com')
    conn.request("PUT", "/v1/firms/trademark?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://api.lawpanel.com/v1/firms/trademark')

request = Net::HTTP::Put.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['subscription-key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body


* See getting started for more information on how to use this API.