91 lines
2.9 KiB
HTTP
91 lines
2.9 KiB
HTTP
@host = https://accone.aplikasi.web.id/one-api/mockup/purchase/requester/PurchaseRequestPersediaan
|
|
@token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJNX1VzZXJJRCI6IjM4MCIsIk1fVXNlclVzZXJuYW1lIjoicmVnc2J5IiwiTV9Vc2VyR3JvdXBEYXNoYm9hcmQiOiJvbmUtdWlcL3Rlc3RcL3Z1ZXhcL2FjYy1vbmUtanVybmFsXC8iLCJNX1VzZXJEZWZhdWx0VF9TYW1wbGVTdGF0aW9uSUQiOiIwIiwiTV9TdGFmZk5hbWUiOiJTdGFmZiBSZWdpb25hbCIsImlzX2NvdXJpZXIiOiJOIiwidGltZV9hdXRvbG9nb3V0IjoiMTIwIiwiTV9Vc2VyTG9jYXRpb25JRCI6IjM3IiwiTV9Vc2VyTG9jYXRpb25GbGFnIjoiUiIsIlNfUmVnaW9uYWxOYW1lIjoiU3VyYWJheWEgUmF5YSIsIlNfUmVnaW9uYWxJRCI6IjYiLCJNX0JyYW5jaE5hbWUiOiIiLCJNX0JyYW5jaENvZGUiOiIiLCJNX0JyYW5jaElEIjoiMCIsImxvZ2luTGV2ZWwiOiJyZWdpb25hbCIsIk1fQnJhbmNoQ29tcGFueUlEIjoiMSIsIk1fQnJhbmNoQ29tcGFueU5hbWUiOiJQVCBQUkFNSVRBIiwiaXAiOiIxNDkuMTEzLjEwMi4yOCIsImFnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NDsgcnY6MTM3LjApIEdlY2tvXC8yMDEwMDEwMSBGaXJlZm94XC8xMzcuMCIsInZlcnNpb24iOiJ2MiIsImxhc3QtbG9naW4iOiIyMDI1LTA2LTEwIDA4OjUyOjIwIiwiTV9TYXRlbGxpdGVJRCI6MH0.C1y8mxuCzwJOXHuKFNk5mpkJ72lY2GFTjOlZ9Tx5AWc"
|
|
|
|
### Save and Request Purchase (Create with Pending status)
|
|
POST {{host}}/saveAndDoPurchaseRequest
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"itemcategory": "1",
|
|
"PRDateUse": "2025-06-15",
|
|
"PRRegional": "REG001",
|
|
"PRBranch": "BR001",
|
|
"PRDescription": "Urgent office supplies needed",
|
|
"items": [
|
|
{
|
|
"itemId": 101,
|
|
"itemCode": "ITM001",
|
|
"itemDesc": "Printer Paper A4",
|
|
"unitId": 1,
|
|
"unitCode": "BOX",
|
|
"unitName": "Box",
|
|
"qty": 5,
|
|
"detailId": 0
|
|
},
|
|
{
|
|
"itemId": 102,
|
|
"itemCode": "ITM002",
|
|
"itemDesc": "Stapler",
|
|
"unitId": 2,
|
|
"unitCode": "PCS",
|
|
"unitName": "Pieces",
|
|
"qty": 10,
|
|
"detailId": 0
|
|
}
|
|
],
|
|
"token": {{token}}
|
|
}
|
|
|
|
### For comparison: Regular Save Purchase Request
|
|
POST {{host}}/savePurchaseRequest
|
|
Content-Type: application/json
|
|
Authorization: Bearer YOUR_AUTH_TOKEN_HERE
|
|
|
|
{
|
|
"itemcategory": "1",
|
|
"PRDateUse": "2025-06-15",
|
|
"PRRegional": "REG001",
|
|
"PRBranch": "BR001",
|
|
"PRDescription": "Regular office supplies order",
|
|
"items": [
|
|
{
|
|
"itemId": 101,
|
|
"itemCode": "ITM001",
|
|
"itemDesc": "Printer Paper A4",
|
|
"unitId": 1,
|
|
"unitCode": "BOX",
|
|
"unitName": "Box",
|
|
"qty": 5,
|
|
"detailId": 0
|
|
}
|
|
],
|
|
"token": {{token}}
|
|
}
|
|
|
|
### For comparison: Update Purchase Request with Pending status
|
|
POST http://localhost/accone/BE/purchase/requester/PurchaseRequestPersediaan/updatePurchaseRequest
|
|
Content-Type: application/json
|
|
Authorization: Bearer YOUR_AUTH_TOKEN_HERE
|
|
|
|
{
|
|
"PRID": 123,
|
|
"PRNumber": "PR202506-001",
|
|
"itemtype": "1",
|
|
"PRDateUse": "2025-06-15",
|
|
"PRRegional": "REG001",
|
|
"PRBranch": "BR001",
|
|
"PRDescription": "Updated office supplies",
|
|
"act": "pending",
|
|
"items": [
|
|
{
|
|
"itemId": 101,
|
|
"itemCode": "ITM001",
|
|
"itemDesc": "Printer Paper A4",
|
|
"unitId": 1,
|
|
"unitCode": "BOX",
|
|
"unitName": "Box",
|
|
"qty": 10,
|
|
"detailId": 456
|
|
}
|
|
]
|
|
} |