Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Authentication
Log in a user.
This endpoint allows a user to log in by providing their email and password. If the credentials are correct, it returns an access token and user information.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"smartwrap.admin@gmail.com\",
\"password\": \"smartwrap@admin2610\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "smartwrap.admin@gmail.com",
"password": "smartwrap@admin2610"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "User is logged in successfully.",
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"user": {
"id": 1,
"name": "John Doe",
"email": "user@example.com",
...
}
}
}
Example response (401):
{
"status": "failed",
"message": "Invalid credentials"
}
Example response (403):
{
"status": "failed",
"message": "Validation Error!",
"data": {
"email": [
"The email field is required."
],
"password": [
"The password field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Log out the authenticated user.
requires authentication
This endpoint logs out the authenticated user by revoking all their tokens.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "User is logged out successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bank Management
Get a list of all banks.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/banks" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/banks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"banks": [
{
"id": 1,
"bank_name": "Bank of America",
"bank_address": "123 Main St, New York, NY",
"account_name": "John Doe",
"account_no": "1234567890",
"ifsc_code": "BOFAUS3N",
"swift_code": "BOFAUS3NXXX",
"bank_ad_code_no": "AD12345678",
"iban_no": "GB82WEST12345698765432"
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created bank in the database.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/banks" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_name\": \"Bank of America\",
\"bank_address\": \"123 Main St, New York, NY\",
\"account_name\": \"John Doe\",
\"account_no\": \"1234567890\",
\"ifsc_code\": \"BOFAUS3N\",
\"swift_code\": \"BOFAUS3NXXX\",
\"bank_ad_code_no\": \"AD12345678\",
\"iban_no\": \"GB82WEST12345698765432\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/banks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_name": "Bank of America",
"bank_address": "123 Main St, New York, NY",
"account_name": "John Doe",
"account_no": "1234567890",
"ifsc_code": "BOFAUS3N",
"swift_code": "BOFAUS3NXXX",
"bank_ad_code_no": "AD12345678",
"iban_no": "GB82WEST12345698765432"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Bank details is stored"
}
Example response (422):
{
"status": "error",
"message": "Validation error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Company Profile
Get company profile details.
variable is like small case and replace space with underscore. Use "/upload/file_name" path for company logo and signature.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/company-profile-get" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-profile-get"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"comapny_profile":[
{
"id": 1dkjvskj-dnjdj-xnxskj,
"company_name": "Sample Company Ltd.",
"contact_person_name":"Ashish Patel",
"otp_mobile_phone":"08796543210",
"mobile":"08796543210",
"email":"abc@gmail.com",
"phone_no":"7896513",
"fax_no":"08796543210",
"website":"http://www.samplecompany.com",
"company_register":"Register123",
"address":"Rajkot, Gujarat, India - 360004.",
"portal_address":"http://portal.samplecompany.com",
"company_type":"Private Limited",
"gst_no":"GSTIN123456789",
"lut_no":"LUT12345",
"cin":"CIN123456789",
"gst_circular_no":"CIRC123456789",
"state_code":"SC",
"lei_no":"LEI1234567890",
"field_3":"Value3",
"pan_no":"PAN123456789",
"lut_expiry":"2025-12-31",
"rcmc_no": "RCMC123456",
"date_of_filling_rex_number": "2024-06-25",
"field_1": "Value1",
"field_4": "Value4",
"iec_no": "IEC123456789",
"bin_no": "BIN123456",
"rcmc_expiry": "2026-12-31",
"circular_no": "CIRC789456123",
"aeo_no": "AEO123456",
"field_2": "Value2",
"field_5": "Value5",
"pre_carriage_by": "Road",
"state_of_origin": "Sample State",
"delivery_period": "30 days",
"terms_of_delivery": "FOB",
"place_of_receipt": "Sample Port",
"part_of_loading": "Loading Dock A",
"partial_shipement": "No",
"district_of_origin": "Sample District",
"trans_shipement": "No",
"variety_of_quality": "Premium",
"company_logo": "sample_logo.png",
"signature_upload": "signature.png",
"range": "Range 1",
"division": "Division A",
"commissionerate": "Commissionerate 1",
"location_code": "LOC123",
"annexure_remark": "N/A",
"shipper_name": "Sample Shipper",
"method_used_for_vgm": "Weighbridge",
"weighbridge_slip_no": "WS123456",
"bank_id":"fbdj54-fvd-g45bbf-5tgr4",
},
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update company profile details.
This endpoint allows you to update the company profile details. The variables are in snake_case and should be provided in the request body. company_logo and signature_upload both send direct file only, don't refer example for both.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/company-profile" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "id=1dkjvskj-dnjdj-xnxskj"\
--form "company_name=Sample Company Ltd."\
--form "contact_person_name=Ashish Patel"\
--form "otp_mobile_phone=08796543210"\
--form "mobile=08796543210"\
--form "email=abc@gmail.com"\
--form "phone_no=7896513"\
--form "fax_no=08796543210"\
--form "website=http://www.samplecompany.com"\
--form "company_register=Register123"\
--form "address=Rajkot, Gujarat, India - 360004."\
--form "portal_address=http://portal.samplecompany.com"\
--form "company_type=Private Limited"\
--form "gst_no=GSTIN123456789"\
--form "lut_no=LUT12345"\
--form "cin=CIN123456789"\
--form "gst_circular_no=CIRC123456789"\
--form "state_code=SC"\
--form "lei_no=LEI1234567890"\
--form "field_3=Value3"\
--form "pan_no=PAN123456789"\
--form "lut_expiry=2025-12-31"\
--form "rcmc_no=RCMC123456"\
--form "date_of_filling_rex_number=2024-06-25"\
--form "field_1=Value1"\
--form "field_4=Value4"\
--form "iec_no=IEC123456789"\
--form "bin_no=BIN123456"\
--form "rcmc_expiry=2026-12-31"\
--form "circular_no=CIRC789456123"\
--form "aeo_no=AEO123456"\
--form "field_2=Value2"\
--form "field_5=Value5"\
--form "pre_carriage_by=Road"\
--form "state_of_origin=Sample State"\
--form "delivery_period=30 days"\
--form "terms_of_delivery=FOB"\
--form "place_of_receipt=Sample Port"\
--form "part_of_loading=Loading Dock A"\
--form "partial_shipement=No"\
--form "district_of_origin=Sample District"\
--form "trans_shipement=No"\
--form "variety_of_quality=Premium"\
--form "range=Range 1"\
--form "division=Division A"\
--form "commissionerate=Commissionerate 1"\
--form "location_code=LOC123"\
--form "annexure_remark=N/A"\
--form "shipper_name=Sample Shipper"\
--form "method_used_for_vgm=Weighbridge"\
--form "weighbridge_slip_no=WS123456"\
--form "bank_id=fbdj54-fvd-g45bbf-5tgr4"\
--form "export_under_detail_1=Export Detail 1"\
--form "export_under_detail_2=Export Detail 2"\
--form "export_remarks=Export Remarks Example"\
--form "company_logo=@C:\Users\shrey\AppData\Local\Temp\phpD28A.tmp" \
--form "signature_upload=@C:\Users\shrey\AppData\Local\Temp\phpD29B.tmp"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-profile"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('id', '1dkjvskj-dnjdj-xnxskj');
body.append('company_name', 'Sample Company Ltd.');
body.append('contact_person_name', 'Ashish Patel');
body.append('otp_mobile_phone', '08796543210');
body.append('mobile', '08796543210');
body.append('email', 'abc@gmail.com');
body.append('phone_no', '7896513');
body.append('fax_no', '08796543210');
body.append('website', 'http://www.samplecompany.com');
body.append('company_register', 'Register123');
body.append('address', 'Rajkot, Gujarat, India - 360004.');
body.append('portal_address', 'http://portal.samplecompany.com');
body.append('company_type', 'Private Limited');
body.append('gst_no', 'GSTIN123456789');
body.append('lut_no', 'LUT12345');
body.append('cin', 'CIN123456789');
body.append('gst_circular_no', 'CIRC123456789');
body.append('state_code', 'SC');
body.append('lei_no', 'LEI1234567890');
body.append('field_3', 'Value3');
body.append('pan_no', 'PAN123456789');
body.append('lut_expiry', '2025-12-31');
body.append('rcmc_no', 'RCMC123456');
body.append('date_of_filling_rex_number', '2024-06-25');
body.append('field_1', 'Value1');
body.append('field_4', 'Value4');
body.append('iec_no', 'IEC123456789');
body.append('bin_no', 'BIN123456');
body.append('rcmc_expiry', '2026-12-31');
body.append('circular_no', 'CIRC789456123');
body.append('aeo_no', 'AEO123456');
body.append('field_2', 'Value2');
body.append('field_5', 'Value5');
body.append('pre_carriage_by', 'Road');
body.append('state_of_origin', 'Sample State');
body.append('delivery_period', '30 days');
body.append('terms_of_delivery', 'FOB');
body.append('place_of_receipt', 'Sample Port');
body.append('part_of_loading', 'Loading Dock A');
body.append('partial_shipement', 'No');
body.append('district_of_origin', 'Sample District');
body.append('trans_shipement', 'No');
body.append('variety_of_quality', 'Premium');
body.append('range', 'Range 1');
body.append('division', 'Division A');
body.append('commissionerate', 'Commissionerate 1');
body.append('location_code', 'LOC123');
body.append('annexure_remark', 'N/A');
body.append('shipper_name', 'Sample Shipper');
body.append('method_used_for_vgm', 'Weighbridge');
body.append('weighbridge_slip_no', 'WS123456');
body.append('bank_id', 'fbdj54-fvd-g45bbf-5tgr4');
body.append('export_under_detail_1', 'Export Detail 1');
body.append('export_under_detail_2', 'Export Detail 2');
body.append('export_remarks', 'Export Remarks Example');
body.append('company_logo', document.querySelector('input[name="company_logo"]').files[0]);
body.append('signature_upload', document.querySelector('input[name="signature_upload"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Company Profile updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Company Raw Materials
Raw Materials list
Display a listing of the company raw materials. This endpoint returns a list of all company raw materials.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/company-raw-material" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-raw-material"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"company_raw_materials": [
{
"id": "1dfd-4tfv-4gdgr",
"company_name": "Company A",
"total_pallet": 10,
"bag_per_pallet": 20,
"total_bag": 200,
"weight_per_bag": 50,
"total_weight": 10000,
"supplier_name": "Supplier A",
"purchase_order_no": "PO12345",
"sales_order_no": "SO12345",
"description_of_goods": "Description of goods",
"grade": "140*140",
"qty": 100,
"weight_per_pcs": 10,
"payment_terms": "Net 30",
"invoice_date": "2023-06-25",
"status": "Received",
"received_date": "2023-06-26"
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Raw Material
Store a newly created company raw material in storage. This endpoint allows you to create a new company raw material.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/company-raw-material" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_name\": \"Company A\",
\"total_pallet\": \"10\",
\"bag_per_pallet\": \"20\",
\"total_bag\": \"200\",
\"weight_per_bag\": \"50\",
\"total_weight\": \"10000\",
\"supplier_name\": \"Supplier A\",
\"purchase_order_no\": \"PO12345\",
\"sales_order_no\": \"SO12345\",
\"description_of_goods\": \"Description of goods\",
\"grade\": \"140*140\",
\"qty\": \"100\",
\"weight_per_pcs\": \"10\",
\"payment_terms\": \"Net 30\",
\"invoice_date\": \"2023-06-25\",
\"status\": \"Received\",
\"received_date\": \"2023-06-26\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-raw-material"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_name": "Company A",
"total_pallet": "10",
"bag_per_pallet": "20",
"total_bag": "200",
"weight_per_bag": "50",
"total_weight": "10000",
"supplier_name": "Supplier A",
"purchase_order_no": "PO12345",
"sales_order_no": "SO12345",
"description_of_goods": "Description of goods",
"grade": "140*140",
"qty": "100",
"weight_per_pcs": "10",
"payment_terms": "Net 30",
"invoice_date": "2023-06-25",
"status": "Received",
"received_date": "2023-06-26"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Company Raw Materials are stored"
}
Example response (422):
{
"errors": {
"company_name": [
"Company Name is required"
],
"total_pallet": [
"Total Pallet is required",
"Total Pallet must be numeric"
],
"bag_per_pallet": [
"Bag Per Pallet is required",
"Bag Per Pallet must be numeric"
],
"total_bag": [
"Total Bag is required",
"Total Bag must be numeric"
],
"weight_per_bag": [
"Weight Per Bag is required",
"Weight Per Bag must be numeric"
],
"total_weight": [
"Total Weight is required",
"Total Weight must be numeric"
],
"supplier_name": [
"Supplier Name is required"
],
"purchase_order_no": [
"Purchase Order No is required"
],
"sales_order_no": [
"Sales Order No is required"
],
"description_of_goods": [
"Description Of Goods is required"
],
"grade": [
"Grade is required"
],
"qty": [
"Quantity is required"
],
"weight_per_pcs": [
"Weight Per Piece is required"
],
"payment_terms": [
"Payment Terms are required"
],
"invoice_date": [
"Invoice Date is required"
],
"status": [
"Status is required"
],
"received_date": [
"Received Date is required"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Raw Material
Update the specified company raw material in storage. This endpoint allows you to update an existing company raw material by providing its ID and the updated information.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/company-raw-material/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_name\": \"Company A\",
\"total_pallet\": \"10\",
\"bag_per_pallet\": \"20\",
\"total_bag\": \"200\",
\"weight_per_bag\": \"50\",
\"total_weight\": \"10000\",
\"supplier_name\": \"Supplier A\",
\"purchase_order_no\": \"PO12345\",
\"sales_order_no\": \"SO12345\",
\"description_of_goods\": \"Description of goods\",
\"grade\": \"140*140\",
\"qty\": \"100\",
\"weight_per_pcs\": \"10\",
\"payment_terms\": \"Net 30\",
\"invoice_date\": \"2023-06-25\",
\"status\": \"Received\",
\"received_date\": \"2023-06-26\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-raw-material/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_name": "Company A",
"total_pallet": "10",
"bag_per_pallet": "20",
"total_bag": "200",
"weight_per_bag": "50",
"total_weight": "10000",
"supplier_name": "Supplier A",
"purchase_order_no": "PO12345",
"sales_order_no": "SO12345",
"description_of_goods": "Description of goods",
"grade": "140*140",
"qty": "100",
"weight_per_pcs": "10",
"payment_terms": "Net 30",
"invoice_date": "2023-06-25",
"status": "Received",
"received_date": "2023-06-26"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Company Raw Material updated successfully"
}
Example response (404):
{
"message": "Raw Material not found"
}
Example response (422):
{
"errors": {
"company_name": [
"Company Name is required"
],
"total_pallet": [
"Total Pallet is required",
"Total Pallet must be numeric"
],
"bag_per_pallet": [
"Bag Per Pallet is required",
"Bag Per Pallet must be numeric"
],
"total_bag": [
"Total Bag is required",
"Total Bag must be numeric"
],
"weight_per_bag": [
"Weight Per Bag is required",
"Weight Per Bag must be numeric"
],
"total_weight": [
"Total Weight is required",
"Total Weight must be numeric"
],
"supplier_name": [
"Supplier Name is required"
],
"purchase_order_no": [
"Purchase Order No is required"
],
"sales_order_no": [
"Sales Order No is required"
],
"description_of_goods": [
"Description Of Goods is required"
],
"grade": [
"Grade is required"
],
"qty": [
"Quantity is required"
],
"weight_per_pcs": [
"Weight Per Piece is required"
],
"payment_terms": [
"Payment Terms are required"
],
"invoice_date": [
"Invoice Date is required"
],
"status": [
"Status is required"
],
"received_date": [
"Received Date is required"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Raw Material
Remove the specified company raw material from storage. This endpoint allows you to delete a company raw material by providing its ID.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/company-raw-material/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-raw-material/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Company Raw Material deleted successfully"
}
Example response (404):
{
"message": "Raw Material not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Calculate the totals for pallets, bags, bags per pallet, weight per bag, and total weight.
This endpoint calculates the sum of various properties of company raw materials filtered by a specific date. The properties include total pallet count, total bag count, total bags per pallet count, total weight per bag count, and total weight count.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/company-raw-material-calculation" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_filter\": \"2023-06-25\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/company-raw-material-calculation"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_filter": "2023-06-25"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"company_raw_materials": [
{
"id": 1,
"company_name": "Company A",
"total_pallet": 10,
"bag_per_pallet": 50,
"total_bag": 500,
"weight_per_bag": 20,
"total_weight": 10000
}
],
"totalPalletCount": 10,
"totalBagCount": 500,
"totalBagPerPalletCount": 50,
"totalWeightPerBagCount": 20,
"totalWeightCount": 10000
}
Example response (422):
{
"status": "error",
"message": "Invalid date format"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Calculate the totals for pallets, bags, bags per pallet, weight per bag, and total weight.
This endpoint calculates the sum of various properties of company raw materials filtered by a specific date. The properties include total pallet count, total bag count, total bags per pallet count, total weight per bag count, and total weight count.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/finish-goods-calculation" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_filter\": \"2023-06-25\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/finish-goods-calculation"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_filter": "2023-06-25"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"company_raw_materials": [
{
"id": 1,
"company_name": "Company A",
"total_pallet": 10,
"bag_per_pallet": 50,
"total_bag": 500,
"weight_per_bag": 20,
"total_weight": 10000
}
],
"totalPalletCount": 10,
"totalBagCount": 500,
"totalBagPerPalletCount": 50,
"totalWeightPerBagCount": 20,
"totalWeightCount": 10000
}
Example response (422):
{
"status": "error",
"message": "Invalid date format"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
GET api/login
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
"type": "Unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/smart-gogodofkog-fkbkr0iooh-4mkfm/{id}
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/smart-gogodofkog-fkbkr0iooh-4mkfm/ducimus" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/smart-gogodofkog-fkbkr0iooh-4mkfm/ducimus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/fkfjdgrkgrinrinirnijvdnmrgmbro4k
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/fkfjdgrkgrinrinirnijvdnmrgmbro4k" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/fkfjdgrkgrinrinirnijvdnmrgmbro4k"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
{
"users": [
{
"id": "1e194a12-0ed9-470d-b01e-0275840181a8",
"name": "SmartWrap Admin",
"email": "smartwrap.admin@gmail.com",
"email_verified_at": null,
"created_at": "2024-07-24T17:30:36.000000Z",
"updated_at": "2024-07-24T17:30:36.000000Z",
"deleted_at": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Finish Goods
Display a listing of the finish goods.
This endpoint returns a list of all finish goods with their associated product and size details for the authenticated user.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/finish-goods" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/finish-goods"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"finishGoods": [
{
"id": "15fjl5-4f45t-5g456y-g5t",
"product_id": "1g5l67-54yb6-8u567-65g",
"size_id": "1g5l67-54yb6-8u567-65g5",
"kg_per_roll": 100,
"roll_quantity": 10,
"total_kg": 1000,
"number_of_pallet": "Pallet 1",
"pallet_number": "Pallet A",
"details": "Details of finish goods",
"boxes": 5,
"production_date": "2023-06-25",
"good_details": "Details about the goods",
"company": "Company A",
"description_of_goods": "Description of goods",
"qty_in_storage_start": 50,
"qty_issued": 10,
"qty_in_storage_end": 40,
"qty_returned": 5,
"wastage": 2,
"actual_qty_consumed": 8,
"product": {
"id": "1g5l67-54yb6-8u567-65g",
"product_name": "Product A"
},
"size": {
"id": "1g5l67-54yb6-8u567-65g5",
"size_in_cm": 100,
"size_in_mm": 1000,
"micron": 50
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created finish good in storage.
This endpoint allows you to create a new finish good.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/finish-goods" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 15,
\"size_id\": 1,
\"kg_per_roll\": \"100\",
\"roll_quantity\": \"10\",
\"total_kg\": \"1000\",
\"number_of_pallet\": \"Pallet 1\",
\"pallet_number\": \"Pallet A\",
\"details\": \"Details of finish goods\",
\"boxes\": \"5\",
\"production_date\": \"2023-06-15\",
\"good_details\": \"\\\"Good details\\\"\",
\"company\": \"\\\"Company A\\\"\",
\"description_of_goods\": \"\\\"Description of goods\\\"\",
\"qty_in_storage_start\": \"100\",
\"qty_issued\": \"10\",
\"qty_in_storage_end\": \"90\",
\"qty_returned\": \"5\",
\"wastage\": \"2\",
\"actual_qty_consumed\": \"8\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/finish-goods"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 15,
"size_id": 1,
"kg_per_roll": "100",
"roll_quantity": "10",
"total_kg": "1000",
"number_of_pallet": "Pallet 1",
"pallet_number": "Pallet A",
"details": "Details of finish goods",
"boxes": "5",
"production_date": "2023-06-15",
"good_details": "\"Good details\"",
"company": "\"Company A\"",
"description_of_goods": "\"Description of goods\"",
"qty_in_storage_start": "100",
"qty_issued": "10",
"qty_in_storage_end": "90",
"qty_returned": "5",
"wastage": "2",
"actual_qty_consumed": "8"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Finish Goods is saved"
}
Example response (422):
{
"errors": {
"product_id": [
"Product is required"
],
"size_id": [
"Size is required"
],
"kg_per_roll": [
"Kg Per Roll is required",
"Kg Per Roll must be numeric"
],
"roll_quantity": [
"Roll Quantity is required",
"Roll Quantity must be numeric"
],
"total_kg": [
"Total Kg is required",
"Total Kg must be numeric"
],
"number_of_pallet": [
"Pallet is required"
],
"pallet_number": [
"Pallet Name is required"
],
"details": [
"Details is required"
],
"boxes": [
"Boxes is required",
"Boxes must be numeric"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified finish good in storage.
This endpoint allows you to update an existing finish good.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/finish-goods/15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 15,
\"size_id\": 1,
\"kg_per_roll\": \"100\",
\"roll_quantity\": \"10\",
\"total_kg\": \"1000\",
\"number_of_pallet\": \"Pallet 1\",
\"pallet_number\": \"Pallet A\",
\"details\": \"Details of finish goods\",
\"boxes\": \"5\",
\"production_date\": \"2023-06-15\",
\"good_details\": \"\\\"Good details\\\"\",
\"company\": \"\\\"Company A\\\"\",
\"description_of_goods\": \"\\\"Description of goods\\\"\",
\"qty_in_storage_start\": \"100\",
\"qty_issued\": \"10\",
\"qty_in_storage_end\": \"90\",
\"qty_returned\": \"5\",
\"wastage\": \"2\",
\"actual_qty_consumed\": \"8\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/finish-goods/15"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 15,
"size_id": 1,
"kg_per_roll": "100",
"roll_quantity": "10",
"total_kg": "1000",
"number_of_pallet": "Pallet 1",
"pallet_number": "Pallet A",
"details": "Details of finish goods",
"boxes": "5",
"production_date": "2023-06-15",
"good_details": "\"Good details\"",
"company": "\"Company A\"",
"description_of_goods": "\"Description of goods\"",
"qty_in_storage_start": "100",
"qty_issued": "10",
"qty_in_storage_end": "90",
"qty_returned": "5",
"wastage": "2",
"actual_qty_consumed": "8"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Finish Goods is updated"
}
Example response (422):
{
"errors": {
"product_id": [
"Product is required"
],
"size_id": [
"Size is required"
],
"kg_per_roll": [
"Sqm Per Roll is required",
"Sqm Per Roll must be numeric"
],
"roll_quantity": [
"Roll Quantity is required",
"Roll Quantity must be numeric"
],
"total_kg": [
"Total Sqm is required",
"Total Sqm must be numeric"
],
"number_of_pallet": [
"Pallet is required"
],
"pallet_number": [
"Pallet Name is required"
],
"details": [
"Details is required"
],
"boxes": [
"Boxes is required",
"Boxes must be numeric"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified finish good from storage.
This endpoint allows you to delete a finish good by its ID.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/finish-goods/15" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/finish-goods/15"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Finish Goods is deleted"
}
Example response (404):
{
"message": "Finish Goods not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PI Reports Domestic
Display the get all PI Report Domestic resource.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/pi-reports-domestic" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-domestic"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"piReportsExport": [
{
"id": 1xv5-545g7-5tgr,
"pi_no": "PI001",
"date": "2023-01-01",
"buyer_order_no": "BO123",
"buyer_order_date": "2022-12-15",
"supplier_name": "Supplier Inc.",
"supplier_address": "123 Supplier St.",
"supplier_pan": "ABCDE1234F",
"supplier_gst": "29ABCDE1234F1Z5",
"exporter_gst": "27ABCDE1234F1Z1",
"supplier_mail": "supplier@example.com",
"supplier_contact_person": "John Doe",
"supplier_contact_no": "1234567890",
"consignee_name": "Consignee Ltd.",
"consignee_address": "456 Consignee Rd.",
"consignee_pan": "FGHIJ5678K",
"consignee_iec": "0306060070",
"consignee_gst": "24FGHIJ5678K1Z2",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Smith",
"consignee_contact_no": "0987654321",
"igst": 18,
"sgst": 9,
"cgst": 9,
"total_fob_value": 10000.00,
"amount_in_words": "Ten Thousand Only",
"bank_name": "Bank of Export",
"bank_address": "789 Bank St.",
"bank_account_no": "123456789012",
"bank_ifsc_code": "BKID0001234",
"bank_ad_code": "AD1234567890",
"bank_swift_code": "BKIDINBBXXX",
"payment_terms": "Net 30 days",
"payment_delivery_time": "2024-08-25 14:16:56",
"payment_delivery_terms": "FOB",
"notes": "Urgent delivery required.",
"piReportProducts": [
{
"id": 1,
"pi_report_domestic_id": 1,
"description": "Product A",
"hsn_code": "1001",
"no_of_box": 10,
"quantity": 100,
"unit": 5, // Number of units
"rate": 100.00,
"amount": 10000.00
}
]
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store the specified PI Report.
This endpoint stores the details of a specific PI Report.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/pi-reports-domestic" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pi_no\": \"PI001\",
\"date\": \"2023-01-01\",
\"buyer_order_no\": \"BO123\",
\"buyer_order_date\": \"2022-12-15\",
\"supplier_name\": \"Supplier Inc.\",
\"supplier_address\": \"123 Supplier St.\",
\"supplier_pan\": \"ABCDE1234F\",
\"supplier_gst\": \"29ABCDE1234F1Z5\",
\"supplier_mail\": \"supplier@example.com\",
\"supplier_contact_person\": \"John Doe\",
\"supplier_contact_no\": \"1234567890\",
\"consignee_name\": \"Consignee Ltd.\",
\"consignee_address\": \"456 Consignee Rd.\",
\"consignee_pan\": \"FGHIJ5678K\",
\"consignee_iec\": \"0306060070\",
\"consignee_gst\": \"24FGHIJ5678K1Z2\",
\"consignee_mail\": \"consignee@example.com\",
\"consignee_contact_person\": \"Jane Smith\",
\"consignee_contact_no\": \"0987654321\",
\"igst\": \"18\",
\"sgst\": \"9\",
\"cgst\": \"9\",
\"total_fob_value\": \"10000.00\",
\"amount_in_words\": \"Ten Thousand Only\",
\"bank_name\": \"Bank of Export\",
\"bank_address\": \"789 Bank St.\",
\"bank_account_no\": \"123456789012\",
\"bank_ifsc_code\": \"BKID0001234\",
\"bank_ad_code\": \"AD1234567890\",
\"bank_swift_code\": \"BKIDINBBXXX\",
\"payment_terms\": \"Net 30 days\",
\"payment_delivery_time\": \"2024-05-11 14:15:03\",
\"payment_delivery_terms\": \"FOB\",
\"notes\": \"Urgent delivery required.\",
\"products\": [
{
\"description\": \"Product A\",
\"hsn_code\": \"1001\",
\"no_of_box\": 10,
\"quantity\": 100,
\"unit\": 5,
\"rate_in_usd\": 100,
\"amount\": 10000
}
]
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-domestic"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pi_no": "PI001",
"date": "2023-01-01",
"buyer_order_no": "BO123",
"buyer_order_date": "2022-12-15",
"supplier_name": "Supplier Inc.",
"supplier_address": "123 Supplier St.",
"supplier_pan": "ABCDE1234F",
"supplier_gst": "29ABCDE1234F1Z5",
"supplier_mail": "supplier@example.com",
"supplier_contact_person": "John Doe",
"supplier_contact_no": "1234567890",
"consignee_name": "Consignee Ltd.",
"consignee_address": "456 Consignee Rd.",
"consignee_pan": "FGHIJ5678K",
"consignee_iec": "0306060070",
"consignee_gst": "24FGHIJ5678K1Z2",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Smith",
"consignee_contact_no": "0987654321",
"igst": "18",
"sgst": "9",
"cgst": "9",
"total_fob_value": "10000.00",
"amount_in_words": "Ten Thousand Only",
"bank_name": "Bank of Export",
"bank_address": "789 Bank St.",
"bank_account_no": "123456789012",
"bank_ifsc_code": "BKID0001234",
"bank_ad_code": "AD1234567890",
"bank_swift_code": "BKIDINBBXXX",
"payment_terms": "Net 30 days",
"payment_delivery_time": "2024-05-11 14:15:03",
"payment_delivery_terms": "FOB",
"notes": "Urgent delivery required.",
"products": [
{
"description": "Product A",
"hsn_code": "1001",
"no_of_box": 10,
"quantity": 100,
"unit": 5,
"rate_in_usd": 100,
"amount": 10000
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PI Report Export added successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified PI Report.
This endpoint updates the details of a specific PI Report by its ID.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/pi-reports-domestic/15fjl5-4f45t-5g456y-g5t" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pi_no\": \"PI001\",
\"date\": \"2023-01-01\",
\"buyer_order_no\": \"BO123\",
\"buyer_order_date\": \"2022-12-15\",
\"supplier_name\": \"Supplier Inc.\",
\"supplier_address\": \"123 Supplier St.\",
\"supplier_pan\": \"ABCDE1234F\",
\"supplier_gst\": \"29ABCDE1234F1Z5\",
\"supplier_mail\": \"supplier@example.com\",
\"supplier_contact_person\": \"John Doe\",
\"supplier_contact_no\": \"1234567890\",
\"consignee_name\": \"Consignee Ltd.\",
\"consignee_address\": \"456 Consignee Rd.\",
\"consignee_pan\": \"FGHIJ5678K\",
\"consignee_iec\": \"0306060070\",
\"consignee_gst\": \"24FGHIJ5678K1Z2\",
\"consignee_mail\": \"consignee@example.com\",
\"consignee_contact_person\": \"Jane Smith\",
\"consignee_contact_no\": \"0987654321\",
\"igst\": \"18\",
\"sgst\": \"9\",
\"cgst\": \"9\",
\"total_fob_value\": \"10000.00\",
\"amount_in_words\": \"Ten Thousand Only\",
\"bank_name\": \"Bank of Export\",
\"bank_address\": \"789 Bank St.\",
\"bank_account_no\": \"123456789012\",
\"bank_ifsc_code\": \"BKID0001234\",
\"bank_ad_code\": \"AD1234567890\",
\"bank_swift_code\": \"BKIDINBBXXX\",
\"payment_terms\": \"Net 30 days\",
\"payment_delivery_time\": \"2024-05-11 14:15:03\",
\"payment_delivery_terms\": \"FOB\",
\"notes\": \"Urgent delivery required.\",
\"products\": [
{
\"description\": \"Product A\",
\"hsn_code\": \"1001\",
\"no_of_box\": 10,
\"quantity\": 100,
\"unit\": 5,
\"rate_in_usd\": 100,
\"amount\": 10000
}
]
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-domestic/15fjl5-4f45t-5g456y-g5t"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pi_no": "PI001",
"date": "2023-01-01",
"buyer_order_no": "BO123",
"buyer_order_date": "2022-12-15",
"supplier_name": "Supplier Inc.",
"supplier_address": "123 Supplier St.",
"supplier_pan": "ABCDE1234F",
"supplier_gst": "29ABCDE1234F1Z5",
"supplier_mail": "supplier@example.com",
"supplier_contact_person": "John Doe",
"supplier_contact_no": "1234567890",
"consignee_name": "Consignee Ltd.",
"consignee_address": "456 Consignee Rd.",
"consignee_pan": "FGHIJ5678K",
"consignee_iec": "0306060070",
"consignee_gst": "24FGHIJ5678K1Z2",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Smith",
"consignee_contact_no": "0987654321",
"igst": "18",
"sgst": "9",
"cgst": "9",
"total_fob_value": "10000.00",
"amount_in_words": "Ten Thousand Only",
"bank_name": "Bank of Export",
"bank_address": "789 Bank St.",
"bank_account_no": "123456789012",
"bank_ifsc_code": "BKID0001234",
"bank_ad_code": "AD1234567890",
"bank_swift_code": "BKIDINBBXXX",
"payment_terms": "Net 30 days",
"payment_delivery_time": "2024-05-11 14:15:03",
"payment_delivery_terms": "FOB",
"notes": "Urgent delivery required.",
"products": [
{
"description": "Product A",
"hsn_code": "1001",
"no_of_box": 10,
"quantity": 100,
"unit": 5,
"rate_in_usd": 100,
"amount": 10000
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PI Report Export updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified PI Report Domestic resource.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/pi-reports-domestic-get" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pi_no\": \"PI654\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-domestic-get"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pi_no": "PI654"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"piReportsExport": {
"id": 1xv5-545g7-5tgr,
"pi_no": "PI001",
"date": "2023-01-01",
"buyer_order_no": "BO123",
"buyer_order_date": "2022-12-15",
"supplier_name": "Supplier Inc.",
"supplier_address": "123 Supplier St.",
"supplier_pan": "ABCDE1234F",
"supplier_gst": "29ABCDE1234F1Z5",
"exporter_gst": "27ABCDE1234F1Z1",
"supplier_mail": "supplier@example.com",
"supplier_contact_person": "John Doe",
"supplier_contact_no": "1234567890",
"consignee_name": "Consignee Ltd.",
"consignee_address": "456 Consignee Rd.",
"consignee_pan": "FGHIJ5678K",
"consignee_iec": "0306060070",
"consignee_gst": "24FGHIJ5678K1Z2",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Smith",
"consignee_contact_no": "0987654321",
"igst": 18,
"sgst": 9,
"cgst": 9,
"total_fob_value": 10000.00,
"amount_in_words": "Ten Thousand Only",
"bank_name": "Bank of Export",
"bank_address": "789 Bank St.",
"bank_account_no": "123456789012",
"bank_ifsc_code": "BKID0001234",
"bank_ad_code": "AD1234567890",
"bank_swift_code": "BKIDINBBXXX",
"payment_terms": "Net 30 days",
"payment_delivery_time": "2024-08-25 14:16:56",
"payment_delivery_terms": "FOB",
"notes": "Urgent delivery required.",
"piReportProducts": [
{
"id": 1,
"pi_report_domestic_id": 1,
"description": "Product A",
"hsn_code": "1001",
"no_of_box": 10,
"quantity": 100,
"unit": 5, // Number of units
"rate": 100.00,
"amount": 10000.00
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PI Reports Export
Display a listing of the PI Reports.
This endpoint retrieves a list of PI Reports created by the authenticated user, including detailed information such as the exporter's and consignee's details, product information, and financial data. Each PI Report also contains associated product information, such as packaging details, quantity, and pricing in USD.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/pi-reports-export" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-export"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"piReportsExport": [
{
"id": "15fjl5-4f45t-5g456y-g5t",
"pi_no": "PI12345",
"date": "2023-06-25",
"buyer_order_no": "BO12345",
"buyer_order_date": "2023-06-20",
"exporter_name": "Exporter A",
"exporter_address": "123 Street, City, Country",
"exporter_pan": "ABCDE1234F",
"exporter_iec": "IEC1234567",
"exporter_gst": "GST123456",
"exporter_mail": "exporter@example.com",
"exporter_contact_person": "John Doe",
"exporter_contact_no": "1234567890",
"consignee_name": "Consignee A",
"consignee_address": "456 Avenue, City, Country",
"consignee_country": "Country B",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Doe",
"consignee_contact_no": "0987654321",
"port_of_loading": "Port A",
"port_of_discharge": "Port B",
"final_destination_port": "Port C",
"country_of_origin_of_goods": "Country A",
"country_of_final_destination": "Country B",
"total_fob_value": 1000,
"freight_charges": 50,
"total_cfr_value": 1050,
"insurance_charges": 20,
"total_cif_value": 1070,
"amount_in_words": "One Thousand Seventy",
"bank_name": "Bank A",
"bank_address": "789 Boulevard, City, Country",
"bank_account_no": "123456789012",
"bank_ifsc_code": "IFSC12345",
"bank_ad_code": "AD12345",
"bank_swift_code": "SWIFT12345",
"payment_terms": "30 days",
"payment_delivery_time": "2024-05-13 17:05:06",
"payment_delivery_terms": "FOB",
"notes": "Special instructions",
"piReportProducts": [
{
"id": "12345",
"pi_report_export_id": "15fjl5-4f45t-5g456y-g5t",
"size": "Medium",
"type": "Type A",
"packaging_description": "Box",
"roll_per_pallet": 10,
"no_of_pallets": 5,
"total_rolls": 50,
"weight_per_roll": "weight_per_roll A",
"quanity": 100,
"core_weight": "pcs",
"rate_in_usd": 10,
"amount_in_usd": 1000
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created PI Report.
This endpoint creates a new PI Report with the specified details and associated products.
It accepts various details related to the exporter, consignee, and product information.
After creation, the associated product details are stored in the PiReportExportProduct
model.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/pi-reports-export" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pi_no\": \"PI12345\",
\"date\": \"2023-06-25\",
\"buyer_order_no\": \"BO12345\",
\"buyer_order_date\": \"2023-06-20\",
\"exporter_name\": \"Exporter A\",
\"exporter_address\": \"123 Street, City, Country\",
\"exporter_pan\": \"ABCDE1234F\",
\"exporter_iec\": \"IEC1234567\",
\"exporter_gst\": \"GST123456\",
\"exporter_mail\": \"exporter@example.com\",
\"exporter_contact_person\": \"John Doe\",
\"exporter_contact_no\": \"1234567890\",
\"consignee_name\": \"Consignee A\",
\"consignee_address\": \"456 Avenue, City, Country\",
\"consignee_country\": \"Country B\",
\"consignee_mail\": \"consignee@example.com\",
\"consignee_contact_person\": \"Jane Doe\",
\"consignee_contact_no\": \"0987654321\",
\"port_of_loading\": \"Port A\",
\"port_of_discharge\": \"Port B\",
\"final_destination_port\": \"Port C\",
\"country_of_origin_of_goods\": \"Country A\",
\"country_of_final_destination\": \"Country B\",
\"total_fob_value\": 1000,
\"freight_charges\": 50,
\"total_cfr_value\": 1050,
\"insurance_charges\": 20,
\"total_cif_value\": 1070,
\"amount_in_words\": \"One Thousand Seventy\",
\"bank_name\": \"Bank A\",
\"bank_address\": \"789 Boulevard, City, Country\",
\"bank_account_no\": \"123456789012\",
\"bank_ifsc_code\": \"IFSC12345\",
\"bank_ad_code\": \"AD12345\",
\"bank_swift_code\": \"SWIFT12345\",
\"payment_terms\": \"30 days\",
\"payment_delivery_time\": \"2024-05-13 17:05:06\",
\"payment_delivery_terms\": \"FOB\",
\"notes\": \"Special instructions\",
\"products\": [
\"ut\"
]
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-export"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pi_no": "PI12345",
"date": "2023-06-25",
"buyer_order_no": "BO12345",
"buyer_order_date": "2023-06-20",
"exporter_name": "Exporter A",
"exporter_address": "123 Street, City, Country",
"exporter_pan": "ABCDE1234F",
"exporter_iec": "IEC1234567",
"exporter_gst": "GST123456",
"exporter_mail": "exporter@example.com",
"exporter_contact_person": "John Doe",
"exporter_contact_no": "1234567890",
"consignee_name": "Consignee A",
"consignee_address": "456 Avenue, City, Country",
"consignee_country": "Country B",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Doe",
"consignee_contact_no": "0987654321",
"port_of_loading": "Port A",
"port_of_discharge": "Port B",
"final_destination_port": "Port C",
"country_of_origin_of_goods": "Country A",
"country_of_final_destination": "Country B",
"total_fob_value": 1000,
"freight_charges": 50,
"total_cfr_value": 1050,
"insurance_charges": 20,
"total_cif_value": 1070,
"amount_in_words": "One Thousand Seventy",
"bank_name": "Bank A",
"bank_address": "789 Boulevard, City, Country",
"bank_account_no": "123456789012",
"bank_ifsc_code": "IFSC12345",
"bank_ad_code": "AD12345",
"bank_swift_code": "SWIFT12345",
"payment_terms": "30 days",
"payment_delivery_time": "2024-05-13 17:05:06",
"payment_delivery_terms": "FOB",
"notes": "Special instructions",
"products": [
"ut"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PI Report Export added successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified PI Report.
This endpoint updates the details of a specific PI Report by its ID, along with its associated products.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/pi-reports-export/15fjl5-4f45t-5g456y-g5t" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pi_no\": \"PI12345\",
\"date\": \"2023-06-25\",
\"buyer_order_no\": \"BO12345\",
\"buyer_order_date\": \"2023-06-20\",
\"exporter_name\": \"Exporter A\",
\"exporter_address\": \"123 Street, City, Country\",
\"exporter_pan\": \"ABCDE1234F\",
\"exporter_iec\": \"IEC1234567\",
\"exporter_gst\": \"GST123456\",
\"exporter_mail\": \"exporter@example.com\",
\"exporter_contact_person\": \"John Doe\",
\"exporter_contact_no\": \"1234567890\",
\"consignee_name\": \"Consignee A\",
\"consignee_address\": \"456 Avenue, City, Country\",
\"consignee_country\": \"Country B\",
\"consignee_mail\": \"consignee@example.com\",
\"consignee_contact_person\": \"Jane Doe\",
\"consignee_contact_no\": \"0987654321\",
\"port_of_loading\": \"Port A\",
\"port_of_discharge\": \"Port B\",
\"final_destination_port\": \"Port C\",
\"country_of_origin_of_goods\": \"Country A\",
\"country_of_final_destination\": \"Country B\",
\"total_fob_value\": 1000,
\"freight_charges\": 50,
\"total_cfr_value\": 1050,
\"insurance_charges\": 20,
\"total_cif_value\": 1070,
\"amount_in_words\": \"One Thousand Seventy\",
\"bank_name\": \"Bank A\",
\"bank_address\": \"789 Boulevard, City, Country\",
\"bank_account_no\": \"123456789012\",
\"bank_ifsc_code\": \"IFSC12345\",
\"bank_ad_code\": \"AD12345\",
\"bank_swift_code\": \"SWIFT12345\",
\"payment_terms\": \"30 days\",
\"payment_delivery_time\": \"2024-05-13 17:05:06\",
\"payment_delivery_terms\": \"FOB\",
\"notes\": \"Special instructions\",
\"products\": [
\"facere\"
]
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-export/15fjl5-4f45t-5g456y-g5t"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pi_no": "PI12345",
"date": "2023-06-25",
"buyer_order_no": "BO12345",
"buyer_order_date": "2023-06-20",
"exporter_name": "Exporter A",
"exporter_address": "123 Street, City, Country",
"exporter_pan": "ABCDE1234F",
"exporter_iec": "IEC1234567",
"exporter_gst": "GST123456",
"exporter_mail": "exporter@example.com",
"exporter_contact_person": "John Doe",
"exporter_contact_no": "1234567890",
"consignee_name": "Consignee A",
"consignee_address": "456 Avenue, City, Country",
"consignee_country": "Country B",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Doe",
"consignee_contact_no": "0987654321",
"port_of_loading": "Port A",
"port_of_discharge": "Port B",
"final_destination_port": "Port C",
"country_of_origin_of_goods": "Country A",
"country_of_final_destination": "Country B",
"total_fob_value": 1000,
"freight_charges": 50,
"total_cfr_value": 1050,
"insurance_charges": 20,
"total_cif_value": 1070,
"amount_in_words": "One Thousand Seventy",
"bank_name": "Bank A",
"bank_address": "789 Boulevard, City, Country",
"bank_account_no": "123456789012",
"bank_ifsc_code": "IFSC12345",
"bank_ad_code": "AD12345",
"bank_swift_code": "SWIFT12345",
"payment_terms": "30 days",
"payment_delivery_time": "2024-05-13 17:05:06",
"payment_delivery_terms": "FOB",
"notes": "Special instructions",
"products": [
"facere"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PI Report Export updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified PI Report.
This endpoint deletes a specific PI Report by its ID.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/pi-reports-export/15fjl5-4f45t-5g456y-g5t" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-export/15fjl5-4f45t-5g456y-g5t"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PI Report Export deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified PI Report.
This endpoint retrieves the details of a specific PI Report by its PI number (pi_no
), including the associated product details.
It fetches the report created by the authenticated user.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/pi-reports-export-get" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-export-get"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"piReportsExport": {
"id": "15fjl5-4f45t-5g456y-g5t",
"pi_no": "PI12345",
"date": "2023-06-25",
"buyer_order_no": "BO12345",
"buyer_order_date": "2023-06-20",
"exporter_name": "Exporter A",
"exporter_address": "123 Street, City, Country",
"exporter_pan": "ABCDE1234F",
"exporter_iec": "IEC1234567",
"exporter_gst": "GST123456",
"exporter_mail": "exporter@example.com",
"exporter_contact_person": "John Doe",
"exporter_contact_no": "1234567890",
"consignee_name": "Consignee A",
"consignee_address": "456 Avenue, City, Country",
"consignee_country": "Country B",
"consignee_mail": "consignee@example.com",
"consignee_contact_person": "Jane Doe",
"consignee_contact_no": "0987654321",
"port_of_loading": "Port A",
"port_of_discharge": "Port B",
"final_destination_port": "Port C",
"country_of_origin_of_goods": "Country A",
"country_of_final_destination": "Country B",
"total_fob_value": 1000,
"freight_charges": 50,
"total_cfr_value": 1050,
"insurance_charges": 20,
"total_cif_value": 1070,
"amount_in_words": "One Thousand Seventy",
"bank_name": "Bank A",
"bank_address": "789 Boulevard, City, Country",
"bank_account_no": "123456789012",
"bank_ifsc_code": "IFSC12345",
"bank_ad_code": "AD12345",
"bank_swift_code": "SWIFT12345",
"payment_terms": "30 days",
"payment_delivery_time": "2024-05-13 17:05:06",
"payment_delivery_terms": "FOB",
"notes": "Special instructions",
"piReportProducts": [
{
"id": "12345",
"pi_report_export_id": "15fjl5-4f45t-5g456y-g5t",
"size": "Medium",
"type": "Type A",
"packaging_description": "Box",
"roll_per_pallet": 10,
"no_of_pallets": 5,
"total_rolls": 50,
"weight_per_roll": "weight_per_roll A",
"quanity": 100,
"core_weight": "pcs",
"rate_in_usd": 10,
"amount_in_usd": 1000
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified PI Report.
This endpoint deletes a specific PI Report by its ID.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/pi-reports-domestic/15fjl5-4f45t-5g456y-g5t" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/pi-reports-domestic/15fjl5-4f45t-5g456y-g5t"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PI Report Domestic deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PO Reports
Display a listing of the PO Reports.
This endpoint returns a list of all PO Reports created by the authenticated user, including associated product details.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/po-reports" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/po-reports"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"poReports": [
{
"id": "15fjl5-4f45t-5g456y-g5t",
"po_no": "PO12345",
"po_date": "2023-06-25",
"quotation_no": "Q12345",
"quotation_date": "2023-06-20",
"buyer_name": "Buyer A",
"buyer_address": "123 Street, City, Country",
"buyer_pan": "ABCDE1234F",
"buyer_iec": "IEC1234567",
"buyer_gst": "GST123456",
"buyer_mail": "buyer@example.com",
"buyer_contact_person": "John Doe",
"buyer_contact_no": "1234567890",
"created_by": 1,
"igst": 18,
"sgst": 9,
"cgst": 9,
"total_value": 1000,
"amount_in_words": "One Thousand",
"notes_1": "Note 1",
"notes_2": "Note 2",
"notes_3": "Note 3",
"notes_4": "Note 4",
"poReportProducts": [
{
"id": "12345jl5-4f45t-5g45",
"po_report_id": "15fjl5-4f45t-5g456y-g5t",
"product_description": "Product A",
"hsn_code": "1234",
"quantity": 10,
"unit": "pcs",
"rate": 100,
"amount": 1000
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created PO Report in storage.
This endpoint allows for the creation of a new PO Report along with its associated product details.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/po-reports" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"po_no\": \"molestias\",
\"po_date\": \"ut\",
\"quotation_no\": \"rerum\",
\"quotation_date\": \"consectetur\",
\"buyer_name\": \"velit\",
\"buyer_address\": \"quasi\",
\"buyer_pan\": \"dolorum\",
\"buyer_iec\": \"corporis\",
\"buyer_gst\": \"non\",
\"buyer_mail\": \"optio\",
\"buyer_contact_person\": \"at\",
\"buyer_contact_no\": \"soluta\",
\"supplier_name\": \"et\",
\"supplier_address\": \"in\",
\"supplier_pan\": \"est\",
\"supplier_iec\": \"eos\",
\"supplier_gst\": \"impedit\",
\"supplier_mail\": \"et\",
\"supplier_contact_person\": \"nisi\",
\"supplier_contact_no\": \"sed\",
\"igst\": \"voluptatem\",
\"sgst\": \"aut\",
\"cgst\": \"et\",
\"total_value\": \"perferendis\",
\"amount_in_words\": \"tempora\",
\"notes_1\": \"consequatur\",
\"notes_2\": \"sit\",
\"notes_3\": \"sed\",
\"notes_4\": \"impedit\",
\"products\": [
\"nobis\"
]
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/po-reports"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"po_no": "molestias",
"po_date": "ut",
"quotation_no": "rerum",
"quotation_date": "consectetur",
"buyer_name": "velit",
"buyer_address": "quasi",
"buyer_pan": "dolorum",
"buyer_iec": "corporis",
"buyer_gst": "non",
"buyer_mail": "optio",
"buyer_contact_person": "at",
"buyer_contact_no": "soluta",
"supplier_name": "et",
"supplier_address": "in",
"supplier_pan": "est",
"supplier_iec": "eos",
"supplier_gst": "impedit",
"supplier_mail": "et",
"supplier_contact_person": "nisi",
"supplier_contact_no": "sed",
"igst": "voluptatem",
"sgst": "aut",
"cgst": "et",
"total_value": "perferendis",
"amount_in_words": "tempora",
"notes_1": "consequatur",
"notes_2": "sit",
"notes_3": "sed",
"notes_4": "impedit",
"products": [
"nobis"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PO Report added successfully."
}
Example response (422):
{
"status": "error",
"errors": {
"po_no": ["The PO number is required."],
"po_date": ["The PO date is required."],
...
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified PO Report in storage.
This endpoint allows for updating a specific PO Report by its ID, including associated product details.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/po-reports/vero" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"po_no\": \"est\",
\"po_date\": \"non\",
\"quotation_no\": \"sint\",
\"quotation_date\": \"recusandae\",
\"buyer_name\": \"non\",
\"buyer_address\": \"eius\",
\"buyer_pan\": \"molestiae\",
\"buyer_iec\": \"vitae\",
\"buyer_gst\": \"esse\",
\"buyer_mail\": \"illo\",
\"buyer_contact_person\": \"voluptate\",
\"buyer_contact_no\": \"assumenda\",
\"supplier_name\": \"sunt\",
\"supplier_address\": \"quis\",
\"supplier_pan\": \"eum\",
\"supplier_iec\": \"rem\",
\"supplier_gst\": \"at\",
\"supplier_mail\": \"debitis\",
\"supplier_contact_person\": \"et\",
\"supplier_contact_no\": \"eum\",
\"igst\": \"possimus\",
\"sgst\": \"ullam\",
\"cgst\": \"vitae\",
\"total_value\": \"harum\",
\"amount_in_words\": \"assumenda\",
\"notes_1\": \"eveniet\",
\"notes_2\": \"totam\",
\"notes_3\": \"non\",
\"notes_4\": \"qui\",
\"products\": [
\"eos\"
]
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/po-reports/vero"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"po_no": "est",
"po_date": "non",
"quotation_no": "sint",
"quotation_date": "recusandae",
"buyer_name": "non",
"buyer_address": "eius",
"buyer_pan": "molestiae",
"buyer_iec": "vitae",
"buyer_gst": "esse",
"buyer_mail": "illo",
"buyer_contact_person": "voluptate",
"buyer_contact_no": "assumenda",
"supplier_name": "sunt",
"supplier_address": "quis",
"supplier_pan": "eum",
"supplier_iec": "rem",
"supplier_gst": "at",
"supplier_mail": "debitis",
"supplier_contact_person": "et",
"supplier_contact_no": "eum",
"igst": "possimus",
"sgst": "ullam",
"cgst": "vitae",
"total_value": "harum",
"amount_in_words": "assumenda",
"notes_1": "eveniet",
"notes_2": "totam",
"notes_3": "non",
"notes_4": "qui",
"products": [
"eos"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PO Report updated successfully."
}
Example response (422):
{
"status": "error",
"errors": {
"po_no": ["The PO number is required."],
"po_date": ["The PO date is required."],
...
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified PO Report from storage.
This endpoint deletes a specific PO Report by its ID, including associated product details.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/po-reports/laboriosam" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/po-reports/laboriosam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "PO Report deleted successfully."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified PO Report.
This endpoint returns the details of a specific PO Report by its PO number, including associated product details.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/po-reports-get?po_no=quas" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/po-reports-get"
);
const params = {
"po_no": "quas",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"poReports": {
"id": "15fjl5-4f45t-5g456y-g5t",
"po_no": "PO12345",
"po_date": "2023-06-25",
"quotation_no": "Q12345",
"quotation_date": "2023-06-20",
"buyer_name": "Buyer A",
"buyer_address": "123 Street, City, Country",
"buyer_pan": "ABCDE1234F",
"buyer_iec": "IEC1234567",
"buyer_gst": "GST123456",
"buyer_mail": "buyer@example.com",
"buyer_contact_person": "John Doe",
"buyer_contact_no": "1234567890",
"created_by": 1,
"igst": 18,
"sgst": 9,
"cgst": 9,
"total_value": 1000,
"amount_in_words": "One Thousand",
"notes_1": "Note 1",
"notes_2": "Note 2",
"notes_3": "Note 3",
"notes_4": "Note 4",
"poReportProducts": [
{
"id": "12345",
"po_report_id": "15fjl5-4f45t-5g456y-g5t",
"product_description": "Product A",
"hsn_code": "1234",
"quantity": 10,
"unit": "pcs",
"rate": 100,
"amount": 1000
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
Products list
Get a list of all products available in system.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"products": [
{
"id": 1dfn4k5-43tn4gkn-434,
"hsn_code": "1234",
"product_name": "Product A",
"sales": 100,
"purchase": 90,
"water_absorption": "5%",
"field": "Field A"
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Product
It store a newly created product in the system.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"hsn_code\": \"1234\",
\"product_name\": \"Product A\",
\"sales\": 100,
\"purchase\": 90,
\"water_absorption\": \"5\",
\"field\": \"Field A\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"hsn_code": "1234",
"product_name": "Product A",
"sales": 100,
"purchase": 90,
"water_absorption": "5",
"field": "Field A"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Product details are stored"
}
Example response (422):
{
"status": "error",
"message": "Validation error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Update
It update the specified product in the system.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/products/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"hsn_code\": \"1234\",
\"product_name\": \"Product A\",
\"sales\": 100,
\"purchase\": 90,
\"water_absorption\": \"10\",
\"field\": \"Field A\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"hsn_code": "1234",
"product_name": "Product A",
"sales": 100,
"purchase": 90,
"water_absorption": "10",
"field": "Field A"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Product details are updated"
}
Example response (422):
{
"status": "error",
"message": "Validation error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Product
It remove the specified product from the system.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/products/1453mk-545tmkm4-3tvekvek" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/products/1453mk-545tmkm4-3tvekvek"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Product details are deleted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sizes
Sizes list
Get a list of all sizes available in system.
Example request:
curl --request GET \
--get "https://api.smartwrapfilms.com/api/sizes" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/sizes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"sizes": [
{
"id": 1dfn4k5-43tn4gkn-434,
"size_in_cm": "50",
"size_in_mm": "550",
"product_name": "Product A",
"hsn_code": "9035",
"thickness": "15mm",
"micron": "500",
"grade": null,
"width": null,
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Size
Store a newly created size in the database. This endpoint allows you to store size details. The variables should be provided in the request body.
Example request:
curl --request POST \
"https://api.smartwrapfilms.com/api/sizes" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"size_in_cm\": \"100\",
\"size_in_mm\": \"1000\",
\"product_name\": \"Product A\",
\"hsn_code\": \"1234\",
\"thickness\": \"5\",
\"micron\": \"50\",
\"grade\": \"Grade A\",
\"width\": \"200\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/sizes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"size_in_cm": "100",
"size_in_mm": "1000",
"product_name": "Product A",
"hsn_code": "1234",
"thickness": "5",
"micron": "50",
"grade": "Grade A",
"width": "200"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Size details are stored"
}
Example response (422):
{
"errors": {
"size_in_cm": [
"Size in centimeters is required",
"Size in centimeters must be numeric"
],
"size_in_mm": [
"Size in millimeters is required",
"Size in millimeters must be numeric"
],
"product_name": [
"Product Name is required"
],
"hsn_code": [
"HSN code is required"
],
"thickness": [
"Thickness is required"
],
"micron": [
"Micron is required",
"Micron must be numeric"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Size
Update the specified size in the database. This endpoint allows you to update size details by providing the size ID and the updated information.
Example request:
curl --request PUT \
"https://api.smartwrapfilms.com/api/sizes/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"size_in_cm\": \"100\",
\"size_in_mm\": \"1000\",
\"product_name\": \"Product A\",
\"hsn_code\": \"1234\",
\"thickness\": \"5\",
\"micron\": \"50\",
\"grade\": \"Grade A\",
\"width\": \"200\"
}"
const url = new URL(
"https://api.smartwrapfilms.com/api/sizes/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"size_in_cm": "100",
"size_in_mm": "1000",
"product_name": "Product A",
"hsn_code": "1234",
"thickness": "5",
"micron": "50",
"grade": "Grade A",
"width": "200"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Size details are updated"
}
Example response (422):
{
"errors": {
"size_in_cm": [
"Size in centimeters is required",
"Size in centimeters must be numeric"
],
"size_in_mm": [
"Size in millimeters is required",
"Size in millimeters must be numeric"
],
"product_name": [
"Product Name is required"
],
"hsn_code": [
"HSN code is required"
],
"thickness": [
"Thickness is required"
],
"micron": [
"Micron is required",
"Micron must be numeric"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Size
Remove the specified size from the database. This endpoint allows you to delete a size by providing its ID.
Example request:
curl --request DELETE \
"https://api.smartwrapfilms.com/api/sizes/1fkj58-4nci34-fk48i" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.smartwrapfilms.com/api/sizes/1fkj58-4nci34-fk48i"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Size is deleted"
}
Example response (404):
{
'status': 'error',
"message": "No records found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.