PDF Invoice (Just a Basic Invoice)
$client = new Client();
$headers = [
"Authorization" => "Bearer <your-token>",
"Content-Type" => "application/x-www-form-urlencoded"
];
$options = [
"form_params" => [
"date" => "2023-02-13",
"id" => "202302130001",
"payment_method" => "Credit Card - 572817283817",
"parameters_data[0][0]" => "Christmas Bundle A",
"parameters_data[0][1]" => "1600000",
"parameters_data[0][2]" => "2",
"parameters_data[0][3]" => "3200000",
"total_payment" => "3200000",
"buyer_name" => "Foo Bar",
"buyer_email" => "[email protected]",
"company_name" => "Foo Bar, Ltd.",
"company_address" => "Foo Bar St. 12",
"city" => "Los Angeles",
"zip_code" => "88888"
]];
$request = new Request("POST", "https://pdf-generator.fransteja.com/pdf-invoice-2", $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
var settings = {
"url": "https://pdf-generator.fransteja.com/pdf-invoice-2",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer <your-token>",
"Content-Type": "application/x-www-form-urlencoded"
},
"data": {
"date": "2023-02-13",
"id": "202302130001",
"payment_method": "Credit Card - 572817283817",
"parameters_data[0][0]": "Christmas Bundle A",
"parameters_data[0][1]": "1600000",
"parameters_data[0][2]": "2",
"parameters_data[0][3]": "3200000",
"total_payment": "3200000",
"buyer_name": "Foo Bar",
"buyer_email": "[email protected]",
"company_name": "Foo Bar, Ltd.",
"company_address": "Foo Bar St. 12",
"city": "Los Angeles",
"zip_code": "88888"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
PDF Stock Report (Just a Basic Stock Report)
<?php $client = new Client(); $headers = [ 'Authorization' => 'Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4', 'Cookie' => 'laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D' ]; $options = [ 'multipart' => [ [ 'name' => 'date', 'contents' => '2023-02-13' ], [ 'name' => 'parameters_data[0][0]', 'contents' => 'ITEM-1' ], [ 'name' => 'parameters_data[0][1]', 'contents' => 'Tas Laptop' ], [ 'name' => 'parameters_data[0][2]', 'contents' => '23 Unit' ] ]]; $request = new Request('POST', 'https://pdf-generator.fransteja.com/stock-report', $headers); $res = $client->sendAsync($request, $options)->wait(); echo $res->getBody();
var form = new FormData(); form.append("date", "2023-02-13"); form.append("parameters_data[0][0]", "ITEM-1"); form.append("parameters_data[0][1]", "Tas Laptop"); form.append("parameters_data[0][2]", "23 Unit"); var settings = { "url": "https://pdf-generator.fransteja.com/stock-report", "method": "POST", "timeout": 0, "headers": { "Authorization": "Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4", "Cookie": "laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D" }, "processData": false, "mimeType": "multipart/form-data", "contentType": false, "data": form }; $.ajax(settings).done(function (response) { console.log(response); });
PDF Forgot Password (Just a Basic Forgot Password)
<?php $client = new Client(); $headers = [ 'Authorization' => 'Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4', 'Cookie' => 'laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D' ]; $options = [ 'multipart' => [ [ 'name' => 'date', 'contents' => '2023-02-13' ], [ 'name' => 'parameters_data[0][0]', 'contents' => 'ITEM-1' ], [ 'name' => 'parameters_data[0][1]', 'contents' => 'Tas Laptop' ], [ 'name' => 'parameters_data[0][2]', 'contents' => '23 Unit' ] ]]; $request = new Request('POST', 'https://pdf-generator.fransteja.com/stock-report', $headers); $res = $client->sendAsync($request, $options)->wait(); echo $res->getBody();
var form = new FormData(); form.append("date", "2023-02-13"); form.append("parameters_data[0][0]", "ITEM-1"); form.append("parameters_data[0][1]", "Tas Laptop"); form.append("parameters_data[0][2]", "23 Unit"); var settings = { "url": "https://pdf-generator.fransteja.com/stock-report", "method": "POST", "timeout": 0, "headers": { "Authorization": "Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4", "Cookie": "laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D" }, "processData": false, "mimeType": "multipart/form-data", "contentType": false, "data": form }; $.ajax(settings).done(function (response) { console.log(response); });
Interface Documentation
<?php $client = new Client(); $headers = [ 'Authorization' => 'Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4', 'Cookie' => 'laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D' ]; $options = [ 'multipart' => [ [ 'name' => 'date', 'contents' => '2023-02-13' ], [ 'name' => 'parameters_data[0][0]', 'contents' => 'ITEM-1' ], [ 'name' => 'parameters_data[0][1]', 'contents' => 'Tas Laptop' ], [ 'name' => 'parameters_data[0][2]', 'contents' => '23 Unit' ] ]]; $request = new Request('POST', 'https://pdf-generator.fransteja.com/stock-report', $headers); $res = $client->sendAsync($request, $options)->wait(); echo $res->getBody();
var form = new FormData(); form.append("date", "2023-02-13"); form.append("parameters_data[0][0]", "ITEM-1"); form.append("parameters_data[0][1]", "Tas Laptop"); form.append("parameters_data[0][2]", "23 Unit"); var settings = { "url": "https://pdf-generator.fransteja.com/stock-report", "method": "POST", "timeout": 0, "headers": { "Authorization": "Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4", "Cookie": "laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D" }, "processData": false, "mimeType": "multipart/form-data", "contentType": false, "data": form }; $.ajax(settings).done(function (response) { console.log(response); });
Pengajuan Barang Keluar
<?php $client = new Client(); $headers = [ 'Authorization' => 'Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4', 'Cookie' => 'laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D' ]; $options = [ 'multipart' => [ [ 'name' => 'date', 'contents' => '2023-02-13' ], [ 'name' => 'parameters_data[0][0]', 'contents' => 'ITEM-1' ], [ 'name' => 'parameters_data[0][1]', 'contents' => 'Tas Laptop' ], [ 'name' => 'parameters_data[0][2]', 'contents' => '23 Unit' ] ]]; $request = new Request('POST', 'https://pdf-generator.fransteja.com/stock-report', $headers); $res = $client->sendAsync($request, $options)->wait(); echo $res->getBody();
var form = new FormData(); form.append("date", "2023-02-13"); form.append("parameters_data[0][0]", "ITEM-1"); form.append("parameters_data[0][1]", "Tas Laptop"); form.append("parameters_data[0][2]", "23 Unit"); var settings = { "url": "https://pdf-generator.fransteja.com/stock-report", "method": "POST", "timeout": 0, "headers": { "Authorization": "Bearer GIYQmBTQGePPrVct3djBXFySmkhemM56FuTptqbSoa6hNSROC4", "Cookie": "laravel_session=eyJpdiI6Ijg3YkU2S2cwSlpHTHVxbEIrQW5RcHc9PSIsInZhbHVlIjoiblY5WEVpSFdxUTZrVFpPOG95aGNqK3JUUVpKK1JGMU44dnZRdytSSGRxRi9rbXptM2ZUZEVUaG5rak5vcmJoNmw2MHhHbjNjWk5sWVA3UjljSWJPVmtWNnZ3elh2SHQvUHk5RlRJSTcxRGljbjB5cWJSOE05R2YycjRrWXRKWmQiLCJtYWMiOiI1NzhkOTRiZDU3ZjBjODNjMjBiZWMxODY5ODBmODY4ZDM5ODk5MmIwZWJjYTJhZDYxNDhlMjI4ZTM3Y2FlMTBkIiwidGFnIjoiIn0%3D" }, "processData": false, "mimeType": "multipart/form-data", "contentType": false, "data": form }; $.ajax(settings).done(function (response) { console.log(response); });