API reference
Connection management
Verification and authentication
Inventory management
Discount strategy
Select an endpoint to view its request parameters, authentication
requirements, example responses, and troubleshooting information.
The connection calls run in this order, through login. A later connection call depends on the one before it.
- Connect DSA. GMEX stores the seller’s Route To URL and DSA Server URL. A saved link still comes back as
NOT_CONNECTED until the account is verified.
- Register.
POST /api/authUser/register creates the account. A 200 returns the company, the organization id, the DSA server URL, the org token, and a token. The message is Verification done successfully!
- Sign in on DSA. After the organization is connected, the DSA site sends the user id and password. GMEX returns a token and the DSA server URL. Login finishes the connection.
These calls are for a product file.
- List warehouses. Read the addresses a product file can be loaded against, when you are uploading.
- Upload inventory. Send the spreadsheet for one of those warehouses, when you have a file to load. This puts the seller’s products where they can sync.
GMEX DSA APIs use bearer-token authentication for protected endpoints.
Include the appropriate token in the Authorization request
header. The seller login token and DSA login token serve different purposes
and are not interchangeable.
Authorization: Bearer <your-token>
Replace <your-token> with the actual token. Do not include
quotation marks around the token.
| Token |
Obtained from |
Used for |
| Seller login token |
Authenticated session on seller.gmex.com |
Connect DSA |
| DSA login token |
model.token from
DSA login
|
Protected DSA endpoints, including warehouse listing and inventory upload |
- Sign in to the GMEX Seller Portal to obtain a valid seller session.
- Call Connect DSA using the seller login token.
- Complete organization verification if required.
- Sign in to DSA using the user's credentials.
- Extract
model.token from a successful DSA login response.
- Use the DSA login token for subsequent protected DSA requests.
DSA login does not require an Authorization header. Send the following
credentials in the request body.
| Name |
Location |
Type |
Required |
Example |
Description |
userid |
Body |
string |
Yes |
user@example.com |
Email address used on the DSA sign-in page. |
password |
Body |
string |
Yes |
<password> |
Password associated with the DSA user account. |
A successful login returns a DSA access token and the DSA server URL.
The values below are placeholders; use the values returned by your API.
| Field |
Type |
Description |
model.token |
string |
DSA access token used for subsequent protected requests. |
model.dsaserverURL |
string |
Base URL of the DSA API server. |
metaData.status |
number |
Application status code returned in the response body. |
metaData.message |
string |
Message describing the operation result. |
{
"model": {
"token": "<dsa-access-token>",
"dsaserverURL": "https://yourdomain.com/api/"
},
"metaData": {
"status": 200,
"message": "Successfully logged in!"
}
}
| Endpoint |
Required token |
Authorization header |
| Connect DSA |
Seller login token |
Yes |
| Verify code |
None, according to the documented request |
No |
| DSA login |
None |
No |
| Warehouse list |
DSA login token |
Yes |
| Inventory upload |
DSA login token |
Yes |
- Missing token: The request may be rejected if authentication is required.
- Invalid or expired token: Sign in again to obtain a valid token.
- Invalid credentials: Check the user ID and password. A failed login may return HTTP 400 with
model: null, according to the documented API behavior.
Saves the DSA application URL and API base URL for a seller's
organization. Call this endpoint after deploying the DSA application
and completing the required warehouse setup. A successful response
confirms that the URLs have been saved. The organization must still
complete code verification before it is connected.
POST /api/seller/dsalink
Request headers
| Header |
Value |
Meaning |
Authorization |
Bearer <token> |
Seller's access token obtained after signing in to
Seller Central.
|
Content-Type |
application/json |
Specifies that the request body uses JSON format. |
Accept |
application/json |
Indicates that the client expects a JSON response. |
Body fields
| Field |
Type |
Required |
Description |
orgId |
string |
Yes |
Unique identifier of the seller's organization. |
dsaLink |
string |
Yes |
URL of the DSA application that the seller will access. |
backenddsaLink |
string |
Yes |
Base URL of the DSA API used for subsequent DSA requests.
|
Example request
Replace the example organization ID and URLs with the values
configured for your environment.
POST /api/seller/dsalink
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/json
{
"orgId": "<your-org-id>",
"dsaLink": "https://yourdomain.com",
"backenddsaLink": "https://yourdomain.com/api/"
}
Successful response — HTTP 200
The model object contains the saved
DSA configuration, while metaData
provides the operation status and message. In this example,
dsaStatus is
NOT_CONNECTED, indicating that
code verification is still required.
model fields
| Field |
Example |
Description |
companyName |
<company-name> |
Name of the company associated with the organization. |
orgId |
<your-org-id> |
Organization identifier supplied in the request. |
dsaLink |
https://yourdomain.com |
DSA application URL saved by the API. |
backenddsaLink |
https://yourdomain.com/api/ |
DSA API base URL saved by the API. |
dsaStatus |
NOT_CONNECTED |
Indicates that the DSA configuration is saved but
verification is not yet complete.
|
orgToken |
null |
No organization token is returned in this example response. |
generatedAt |
null |
No generation timestamp is returned in this example response. |
metaData fields
| Field |
Example |
Description |
status |
200 |
Application-level status reported in the response body. |
message |
DSA Link updated successfully |
Message describing the result of the operation. |
validationResult |
null |
Validation details, when provided by the API. |
exceptionMessage |
null |
Exception details, when provided by the API. |
{
"model": {
"companyName": "<company-name>",
"orgId": "<your-org-id>",
"dsaLink": "https://yourdomain.com",
"backenddsaLink": "https://yourdomain.com/api/",
"dsaStatus": "NOT_CONNECTED",
"orgToken": null,
"generatedAt": null
},
"metaData": {
"status": 200,
"message": "DSA Link updated successfully",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
The fields recordsTotal,
fullRecordsTotal,
recordsFiltered,
unreadCount,
totalPages, and
totalElements are included in the
response structure but are not used by this endpoint's operation.
Error handling:
If the request fails, inspect the HTTP status and the response fields
metaData.message,
metaData.exceptionMessage, and
metaData.validationResult.
Include the status and response body when contacting
support.
Verifies the seller's organization using the verification code
provided by the admin. After the seller connects the DSA, the code
is sent to the admin. The seller must obtain the code from the admin
and enter it on the Verify and Create Your Account
screen. Successful verification allows the seller to proceed with
account creation.
PUT /api/authUser/verifyOrg
This endpoint does not require a bearer token, based on the current integration flow.
Body fields
| Field |
Type |
Required |
Description |
organizationId |
string |
Yes |
Unique identifier of the organization. Use the same value
supplied as orgId in the
Connect DSA request.
|
otp |
string |
Yes |
The six-digit verification code provided by the admin.
|
Example request
PUT /api/authUser/verifyOrg
Content-Type: application/json
Accept: application/json
{
"organizationId": "<your-org-id>",
"otp": "<6-digit-verification-code>"
}
Successful response
A successful verification allows the seller to proceed with account
creation. The exact response body and response fields have not been
provided, so they are not documented here.
Error handling
If verification fails, check that the organization ID is correct
and that the verification code matches the code provided by the
admin. Use the actual HTTP status and API response message to
diagnose other errors.
Use this API to verify whether the authentication token is valid on the
DSA server. A successful request returns HTTP 200 OK
with the message
Auth token verified successfully!.
The model field is
null because this endpoint does not return
any additional data.
POST /api/authUser/verifyAuthToken
Successful Response — HTTP 200 OK
Response: model
The model field is
null. This endpoint only verifies the
authentication token; it does not return company details, a token, or a
link.
Response: metaData
The metaData object contains the verification
status, a descriptive message, and additional response fields.
| Field |
Example Value |
Description |
status |
200 |
The status code returned in the response body. A value of 200 indicates successful verification. |
message |
Auth token verified successfully! |
A message confirming that the authentication token was verified successfully. |
validationResult |
null |
Contains validation details when applicable. It is null in this successful response. |
exceptionMessage |
null |
Contains exception details when applicable. It is null in this successful response. |
{
"model": null,
"metaData": {
"status": 200,
"message": "Auth token verified successfully!",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Additional fields:
recordsTotal,
fullRecordsTotal,
recordsFiltered, and
unreadCount are null in this response.
totalPages and
totalElements are both 0.
These fields are not relevant to token verification.
Use this API to complete DSA account registration after the organization
has been verified. A successful request returns HTTP 200 OK
with the message Verification done successfully!.
The model object contains the company name,
organization ID, DSA server URL, organization token, and user authentication token.
POST /api/authUser/register
The account details are sample values.
Successful Response — HTTP 200 OK
model fields
| Field |
Example |
Description |
CompanyName |
prtsc |
The name of the registered company. |
OrganizationId |
17439848 |
The unique identifier of the connected organization. |
DSABackednURL |
https://yourdomain.com/api/ |
The DSA server URL saved during the connection process. The field name is returned exactly as provided by the API. |
OrgToken |
<organization-token> |
The organization token associated with the account. Keep this value confidential. |
token |
<authentication-token> |
The authentication token issued after successful registration. Keep this value confidential. |
metaData fields
| Field |
Example |
Description |
status |
200 |
The status code included in the response body. A value of 200 indicates success. |
message |
Verification done successfully! |
A message confirming that verification was completed successfully. |
validationResult |
null |
Contains validation details when applicable. It is null in this successful response. |
exceptionMessage |
null |
Contains exception details when applicable. It is null in this successful response. |
{
"model": {
"CompanyName": "prtsc",
"OrganizationId": "17439848",
"DSABackednURL": "https://yourdomain.com/api/",
"OrgToken": "<organization-token>",
"token": "<authentication-token>"
},
"metaData": {
"status": 200,
"message": "Verification done successfully!",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Additional fields:
recordsTotal,
fullRecordsTotal,
recordsFiltered, and
unreadCount are null.
totalPages and
totalElements are 0.
These fields are not used by this endpoint.
Use this API to retrieve the profile of the currently authenticated user
from the DSA server. A successful request returns HTTP 200 OK
with the user's profile details in the model
object.
In the example response, metaData.message
is null, while
metaData.exceptionMessage contains
User details fetched.
GET /api/userprofile
This endpoint does not require a request body.
Successful Response — HTTP 200 OK
model fields
| Field |
Example |
Description |
id |
40 |
The unique identifier of the user. |
name |
sayali |
The user's display name. |
email |
<user-email> |
The email address associated with the user account. |
companyName |
prtsc |
The name of the company associated with the user. |
orgId |
17439848 |
The identifier of the associated organization. |
activeStatus |
true |
Indicates whether the user account is active. A value of true means the account is active. |
metaData fields
| Field |
Example |
Description |
status |
200 |
The status code included in the response body. A value of 200 indicates success. |
message |
null |
The response message. It is null in this example. |
validationResult |
null |
Contains validation details when applicable. It is null in this successful response. |
exceptionMessage |
User details fetched |
Contains the profile retrieval message in this response. |
{
"model": {
"id": 40,
"name": "sayali",
"email": "<user-email>",
"companyName": "prtsc",
"orgId": "17439848",
"activeStatus": true
},
"metaData": {
"status": 200,
"message": null,
"validationResult": null,
"exceptionMessage": "User details fetched",
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Additional fields:
recordsTotal,
fullRecordsTotal,
recordsFiltered, and
unreadCount are null.
totalPages and
totalElements are 0.
These fields are not used by this endpoint.
Use this API to authenticate a user on the DSA website after the
organization has been connected to GMEX. The DSA website sends the
user's login credentials to GMEX for authentication.
A successful request returns HTTP 200 OK, along with
an authentication token and the DSA server URL. This endpoint does not
require a bearer token in the request.
POST /api/seller/dsalogin
Request headers
| Header |
Value |
Description |
Content-Type |
application/json |
Specifies that the request body is formatted as JSON. |
Accept |
application/json |
Indicates that the client expects a JSON response. |
Origin |
https://yourdomain.com |
Identifies the DSA website sending the request. Replace the example origin with the configured DSA website address for your environment. |
Request body fields
| Field |
Type |
Required |
Description |
userid |
String |
Yes |
The user's email address entered on the DSA login page. |
password |
String |
Yes |
The user's login password. Never expose real passwords in documentation or logs. |
Example request
POST /api/seller/dsalogin
Content-Type: application/json
Accept: application/json
Origin: https://yourdomain.com
{
"userid": "<user-email>",
"password": "<password>"
}
Successful Response — HTTP 200 OK
The model object contains the authentication
token and the DSA API base URL. Use the returned URL for subsequent DSA API
requests, and include the token in the Authorization header for endpoints
that require bearer authentication.
model fields
| Field |
Example |
Description |
token |
<authentication-token> |
The authentication token issued after successful login. Send it as Authorization: Bearer <token> when calling endpoints that require bearer authentication. |
dsaserverURL |
https://yourdomain.com/api/ |
The base URL of the DSA API associated with the connected organization. |
metaData fields
| Field |
Example |
Description |
status |
200 |
The status code included in the response body. A value of 200 indicates a successful login. |
message |
Successfully logged in! |
A message confirming successful authentication. |
validationResult |
null |
Contains validation errors when applicable. It is null in this successful response. |
exceptionMessage |
null |
Contains exception details when applicable. It is null in this successful response. |
recordsTotal |
null |
Not used by this endpoint. |
fullRecordsTotal |
null |
Not used by this endpoint. |
recordsFiltered |
null |
Not used by this endpoint. |
unreadCount |
null |
Not used by this endpoint. |
totalPages |
0 |
Not used by this endpoint. The example response returns 0. |
totalElements |
0 |
Not used by this endpoint. The example response returns 0. |
{
"model": {
"token": "<authentication-token>",
"dsaserverURL": "https://yourdomain.com/api/"
},
"metaData": {
"status": 200,
"message": "Successfully logged in!",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Error Response — HTTP 400 Bad Request
If the supplied email address is not registered in the system, the API
returns HTTP 400 Bad Request. In this case,
model is null,
and no authentication token or DSA server URL is returned. The
validationResult array contains the reason
for the failure in its errorMessage field.
Handling the error response
| Field |
Example |
Description |
model |
null |
No authentication token or DSA server URL is returned. Do not treat the user as signed in. |
metaData.status |
400 |
Indicates that the login request was rejected. |
metaData.message |
null |
The response message is null in this example. Check the validation errors for details. |
validationResult |
Array |
Contains the validation errors associated with the failed request. |
validationResult[].errorMessage |
This email was not found in system |
Explains why the login request failed. Display an appropriate message to the user. |
exceptionMessage |
null |
It is null in this example. The failure reason is provided in the validation result. |
{
"model": null,
"metaData": {
"status": 400,
"message": null,
"validationResult": [
{
"errorMessage": "This email was not found in system"
}
],
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Implementation note: Check the HTTP status and available
error details when handling failed login requests. Do not assume that all
errors will return the same response structure.
Use this API to retrieve the warehouse addresses associated with the
authenticated seller. Select a warehouse from the returned list when
uploading an inventory file. This endpoint does not require a request body.
GET /api/inventory/addresses
Request Parameters
This endpoint does not require query parameters, path parameters, or a
request body. Include the authentication token in the request headers.
| Name |
Location |
Type |
Required |
Example |
Description |
Authorization |
Header |
String |
Yes |
Bearer <token> |
The authentication token returned by the DSA login API. Replace the placeholder with a valid token. |
Accept |
Header |
String |
No |
*/* |
Specifies the response formats accepted by the client. |
Example cURL Request
curl -X GET \
'/api/inventory/addresses' \
-H 'Accept: */*' \
-H 'Authorization: Bearer <token>'
Responses
| HTTP Status |
Description |
| 200 OK |
The request succeeded. The response contains the warehouse list in model and response details in metaData. |
model Fields
The model field is an array in which each
object represents a warehouse associated with the seller.
| Field |
Type |
Example |
Description |
id |
Number |
1 |
The unique identifier of the warehouse. |
warehouseName |
String |
Main warehouse |
The name displayed when selecting a warehouse. |
city |
String |
City |
The city where the warehouse is located. |
state |
String |
State |
The state or province where the warehouse is located. |
country |
String |
Country |
The country where the warehouse is located. |
zipCode |
String |
00000 |
The postal or ZIP code of the warehouse. |
provinceCode |
String |
ST |
The short code representing the state or province. |
warehouseNumber |
String |
10000000 |
The warehouse reference number. |
primary |
Boolean |
true |
Indicates whether the warehouse is marked as the primary warehouse. |
metaData Fields
| Field |
Type |
Example |
Description |
status |
Number |
200 |
The status code included in the response body. A value of 200 indicates success. |
message |
String |
Warehouses fetched successfully |
A message confirming that the warehouse list was retrieved. |
validationResult |
Array or null |
null |
Contains validation details when applicable. It is null in this successful response. |
exceptionMessage |
String or null |
null |
Contains exception details when applicable. It is null in this successful response. |
recordsTotal |
Number or null |
null |
Not used by this endpoint in the example response. |
fullRecordsTotal |
Number or null |
null |
Not used by this endpoint in the example response. |
recordsFiltered |
Number or null |
null |
Not used by this endpoint in the example response. |
unreadCount |
Number or null |
null |
Not used by this endpoint in the example response. |
totalPages |
Number |
0 |
The example response returns 0. Pagination is not used in this response. |
totalElements |
Number |
0 |
The example response returns 0. The warehouse records are provided in model. |
Example Successful Response — HTTP 200 OK
The following is a sample response for reference. Actual warehouse details
and identifiers depend on the authenticated seller's account.
{
"model": [
{
"id": 1,
"warehouseName": "Main warehouse",
"city": "City",
"state": "State",
"country": "Country",
"zipCode": "00000",
"provinceCode": "ST",
"warehouseNumber": "10000000",
"primary": true
}
],
"metaData": {
"status": 200,
"message": "Warehouses fetched successfully",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Use this API to upload an inventory file to the DSA server. Retrieve the
available warehouses first and select the appropriate warehouse if required
by your inventory workflow. The supported file formats specified for this
integration are .csv and .xlsx.
POST /api/inventory/upload
Include a valid authentication token in the request headers.
Request Details
Inventory uploads typically use multipart/form-data
when sending a file. Confirm the request format and required fields against
the API implementation before sending the request.
Request Body Fields
| Field |
Type |
Required |
Description |
file |
File |
Yes |
The inventory spreadsheet to upload. Supported formats are CSV and XLSX, subject to the server's validation rules. |
Example Request
curl -X POST \
'/api/inventory/upload' \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/json' \
-F 'file=@Product_Inventory_List.xlsx'
Replace <token> with a valid
authentication token. The file must exist at the specified local path.
When using cURL's -F option, cURL sets the
multipart content type automatically.
Response
The response indicates whether the inventory upload was processed
successfully. The exact response fields and error details depend on the
server's implementation. Add the actual successful and failed response
examples here once they have been verified.
Retrieves inventory records for the configured DSA organization.
Supports pagination through the request body and returns inventory
details along with pagination metadata.
POST /api/inventory/Browse
Request headers
| Header |
Value |
Description |
Authorization |
Bearer <access-token> |
Access token required to authorize the inventory request.
|
Content-Type |
application/json |
Specifies that the request body is JSON. |
Accept |
*/* |
Accepts any response media type, as shown in the API example. |
Body fields
| Field |
Type |
Required |
Description |
currentPage |
integer |
Yes |
Page number to retrieve. The example uses
1.
|
rowsPerPage |
integer |
Yes |
Maximum number of inventory records requested per page.
The example uses 10.
|
Example request
POST /api/inventory/Browse
Authorization: Bearer <access-token>
Content-Type: application/json
Accept: */*
{
"currentPage": 1,
"rowsPerPage": 10
}
cURL example
curl -X POST \
'/api/inventory/Browse' \
-H 'Accept: */*' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
-d '{
"currentPage": 1,
"rowsPerPage": 10
}'
Successful response — HTTP 200
The model array contains the inventory
records returned for the requested page. The
metaData object provides the result
message and pagination counts.
{
"model": [
{
"id": 44,
"productCode": "7533939",
"productName": null,
"itemDescription": "3-1/2 600 RF WN FLG STD A105N",
"gmexPartNumber": null,
"gmexDescription": null,
"availableStock": 400,
"pricePerUom": 22,
"price_per_uom": "FT",
"stock_per_uom": "EA",
"warehouseNumber": "30701215",
"countryOrigin": "USA",
"syncStatus": "PENDING",
"createdAt": "2026-10-09T08:00:50.402653",
"updatedAt": "2026-10-12T07:01:48.208459"
}
],
"metaData": {
"status": 200,
"message": "Inventory fetched successfully",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": 9,
"fullRecordsTotal": null,
"recordsFiltered": 9,
"unreadCount": null,
"totalPages": 1,
"totalElements": 9
}
}
The response above shows one representative inventory record.
The actual response can contain multiple records, depending on
the requested page and available inventory.
model fields
| Field |
Type / Example |
Description |
id |
integer — 44 |
Unique identifier of the inventory record. |
productCode |
string — "7533939" |
Product code assigned to the inventory item. |
productName |
string / null |
Product name, when available. |
itemDescription |
string |
Description of the inventory item. |
gmexPartNumber |
string / null |
GMEX part number, when available. |
gmexDescription |
string / null |
GMEX product description, when available. |
availableStock |
number — 400 |
Quantity of stock available for the item. |
pricePerUom |
number — 22 |
Price value returned for the inventory item. |
price_per_uom |
string — "FT" |
Unit-related value returned under this field name. |
stock_per_uom |
string — "EA" |
Stock unit of measure returned by the API. |
warehouseNumber |
string |
Identifier of the warehouse associated with the item. |
countryOrigin |
string |
Country-of-origin value returned for the item. |
syncStatus |
string — "PENDING" |
Inventory synchronization status. |
createdAt |
datetime string |
Date and time when the record was created. |
updatedAt |
datetime string |
Date and time when the record was last updated. |
metaData fields
| Field |
Example |
Description |
status |
200 |
Status code reported in the response body. |
message |
Inventory fetched successfully |
Message describing the operation result. |
validationResult |
null |
Validation details, when provided by the API. |
exceptionMessage |
null |
Exception details, when provided by the API. |
recordsTotal |
9 |
Total record count reported by the API. |
fullRecordsTotal |
null |
Additional total-record count field returned by the API. |
recordsFiltered |
9 |
Number of records reported after filtering. |
unreadCount |
null |
Additional count field returned by the API. |
totalPages |
1 |
Total number of pages reported by the API. |
totalElements |
9 |
Total number of elements reported by the API. |
Error handling
If the request fails, check the HTTP status, access token, request
body, and DSA server URL. Inspect
metaData.message,
metaData.validationResult, and
metaData.exceptionMessage when these
fields are returned. Include the response details when contacting
support.
Updates an existing inventory record using the supplied product,
stock, pricing, and warehouse details.
PUT /api/inventory
Include the auth token in the Authorization header.
Request headers
| Header |
Required |
Description |
Authorization |
Yes |
Bearer token for authentication. |
Content-Type |
Yes |
application/json |
Accept |
No |
*/* |
Request body
Send the inventory record as a JSON object.
| Field |
Type |
Description |
id |
Number |
ID of the inventory record to update. |
productCode |
String |
Product code. |
productName |
String |
Product name. |
productDescription |
String |
Description of the product. |
availableStock |
Number |
Available stock quantity. |
stock_uom |
String |
Unit of measure for stock, for example EA. |
countryOfOrigin |
String |
Country where the product originates. |
price |
Number |
Product price. |
price_uom |
String |
Unit of measure associated with the price, for example FT. |
warehouseNumber |
String |
Warehouse identifier associated with the inventory. |
Example request
{
"id": 0,
"productCode": "string",
"productName": "string",
"productDescription": "string",
"availableStock": 0,
"stock_uom": "EA",
"countryOfOrigin": "string",
"price": 0,
"price_uom": "FT",
"warehouseNumber": "string"
}
cURL example
curl -X PUT \
'/api/inventory' \
-H 'accept: */*' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": 0,
"productCode": "string",
"productName": "string",
"productDescription": "string",
"availableStock": 0,
"stock_uom": "EA",
"countryOfOrigin": "string",
"price": 0,
"price_uom": "FT",
"warehouseNumber": "string"
}'
Response — HTTP 200
Refer to the response body for the operation status, message,
and any validation or exception details.
{
"model": {},
"metaData": {
"status": 0,
"message": "string",
"validationResult": [
{
"errorMessage": "string"
}
],
"exceptionMessage": "string",
"recordsTotal": 0,
"fullRecordsTotal": 0,
"recordsFiltered": 0,
"unreadCount": 0,
"totalPages": 0,
"totalElements": 0
}
}
Error handling
If the update fails, check the HTTP status and any validation
or exception details returned by the API.
Need help? Visit
support.
Deletes the inventory record associated with the specified ID.
DELETE /api/inventory/{id}
Include the auth token in the Authorization header.
Request headers
| Header |
Required |
Description |
Authorization |
Yes |
Bearer token for authentication. |
Accept |
No |
*/* |
Path parameters
| Parameter |
Type |
Required |
Description |
id |
Integer |
Yes |
Unique ID of the inventory record to delete. |
Example request
DELETE /api/inventory/123
cURL example
curl -X DELETE \
'/api/inventory/123' \
-H 'accept: */*' \
-H 'Authorization: Bearer <access-token>'
Response — HTTP 200
Refer to the response body for the operation status, message,
and any validation or exception details.
{
"model": {},
"metaData": {
"status": 0,
"message": "string",
"validationResult": [
{
"errorMessage": "string"
}
],
"exceptionMessage": "string",
"recordsTotal": 0,
"fullRecordsTotal": 0,
"recordsFiltered": 0,
"unreadCount": 0,
"totalPages": 0,
"totalElements": 0
}
}
Error handling
If the deletion fails, check the HTTP status and any validation
or exception details returned by the API. Confirm the inventory ID
before submitting the request.
Need help? Visit
support.
Retrieves discount records based on the specified discount type.
The response includes discount details, associated user information,
and pagination metadata.
POST /api/discount/browse/{type}
The example below uses
customer as the discount type.
Path parameters
| Parameter |
Type |
Required |
Description |
type |
string |
Yes |
Discount category used to retrieve the relevant records.
The provided example uses customer.
|
Request headers
| Header |
Value |
Description |
Authorization |
Bearer <access-token> |
Access token used to authorize the request. |
Content-Type |
application/json |
Specifies that the request body is JSON. |
Accept |
*/* |
Accepts any response media type, as shown in the API example. |
Request body
The request body specifies the pagination settings for the discount
records.
| Field |
Type |
Required |
Description |
currentPage |
integer |
Yes |
Page number to retrieve. The example uses 1. |
rowsPerPage |
integer |
Yes |
Maximum number of records requested per page. The example uses 10. |
Example request
POST /api/discount/browse/customer
Authorization: Bearer <access-token>
Content-Type: application/json
Accept: */*
{
"currentPage": 1,
"rowsPerPage": 10
}
cURL example
curl -X POST \
'/api/discount/browse/customer' \
-H 'Accept: */*' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
-d '{
"currentPage": 1,
"rowsPerPage": 10
}'
Successful response — HTTP 200
The model array contains the matching
discount records. Each record includes discount settings, status,
customer information, and the associated user details.
The metaData object provides the
operation status and record counts.
{
"model": [
{
"id": 3,
"category": "Customer",
"percentage": 10,
"minWeight": 0,
"maxWeight": 0,
"custName": "<customer-name>",
"isDeleted": false,
"status": "Active",
"userId": {
"id": 37,
"name": "<user-name>",
"email": "<user-email>",
"activeStatus": true,
"createdDate": "2026-10-07T08:19:28.963+00:00",
"modifiedDate": "2026-10-07T08:19:28.963+00:00"
},
"createdDate": "2026-10-13T10:03:56.294+00:00",
"modifiedDate": "2026-10-13T10:03:56.294+00:00"
}
],
"metaData": {
"status": 200,
"message": "Discounts fetched successfully",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": 3,
"fullRecordsTotal": null,
"recordsFiltered": 3,
"unreadCount": null,
"totalPages": 1,
"totalElements": 0
}
}
model fields
| Field |
Example |
Description |
id |
3 |
Unique identifier of the discount record. |
category |
Customer |
Category associated with the discount. |
percentage |
10 |
Discount percentage configured for the record. |
minWeight |
0 |
Minimum weight value associated with the discount. |
maxWeight |
0 |
Maximum weight value associated with the discount. |
custName |
Customer name |
Name associated with the customer discount. |
isDeleted |
false |
Indicates whether the discount record is marked as deleted. |
status |
Active |
Status of the discount record. |
userId |
object |
Details of the user associated with the discount. |
createdDate |
datetime string |
Date and time when the discount was created. |
modifiedDate |
datetime string |
Date and time when the discount was last modified. |
userId object fields
| Field |
Example |
Description |
id |
37 |
Unique identifier of the associated user. |
name |
User name |
Name of the associated user. |
email |
User email |
Email address of the associated user. |
activeStatus |
true |
Indicates whether the associated user is active. |
createdDate |
datetime string |
Date and time when the user record was created. |
modifiedDate |
datetime string |
Date and time when the user record was last modified. |
metaData fields
| Field |
Example |
Description |
status |
200 |
Status code reported in the response body. |
message |
Discounts fetched successfully |
Message describing the operation result. |
validationResult |
null |
Validation details, when provided by the API. |
exceptionMessage |
null |
Exception details, when provided by the API. |
recordsTotal |
3 |
Total record count reported by the API. |
fullRecordsTotal |
null |
Additional total-record count field. |
recordsFiltered |
3 |
Number of records reported after filtering. |
unreadCount |
null |
Additional count field returned by the API. |
totalPages |
1 |
Total number of pages reported by the API. |
totalElements |
0 |
Total element count reported by the API. |
Error handling
If the request fails, verify the discount type, access token,
request body, and DSA server URL. Inspect
metaData.message,
metaData.validationResult, and
metaData.exceptionMessage when
returned by the API. Include the HTTP status and response body
when contacting
support.
Updates an existing discount using the supplied discount ID and
configuration details. A successful request returns a confirmation
message in metaData.message.
PUT /api/discount
Include the auth token in the Authorization header.
Request headers
| Header |
Required |
Description |
Authorization |
Yes |
Bearer token for authentication. |
Content-Type |
Yes |
application/json |
Accept |
No |
*/* |
Request body
Send the discount details as a JSON object.
| Field |
Type |
Description |
id |
Number |
ID of the discount to update. |
category |
String |
Discount category, such as Customer. |
customerName |
String |
Customer name associated with the discount. |
productName |
String |
Product name associated with the discount. |
minWeight |
Number |
Minimum weight for the discount configuration. |
maxWeight |
Number |
Maximum weight for the discount configuration. |
status |
Boolean |
Discount status; the example uses false. |
discount |
Number |
Discount value. |
Example request
{
"id": 3,
"category": "Customer",
"customerName": "dc",
"productName": "string",
"minWeight": 0,
"maxWeight": 0,
"status": false,
"discount": 0
}
cURL example
curl -X PUT \
'/api/discount' \
-H 'accept: */*' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": 3,
"category": "Customer",
"customerName": "dc",
"productName": "string",
"minWeight": 0,
"maxWeight": 0,
"status": false,
"discount": 0
}'
Successful response — HTTP 200
{
"model": null,
"metaData": {
"status": 200,
"message": "Discount updated successfully!",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Response fields
| Field |
Description |
model |
null for the supplied successful response. |
metaData.status |
Response status code; 200 indicates success. |
metaData.message |
Confirmation message for the discount update. |
metaData.validationResult |
Validation details, or null in the example. |
metaData.exceptionMessage |
Exception details, or null in the example. |
metaData.totalPages |
Total pages reported by the response. |
metaData.totalElements |
Total elements reported by the response. |
Error handling
If the request fails, check the HTTP status code and the response's
metaData fields for available validation or exception details.
The supplied example documents the successful 200 response only.
Need help? Visit
support.
Deletes the discount configuration associated with the specified ID.
A successful request returns a confirmation message in
metaData.message.
DELETE /api/discount/deleteDiscount/{id}
Include the auth token in the Authorization header.
Request headers
| Header |
Required |
Description |
Authorization |
Yes |
Bearer token for authentication. |
Accept |
No |
*/* |
Path parameters
| Parameter |
Type |
Required |
Description |
id |
Integer |
Yes |
Unique ID of the discount to delete. |
Example request
DELETE /api/discount/deleteDiscount/3
cURL example
curl -X DELETE \
'/api/discount/deleteDiscount/3' \
-H 'accept: */*' \
-H 'Authorization: Bearer <access-token>'
Successful response — HTTP 200
{
"model": null,
"metaData": {
"status": 200,
"message": "Discount deleted successfully",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Response fields
| Field |
Description |
model |
null in the successful response. |
metaData.status |
Response status code; 200 indicates success. |
metaData.message |
Confirmation message indicating that the discount was deleted. |
metaData.validationResult |
Validation details, or null in the example. |
metaData.exceptionMessage |
Exception details, or null in the example. |
metaData.recordsTotal |
Total record count, or null in the example. |
metaData.totalPages |
Total pages reported by the response. |
metaData.totalElements |
Total elements reported by the response. |
Error handling
If the request fails, check the HTTP status code and any available
validation or exception details in the response. The supplied example
documents the successful 200 response only.
Need help? Visit
support.
Retrieves discount details for a specific discount ID. A successful
request returns the discount record in model
and a confirmation message in metaData.message.
GET /api/discount/getDiscountById/{id}
Include the auth token in the Authorization header.
Path parameters
| Parameter |
Type |
Required |
Description |
id |
Integer |
Yes |
Unique ID of the discount record. |
Request headers
| Header |
Required |
Description |
Authorization |
Yes |
Bearer token for authentication. |
Accept |
No |
application/json |
Example request
GET /api/discount/getDiscountById/2
cURL example
curl -X GET \
'/api/discount/getDiscountById/2' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <access-token>'
Successful response — HTTP 200
{
"model": {
"id": 2,
"category": "Customer",
"customerName": "reco",
"status": false,
"discount": 5
},
"metaData": {
"status": 200,
"message": "Discount get successfully!",
"validationResult": null,
"exceptionMessage": null,
"recordsTotal": null,
"fullRecordsTotal": null,
"recordsFiltered": null,
"unreadCount": null,
"totalPages": 0,
"totalElements": 0
}
}
Response fields
| Field |
Type |
Description |
model.id |
Integer |
Unique discount ID. |
model.category |
String |
Discount category. |
model.customerName |
String |
Name of the customer associated with the discount. |
model.status |
Boolean |
Discount status. The example uses false. |
model.discount |
Number |
Discount value. |
metaData.status |
Integer |
Response status code; 200 indicates success. |
metaData.message |
String |
Confirmation message for the discount lookup. |
metaData.validationResult |
Array or null |
Validation errors, or null in the example. |
metaData.exceptionMessage |
String or null |
Exception details, or null in the example. |
Response headers
| Header |
Value |
Content-Type |
application/json |
Cache-Control |
no-cache, no-store |
Notes
- A valid discount ID must be provided in the URL path.
- Include a valid Bearer access token in the Authorization header.
- The example response returns the discount record with ID
2.
Error handling
If the request fails, check the HTTP status code and the response's
metaData fields for available validation or
exception details. The supplied example documents the successful 200
response only.
Need help? Visit
support.