{"info":{"_postman_id":"8514cec5-25dd-4e12-b4a0-7cb0a041191f","name":"Assignment Golang Gin","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"47767603","collectionId":"8514cec5-25dd-4e12-b4a0-7cb0a041191f","publishedId":"2sB3HopzoE","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-09-13T09:31:15.000Z"},"item":[{"name":"Create Order","id":"ef5896ab-ebd5-4a1f-8ce7-02a1870ec0e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"product_id\": 1,\r\n  \"quantity\": 7,\r\n  \"buyer_id\": \"user-1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/orders","urlObject":{"protocol":"http","port":"8080","path":["orders"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e83157bb-9865-4971-8813-1156b1275af0","name":"Error 422 Required","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"product_id\": 1,\r\n  \"quantity\": 0,\r\n  \"buyer_id\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/orders"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 08:55:39 GMT"},{"key":"Content-Length","value":"140"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 422,\n    \"message\": {\n        \"buyer_id\": [\n            \"buyer id is a required field\"\n        ],\n        \"quantity\": [\n            \"quantity is a required field\"\n        ]\n    },\n    \"data\": null\n}"},{"id":"88b79c38-9473-45ea-b60b-b3b271bcac8c","name":"Error 404","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"product_id\": 19,\r\n  \"quantity\": 7,\r\n  \"buyer_id\": \"user-1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/orders"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 08:57:16 GMT"},{"key":"Content-Length","value":"70"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 404,\n    \"message\": \"product not found\",\n    \"data\": null\n}"},{"id":"f30ceafc-5fef-451b-bd1f-e843c798af01","name":"Success 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"product_id\": 1,\r\n  \"quantity\": 7,\r\n  \"buyer_id\": \"user-1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/orders"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 08:54:58 GMT"},{"key":"Content-Length","value":"127"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"code\": 201,\n    \"message\": \"success\",\n    \"data\": {\n        \"order_id\": \"ba66a651-fc57-4291-b0c9-ecab6747ec03\",\n        \"status\": \"COMPLETED\"\n    }\n}"},{"id":"f4c53679-4862-4aa5-847b-86d2518a6bcb","name":"Error 422 out of stock","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"product_id\": 1,\r\n  \"quantity\": 100,\r\n  \"buyer_id\": \"user-1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/orders"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 08:51:31 GMT"},{"key":"Content-Length","value":"65"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 422,\n    \"message\": \"out of stock\",\n    \"data\": null\n}"}],"_postman_id":"ef5896ab-ebd5-4a1f-8ce7-02a1870ec0e6"},{"name":"Get Order By ID","id":"a3eec802-df38-4432-a7cb-87e48852f4c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/orders/:orderID","urlObject":{"protocol":"http","port":"8080","path":["orders",":orderID"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"ba66a651-fc57-4291-b0c9-ecab6747ec03","key":"orderID"}]}},"response":[{"id":"1fc89767-815f-4934-809d-a312d05c31bb","name":"Succes 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8080/orders/:orderID","protocol":"http","host":["localhost"],"port":"8080","path":["orders",":orderID"],"variable":[{"key":"orderID","value":"ba66a651-fc57-4291-b0c9-ecab6747ec03"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:00:57 GMT"},{"key":"Content-Length","value":"267"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"code\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"order_id\": \"ba66a651-fc57-4291-b0c9-ecab6747ec03\",\n        \"product_id\": 1,\n        \"buyer_id\": \"user-1\",\n        \"quantity\": 7,\n        \"total_cents\": 70000,\n        \"status\": \"COMPLETED\",\n        \"product\": {\n            \"id\": 1,\n            \"name\": \"Limited Edition Product\",\n            \"price_cents\": 10000\n        }\n    }\n}"},{"id":"4d0ec8e2-fb31-4f37-9746-ed0427493986","name":"Error 400 harus UUID","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8080/orders/:orderID","protocol":"http","host":["localhost"],"port":"8080","path":["orders",":orderID"],"variable":[{"key":"orderID","value":"wrong ID"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 08:59:06 GMT"},{"key":"Content-Length","value":"69"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 400,\n    \"message\": \"Job ID must be a valid UUID\",\n    \"data\": null\n}"},{"id":"211c07dc-3ef0-4ff3-9ccd-29b07dc1acc1","name":"Error 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8080/orders/:orderID","protocol":"http","host":["localhost"],"port":"8080","path":["orders",":orderID"],"variable":[{"key":"orderID","value":"befa2802-c2c7-4d2e-a07c-3f0d72ed745c"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 08:59:58 GMT"},{"key":"Content-Length","value":"68"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 404,\n    \"message\": \"order not found\",\n    \"data\": null\n}"}],"_postman_id":"a3eec802-df38-4432-a7cb-87e48852f4c5"},{"name":"Create settlement job","id":"b7eb3ebb-2e81-4753-ae15-52b64d5c5ff9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"from\": \"2025-01-10\",\r\n  \"to\": \"2025-01-15\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/jobs/settlement","urlObject":{"protocol":"http","port":"8080","path":["jobs","settlement"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"57bd675e-708f-4a1e-80dd-d230a52f906a","name":"Success 202","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"from\": \"2025-01-10\",\r\n  \"to\": \"2025-01-15\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/jobs/settlement"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:04:49 GMT"},{"key":"Content-Length","value":"122"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"code\": 202,\n    \"message\": \"success\",\n    \"data\": {\n        \"job_id\": \"2b09bdab-8e89-4262-9789-eaebd610f1e7\",\n        \"status\": \"QUEUED\"\n    }\n}"},{"id":"564948d2-8c2a-412b-84f7-f106011bbaae","name":"Error 422","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"from\": \"2025-01-10\",\r\n  \"to\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/jobs/settlement"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:03:21 GMT"},{"key":"Content-Length","value":"84"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 422,\n    \"message\": {\n        \"to\": [\n            \"to is a required field\"\n        ]\n    },\n    \"data\": null\n}"},{"id":"8f746e21-12c2-4598-81a6-b2c7e7688504","name":"error 400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"from\": \"ngasal\",\r\n  \"to\": \"ngasal\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/jobs/settlement"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:04:26 GMT"},{"key":"Content-Length","value":"71"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 400,\n    \"message\": \"Job ID must be a valid UUID\",\n    \"data\": null\n}"}],"_postman_id":"b7eb3ebb-2e81-4753-ae15-52b64d5c5ff9"},{"name":"Get job by ID","id":"c7a76da6-ba30-4ca0-98fe-6d8fc8449da1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"http://localhost:8080/jobs/:jobID","urlObject":{"protocol":"http","port":"8080","path":["jobs",":jobID"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"1dc4f456-d703-4378-bd3e-5bf8211eeae7","key":"jobID"}]}},"response":[{"id":"c842b4bd-ab6d-4325-af83-472c75b6f73b","name":"success 200","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"http://localhost:8080/jobs/:jobID","protocol":"http","host":["localhost"],"port":"8080","path":["jobs",":jobID"],"variable":[{"key":"jobID","value":"1dc4f456-d703-4378-bd3e-5bf8211eeae7"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:11:49 GMT"},{"key":"Content-Length","value":"261"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"code\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"job_id\": \"1dc4f456-d703-4378-bd3e-5bf8211eeae7\",\n        \"status\": \"COMPLETED\",\n        \"progress\": 100,\n        \"processed\": 191676,\n        \"total\": 213021,\n        \"download_url\": \"/downloads/tmp\\\\settlements\\\\1dc4f456-d703-4378-bd3e-5bf8211eeae7.csv\"\n    }\n}"},{"id":"6294e862-93bd-46f3-bdc4-256cfe455be6","name":"error 400 harus UUID","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/jobs/:jobID","protocol":"http","host":["localhost"],"port":"8080","path":["jobs",":jobID"],"variable":[{"key":"jobID","value":"wrong id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:09:04 GMT"},{"key":"Content-Length","value":"67"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 400,\n    \"message\": \"invalid job ID\",\n    \"data\": null\n}"}],"_postman_id":"c7a76da6-ba30-4ca0-98fe-6d8fc8449da1"},{"name":"Cancel job by ID","id":"475cb902-04ca-4014-89b6-4aae008face8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"http://localhost:8080/jobs/:jobID/cancel","urlObject":{"protocol":"http","port":"8080","path":["jobs",":jobID","cancel"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"2b09bdab-8e89-4262-9789-eaebd610f1e7","key":"jobID"}]}},"response":[{"id":"2cbd4ecc-c86e-4282-a07a-54891804ad7b","name":"Error 400 because status not QUEUED","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"http://localhost:8080/jobs/:jobID/cancel","protocol":"http","host":["localhost"],"port":"8080","path":["jobs",":jobID","cancel"],"variable":[{"key":"jobID","value":"2b09bdab-8e89-4262-9789-eaebd610f1e7"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:20:15 GMT"},{"key":"Content-Length","value":"76"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 400,\n    \"message\": \"job cannot be cancelled\",\n    \"data\": null\n}"},{"id":"0c09614a-cf80-4d4b-98ff-c9fe88a86019","name":"error 404","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"http://localhost:8080/jobs/:jobID/cancel","protocol":"http","host":["localhost"],"port":"8080","path":["jobs",":jobID","cancel"],"variable":[{"key":"jobID","value":"2b09bdab-8e89-4262-9789-eaebd610f1e1"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:24:46 GMT"},{"key":"Content-Length","value":"66"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"code\": 404,\n    \"message\": \"job not found\",\n    \"data\": null\n}"},{"id":"41a8bfd6-a8d4-43c9-8cf6-29cbe2200459","name":"Success 200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"http://localhost:8080/jobs/:jobID/cancel","protocol":"http","host":["localhost"],"port":"8080","path":["jobs",":jobID","cancel"],"variable":[{"key":"jobID","value":"2b09bdab-8e89-4262-9789-eaebd610f1e7"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Date","value":"Sat, 13 Sep 2025 09:26:23 GMT"},{"key":"Content-Length","value":"78"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"code\": 200,\n    \"message\": \"job cancellation requested\",\n    \"data\": null\n}"}],"_postman_id":"475cb902-04ca-4014-89b6-4aae008face8"}]}