Skip to main content

FileStorage

This service provides functionality to manage assets and generate pdf. You can upload the assets, get the cdn link for the assets, proxy the assets and many more things.

Browse File

Browse files by fetching all files in a directory based on the provided namespace, query, and request body parameters. It determines the directory path, retrieves paginated files accordingly, and serializes the response for further processing. This method optimizes directory browsing functionality within the system.

Operations
GET
/service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/browse
# Browse files
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/browse
# Browse files for Application
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/browse
# Browse files for Application
GET

Browse files

View and navigate through available files.
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
page
integer
Optional
page no
limit
integer
Optional
Limit
Response
200
400
Success
Properties
items
array of object
Array of Properties
page
object
Properties
Examples
Parameters
namespace:
"test"
page:
1
limit:
1
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/browse
Loading...
Response
Example response not available.
GET

Browse files for Application

View and navigate through available files.
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
page
integer
Optional
page no
limit
integer
Optional
Limit
search
string
Optional
Search
Response
200
400
Success
Properties
items
array of object
Array of Properties
page
object
Properties
Examples
Parameters
namespace:
"test"
page:
1
limit:
1
search:
"test"
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/browse
Loading...
Response
Example response not available.
POST

Browse files for Application

View and navigate through available files.
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
page
integer
Optional
page no
limit
integer
Optional
Limit
search
string
Optional
Search
body
object (ExtensionSlug)
ExtensionSlug
extension_slug
string
Optional
Response
200
400
Success
Properties
items
array of object
Array of Properties
page
object
Properties
Examples
Parameters
namespace:
"test"
page:
1
limit:
1
search:
"test"
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/browse
Loading...
Response
Example response not available.

File Upload

File upload is a feature that enables users to upload files from their device to a designated storage location in the system. The process of uploading begins by validating user parameters and organizing files into different groups based on their type using something called a "namespace". This helps in storing the files into Public and Private buckets Private - The files stored in private bucket is accessible via getSignedUrl method for a temporary duration. Public - The files stored in public bucket is accessible via cdn url Seller initiate the upload process by selecting files through drag-and-drop, pre-existing images, choosing from your device, uploading via URL, or entering an image URL. 1. Start Upload - Once seller calls start upload will receive a signed URL to initiate the upload process. 2. Utilize a Google Cloud Platform (GCP) method to upload the file through the obtained signed URL. 3. Complete File upload - Important file details such as name, size, content type, and namespace are collected and linked to maintain data integrity within the system's database. Once you upload a file, you receive a message with all the details about where your file is stored, including a secure URL for uploading files to the designated storage and a CDN (Content Delivery Network) URL for future accessibility. Furthermore, the system sets an expiration time for access links(signed Url) enhancing security measures.

Operations
POST
/service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/start
# Start file upload
POST
/service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/complete
# Complete file upload
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/start
# Initiates file upload for Application
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/complete
# Complete file upload for Application
POST
/service/platform/assets/v1.0/company/{company_id}/sign-urls
# Get signed URLs
POST
/service/platform/assets/v1.0/company/{company_id}/uploads/copy
# Copy files
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/uploads/copy
# Copy files for Application
POST

Start file upload

Inititates the process of uploading a file to storage location, and returns a storage link in response at platform level. Please refer group description for more details.
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
body
object (StartRequest)
StartRequest
file_name
string
content_type
string
size
integer
tags
array of string
Optional
params
object
Optional
Response
200
400
Success. Returns a response containing relaving and absolute_url of storage service
StartResponse
file_name
string
file_path
string
content_type
string
method
string
Optional
namespace
string
operation
string
size
integer
upload
object (Upload)
Upload
cdn
object (CDN)
CDN
tags
array of string
Optional
Examples
Parameters
namespace:
"test"
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/start
Loading...
Response
Loading...
POST

Complete file upload

Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database at platform level
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
body
object (StartResponse)
StartResponse
file_name
string
file_path
string
content_type
string
method
string
Optional
namespace
string
operation
string
size
integer
upload
object (Upload)
Upload
cdn
object (CDN)
CDN
tags
array of string
Optional
Response
200
400
Success
CompleteResponse
_id
string
file_name
string
file_path
string
content_type
string
namespace
string
operation
string
company_id
number
size
integer
upload
object (Upload)
Upload
cdn
object (CDN)
CDN
success
boolean
tags
array of string
Optional
created_on
string
modified_on
string
created_by
object (CreatedBy)
Optional
CreatedBy
Examples
Parameters
namespace:
"test"
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/complete
Loading...
Response
Loading...
POST

Initiates file upload for Application

Inititates the process of uploading a file to storage location, and returns a storage link in response on platofrm at application level. Please refer group description for more details.
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
body
object (StartRequest)
StartRequest
file_name
string
content_type
string
size
integer
tags
array of string
Optional
params
object
Optional
Response
200
400
Success. Returns a response containing relaving and absolute_url of storage service
StartResponse
file_name
string
file_path
string
content_type
string
method
string
Optional
namespace
string
operation
string
size
integer
upload
object (Upload)
Upload
cdn
object (CDN)
CDN
tags
array of string
Optional
Examples
Parameters
namespace:
"test"
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/start
Loading...
Response
Loading...
POST

Complete file upload for Application

Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database on platform at application level
Parameters
namespace
string
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
body
object (StartResponse)
StartResponse
file_name
string
file_path
string
content_type
string
method
string
Optional
namespace
string
operation
string
size
integer
upload
object (Upload)
Upload
cdn
object (CDN)
CDN
tags
array of string
Optional
Response
200
400
Success
CompleteResponse
_id
string
file_name
string
file_path
string
content_type
string
namespace
string
operation
string
company_id
number
size
integer
upload
object (Upload)
Upload
cdn
object (CDN)
CDN
success
boolean
tags
array of string
Optional
created_on
string
modified_on
string
created_by
object (CreatedBy)
Optional
CreatedBy
Examples
Parameters
namespace:
"test"
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/complete
Loading...
Response
Loading...
POST

Get signed URLs

Generates secure, signed URLs that is valid for certain expiry time for accessing stored resources inside private bucket.
Parameters
body
object (SignUrlRequest)
SignUrlRequest
expiry
integer
urls
array of string
Response
200
Success
SignUrlResponse
urls
array of object (Urls)
Array of Urls
Examples
Parameters
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/sign-urls
Loading...
Response
Loading...
POST

Copy files

Handle multiple file uploads, updating progress and providing detailed status reports.
Parameters
sync
boolean
Optional
Copy files operation should run in sync mode or not
body
object (CopyFiles)
CopyFiles
urls
array of string
Optional
destination
object (DestinationNamespace)
DestinationNamespace
Response
200
400
Success
Properties
tracking_url
string
Optional
task
object
Optional
Properties
Examples
Parameters
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/uploads/copy
Loading...
Response
Example response not available.
POST

Copy files for Application

Handle multiple file uploads, updating progress and providing detailed status reports.
Parameters
sync
boolean
Optional
sync
body
object (CopyFiles)
CopyFiles
urls
array of string
Optional
destination
object (DestinationNamespace)
DestinationNamespace
Response
200
400
Success
Properties
tracking_url
string
Optional
task
object
Optional
Properties
Examples
Parameters
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/uploads/copy
Loading...
Response
Example response not available.

Invoice Templates

Invoice Templates makes it easy to create and adjust invoices, which are detailed documents that record transactions between sellers and buyers. An invoice contains important details like the invoice ID, date, product specifics, taxes, and payment information. Using JSON data and templates, users can personalize invoices to fit the requirements of different sales channels. Additionally, a seller may revert templates to their original formats if needed, offering flexibility in design. Users can preview and customize invoice layouts in various formats, such as A4, A6, and POS, ensuring compatibility with different systems and preferences. This functionality streamlines invoicing processes, ensuring accuracy and customization to meet the needs of various sales channels.

Operations
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/types
# Get PDF types
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/mapper
# Get default PDF data
PUT
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/config/{id}
# Update HTML Template
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/config
# Get html template for Application
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/config
# Save PDF template
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/default-template
# Get default PDF template
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/payment-receipt
# Generate payment receipt
GET

Get PDF types

Retrieve a list of available invoice types.
Parameters
countryCode
string
Optional
This is country_code for which data needs to be displayed on UI
Response
200
Get all the invoice types and its format
InvoiceTypesResponse
data
array of object (InvoiceTypesDataResponse)
Array of InvoiceTypesDataResponse
success
boolean
Examples
Parameters
countryCode:
"IN"
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/types
Loading...
Response
Example response not available.
GET

Get default PDF data

Retrieve default pdf payload data for invoice generation.
Parameters
pdfTypeId
integer
This is invoice unique id
countryCode
string
Optional
This is country_code for which data needs to be displayed on UI
Response
200
Get dummy json data for invoice
DummyTemplateDataItems
data
array of object (DummyTemplateData)
Array of DummyTemplateData
success
boolean
Examples
Parameters
pdfTypeId:
1
countryCode:
"IN"
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/mapper
Loading...
Response
Example response not available.
PUT

Update HTML Template

Update the HTML Template.
Parameters
id
string
This is mongo id
body
object (PdfConfig)
PdfConfig
format
string
Optional
This is invoice document format such as A4, A6, POS
Enum
template
string
Optional
This is html template string
pdf_type_id
integer
Optional
Response
200
500
Update html template for invoice
PdfConfigSaveSuccess
data
object (PdfConfigSaveSuccessData)
Optional
PdfConfigSaveSuccessData
success
boolean
Optional
Examples
Parameters
id:
"64dfd8fc8f3b8b5ae5beb72c"
body:
body
Was this section helpful?
PUT
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/config/{id}
Loading...
Response
Example response not available.
GET

Get html template for Application

Get the saved html template for provided sales channel
Parameters
pdfTypeId
integer
This is invoice unique id
format
string
This is invoice document format such as A4, A6, POS
Enum
countryCode
string
Optional
This is country_code for which data needs to be displayed on UI
Response
200
Get last saved html template for invoice
PdfConfigSuccess
data
array of object (PdfConfigSuccessData)
Optional
Array of PdfConfigSuccessData
success
boolean
Optional
Examples
Parameters
pdfTypeId:
1
format:
"A4"
countryCode:
"IN"
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/config
Loading...
Response
Example response not available.
POST

Save PDF template

Save html template for provided sales channel
Parameters
body
object (PdfConfig)
PdfConfig
format
string
Optional
This is invoice document format such as A4, A6, POS
Enum
template
string
Optional
This is html template string
pdf_type_id
integer
Optional
Response
201
500
Saved html template for invoice
PdfConfigSaveSuccess
data
object (PdfConfigSaveSuccessData)
Optional
PdfConfigSaveSuccessData
success
boolean
Optional
Examples
Parameters
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/config
Loading...
Response
Example response not available.
GET

Get default PDF template

Retrieve to get the default Invoice template.
Parameters
pdfTypeId
integer
This is invoice unique id
format
string
This is invoice document format such as A4, A6, POS
Enum
countryCode
string
Optional
This is country_code for which data needs to be displayed on UI
Response
200
Get rendered html with dummy json payload
PdfDefaultTemplateSuccess
data
array of object (Document)
Optional
Array of Document
success
boolean
Optional
Indicates if the request was successful.
Examples
Parameters
pdfTypeId:
1
format:
"A4"
countryCode:
"IN"
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/default-template
Loading...
Response
Loading...
POST

Generate payment receipt

Generate Payment Receipt for Jiomart Digital
Parameters
body
object (PaymentReceiptRequestBody)
PaymentReceiptRequestBody
payload
object (PaymentReceiptPayload)
Optional
PaymentReceiptPayload
meta
object (PaymentReceiptMeta)
Optional
PaymentReceiptMeta
Response
200
400
Kafka response published to generate payment receipt
Properties
success
boolean
Optional
Examples
Parameters
body:
body
Was this section helpful?
POST
/service/platform/assets/v1.0/company/{company_id}/application/{application_id}/pdf/payment-receipt
Loading...
Response
Loading...

Proxy

The proxy acts as an intermediary, enabling communication between two entities by directing client requests to the correct server and sending responses back to the client. It fetches data from a designated URL and delivers it to the client, ensuring seamless interaction with files. This resource can be employed to provide the client (browser) with cross-domain asset URLs, preventing CORS errors.

Operations
GET
/service/platform/assets/v1.0/company/{company_id}/proxy
# Access files through a proxy
GET

Access files through a proxy

It enables the communication between two entities by directing client requests to the correct server and sending responses back to the client. Please refer group description for more details.
Parameters
url
string
url
Response
200
Success
ProxyResponse
data
object
Optional
support
object
Optional
Examples
Parameters
url:
"https://reqres.in/api/users/2"
Was this section helpful?
GET
/service/platform/assets/v1.0/company/{company_id}/proxy
Loading...
Response
Example response not available.