CardShark is a human based business card transcription service. The CardShark API allows you to send images of business cards to FullContact, and you will receive back a response containing human transcribed structured contact data. The endpoint is a RESTful service where a developer can send front and back images of a business card to be transcribed and that data is returned back to you via a specified webhook callback URL.
Use the Upload Card method to submit front and back photos of a business card for processing.
POST https://api.fullcontact.com/v2/cardShark?webhookUrl=xxxx&apiKey=xxxx
| Name | Description |
|---|---|
| apiKey | This API key is assigned to you by FullContact. It is used to identify and authorize your request. Your API key should be kept private, and should never be displayed publicly. |
| webhookUrl |
This is the URL that a request will be made to once the card has been processed. It must be URL Encoded:
http%3A%2F%2Fmydomain.com%2Fwebhook |
| Request Body |
You can either send in the files as a multipart/form-data request or as a JSON object with BASE64 encoded images:
(Back image is optional) Note on image sizes: The minimum image size the POST will accept is 320px by 240px (smaller images will result in a 412 response code). Resolutions smaller than this tend to be difficult to transcribe. Also, please limit image sizes that you POST to the endpoint to be less than 6 MB as anything larger will be rejected with a 413 response code.
{
"front": "iVBORw0KGg...rQAAAAASUVORK5CYII=",
"back": "iVBO...SUVORK5CYII="
}
Content-Disposition: form-data; name="front"; filename="front.png|jpg|gif"
Content-Type: image/png|jpg|gif
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="back"; filename="back.png|jpg|gif"
Content-Type: image/png|jpg|gif
Content-Transfer-Encoding: binary
|
| verified (optional) |
Used to specify the quality of transcription. Calls to verified=medium|high require a FullContact premium account.
|
| returnedData (optional) |
A response can contain verified and unverified data, this parameter can be used to exclude unverified data from being returned in the response.
|
| format (optional) | Used to specify response in xml or json. |
| casing (optional) |
CardShark can alter the casing of certain fields in the final results.
|
| sandbox (optional) |
CardShark Sandbox is a free, quick response mode for testing and development. Read Carefully on how each status option behaves, and what to expect while testing.
copy
POST https://api.fullcontact.com/v2/cardShark?sandbox=CALLBACK_MADE&webhookUrl=myWebhookURL&apiKey=xxxx
|
The API responds with JSON or XML. The POST response will look like:
HTTP/1.1 202 ACCEPTED Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"queued": true,
"id": "xxxxxxxxxxxxxxx",
"estimatedWaitTimeMinutes": 33,
"status": 202
}
HTTP/1.1 202 ACCEPTED Date: Sat May 25 6:33:21 UTC 2013 Content-Type: text/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" ?> <response> <queued>true</queued> <id>xxxxxxxxxxxxxxx</id> <estimatedWaitTimeMinutes>33</estimatedWaitTimeMinutes> <status>202</status> </response>
An example post back response to the webhookUrl will look like:
HTTP/1.1 200 OK Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"lastWebhookAttempt": "2013-02-05T00:37:38.000Z",
"vCardUrl": "https://link-to-vcard.vcf",
"id": "xxxxxxxxxxxxx",
"webhookAttempts": 1,
"webhookUrl": "http://link-to-webhook-server.com",
"quality": "MEDIUM",
"submitted": "2013-02-05T00:13:19.000Z",
"contact": {
"photos":
[
{
"primary": false,
"value": "https://link-to-image.jpg",
"type": "BusinessCard"
}
],
"accounts":
[
{
"username": "lorangb",
"domain": "twitter.com",
"urlString": "http://twitter.com/lorangb"
}
],
"organizations":
[
{
"title": "CEO / Co-Founder",
"isPrimary": false,
"name": "FullContact"
}
],
"urls":
[
{
"value": "www.fullcontact.com",
"type": "other"
}
],
"name": {
"familyName": "Lorang",
"givenName": "Bart"
},
"phoneNumbers":
[
{
"value": "(XXX) XXX-XXXX",
"type": "work"
}
],
"emails":
[
{
"value": "bart@fullcontact.com",
"type": "work"
}
]
},
"unverifiedFields": [
"ims[0]"
],
"unverifiedContact": {
"photos":
[
{
"primary": false,
"value": "https://link-to-image.jpg",
"type": "BusinessCard"
}
],
"accounts":
[
{
"username": "lorangb",
"domain": "twitter.com",
"urlString": "http://twitter.com/lorangb"
}
],
"organizations":
[
{
"title": "CEO / Co-Founder",
"isPrimary": false,
"name": "FullContact"
}
],
"urls":
[
{
"value": "www.fullcontact.com",
"type": "other"
}
],
"name": {
"familyName": "Lorang",
"givenName": "Bart"
},
"phoneNumbers":
[
{
"value": "(XXX) XXX-XXXX",
"type": "work"
}
],
"emails":
[
{
"value": "bart@fullcontact.com",
"type": "work"
}
],
"ims":
[
{
"value": "bart",
"type": "skype"
}
]
},
"unverifiedVCardUrl": "https://link-to-unverified-vcard.vcf"
}
HTTP/1.1 200 OK Date: Sat May 25 6:33:21 UTC 2013 Content-Type: text/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" ?> <response> <lastWebhookAttempt>2013-02-05T00:37:38.000Z</lastWebhookAttempt> <webhookAttempts>1</webhookAttempts> <webhookUrl>http://link-to-webhook-server.com</webhookUrl> <quality>MEDIUM</quality> <submitted>2013-02-05T00:13:19.000Z</submitted> <vCardUrl>https://link-to-vcard.vcf</vCardUrl> <id>xxxxxxxxxxxxx</id> <contact> <photos> <photo> <primary>false</primary> <value> https://link-to-image.JPEG </value> <type>BusinessCard</type> </photo> </photos> <accounts> <account> <username>lorangb</username> <domain>twitter.com</domain> <urlString>http://twitter.com/lorangB</urlString> </account> </accounts> <organizations> <organization> <title>CEO / Co-Founder</title> <isPrimary>false</isPrimary> <name>FullContact</name> </organization> </organizations> <urls> <url> <value>www.fullcontact.com</value> <type>other</type> </url> </urls> <name> <familyName>Lorang</familyName> <givenName>Bart</givenName> </name> <phoneNumbers> <phoneNumber> <value>(XXX) XXX-XXXX</value> <type>work</type> </phoneNumber> </phoneNumbers> <emails> <email> <value>bart@fullcontact.com</value> <type>work</type> </email> </emails> </contact> <unverifiedFields> <unverifiedField>ims[0]</unverifiedField> </unverifiedFields> <unverifiedContact> <photos> <photo> <primary>false</primary> <value> https://link-to-image.JPEG </value> <type>BusinessCard</type> </photo> </photos> <accounts> <account> <username>lorangb</username> <domain>twitter.com</domain> <urlString>http://twitter.com/lorangB</urlString> </account> </accounts> <organizations> <organization> <title>CEO / Co-Founder</title> <isPrimary>false</isPrimary> <name>FullContact</name> </organization> </organizations> <urls> <url> <value>www.fullcontact.com</value> <type>other</type> </url> </urls> <name> <familyName>Lorang</familyName> <givenName>Bart</givenName> </name> <phoneNumbers> <phoneNumber> <value>(XXX) XXX-XXXX</value> <type>work</type> </phoneNumber> </phoneNumbers> <emails> <email> <value>bart@fullcontact.com</value> <type>work</type> </email> </emails> <ims> <im> <value>bart</value> <type>skype</type> </im> </ims> </unverifiedContact> <unverifiedVCardUrl>https://link-to-unverified-vcard.vcf</unverifiedVCardUrl> </response>
If a job is not processable the post back to the webhookUrl will contain the following response.
HTTP/1.1 400 Bad Request Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"status": 400,
"id": "xxxxxxxxxxxxxxx",
"message": "The image sent was not processable. Please ensure the image contains clearly legible contact information."
}
HTTP/1.1 400 Bad Request Date: Sat May 25 6:33:21 UTC 2013 Content-Type: text/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" ?>
<response>
<status>200</status>
<id>xxxxxxxxxxxxxxx</id>
<message>The image sent was not processable. Please ensure the image contains clearly legible contact information.</message>
</response>
The callback will have a response schema as below.
HTTP/1.1 200 Success Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"lastWebhookAttempt": {"type":"string"}, // UTC Time in ISO 8601 format - JSON null if 0 attempts have been made
"webhookAttempts": {"type":"number"},
"webhookUrl": {"type":"string"},
"quality": {"type":"string"}, // "LOW", "MEDIUM", or "HIGH"
"submitted": {"type":"string"}, // UTC Time in ISO 8601 format
"contact": {
"addresses": [
{
"country": {"type":"string"},
"type": {"type":"string"}, // currently always "work"
"locality": {"type":"string"},
"extendedAddress": {"type":"string"}, // currently always null
"postalCode": {"type":"string"},
"formatted": {"type":"string"}, // currently always null
"region": {"type":"string"},
"streetAddress": {"type":"string"} // pipe delimited for up to 4 lines of address "address line 1 | address line 2 | etc."
}
],
"emails": [
{
"type": {"type":"string"}, // currently always "work"
"value": {"type":"string"}
}
],
"phoneNumbers": [
{
"type": {"type":"string"}, // currently supporting "home", "pager", "other", "work fax", "mobile", "main", or "work"
"value": {"type":"string"}
}
],
"name": {
"honorificSuffix": {"type":"string"}, // currently always null
"givenName": {"type":"string"},
"familyName": {"type":"string"},
"honorificPrefix": {"type":"string"}, // currently always null
"middleName": {"type":"string"}
},
"urls": [
{
"type": {"type":"string"}, // currently either "company" or up to three results of type "other"
"value": {"type":"string"}
}
],
"organizations": [
{
"name": {"type":"string"},
"isPrimary": {"type":"boolean"},
"title": {"type":"string"}
}
],
"ims": [
{
"type": {"type":"string"},
"value": {"type":"string"}
}
],
"accounts": [
{
"urlString": {"type":"string"},
"domain": {"type":"string"},
"userid": {"type":"string"},
"username": {"type":"string"}
}
],
"photos": [
{
"type": {"type":"string"}, // currently always "BusinessCard"
"value": {"type":"string"},
"primary": {"type":"boolean"}
}
]
},
"id": {"type":"string"},
"vCardUrl": {"type":"string"},
"unverifiedContact":{
"addresses": [
{
"country": {"type":"string"},
"type": {"type":"string"}, // currently always "work"
"locality": {"type":"string"},
"extendedAddress": {"type":"string"}, // currently always null
"postalCode": {"type":"string"},
"formatted": {"type":"string"}, // currently always null
"region": {"type":"string"},
"streetAddress": {"type":"string"} // pipe delimited for up to 4 lines of address "address line 1 | address line 2 | etc."
}
],
"emails": [
{
"type": {"type":"string"}, // currently always "work"
"value": {"type":"string"}
}
],
"phoneNumbers": [
{
"type": {"type":"string"}, // currently supporting "home", "pager", "other", "work fax", "mobile", "main", or "work"
"value": {"type":"string"}
}
],
"name": {
"honorificSuffix": {"type":"string"}, // currently always null
"givenName": {"type":"string"},
"familyName": {"type":"string"},
"honorificPrefix": {"type":"string"}, // currently always null
"middleName": {"type":"string"}
},
"urls": [
{
"type": {"type":"string"}, // currently either "company" or up to three results of type "other"
"value": {"type":"string"}
}
],
"organizations": [
{
"name": {"type":"string"},
"isPrimary": {"type":"boolean"},
"title": {"type":"string"}
}
],
"ims": [
{
"type": {"type":"string"},
"value": {"type":"string"}
}
],
"accounts": [
{
"urlString": {"type":"string"},
"domain": {"type":"string"},
"userid": {"type":"string"},
"username": {"type":"string"}
}
],
"photos": [
{
"type": {"type":"string"}, // currently always "BusinessCard"
"value": {"type":"string"},
"primary": {"type":"boolean"}
}
]
},
"unverifiedVCardUrl": {"type":"string"},
"unverifiedFields": [
{"type":"string"} // examples include "ims[0]", "emails[2]" or "familyName" etc.
]
}
Use the view single request method to view a specific transcription.
GET https://api.fullcontact.com/v2/cardShark/xxxxx?apiKey=xxxx
| Name | Description |
|---|---|
| apiKey | This API key is assigned to you by FullContact. It is used to identify and authorize your request. Your API key should be kept private, and should never be displayed publicly. |
| id | The id of a specific request. |
| returnedData (optional) |
A response can contain verified and unverified data, this parameter can be used to exclude unverified data from being returned in the response.
verifiedOnly - non-verified results will be excluded from the response payload. |
| format (optional) | Used to specify response in xml or json. |
The API responds with JSON or XML.
HTTP/1.1 200 OK Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"lastWebhookAttempt": "2013-02-05T00:37:38.000Z",
"webhookAttempts": 1,
"webhookUrl": "http://link-to-webhook-server.com",
"quality": "MEDIUM",
"submitted": "2013-02-05T00:13:19.000Z",
"vCardUrl": "https://link-to-vcard.vcf",
"status": "CALLBACK_MADE"
"id": "xxxxxxxxxxxxx",
"contact": {
"photos":
[
{
"primary": false,
"value": "https://link-to-image.jpg",
"type": "BusinessCard"
}
],
"accounts":
[
{
"username": "lorangb",
"domain": "twitter.com",
"urlString": "http://twitter.com/lorangb"
}
],
"organizations":
[
{
"title": "CEO / Co-Founder",
"isPrimary": false,
"name": "FullContact"
}
],
"urls":
[
{
"value": "www.fullcontact.com",
"type": "other"
}
],
"name": {
"familyName": "Lorang",
"givenName": "Bart"
},
"phoneNumbers":
[
{
"value": "(XXX) XXX-XXXX",
"type": "work"
}
],
"emails":
[
{
"value": "bart@fullcontact.com",
"type": "work"
}
]
},
"params": { "my-custom-param": "xxxxx" },
}
HTTP/1.1 200 OK Date: Sat May 25 6:33:21 UTC 2013 Content-Type: text/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" ?>
<response>
<lastWebhookAttempt>2013-02-05T00:37:38.000Z</lastWebhookAttempt>
<webhookAttempts>1</webhookAttempts>
<webhookUrl>http://link-to-webhook-server.com</webhookUrl>
<quality>MEDIUM</quality>
<submitted>2013-02-05T00:13:19.000Z</submitted>
<vCardUrl>https://link-to-vcard.vcf</vCardUrl>
<status>CALLBACK_MADE</status>
<id>xxxxxxxxxxxxx</id>
<contact>
<photos>
<photo>
<primary>false</primary>
<value>
https://link-to-image.JPEG
</value>
<type>BusinessCard</type>
</photo>
</photos>
<accounts>
<account>
<username>lorangb</username>
<domain>twitter.com</domain>
<urlString>http://twitter.com/lorangB</urlString>
</account>
</accounts>
<organizations>
<organization>
<title>CEO / Co-Founder</title>
<isPrimary>false</isPrimary>
<name>FullContact</name>
</organization>
</organizations>
<urls>
<url>
<value>www.fullcontact.com</value>
<type>other</type>
</url>
</urls>
<name>
<familyName>Lorang</familyName>
<givenName>Bart</givenName>
</name>
<phoneNumbers>
<phoneNumber>
<value>(XXX) XXX-XXXX</value>
<type>work</type>
</phoneNumber>
</phoneNumbers>
<emails>
<email>
<value>bart@fullcontact.com</value>
<type>work</type>
</email>
</emails>
</contact>
<params>
<my-custom-param>xxxxxxx</my-custom-param>
</params>
</response>
HTTP/1.1 404 File Not Found Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"response": "Request failed, the given uuid was not found",
"status": 404
}
HTTP/1.1 404 File Not Found Date: Sat May 25 6:33:21 UTC 2013 Content-Type: text/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" ?> <response> <response>Request failed, the given uuid was not found</response> <status>404</status> </response>
Use the view requests method to view a paged history of your transcriptions.
GET https://api.fullcontact.com/v2/cardShark?page=0&apiKey=xxxx
| Name | Description |
|---|---|
| apiKey | This API key is assigned to you by FullContact. It is used to identify and authorize your request. Your API key should be kept private, and should never be displayed publicly. |
| page (optional) | Used to page through the results. If not specified, it defaults to the first page (0). |
| returnedData (optional) |
A response can contain verified and unverified data, this parameter can be used to exclude unverified data from being returned in the response.
verifiedOnly - non-verified results will be excluded from the response payload. |
| format (optional) | Used to specify response in xml or json. |
The API responds with JSON or XML.
HTTP/1.1 200 OK Date: Sat May 25 6:33:21 UTC 2013 Content-Type: application/json;charset=UTF-8
{
"status": 200,
"currentPage":0,
"totalPages":11,
"totalRecords":208,
"count":20,
"results": [
{
"lastWebhookAttempt": null,
"id": "xxxxxxxxxxxxx",
"webhookAttempts": 0,
"status": "PROCESSING",
"webhookUrl": "http://link-to-webhook-server.com",
"quality": "LOW",
"submitted": "2013-02-05T20:19:19.000Z",
"params": { "my-custom-param": "xxxxx" },
},
{
"lastWebhookAttempt": "2013-02-05T00:37:38.000Z",
"webhookAttempts": 1,
"webhookUrl": "http://link-to-webhook-server.com",
"quality": "MEDIUM",
"submitted": "2013-02-05T00:13:19.000Z",
"vCardUrl": "https://link-to-vcard.vcf",
"status": "CALLBACK_MADE"
"id": "xxxxxxxxxxxxx",
"contact": {
"photos":
[
{
"primary": false,
"value": "https://link-to-image.jpg",
"type": "BusinessCard"
}
],
"accounts":
[
{
"username": "lorangb",
"domain": "twitter.com",
"urlString": "http://twitter.com/lorangb"
}
],
"organizations":
[
{
"title": "CEO / Co-Founder",
"isPrimary": false,
"name": "FullContact"
}
],
"urls":
[
{
"value": "www.fullcontact.com",
"type": "other"
}
],
"name": {
"familyName": "Lorang",
"givenName": "Bart"
},
"phoneNumbers":
[
{
"value": "(XXX) XXX-XXXX",
"type": "work"
}
],
"emails":
[
{
"value": "bart@fullcontact.com",
"type": "work"
}
]
},
}]
}
HTTP/1.1 200 OK Date: Sat May 25 6:33:21 UTC 2013 Content-Type: text/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" ?>
<response>
<results>
<lastWebhookAttempt></lastWebhookAttempt>
<webhookAttempts>0</webhookAttempts>
<webhookUrl>http://link-to-webhook-server.com</webhookUrl>
<quality>LOW</quality>
<submitted>2013-02-05T20:19:19.000Z</submitted>
<vCardUrl>https://link-to-vcard.vcf</vCardUrl>
<id>xxxxxxxxxxxxx</id>
<status>PROCESSING</status>
<params>
<my-custom-param>xxxxxxx</my-custom-param>
</params>
</results>
<results>
<lastWebhookAttempt>2013-02-05T00:37:38.000Z</lastWebhookAttempt>
<webhookAttempts>1</webhookAttempts>
<webhookUrl>http://link-to-webhook-server.com</webhookUrl>
<quality>MEDIUM</quality>
<submitted>2013-02-05T00:13:19.000Z</submitted>
<vCardUrl>https://link-to-vcard.vcf</vCardUrl>
<id>xxxxxxxxxxxxx</id>
<status>CALLBACK_MADE</status>
<contact>
<photos>
<photo>
<primary>false</primary>
<value>
https://link-to-image.JPEG
</value>
<type>BusinessCard</type>
</photo>
</photos>
<accounts>
<account>
<username>lorangb</username>
<domain>twitter.com</domain>
<urlString>http://twitter.com/lorangB</urlString>
</account>
</accounts>
<organizations>
<organization>
<title>CEO / Co-Founder</title>
<isPrimary>false</isPrimary>
<name>FullContact</name>
</organization>
</organizations>
<urls>
<url>
<value>www.fullcontact.com</value>
<type>other</type>
</url>
</urls>
<name>
<familyName>Lorang</familyName>
<givenName>Bart</givenName>
</name>
<phoneNumbers>
<phoneNumber>
<value>(XXX) XXX-XXXX</value>
<type>work</type>
</phoneNumber>
</phoneNumbers>
<emails>
<email>
<value>bart@fullcontact.com</value>
<type>work</type>
</email>
</emails>
</contact>
</results>
<count>20</count>
<status>200</status>
<totalRecords>208</totalRecords>
<currentPage>0</currentPage>
<totalPages>11</totalPages>
</response>
| Status | Description |
|---|---|
| PROCESSING | The job request for the image(s) is processing. |
| CALLBACK_MADE | A successful http POST response callback has been made to the webhook URL. No further action will be completed for the job request. |
| CALLBACK_FAILED | The http POST attempt was made to the webhook URL but the recipient server did not respond or responded with error. The request will be retried up to 5 times at 1 minute retry intervals. |
| CALLBACK_MADE_NOT_PROCESSABLE | A successful http POST response callback has been made to the webhook URL. The job request could not be completed. This could be due to a number of issues such as illegible image(s), images that don't contain contact information, etc. |
| CALLBACK_FAILED_NOT_PROCESSABLE | The http POST attempt was made to the webhook URL but the recipient server did not respond or responded with error. The request will be retried up to 5 times at 1 minute retry intervals. The job request could not be completed. This could be due to a number of issues such as illegible image(s), images that don't contain contact information, etc. |