Skip to content

Instantly share code, notes, and snippets.

@defrindr
Created September 11, 2023 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save defrindr/b3f26e20951355dda9b70daceca65908 to your computer and use it in GitHub Desktop.
Save defrindr/b3f26e20951355dda9b70daceca65908 to your computer and use it in GitHub Desktop.
{
"info": {
"_postman_id": "df44f797-e00e-45ce-a01d-8bde6431ec9e",
"name": "2023-POS-Haidar",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "8432050"
},
"item": [
{
"name": "Auth",
"item": [
{
"name": "Login",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"admin@mail.com\",\n \"password\": \"password\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/auth/login",
"host": [
"{{BASE_URL}}"
],
"path": [
"auth",
"login"
]
}
},
"response": []
},
{
"name": "Logout",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0L2FwaS9hdXRoL2xvZ2luIiwiaWF0IjoxNjk0MjQ3NDE3LCJleHAiOjE2OTQyNTEwMTcsIm5iZiI6MTY5NDI0NzQxNywianRpIjoibWZaY1dva0NxUThyODBHeSIsInN1YiI6IjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ylR7hqGNX6OpPklUTd6H85EiHcuP1qCmGQi-G9L31Cg",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"admin@mail.com\",\n \"password\": \"password\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/auth/logout",
"host": [
"{{BASE_URL}}"
],
"path": [
"auth",
"logout"
]
}
},
"response": []
}
]
},
{
"name": "Master",
"item": [
{
"name": "Category",
"item": [
{
"name": "List",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/category?page=1",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"category"
],
"query": [
{
"key": "page",
"value": "1"
}
]
}
},
"response": [
{
"name": "List",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/category?page=1",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"category"
],
"query": [
{
"key": "page",
"value": "1"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Host",
"value": "localhost"
},
{
"key": "Date",
"value": "Sat, 09 Sep 2023 08:40:06 GMT"
},
{
"key": "Date",
"value": "Sat, 09 Sep 2023 08:40:06 GMT"
},
{
"key": "Connection",
"value": "close"
},
{
"key": "X-Powered-By",
"value": "PHP/8.2.10"
},
{
"key": "Cache-Control",
"value": "no-cache, private"
},
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "X-RateLimit-Limit",
"value": "60"
},
{
"key": "X-RateLimit-Remaining",
"value": "55"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
],
"cookie": [],
"body": "{\n \"current_page\": 1,\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"BAJU\",\n \"parent_id\": null,\n \"created_at\": \"2023-09-09T08:39:23.000000Z\",\n \"updated_at\": \"2023-09-09T08:39:23.000000Z\"\n },\n {\n \"id\": 2,\n \"name\": \"Seragam Sekolah\",\n \"parent_id\": 1,\n \"created_at\": \"2023-09-09T08:39:52.000000Z\",\n \"updated_at\": \"2023-09-09T08:39:52.000000Z\"\n },\n {\n \"id\": 3,\n \"name\": \"Muslim\",\n \"parent_id\": 1,\n \"created_at\": \"2023-09-09T08:40:02.000000Z\",\n \"updated_at\": \"2023-09-09T08:40:02.000000Z\"\n }\n ],\n \"first_page_url\": \"http://localhost/api/master/category?page=1\",\n \"from\": 1,\n \"last_page\": 1,\n \"last_page_url\": \"http://localhost/api/master/category?page=1\",\n \"links\": [\n {\n \"url\": null,\n \"label\": \"« Previous\",\n \"active\": false\n },\n {\n \"url\": \"http://localhost/api/master/category?page=1\",\n \"label\": \"1\",\n \"active\": true\n },\n {\n \"url\": null,\n \"label\": \"Next »\",\n \"active\": false\n }\n ],\n \"next_page_url\": null,\n \"path\": \"http://localhost/api/master/category\",\n \"per_page\": 20,\n \"prev_page_url\": null,\n \"to\": 3,\n \"total\": 3\n}"
}
]
},
{
"name": "Store",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/category",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"category"
]
}
},
"response": [
{
"name": "Store",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Muslim\",\n \"parent_id\": 1\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/category",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"category"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Host",
"value": "localhost"
},
{
"key": "Date",
"value": "Sat, 09 Sep 2023 08:40:02 GMT"
},
{
"key": "Date",
"value": "Sat, 09 Sep 2023 08:40:02 GMT"
},
{
"key": "Connection",
"value": "close"
},
{
"key": "X-Powered-By",
"value": "PHP/8.2.10"
},
{
"key": "Cache-Control",
"value": "no-cache, private"
},
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "X-RateLimit-Limit",
"value": "60"
},
{
"key": "X-RateLimit-Remaining",
"value": "56"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
],
"cookie": [],
"body": "{\n \"message\": \"Category berhasil dibuat\"\n}"
}
]
},
{
"name": "Update",
"request": {
"method": "PUT",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Koko\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/category/3",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"category",
"3"
]
}
},
"response": []
},
{
"name": "destroy",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/category/3",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"category",
"3"
]
}
},
"response": []
}
]
},
{
"name": "Storage",
"item": [
{
"name": "List",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/storage",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"storage"
]
}
},
"response": []
},
{
"name": "Store",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Rak Belakang\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/storage",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"storage"
]
}
},
"response": []
},
{
"name": "Update",
"request": {
"method": "PUT",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Rak Belakang Revisi\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/storage/4",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"storage",
"4"
]
}
},
"response": []
},
{
"name": "destroy",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/storage/4",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"storage",
"4"
]
}
},
"response": []
}
]
},
{
"name": "User",
"item": [
{
"name": "List",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/user",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"user"
]
}
},
"response": []
},
{
"name": "Store",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"User 2\",\n \"email\": \"user2@mail.com\",\n \"password\": \"password\",\n \"role_id\": \"admin\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/user",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"user"
]
}
},
"response": []
},
{
"name": "Update",
"request": {
"method": "PUT",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"User 2(revisi)\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/user/5",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"user",
"5"
]
}
},
"response": []
},
{
"name": "destroy",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/user/5",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"user",
"5"
]
}
},
"response": []
}
]
},
{
"name": "Member",
"item": [
{
"name": "List",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/member",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member"
]
}
},
"response": []
},
{
"name": "Store",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Member\",\n \"address\": \"Alamat member\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/member",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member"
]
}
},
"response": []
},
{
"name": "Update",
"request": {
"method": "PUT",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Member\",\n \"address\": \"Alamat member\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/member/5",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member",
"5"
]
}
},
"response": []
},
{
"name": "destroy",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/member/5",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member",
"5"
]
}
},
"response": []
}
]
},
{
"name": "Product",
"item": [
{
"name": "List",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/member",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member"
]
}
},
"response": []
},
{
"name": "Store",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Member\",\n \"address\": \"Alamat member\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/member",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member"
]
}
},
"response": []
},
{
"name": "Update",
"request": {
"method": "PUT",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Member\",\n \"address\": \"Alamat member\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/master/member/5",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member",
"5"
]
}
},
"response": []
},
{
"name": "destroy",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{BASE_URL}}/master/member/5",
"host": [
"{{BASE_URL}}"
],
"path": [
"master",
"member",
"5"
]
}
},
"response": []
}
]
},
{
"name": "Transaction",
"item": [
{
"name": "create",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"discount\": 0,\n \"price\": 10000,\n \"pay\": 0,\n \"total_price\": 10000,\n \"back\": 0,\n \"items\": [\n {\n \"product_id\": 2,\n \"amount\": \"2\"\n }\n ]\n}"
},
"url": {
"raw": "{{BASE_URL}}/main/transaction",
"host": [
"{{BASE_URL}}"
],
"path": [
"main",
"transaction"
]
}
},
"response": []
},
{
"name": "List",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"item\": [{\n \"product_id\": 1,\n \"amount\": 2\n },{\n \"product_id\": 2,\n \"amount\": 10\n }],\n \"pay\": 2000\n}"
},
"url": {
"raw": "{{BASE_URL}}/main/transaction",
"host": [
"{{BASE_URL}}"
],
"path": [
"main",
"transaction"
]
}
},
"response": []
}
]
}
]
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{JWT_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "BASE_URL",
"value": "",
"type": "string"
},
{
"key": "JWT_TOKEN",
"value": "",
"type": "string"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment