Frequently Asked Questions

Question: How can I just play?

Once you are setup, there are two ways to play and test your CertCapture API

Follow the code examples provided below for your choice of language.

Or install one of these free Browser Add-ons:

Advanced Rest for Chrome

Postman for Chrome

RESTClient for Firefox

Question: The example Java code for making a PUT call returns 200 OK, but doesn't update the record.

The example auto-generated code for the Java programming language is not compatible with our Framework. Please refer to the code snippet below when making a PUT call, adapted to each endpoint:

import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.core.Form; import javax.ws.rs.core.Response; import javax.ws.rs.core.MediaType; Form form = new Form(); form.param("customer_number", "cc0000001") .param("name", "Customer Name"); Client client = ClientBuilder.newClient(); Entity<Form> payload = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); Response response = client.target("https://api.certcapture.com/v2/customers/id") .request(MediaType.TEXT_PLAIN_TYPE) .header("x-client-id", "12345") .header("Authorization", "Basic MYAUTHSTRING=") .put(payload); System.out.println("status: "  + response.getStatus()); System.out.println("headers: " + response.getHeaders()); System.out.println("body:"     + response.readEntity(String.class));

Question: I keep getting a 401 error!

Make sure you: 1) Have an API account setup and tied to your Avalara CertCapture user account 2) Are base64 encoding your username:password and sending it as HTTP Basic access authentication.

See Credentials.

Question: Do I have to provide all the information when creating or associating a related model?

No, provide just enough information to find a unique instance. IE: You can provide State with {"name":"North Carolina"}

Question: Sometimes my newly created customer or my customers ship to state is being assigned the incorrect state!

CertCapture has state information for a number of countries that have duplicate state initials.

Washington and Western Australia Hawaii and Hidalgo

If you are creating a customer in Washington, simply include the country as well. country={"country":"US"} or use the full name: state={"name":"North Carolina"}

Question: I am getting this error: "Unable to find user company details"

Make sure you have access to the client ID you are passing as x-client-id

Question: Still not working!

Sometimes requests don't follow the 302 http redirect so remove the trailing slash from the URL. IE /v2/certificates instead of /v2/certificates/

Question: I keep getting "error": "Related data not found in request, must be one of: [X]"

Make sure you are POST/PUT with Content-Type application/x-www-form-urlencoded

Question: I'm still getting "error": "Related data not found in request, must be one of: [X]"

Make sure you are using snake_case

Question: Can I multithread my requests.

We would recommend against multithreading calls to the CertCapture REST API as there have been some unexpected errors when doing simultaneous create or update calls.