API¶
The Gem Logic API lets you integrate with external systems and automate workflows. You can use it to manage products, sales, contacts, repairs, inventory counts, and print jobs programmatically.
Navigate to to create and manage your API keys.
Authentication¶
All API requests must include an API key in the x-api-key HTTP header. You can create keys
from the page. Keys can be deactivated or deleted at any time.
Example request:
curl -X GET https://your-instance.gem-logic.com/api/marketplaces/ \
-H "x-api-key: YOUR_API_KEY"
Danger
Keep your API keys secret. Never share them in public repositories or client-side code. If a key is compromised, deactivate it immediately and create a new one.
Base URL¶
All endpoints are relative to your instance URL, under the /api/ prefix:
https://your-instance.gem-logic.com/api/
Response format¶
All responses are returned as JSON. Successful requests return a 200 (for GET) or 201
(for POST) status code. Errors return the appropriate status code with a message:
200 OK — successful GET request
201 Created — successful POST request
400 Bad Request — invalid or missing data
401 Unauthorized — invalid or missing API key
404 Not Found — resource does not exist
Endpoints¶
Marketplaces¶
Method |
|
|---|---|
URL |
|
Description |
Returns a list of all sales channels. |
Response fields:
Field |
Type |
Description |
|---|---|---|
|
integer |
Unique identifier |
|
string |
Marketplace name |
Products¶
List products
Method |
|
|---|---|
URL |
|
Description |
Returns products filtered by marketplace. Use the marketplace ID from the marketplaces endpoint. |
Response fields:
Field |
Type |
Description |
|---|---|---|
|
integer |
Unique identifier |
|
string |
Product SKU |
|
datetime |
Creation date |
|
string |
Product status |
|
array |
List of product images ( |
|
decimal |
Weight |
|
decimal |
Height |
|
decimal |
Length |
|
decimal |
Width |
Create product image
Method |
|
|---|---|
URL |
|
Description |
Upload a product image using base64 encoding. If the product SKU does not exist yet, a new product is created automatically. |
Request fields:
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Product SKU to attach the image to |
|
string (base64) |
Yes |
Base64-encoded image data |
Sales¶
List sales
Method |
|
|---|---|
URL |
|
Description |
Returns a list of all sale orders. |
Response fields:
Field |
Type |
Description |
|---|---|---|
|
string |
Unique order identifier |
Create sale
Method |
|
|---|---|
URL |
|
Description |
Creates a new sale order. |
Contacts¶
Method |
|
|---|---|
URL |
|
Description |
Returns a list of all contacts. |
Response fields:
Field |
Type |
Description |
|---|---|---|
|
integer |
Unique identifier |
|
string |
Full name |
|
string |
Type of contact |
|
string |
Email address |
|
string |
Phone number |
|
string |
Preferred language |
Repairs¶
Create repair
Method |
|
|---|---|
URL |
|
Description |
Creates a new repair order with an associated repair item. If marketplace or division is not provided, the first available one is used. |
Request fields:
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
ID of the client/contact |
|
string / integer |
No |
Marketplace ID or name |
|
integer |
No |
Business division ID |
|
string |
No |
Title or description of the repair item |
|
string |
No |
Additional repair comment |
|
string |
No |
Additional repair comment |
|
string |
No |
Additional repair comment |
|
decimal |
No |
Quantity (default: 1) |
|
decimal |
No |
Item weight |
|
string |
No |
Unit of weight measurement |
|
string |
No |
Item size |
|
string |
No |
Item color |
|
string |
No |
Engravement text |
|
No |
Client’s reference number |
|
Example response:
{"message": "Repair created successfully.", "order_id": "R-0001"}
Add item to repair
Method |
|
|---|---|
URL |
|
Description |
Adds a new item to an existing repair order. |
Request fields:
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Order ID of the repair to add the item to |
|
string |
No |
Product SKU to link with the item |
|
string |
No |
Title or description |
|
string |
No |
Additional repair comment |
|
string |
No |
Additional repair comment |
|
string |
No |
Additional repair comment |
|
decimal |
No |
Quantity (default: 1) |
|
decimal |
No |
Item weight |
|
string |
No |
Unit of weight measurement |
|
string |
No |
Item size |
|
string |
No |
Item color |
|
string |
No |
Engravement text |
|
No |
Client’s reference number |
|
|
decimal |
No |
Cost of the item |
Inventory counts¶
Create inventory count
Method |
|
|---|---|
URL |
|
Description |
Creates a new inventory count session. |
Response fields:
Field |
Type |
Description |
|---|---|---|
|
string |
Inventory count ID |
|
datetime |
Creation timestamp |
|
string |
Always |
|
integer |
Number of counted products |
List inventory count products
Method |
|
|---|---|
URL |
|
Description |
Returns all products counted in a specific inventory count. |
Response fields:
Field |
Type |
Description |
|---|---|---|
|
string |
Unique identifier |
|
datetime |
When the product was counted |
|
string |
Product SKU |
|
string |
Product name |
|
integer |
Counted quantity |
Print jobs¶
Method |
|
|---|---|
URL |
|
Description |
Upload a PDF file to the print queue for a specific printer. The file is validated for format
and security. Maximum file size is 20 MB. Use |
Request fields:
Field |
Type |
Required |
Description |
|---|---|---|---|
|
file |
Yes |
PDF file to print (max 20 MB) |
|
UUID |
Yes |
UUID of the target printer |
|
boolean |
No |
Print in landscape mode (default: false) |
Example request:
curl -X POST https://your-instance.gem-logic.com/api/print-pdf/ \
-H "x-api-key: YOUR_API_KEY" \
-F "pdf=@document.pdf" \
-F "printer_uuid=YOUR_PRINTER_UUID"
Example response:
{"status": "queued", "print_job_id": 42}
Interactive API explorer¶
Gem Logic includes a built-in interactive API explorer powered by Swagger UI. You can access it from the API documentation link on the page. The explorer lets you try out each endpoint directly from your browser.
See also