MENU navbar-image

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."
        ]
    }
}
 

Request      

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The user's email address. Example: smartwrap.admin@gmail.com

password   string   

The user's password. Example: smartwrap@admin2610

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"
}
 

Request      

POST api/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
     },
     ...
 ]
}
 

Request      

GET api/banks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

POST api/banks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

bank_name   string   

The name of the bank. Example: Bank of America

bank_address   string   

The address of the bank. Example: 123 Main St, New York, NY

account_name   string   

The name of the account holder. Example: John Doe

account_no   string   

The bank account number. Example: 1234567890

ifsc_code   string   

The IFSC code of the bank. Example: BOFAUS3N

swift_code   string  optional  

The SWIFT code of the bank. Example: BOFAUS3NXXX

bank_ad_code_no   string  optional  

The bank AD code number. Example: AD12345678

iban_no   string  optional  

The IBAN number of the bank account. Example: GB82WEST12345698765432

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",
     },
]
}
 

Request      

GET api/company-profile-get

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

PUT api/company-profile

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

id   string   

The unique identifier for the company profile. Example: 1dkjvskj-dnjdj-xnxskj

company_name   string   

The name of the company. Example: Sample Company Ltd.

contact_person_name   string   

The name of the contact person. Example: Ashish Patel

otp_mobile_phone   string   

The OTP mobile phone number. Example: 08796543210

mobile   string   

The mobile phone number. Example: 08796543210

email   string   

The email address. Example: abc@gmail.com

phone_no   string  optional  

The phone number. Example: 7896513

fax_no   string  optional  

The fax number. Example: 08796543210

website   string  optional  

The company website URL. Example: http://www.samplecompany.com

company_register   string  optional  

The company registration number. Example: Register123

address   string  optional  

The company address. Example: Rajkot, Gujarat, India - 360004.

portal_address   string  optional  

The company portal address. Example: http://portal.samplecompany.com

company_type   string  optional  

The type of the company. Example: Private Limited

gst_no   string  optional  

The GST number. Example: GSTIN123456789

lut_no   string  optional  

The LUT number. Example: LUT12345

cin   string  optional  

The CIN number. Example: CIN123456789

gst_circular_no   string  optional  

The GST circular number. Example: CIRC123456789

state_code   string  optional  

The state code. Example: SC

lei_no   string  optional  

The LEI number. Example: LEI1234567890

field_3   string  optional  

Additional field 3. Example: Value3

pan_no   string  optional  

The PAN number. Example: PAN123456789

lut_expiry   date  optional  

The LUT expiry date. Example: 2025-12-31

rcmc_no   string  optional  

The RCMC number. Example: RCMC123456

date_of_filling_rex_number   date  optional  

The date of filling REX number. Example: 2024-06-25

field_1   string  optional  

Additional field 1. Example: Value1

field_4   string  optional  

Additional field 4. Example: Value4

iec_no   string  optional  

The IEC number. Example: IEC123456789

bin_no   string  optional  

The BIN number. Example: BIN123456

rcmc_expiry   date  optional  

The RCMC expiry date. Example: 2026-12-31

circular_no   string  optional  

The circular number. Example: CIRC789456123

aeo_no   string  optional  

The AEO number. Example: AEO123456

field_2   string  optional  

Additional field 2. Example: Value2

field_5   string  optional  

Additional field 5. Example: Value5

pre_carriage_by   string  optional  

The mode of pre-carriage. Example: Road

state_of_origin   string  optional  

The state of origin. Example: Sample State

delivery_period   string  optional  

The delivery period. Example: 30 days

terms_of_delivery   string  optional  

The terms of delivery. Example: FOB

place_of_receipt   string  optional  

The place of receipt. Example: Sample Port

part_of_loading   string  optional  

The part of loading. Example: Loading Dock A

partial_shipement   string  optional  

Indicates if partial shipment is allowed. Example: No

district_of_origin   string  optional  

The district of origin. Example: Sample District

trans_shipement   string  optional  

Indicates if trans-shipment is allowed. Example: No

variety_of_quality   string  optional  

The variety of quality. Example: Premium

company_logo   file  optional  

The company logo file. Select file only. Example: C:\Users\shrey\AppData\Local\Temp\phpD28A.tmp

signature_upload   file  optional  

The signature upload file. Select file only. Example: C:\Users\shrey\AppData\Local\Temp\phpD29B.tmp

range   string  optional  

The range. Example: Range 1

division   string  optional  

The division. Example: Division A

commissionerate   string  optional  

The commissionerate. Example: Commissionerate 1

location_code   string  optional  

The location code. Example: LOC123

annexure_remark   string  optional  

The annexure remark. Example: N/A

shipper_name   string  optional  

The name of the shipper. Example: Sample Shipper

method_used_for_vgm   string  optional  

The method used for VGM. Example: Weighbridge

weighbridge_slip_no   string  optional  

The weighbridge slip number. Example: WS123456

bank_id   string  optional  

The bank identifier. Example: fbdj54-fvd-g45bbf-5tgr4

export_under_detail_1   string  optional  

Export Detail 1. Example: Export Detail 1

export_under_detail_2   string  optional  

Export Detail 2. Example: Export Detail 2

export_remarks   string  optional  

Export Remarks. Example: Export Remarks Example

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"
     },
     ...
 ]
}
 

Request      

GET api/company-raw-material

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
        ]
    }
}
 

Request      

POST api/company-raw-material

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

company_name   string   

The name of the company. Example: Company A

total_pallet   numeric   

The total number of pallets. Example: 10

bag_per_pallet   numeric   

The number of bags per pallet. Example: 20

total_bag   numeric   

The total number of bags. Example: 200

weight_per_bag   numeric   

The weight per bag. Example: 50

total_weight   numeric   

The total weight. Example: 10000

supplier_name   string   

The name of the supplier. Example: Supplier A

purchase_order_no   string   

The purchase order number. Example: PO12345

sales_order_no   string   

The sales order number. Example: SO12345

description_of_goods   string   

The description of goods. Example: Description of goods

grade   string   

grade. Example: 140*140

qty   numeric   

The quantity of goods. Example: 100

weight_per_pcs   numeric   

The weight per piece. Example: 10

payment_terms   string   

The payment terms. Example: Net 30

invoice_date   date   

The invoice date. Example: 2023-06-25

status   string   

The status of the raw materials. Example: Received

received_date   date   

The received date. Example: 2023-06-26

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"
        ]
    }
}
 

Request      

PUT api/company-raw-material/{id}

PATCH api/company-raw-material/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the company raw material to update. Example: 1

Body Parameters

company_name   string   

The name of the company. Example: Company A

total_pallet   numeric   

The total number of pallets. Example: 10

bag_per_pallet   numeric   

The number of bags per pallet. Example: 20

total_bag   numeric   

The total number of bags. Example: 200

weight_per_bag   numeric   

The weight per bag. Example: 50

total_weight   numeric   

The total weight. Example: 10000

supplier_name   string   

The name of the supplier. Example: Supplier A

purchase_order_no   string   

The purchase order number. Example: PO12345

sales_order_no   string   

The sales order number. Example: SO12345

description_of_goods   string   

The description of goods. Example: Description of goods

grade   string   

grade. Example: 140*140

qty   numeric   

The quantity of goods. Example: 100

weight_per_pcs   numeric   

The weight per piece. Example: 10

payment_terms   string   

The payment terms. Example: Net 30

invoice_date   date   

The invoice date. Example: 2023-06-25

status   string   

The status of the raw materials. Example: Received

received_date   date   

The received date. Example: 2023-06-26

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"
}
 

Request      

DELETE api/company-raw-material/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the company raw material to delete. Example: 1

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"
}
 

Request      

GET api/company-raw-material-calculation

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

date_filter   string   

The date to filter the company raw materials by. Example: 2023-06-25

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"
}
 

Request      

GET api/finish-goods-calculation

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

date_filter   string   

The date to filter the company raw materials by. Example: 2023-06-25

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"
}
 

Request      

GET api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/smart-gogodofkog-fkbkr0iooh-4mkfm/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the smart gogodofkog fkbkr0iooh 4mkfm. Example: ducimus

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
        }
    ]
}
 

Request      

GET api/fkfjdgrkgrinrinirnijvdnmrgmbro4k

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
            }
        }
    ]
}
 

Request      

GET api/finish-goods

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
        ]
    }
}
 

Request      

POST api/finish-goods

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer   

The ID of the product. Example: 15

size_id   integer   

The ID of the size. Example: 1

kg_per_roll   numeric   

The kilograms per roll. Example: 100

roll_quantity   numeric   

The quantity of rolls. Example: 10

total_kg   numeric   

The total kilograms. Example: 1000

number_of_pallet   string   

The number of pallets. Example: Pallet 1

pallet_number   string   

The name of the pallet. Example: Pallet A

details   string   

The details of the finish goods. Example: Details of finish goods

boxes   numeric   

The number of boxes. Example: 5

production_date   date   

The production date. Example: 2023-06-15

good_details   string   

The details of the goods. Example: "Good details"

company   string   

The name of the company. Example: "Company A"

description_of_goods   string   

The description of the goods. Example: "Description of goods"

qty_in_storage_start   numeric   

The quantity in storage at the start. Example: 100

qty_issued   numeric   

The quantity issued. Example: 10

qty_in_storage_end   numeric   

The quantity in storage at the end. Example: 90

qty_returned   numeric   

The quantity returned. Example: 5

wastage   numeric   

The wastage quantity. Example: 2

actual_qty_consumed   numeric   

The actual quantity consumed. Example: 8

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"
        ]
    }
}
 

Request      

PUT api/finish-goods/{id}

PATCH api/finish-goods/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the finish good. Example: 15

Body Parameters

product_id   integer   

The ID of the product. Example: 15

size_id   integer   

The ID of the size. Example: 1

kg_per_roll   numeric   

The square meters per roll. Example: 100

roll_quantity   numeric   

The quantity of rolls. Example: 10

total_kg   numeric   

The total square meters. Example: 1000

number_of_pallet   string   

The number_of_pallet information. Example: Pallet 1

pallet_number   string   

The name of the pallet. Example: Pallet A

details   string   

The details of the finish goods. Example: Details of finish goods

boxes   numeric   

The number of boxes. Example: 5

production_date   date   

The order purchase date. Example: 2023-06-15

good_details   string   

The details of the goods. Example: "Good details"

company   string   

The name of the company. Example: "Company A"

description_of_goods   string   

The description of the goods. Example: "Description of goods"

qty_in_storage_start   numeric   

The quantity in storage at the start. Example: 100

qty_issued   numeric   

The quantity issued. Example: 10

qty_in_storage_end   numeric   

The quantity in storage at the end. Example: 90

qty_returned   numeric   

The quantity returned. Example: 5

wastage   numeric   

The wastage quantity. Example: 2

actual_qty_consumed   numeric   

The actual quantity consumed. Example: 8

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"
}
 

Request      

DELETE api/finish-goods/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the finish good. Example: 15

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
            }
        ]
    },
     ...
    ]
}
 

Request      

GET api/pi-reports-domestic

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

POST api/pi-reports-domestic

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PI Report. Example: 15fjl5-4f45t-5g456y-g5t

Body Parameters

pi_no   string   

The PI number. Example: PI001

date   string   

The date of the PI report in YYYY-MM-DD format. Example: 2023-01-01

buyer_order_no   string   

The buyer order number. Example: BO123

buyer_order_date   string   

The date of the buyer order in YYYY-MM-DD format. Example: 2022-12-15

supplier_name   string   

The name of the supplier. Example: Supplier Inc.

supplier_address   string   

The address of the supplier. Example: 123 Supplier St.

supplier_pan   string   

The PAN number of the supplier. Example: ABCDE1234F

supplier_gst   string   

The GST number of the supplier. Example: 29ABCDE1234F1Z5

supplier_mail   string   

The email of the supplier. Example: supplier@example.com

supplier_contact_person   string   

The contact person of the supplier. Example: John Doe

supplier_contact_no   string   

The contact number of the supplier. Example: 1234567890

consignee_name   string   

The name of the consignee. Example: Consignee Ltd.

consignee_address   string   

The address of the consignee. Example: 456 Consignee Rd.

consignee_pan   string   

The PAN number of the consignee. Example: FGHIJ5678K

consignee_iec   string   

The IEC code of the consignee. Example: 0306060070

consignee_gst   string   

The GST number of the consignee. Example: 24FGHIJ5678K1Z2

consignee_mail   string   

The email of the consignee. Example: consignee@example.com

consignee_contact_person   string   

The contact person of the consignee. Example: Jane Smith

consignee_contact_no   string   

The contact number of the consignee. Example: 0987654321

igst   string   

The IGST percentage. Example: 18

sgst   string   

The SGST percentage. Example: 9

cgst   string   

The CGST percentage. Example: 9

total_fob_value   numeric   

The total FOB value of the report. Example: 10000.00

amount_in_words   string   

The total amount in words. Example: Ten Thousand Only

bank_name   string   

The name of the bank. Example: Bank of Export

bank_address   string   

The address of the bank. Example: 789 Bank St.

bank_account_no   string   

The bank account number. Example: 123456789012

bank_ifsc_code   string   

The bank IFSC code. Example: BKID0001234

bank_ad_code   string   

The bank AD code. Example: AD1234567890

bank_swift_code   string   

The bank SWIFT code. Example: BKIDINBBXXX

payment_terms   string   

The payment terms. Example: Net 30 days

payment_delivery_time   string   

The delivery time. Example: 2024-05-11 14:15:03

payment_delivery_terms   string   

The delivery terms. Example: FOB

notes   string  optional  

optional Any additional notes. Example: Urgent delivery required.

products   string[]   

List of products included in the report.

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"
}
 

Request      

PUT api/pi-reports-domestic/{id}

PATCH api/pi-reports-domestic/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PI Report. Example: 15fjl5-4f45t-5g456y-g5t

Body Parameters

pi_no   string   

The PI number. Example: PI001

date   string   

The date of the PI report in YYYY-MM-DD format. Example: 2023-01-01

buyer_order_no   string   

The buyer order number. Example: BO123

buyer_order_date   string   

The date of the buyer order in YYYY-MM-DD format. Example: 2022-12-15

supplier_name   string   

The name of the supplier. Example: Supplier Inc.

supplier_address   string   

The address of the supplier. Example: 123 Supplier St.

supplier_pan   string   

The PAN number of the supplier. Example: ABCDE1234F

supplier_gst   string   

The GST number of the supplier. Example: 29ABCDE1234F1Z5

supplier_mail   string   

The email of the supplier. Example: supplier@example.com

supplier_contact_person   string   

The contact person of the supplier. Example: John Doe

supplier_contact_no   string   

The contact number of the supplier. Example: 1234567890

consignee_name   string   

The name of the consignee. Example: Consignee Ltd.

consignee_address   string   

The address of the consignee. Example: 456 Consignee Rd.

consignee_pan   string   

The PAN number of the consignee. Example: FGHIJ5678K

consignee_iec   string   

The IEC code of the consignee. Example: 0306060070

consignee_gst   string   

The GST number of the consignee. Example: 24FGHIJ5678K1Z2

consignee_mail   string   

The email of the consignee. Example: consignee@example.com

consignee_contact_person   string   

The contact person of the consignee. Example: Jane Smith

consignee_contact_no   string   

The contact number of the consignee. Example: 0987654321

igst   string   

The IGST percentage. Example: 18

sgst   string   

The SGST percentage. Example: 9

cgst   string   

The CGST percentage. Example: 9

total_fob_value   numeric   

The total FOB value of the report. Example: 10000.00

amount_in_words   string   

The total amount in words. Example: Ten Thousand Only

bank_name   string   

The name of the bank. Example: Bank of Export

bank_address   string   

The address of the bank. Example: 789 Bank St.

bank_account_no   string   

The bank account number. Example: 123456789012

bank_ifsc_code   string   

The bank IFSC code. Example: BKID0001234

bank_ad_code   string   

The bank AD code. Example: AD1234567890

bank_swift_code   string   

The bank SWIFT code. Example: BKIDINBBXXX

payment_terms   string   

The payment terms. Example: Net 30 days

payment_delivery_time   string   

The delivery time. Example: 2024-05-11 14:15:03

payment_delivery_terms   string   

The delivery terms. Example: FOB

notes   string  optional  

optional Any additional notes. Example: Urgent delivery required.

products   string[]   

List of products included in the report.

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
            }
        ]
    }
}
 

Request      

POST api/pi-reports-domestic-get

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

pi_no   string  optional  

to get value. Example: PI654

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
                }
            ]
        }
    ]
}
 

Request      

GET api/pi-reports-export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

POST api/pi-reports-export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

pi_no   string   

The PI number. Example: PI12345

date   date   

The date of the PI. Example: 2023-06-25

buyer_order_no   string   

The buyer's order number. Example: BO12345

buyer_order_date   date   

The buyer's order date. Example: 2023-06-20

exporter_name   string   

The name of the exporter. Example: Exporter A

exporter_address   string   

The address of the exporter. Example: 123 Street, City, Country

exporter_pan   string   

The PAN of the exporter. Example: ABCDE1234F

exporter_iec   string   

The IEC of the exporter. Example: IEC1234567

exporter_gst   string   

The GST of the exporter. Example: GST123456

exporter_mail   string   

The email of the exporter. Example: exporter@example.com

exporter_contact_person   string   

The contact person of the exporter. Example: John Doe

exporter_contact_no   string   

The contact number of the exporter. Example: 1234567890

consignee_name   string   

The name of the consignee. Example: Consignee A

consignee_address   string   

The address of the consignee. Example: 456 Avenue, City, Country

consignee_country   string   

The country of the consignee. Example: Country B

consignee_mail   string   

The email of the consignee. Example: consignee@example.com

consignee_contact_person   string   

The contact person of the consignee. Example: Jane Doe

consignee_contact_no   string   

The contact number of the consignee. Example: 0987654321

port_of_loading   string   

The port of loading. Example: Port A

port_of_discharge   string   

The port of discharge. Example: Port B

final_destination_port   string   

The final destination port. Example: Port C

country_of_origin_of_goods   string   

The country of origin of the goods. Example: Country A

country_of_final_destination   string   

The country of final destination. Example: Country B

total_fob_value   number   

The total FOB value. Example: 1000

freight_charges   number   

The freight charges. Example: 50

total_cfr_value   number   

The total CFR value. Example: 1050

insurance_charges   number   

The insurance charges. Example: 20

total_cif_value   number   

The total CIF value. Example: 1070

amount_in_words   string   

The amount in words. Example: One Thousand Seventy

bank_name   string   

The name of the bank. Example: Bank A

bank_address   string   

The address of the bank. Example: 789 Boulevard, City, Country

bank_account_no   string   

The account number of the bank. Example: 123456789012

bank_ifsc_code   string   

The IFSC code of the bank. Example: IFSC12345

bank_ad_code   string   

The AD code of the bank. Example: AD12345

bank_swift_code   string   

The SWIFT code of the bank. Example: SWIFT12345

payment_terms   string   

The payment terms. Example: 30 days

payment_delivery_time   string   

The payment delivery time. Example: 2024-05-13 17:05:06

payment_delivery_terms   string   

The payment delivery terms. Example: FOB

notes   string  optional  

optional Any additional notes. Example: Special instructions

products   string[]   

The list of products associated with the PI Report.

*   object  optional  
size   string   

The size of the product. Example: Medium

type   string   

The type of the product. Example: Type A

packaging_description   string   

The packaging description. Example: Box

roll_per_pallet   integer   

The number of rolls per pallet. Example: 10

no_of_pallets   integer   

The number of pallets. Example: 5

total_rolls   integer   

The total number of rolls. Example: 50

weight_per_roll   string   

The weight_per_roll. Example: weight_per_roll A

quanity   integer   

The quantity. Example: 100

core_weight   string   

The core_weight of measurement. Example: pcs

rate_in_usd   number   

The rate in USD. Example: 10

amount_in_usd   number   

The amount in USD. Example: 1000

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"
}
 

Request      

PUT api/pi-reports-export/{id}

PATCH api/pi-reports-export/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PI Report. Example: 15fjl5-4f45t-5g456y-g5t

Body Parameters

pi_no   string   

The PI number. Example: PI12345

date   date   

The date of the PI. Example: 2023-06-25

buyer_order_no   string   

The buyer's order number. Example: BO12345

buyer_order_date   date   

The buyer's order date. Example: 2023-06-20

exporter_name   string   

The name of the exporter. Example: Exporter A

exporter_address   string   

The address of the exporter. Example: 123 Street, City, Country

exporter_pan   string   

The PAN of the exporter. Example: ABCDE1234F

exporter_iec   string   

The IEC of the exporter. Example: IEC1234567

exporter_gst   string   

The GST of the exporter. Example: GST123456

exporter_mail   string   

The email of the exporter. Example: exporter@example.com

exporter_contact_person   string   

The contact person of the exporter. Example: John Doe

exporter_contact_no   string   

The contact number of the exporter. Example: 1234567890

consignee_name   string   

The name of the consignee. Example: Consignee A

consignee_address   string   

The address of the consignee. Example: 456 Avenue, City, Country

consignee_country   string   

The country of the consignee. Example: Country B

consignee_mail   string   

The email of the consignee. Example: consignee@example.com

consignee_contact_person   string   

The contact person of the consignee. Example: Jane Doe

consignee_contact_no   string   

The contact number of the consignee. Example: 0987654321

port_of_loading   string   

The port of loading. Example: Port A

port_of_discharge   string   

The port of discharge. Example: Port B

final_destination_port   string   

The final destination port. Example: Port C

country_of_origin_of_goods   string   

The country of origin of the goods. Example: Country A

country_of_final_destination   string   

The country of final destination. Example: Country B

total_fob_value   number   

The total FOB value. Example: 1000

freight_charges   number   

The freight charges. Example: 50

total_cfr_value   number   

The total CFR value. Example: 1050

insurance_charges   number   

The insurance charges. Example: 20

total_cif_value   number   

The total CIF value. Example: 1070

amount_in_words   string   

The amount in words. Example: One Thousand Seventy

bank_name   string   

The name of the bank. Example: Bank A

bank_address   string   

The address of the bank. Example: 789 Boulevard, City, Country

bank_account_no   string   

The account number of the bank. Example: 123456789012

bank_ifsc_code   string   

The IFSC code of the bank. Example: IFSC12345

bank_ad_code   string   

The AD code of the bank. Example: AD12345

bank_swift_code   string   

The SWIFT code of the bank. Example: SWIFT12345

payment_terms   string   

The payment terms. Example: 30 days

payment_delivery_time   string   

The payment delivery time. Example: 2024-05-13 17:05:06

payment_delivery_terms   string   

The payment delivery terms. Example: FOB

notes   string  optional  

optional Any additional notes. Example: Special instructions

products   string[]   

The list of products associated with the PI Report.

*   object  optional  
size   string   

The size of the product. Example: Medium

type   string   

The type of the product. Example: Type A

packaging_description   string   

The packaging description. Example: Box

roll_per_pallet   integer   

The number of rolls per pallet. Example: 10

no_of_pallets   integer   

The number of pallets. Example: 5

total_rolls   integer   

The total number of rolls. Example: 50

weight_per_roll   string   

The weight per roll. Example: weight_per_roll A

quanity   integer   

The quantity. Example: 100

core_weight   string   

The core weight unit. Example: pcs

rate_in_usd   number   

The rate in USD. Example: 10

amount_in_usd   number   

The amount in USD. Example: 1000

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"
}
 

Request      

DELETE api/pi-reports-export/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PI Report. Example: 15fjl5-4f45t-5g456y-g5t

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
            }
        ]
    }
}
 

Request      

POST api/pi-reports-export-get

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

pi_no   string   

The PI number of the report. Example: PI12345

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"
}
 

Request      

DELETE api/pi-reports-domestic/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PI Report. Example: 15fjl5-4f45t-5g456y-g5t

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
                }
            ]
        }
    ]
}
 

Request      

GET api/po-reports

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."],
     ...
 }
}
 

Request      

POST api/po-reports

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

po_no   string   

The PO number. Example: molestias

po_date   date   

The date of the PO. Example: ut

quotation_no   string   

The quotation number. Example: rerum

quotation_date   date   

The date of the quotation. Example: consectetur

buyer_name   string   

The name of the buyer. Example: velit

buyer_address   string   

The address of the buyer. Example: quasi

buyer_pan   string   

The PAN of the buyer. Example: dolorum

buyer_iec   string   

The IEC of the buyer. Example: corporis

buyer_gst   string   

The GST number of the buyer. Example: non

buyer_mail   string   

The email of the buyer. Example: optio

buyer_contact_person   string   

The contact person of the buyer. Example: at

buyer_contact_no   string   

The contact number of the buyer. Example: soluta

supplier_name   string   

The name of the supplier. Example: et

supplier_address   string   

The address of the supplier. Example: in

supplier_pan   string   

The PAN of the supplier. Example: est

supplier_iec   string   

The IEC of the supplier. Example: eos

supplier_gst   string   

The GST number of the supplier. Example: impedit

supplier_mail   string   

The email of the supplier. Example: et

supplier_contact_person   string   

The contact person of the supplier. Example: nisi

supplier_contact_no   string   

The contact number of the supplier. Example: sed

igst   numeric   

The IGST amount. Example: voluptatem

sgst   numeric   

The SGST amount. Example: aut

cgst   numeric   

The CGST amount. Example: et

total_value   numeric   

The total value of the PO. Example: perferendis

amount_in_words   string   

The total value in words. Example: tempora

notes_1   string  optional  

optional Additional notes 1. Example: consequatur

notes_2   string  optional  

optional Additional notes 2. Example: sit

notes_3   string  optional  

optional Additional notes 3. Example: sed

notes_4   string  optional  

optional Additional notes 4. Example: impedit

products   string[]   

The array of product details.

*   object  optional  
product_description   string   

The description of the product. Example: quidem

hsn_code   string   

The HSN code of the product. Example: in

quantity   numeric   

The quantity of the product. Example: distinctio

unit   string   

The unit of the product. Example: rem

rate   numeric   

The rate of the product. Example: sed

amount   numeric   

The amount of the product. Example: non

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."],
     ...
 }
}
 

Request      

PUT api/po-reports/{id}

PATCH api/po-reports/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PO Report. Example: vero

Body Parameters

po_no   string   

The PO number. Example: est

po_date   date   

The date of the PO. Example: non

quotation_no   string   

The quotation number. Example: sint

quotation_date   date   

The date of the quotation. Example: recusandae

buyer_name   string   

The name of the buyer. Example: non

buyer_address   string   

The address of the buyer. Example: eius

buyer_pan   string   

The PAN of the buyer. Example: molestiae

buyer_iec   string   

The IEC of the buyer. Example: vitae

buyer_gst   string   

The GST number of the buyer. Example: esse

buyer_mail   string   

The email of the buyer. Example: illo

buyer_contact_person   string   

The contact person of the buyer. Example: voluptate

buyer_contact_no   string   

The contact number of the buyer. Example: assumenda

supplier_name   string   

The name of the supplier. Example: sunt

supplier_address   string   

The address of the supplier. Example: quis

supplier_pan   string   

The PAN of the supplier. Example: eum

supplier_iec   string   

The IEC of the supplier. Example: rem

supplier_gst   string   

The GST number of the supplier. Example: at

supplier_mail   string   

The email of the supplier. Example: debitis

supplier_contact_person   string   

The contact person of the supplier. Example: et

supplier_contact_no   string   

The contact number of the supplier. Example: eum

igst   numeric   

The IGST amount. Example: possimus

sgst   numeric   

The SGST amount. Example: ullam

cgst   numeric   

The CGST amount. Example: vitae

total_value   numeric   

The total value of the PO. Example: harum

amount_in_words   string   

The total value in words. Example: assumenda

notes_1   string  optional  

optional Additional notes 1. Example: eveniet

notes_2   string  optional  

optional Additional notes 2. Example: totam

notes_3   string  optional  

optional Additional notes 3. Example: non

notes_4   string  optional  

optional Additional notes 4. Example: qui

products   string[]   

The array of product details.

*   object  optional  
product_description   string   

The description of the product. Example: qui

hsn_code   string   

The HSN code of the product. Example: ratione

quantity   numeric   

The quantity of the product. Example: vel

unit   string   

The unit of the product. Example: odio

rate   numeric   

The rate of the product. Example: voluptatem

amount   numeric   

The amount of the product. Example: sit

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."
}
 

Request      

DELETE api/po-reports/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the PO Report. Example: laboriosam

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
            }
        ]
    }
}
 

Request      

POST api/po-reports-get

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

po_no   string   

The PO number of the PO Report. Example: quas

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"
     },
     ...
 ]
}
 

Request      

GET api/products

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

POST api/products

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

hsn_code   string   

The HSN code of the product. Example: 1234

product_name   string   

The name of the product. Example: Product A

sales   number   

The sales price of the product. Example: 100

purchase   number   

The purchase price of the product. Example: 90

water_absorption   string  optional  

The water absorption rate of the product. Example: 5

field   string  optional  

The field of the product. Example: Field A

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"
}
 

Request      

PUT api/products/{id}

PATCH api/products/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product to update. Example: 1

Body Parameters

hsn_code   string   

The HSN code of the product. Example: 1234

product_name   string   

The name of the product. Example: Product A

sales   number   

The sales price of the product. Example: 100

purchase   number   

The purchase price of the product. Example: 90

water_absorption   string  optional  

The water absorption rate of the product. Example: 10

field   string  optional  

The field of the product. Example: Field A

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"
}
 

Request      

DELETE api/products/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product to delete. Example: 1453mk-545tmkm4-3tvekvek

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,
     },
     ...
 ]
}
 

Request      

GET api/sizes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
        ]
    }
}
 

Request      

POST api/sizes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

size_in_cm   numeric   

The size in centimeters. Example: 100

size_in_mm   numeric   

The size in millimeters. Example: 1000

product_name   string   

The name of the product. Example: Product A

hsn_code   string   

The HSN code of the product. Example: 1234

thickness   string   

The thickness of the product. Example: 5

micron   numeric   

The micron value of the product. Example: 50

grade   string  optional  

The grade of the product. Example: Grade A

width   string  optional  

The width of the product. Example: 200

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"
        ]
    }
}
 

Request      

PUT api/sizes/{id}

PATCH api/sizes/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the size to update. Example: 1

Body Parameters

size_in_cm   numeric   

The size in centimeters. Example: 100

size_in_mm   numeric   

The size in millimeters. Example: 1000

product_name   string   

The name of the product. Example: Product A

hsn_code   string   

The HSN code of the product. Example: 1234

thickness   string   

The thickness of the product. Example: 5

micron   numeric   

The micron value of the product. Example: 50

grade   string  optional  

The grade of the product. Example: Grade A

width   string  optional  

The width of the product. Example: 200

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"
}
 

Request      

DELETE api/sizes/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the size to delete. Example: 1fkj58-4nci34-fk48i