Difference between revisions of "Render Business Image"

From docs
Jump to: navigation, search
(Created page with "== Render Image == === Base URL === https://apimobile.callproof.com === Endpoint === /api/image/{document_type}/{id} === Purpose === Renders a stored image by encrypted ID....")
 
(Successful Response (200))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Render Image ==
+
== [[Mobile_API]] »Render Image ==
  
 
=== Base URL ===
 
=== Base URL ===
Line 43: Line 43:
 
==== Request Body ====
 
==== Request Body ====
 
None.
 
None.
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/image/business_card/YOUR_ENCRYPTED_ID?type=frontImage' \ --output business_card_front.jpg </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/image/business_card/YOUR_ENCRYPTED_ID?type=frontImage' \ --output business_card_front.jpg </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 15:09, 21 July 2026

Mobile_API »Render Image

Base URL

https://apimobile.callproof.com

Endpoint

/api/image/{document_type}/{id}

Purpose

Renders a stored image by encrypted ID. For business cards (`document_type` = business_card), returns a resized front or back card image as a JPEG response.

HTTP Method

GET

Headers

Header Required Description
Authorization No Not required for this endpoint

Security

  • No – This route is public (outside the authenticated API middleware group). Access depends on knowing the encrypted image ID.

Parameters

Path Parameters

Parameter Type Required Description
document_type string Yes Image category. Supported value for rendering: business_card
id string Yes Encrypted image/record identifier (Laravel-encrypted business card ID)

Query Parameters

Parameter Type Required Description
type string Conditional Required for business cards. Use frontImage for the front side or backImage for the back side

Request Body

None.

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/image/business_card/YOUR_ENCRYPTED_ID?type=frontImage' \ --output business_card_front.jpg 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/image/business_card/YOUR_ENCRYPTED_ID?type=frontImage' \ --output business_card_front.jpg 

Successful Response (200)

Returns the image binary (JPEG), not a JSON body.

Field Type Description
Content-Type header Typically image/jpeg
Body binary Resized business card image (max width 900, max height 500)

Error Responses

Status Code Meaning
404 Not Found – invalid/encrypted ID, missing business card, or image could not be rendered
  • 404 – Decryption failed, business card not found, or image path unavailable.