Last active
November 9, 2023 12:36
-
-
Save kilgarenone/efb8dd41ecee6accca830e451162c4ef to your computer and use it in GitHub Desktop.
orders.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.0.0", | |
| "paths": { | |
| "/api/orders/orders/latest": { | |
| "get": { | |
| "operationId": "getLastPurchasedOrder", | |
| "summary": "Get last purchase order for a user", | |
| "description": "Get last purchased order by user ID", | |
| "parameters": [ | |
| { | |
| "name": "userId", | |
| "required": true, | |
| "in": "query", | |
| "description": "User id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ReadOrderSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "404": { | |
| "description": "Not Found", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/{id}/pos": { | |
| "get": { | |
| "operationId": "readPosOrder", | |
| "summary": "Get order details from POS", | |
| "description": "Get order details from POS by order ID", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ReadPosOrderResponseDto" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/{id}": { | |
| "get": { | |
| "operationId": "readOrder", | |
| "summary": "Get order details", | |
| "description": "Get order details by order ID", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "byTimeout", | |
| "required": false, | |
| "in": "query", | |
| "description": "Read order on timeout", | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ReadOrderSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "404": { | |
| "description": "Not Found", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/{id}/cancel": { | |
| "put": { | |
| "operationId": "cancelOrder", | |
| "summary": "Cancel order", | |
| "description": "Cancel order by order ID", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "isCancelEarly", | |
| "required": true, | |
| "in": "query", | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| }, | |
| { | |
| "name": "sub", | |
| "in": "header", | |
| "description": "User id passed by api-iam", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CancelOrderSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "404": { | |
| "description": "Not Found", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/orders": { | |
| "post": { | |
| "operationId": "createOrderFuel", | |
| "summary": "createOrderFuel", | |
| "description": "Create fuel order, operationId: `createOrderFuel`", | |
| "parameters": [ | |
| { | |
| "name": "x-device-metadata", | |
| "in": "header", | |
| "description": "Device metadata such as app version, OS type, etc...", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "x-interface-type", | |
| "in": "header", | |
| "description": "Device interface type (E.g. web, app, lite, etc...)", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "x-idempotency-key", | |
| "in": "header", | |
| "description": "Idempotency Key", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateOrderFuelInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "description": "Created", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateOrderFuelSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| }, | |
| "get": { | |
| "operationId": "indexOrdersFuel", | |
| "summary": "Read orders", | |
| "description": "Get list of all orders that belongs to the user", | |
| "parameters": [ | |
| { | |
| "name": "active", | |
| "required": false, | |
| "in": "query", | |
| "description": "To return active fuel orders", | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| }, | |
| { | |
| "name": "page", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "perPage", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "number" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/IndexOrdersFuelSuccess" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/orders/options": { | |
| "get": { | |
| "operationId": "getUserFuelOptions", | |
| "summary": "Get user fuel options", | |
| "description": "Get user fuel options such as fuel presets, limits, etc", | |
| "parameters": [], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/UserFuelOptionsSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/orders/fuel/receipt/{orderId}/resend": { | |
| "get": { | |
| "operationId": "resendPetrolReceipt", | |
| "summary": "Resend Petrol Receipt", | |
| "description": "Resend petrol receipt by order id", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "sent", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ResendReceiptStatusSuccessDto" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "failed", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ResendReceiptStatusFailedDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/orders/fuel/orders/{orderId}/reprocess": { | |
| "post": { | |
| "operationId": "reprocessOrder", | |
| "summary": "Reprocess order by different states", | |
| "description": "Reprocess order by different states with backend token", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ReprocessOrderInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/orders/fuel/receipt/{orderId}/pdf": { | |
| "get": { | |
| "operationId": "downloadPetrolReceiptPdf", | |
| "summary": "Download Petrol Receipt PDF", | |
| "description": "Download petrol receipt PDF by order id", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "" | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/orders/fuel/orders/{orderId}/feedback": { | |
| "post": { | |
| "operationId": "submitFeedback", | |
| "summary": "Submit Feedback", | |
| "description": "Submit feedback for particular fueling experience", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/SubmitFeedbackDto" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/fuel/{orderId}": { | |
| "post": { | |
| "operationId": "retryOrder", | |
| "summary": "Retry order", | |
| "description": "Cancel Current order and create new one based on order id and idempotency key", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "x-device-metadata", | |
| "in": "header", | |
| "description": "Device metadata such as app version, OS type, etc...", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "x-interface-type", | |
| "in": "header", | |
| "description": "Device interface type (E.g. web, app, lite, etc...)", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "201": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateOrderFuelSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/partners/fuel/orders": { | |
| "post": { | |
| "operationId": "partnerCreateOrderFuel", | |
| "summary": "partnerCreateOrderFuel", | |
| "description": "Create a fuel order for a partner user", | |
| "parameters": [ | |
| { | |
| "name": "x-device-metadata", | |
| "in": "header", | |
| "description": "Device metadata such as app version, OS type, etc...", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "x-interface-type", | |
| "in": "header", | |
| "description": "Device interface type (E.g. web, app, lite, etc...)", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "x-idempotency-key", | |
| "in": "header", | |
| "description": "Idempotency Key", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/PartnerCreateOrderFuelInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "description": "Created", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateOrderFuelSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "partners orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/partners/fuel/orders/options": { | |
| "get": { | |
| "operationId": "getPartnerUserFuelOptions", | |
| "summary": "Get user fuel options for partners", | |
| "description": "Get user fuel options for partners such as fuel presets, limits, etc", | |
| "parameters": [], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/PartnerUserFuelOptionsSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "partners orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/partners/fuel/orders/{id}": { | |
| "get": { | |
| "operationId": "partnerReadOrder", | |
| "summary": "Get order details for a partner user", | |
| "description": "Get order details by order ID for a partner user", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "byTimeout", | |
| "required": false, | |
| "in": "query", | |
| "description": "Read order on timeout", | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/PartnerReadOrderSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "404": { | |
| "description": "Not Found", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "partners orders" | |
| ] | |
| } | |
| }, | |
| "/api/orders/pos/fuel/orders": { | |
| "post": { | |
| "operationId": "createPosFuelOrder", | |
| "summary": "createPosFuelOrder", | |
| "description": "Create new fuel order from pos", | |
| "parameters": [], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/PosCreateOrderFuelInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "description": "Created", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/PosCreateOrderFuelSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "pos orders" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/orders/{id}": { | |
| "get": { | |
| "operationId": "adminReadOrder", | |
| "summary": "Get order details", | |
| "description": "Get order details by order ID", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/AdminReadOrderSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "404": { | |
| "description": "Not Found", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/orders": { | |
| "get": { | |
| "operationId": "indexOrders", | |
| "summary": "indexOrders", | |
| "description": "Orders list", | |
| "parameters": [ | |
| { | |
| "name": "type", | |
| "required": false, | |
| "in": "query", | |
| "description": "Type", | |
| "schema": { | |
| "format": "enum", | |
| "enum": [ | |
| "fuel" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "from", | |
| "required": false, | |
| "in": "query", | |
| "description": "From", | |
| "schema": { | |
| "format": "date-time", | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "to", | |
| "required": false, | |
| "in": "query", | |
| "description": "To", | |
| "schema": { | |
| "format": "date-time", | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "status", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "format": "enum", | |
| "enum": [ | |
| "created", | |
| "fulfillmentReady", | |
| "fulfillmentStarted", | |
| "fulfillmentSuccess", | |
| "fulfillmentError", | |
| "confirmed", | |
| "fulfilled", | |
| "cancelled", | |
| "error" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "query", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "stationName", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "adminTags", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| { | |
| "name": "merchantId", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "paymentProvider", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "cardBrand", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "VISA", | |
| "MASTERCARD", | |
| "AMEX", | |
| "petronasSmartpayVirtual", | |
| "petronasSmartpayPhysical" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "interface", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "app", | |
| "wat", | |
| "lite" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "page", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "perPage", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "number" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Index orders", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/AdminIndexOrdersSuccessDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "503": { | |
| "description": "Service Unavailable", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/csv/orders": { | |
| "get": { | |
| "operationId": "indexOrdersCsv", | |
| "summary": "Index orders export to CSV", | |
| "description": "Index orders export to CSV", | |
| "parameters": [ | |
| { | |
| "name": "type", | |
| "required": false, | |
| "in": "query", | |
| "description": "Type", | |
| "schema": { | |
| "format": "enum", | |
| "enum": [ | |
| "fuel" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "from", | |
| "required": false, | |
| "in": "query", | |
| "description": "From", | |
| "schema": { | |
| "format": "date-time", | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "to", | |
| "required": false, | |
| "in": "query", | |
| "description": "To", | |
| "schema": { | |
| "format": "date-time", | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "status", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "format": "enum", | |
| "enum": [ | |
| "created", | |
| "fulfillmentReady", | |
| "fulfillmentStarted", | |
| "fulfillmentSuccess", | |
| "fulfillmentError", | |
| "confirmed", | |
| "fulfilled", | |
| "cancelled", | |
| "error" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "query", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "stationName", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "adminTags", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| { | |
| "name": "merchantId", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "paymentProvider", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "cardBrand", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "VISA", | |
| "MASTERCARD", | |
| "AMEX", | |
| "petronasSmartpayVirtual", | |
| "petronasSmartpayPhysical" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "interface", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "app", | |
| "wat", | |
| "lite" | |
| ], | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "CSV file for fuel orders", | |
| "content": { | |
| "text/csv": { | |
| "schema": { | |
| "type": "string", | |
| "format": "binary" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "text/csv": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "503": { | |
| "description": "Service Unavailable", | |
| "content": { | |
| "text/csv": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/users/{userId}/orders": { | |
| "get": { | |
| "operationId": "indexUserOrders", | |
| "summary": "Index user orders", | |
| "description": "Get list of all orders that belongs to the user. Authorized by backend token", | |
| "parameters": [ | |
| { | |
| "name": "userId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "page", | |
| "required": false, | |
| "in": "query", | |
| "description": "Page number", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "perPage", | |
| "required": false, | |
| "in": "query", | |
| "description": "Per page", | |
| "schema": { | |
| "type": "number" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/IndexOrdersSuccess" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/users/{userId}/options": { | |
| "get": { | |
| "operationId": "adminGetUserFuelOptions", | |
| "summary": "Get user fuel options", | |
| "description": "Get a user's fuel options", | |
| "parameters": [ | |
| { | |
| "name": "userId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/UserFuelOptionsSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/station/{stationId}/orders": { | |
| "get": { | |
| "operationId": "fuelOrdersByStation", | |
| "summary": "Index user orders", | |
| "description": "Get list of all orders that belongs to the station", | |
| "parameters": [ | |
| { | |
| "name": "stationId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "page", | |
| "required": false, | |
| "in": "query", | |
| "description": "Page number", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "perPage", | |
| "required": false, | |
| "in": "query", | |
| "description": "Per page", | |
| "schema": { | |
| "type": "number" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/IndexOrdersSuccess" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/fuel/status": { | |
| "get": { | |
| "operationId": "fuelOrderByStatus", | |
| "summary": "Index of failed charged orders", | |
| "description": "Get list of all orders that failed charged", | |
| "parameters": [ | |
| { | |
| "name": "page", | |
| "required": false, | |
| "in": "query", | |
| "description": "Page number", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "perPage", | |
| "required": false, | |
| "in": "query", | |
| "description": "Per page", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "status", | |
| "required": true, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "404": { | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/{orderId}/recovery/success": { | |
| "put": { | |
| "operationId": "patchOrderInvoiceForRecovery", | |
| "summary": "Manual patch order's invoice for recovery", | |
| "description": "Manual patch order's invoice for recovery", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/RecoveryByFuelDataDto" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ReadOrderSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/{orderId}/recovery/lost": { | |
| "put": { | |
| "operationId": "updateFuelOrderAsLost", | |
| "summary": "Mark fuel order as lost", | |
| "description": "Manually mark fuel order as lost", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK" | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/orders/{orderId}/payment/cancel": { | |
| "post": { | |
| "operationId": "cancelPaymentAuthorize", | |
| "summary": "cancelPaymentAuthorize", | |
| "description": "Cancel payment pre authorization by order id", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Order id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Payment pre authorization cancelled", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/PaymentAuthorizeSuccessDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| }, | |
| "503": { | |
| "description": "Service Unavailable" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/orders/{orderId}/order/cancel": { | |
| "post": { | |
| "operationId": "cancelOrder", | |
| "summary": "cancelOrder", | |
| "description": "Cancel order by order id", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Order id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Order cancelled", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/CancelOrderSuccess" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| }, | |
| "503": { | |
| "description": "Service Unavailable" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/orders/{orderId}/payment/retry": { | |
| "post": { | |
| "operationId": "manualCharge", | |
| "summary": "Retry purchase", | |
| "description": "Retry purchase based on existing invoice", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Order id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/RetryPurchaseBodyDto" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Manual charge successful" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| }, | |
| "503": { | |
| "description": "Service Unavailable" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/orders/admin/orders/{orderId}/payment/invoice": { | |
| "post": { | |
| "operationId": "manualChargeWithGeneratedInvoice", | |
| "summary": "Manual charge with generated invoice", | |
| "description": "Retry purchase based on manually generated invoice", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Order id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/RetryPurchaseWithGeneratedInvoiceBodyDto" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Manual charge with generated invoice successful" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| }, | |
| "503": { | |
| "description": "Service Unavailable" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/authorize": { | |
| "post": { | |
| "operationId": "orderFuelAuthorizeWebhook", | |
| "summary": "Order authorized callback", | |
| "description": "This webhook should be used to flag when order has been authorized.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderFuelAuthorizeWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/loyalty/petronas": { | |
| "post": { | |
| "operationId": "orderFuelLoyaltyPointsPetronasSuccessWebhook", | |
| "summary": "Order loyalty points petronas success callback", | |
| "description": "This webhook should be used to flag when order has been granted loyalty points for Petronas.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderFuelLoyaltyPointsPetronasSuccessWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/loyalty/petronas/cleanup": { | |
| "post": { | |
| "operationId": "orderFuelLoyaltyPointsPetronasCleanupWebhook", | |
| "summary": "Order loyalty points petronas cleanup callback", | |
| "description": "This webhook should be used to cleanup loyalty points petronas recovery flow all attemps failed.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderFuelLoyaltyPointsPetronasCleanupWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/pos/confirmation": { | |
| "post": { | |
| "operationId": "orderFuelConfirmPosOrderSuccessWebhook", | |
| "summary": "Order confirm POS order success callback", | |
| "description": "This webhook should be used to flag when order has been confirm on POS.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/fulfillment/start": { | |
| "post": { | |
| "operationId": "orderFuelFulfillmentStartWebhook", | |
| "summary": "Fulfillment started callback", | |
| "description": "This webhook should be used to flag when fulfillment process has started on the pump.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderFuelFulfillmentStartWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/fulfillment/success": { | |
| "post": { | |
| "operationId": "orderFuelFulfillmentSuccessWebhook", | |
| "summary": "Fulfillment finished callback", | |
| "description": "This webhook should be used to flag when fulfillment process has finished successfully.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderFuelFulfillmentSuccessWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/fulfillment/error": { | |
| "post": { | |
| "operationId": "orderFuelFulfillmentErrorWebhook", | |
| "summary": "Fulfillment error callback", | |
| "description": "This webhook should be used to flag when fulfillment process has finished with an error.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderFuelFulfillmentErrorWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| }, | |
| "get": { | |
| "operationId": "orderFuelFulfillmentErrorWebhookFallback", | |
| "summary": "Fulfillment error callback", | |
| "description": "This webhook should be used to flag when fulfillment process has finished with an error.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/orders/{orderId}/cancel": { | |
| "post": { | |
| "operationId": "orderCancelWebhook", | |
| "summary": "Order cancellation method", | |
| "description": "This webhook should be used to cancel order from POS system.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/OrderCancelWebhookInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| }, | |
| "get": { | |
| "operationId": "orderCancelWebhookFallback", | |
| "summary": "Order cancellation method fallback", | |
| "description": "This webhook should be used to cancel order from POS system as fallback for `orderCancelWebhook`.", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/payments/authorize": { | |
| "post": { | |
| "operationId": "orderFuelPaymentAuthorizeWebhook", | |
| "summary": "Order payments authorized callback", | |
| "description": "This webhook to be used when [Boos, Passthruough] payment is authorized", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/webhooks/fuel/orders/{orderId}/subsidy-mark-transaction-success": { | |
| "post": { | |
| "operationId": "orderFuelSubsidyMarkTransactionSuccessWebhook", | |
| "summary": "Create subsidy transaction cleanup callback", | |
| "description": "This webhook should be used to update failed subsidy transaction as succesful", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/SubsidyMarkTransactionSuccessInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "webhooks" | |
| ] | |
| } | |
| }, | |
| "/api/orders/system/fuel/external": { | |
| "post": { | |
| "operationId": "createExternalOrderFuel", | |
| "summary": "createExternalOrderFuel", | |
| "description": "Create external fuel order", | |
| "parameters": [], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateExternalFuelOrderInput" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "description": "Created", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateOrderFuelSuccess" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "system" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/system/fuel/transactions": { | |
| "get": { | |
| "operationId": "indexOrdersTransactions", | |
| "summary": "Index orders with transaction details", | |
| "description": "Returns orders with basic transaction details ", | |
| "parameters": [ | |
| { | |
| "name": "from", | |
| "required": false, | |
| "in": "query", | |
| "description": "The start date based on the createdAt to start returning the objects", | |
| "schema": { | |
| "format": "date-time", | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "to", | |
| "required": false, | |
| "in": "query", | |
| "description": "The end date based on the createdAt to cap objects that are to be returned", | |
| "schema": { | |
| "format": "date-time", | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "page", | |
| "required": false, | |
| "in": "query", | |
| "description": "A particular page number in a pagination", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "perPage", | |
| "required": false, | |
| "in": "query", | |
| "description": "Specify how many objects a page should contain", | |
| "schema": { | |
| "type": "number" | |
| } | |
| }, | |
| { | |
| "name": "paymentMethod", | |
| "required": false, | |
| "in": "query", | |
| "description": "Filter objects to be returned based on the paymentMethod", | |
| "schema": { | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "required": true, | |
| "in": "query", | |
| "description": "Filter objects to be returned based on the userId", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/IndexOrdersTransactionsSuccess" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "503": { | |
| "description": "Service Unavailable", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "system" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/system/fuel/receipt/{orderId}": { | |
| "get": { | |
| "operationId": "backendGetOrderReceipt", | |
| "summary": "Get Order receipt data", | |
| "description": "Get Order receipt data", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/OrderReceiptDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "503": { | |
| "description": "Service Unavailable", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [ | |
| "system" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/rewards/failed-actions/{actionId}": { | |
| "put": { | |
| "operationId": "acknowledgeAction", | |
| "summary": "Acknowledge Action", | |
| "description": "Acknowledge Action", | |
| "parameters": [ | |
| { | |
| "name": "actionId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Action Id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "incrementSuccess", | |
| "required": false, | |
| "in": "query", | |
| "description": "Increment success", | |
| "schema": { | |
| "type": "boolean" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/RewardsActionDto" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/rewards/failed-actions": { | |
| "get": { | |
| "operationId": "getFailedRewardsActions", | |
| "summary": "Get Failed Rewards Actions", | |
| "description": "Get failed Rewards Actions", | |
| "parameters": [ | |
| { | |
| "name": "userId", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| { | |
| "name": "actionType", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| { | |
| "name": "startDate", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "endDate", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/RewardsActionDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/rewards/failed-actions-stat": { | |
| "get": { | |
| "operationId": "getRewardsFailureStat", | |
| "summary": "Get Rewards Failure Stat", | |
| "description": "Get Rewards Failure Stat", | |
| "parameters": [ | |
| { | |
| "name": "startDate", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "endDate", | |
| "required": false, | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/RewardsFailureStatsDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/recovery/{jobId}/acknowledgement": { | |
| "post": { | |
| "operationId": "recoveryFailedJobsAcknowledgement", | |
| "summary": "Acknowledgement recovery failed jobs", | |
| "description": "Acknowledgement sent by api-orders-recovery", | |
| "parameters": [ | |
| { | |
| "name": "jobId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK" | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/tags": { | |
| "get": { | |
| "operationId": "getAdminTags", | |
| "summary": "Get admin tags", | |
| "description": "Returns a list of admin tags", | |
| "parameters": [ | |
| { | |
| "name": "tag", | |
| "required": false, | |
| "in": "query", | |
| "description": "Tag query string", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/ListTagsResponseDto" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/tags/{orderId}": { | |
| "post": { | |
| "operationId": "createTags", | |
| "summary": "Creating tags for the order", | |
| "description": "Allowing admin to tag an order", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateTagsInputDto" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CreateTagsResponseDto" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/tags/{orderId}/{tag}": { | |
| "delete": { | |
| "operationId": "deleteTag", | |
| "summary": "Deleting tag for the order", | |
| "description": "Allowing admin to delete tag of an order", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "tag", | |
| "required": true, | |
| "in": "path", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK" | |
| }, | |
| "400": { | |
| "description": "Bad Request" | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/orders/health": { | |
| "get": { | |
| "operationId": "indexHealth", | |
| "summary": "Check if the application is healthy", | |
| "description": "Ping pong endpoint for making sure the application is alive.\n Used for healthcheck via orchestration services.", | |
| "parameters": [], | |
| "responses": { | |
| "200": { | |
| "description": "App is healthy" | |
| } | |
| }, | |
| "tags": [ | |
| "health" | |
| ] | |
| } | |
| }, | |
| "/api/orders/admin/manual-release/orders/{orderId}": { | |
| "get": { | |
| "operationId": "getManualReleaseStatus", | |
| "summary": "Get manual release status", | |
| "description": "Get manual release status for an order", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Order Id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/GetManualReleaseStatusDto" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "operationId": "releaseOrderById", | |
| "summary": "Manual release stuck order by order id", | |
| "description": "Manual release stuck order by order id", | |
| "parameters": [ | |
| { | |
| "name": "orderId", | |
| "required": true, | |
| "in": "path", | |
| "description": "Order Id", | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "sub", | |
| "in": "header", | |
| "description": "User id passed by api-iam", | |
| "required": false, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "OK", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/GetManualReleaseStatusDto" | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "description": "Unauthorized" | |
| }, | |
| "500": { | |
| "description": "Internal Server Error" | |
| } | |
| }, | |
| "tags": [ | |
| "administration" | |
| ], | |
| "security": [ | |
| { | |
| "bearer": [] | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "info": { | |
| "title": "Setel Orders API", | |
| "description": "Setel Orders API | [swagger.json](swagger.json)", | |
| "version": "12.2.0", | |
| "contact": {} | |
| }, | |
| "tags": [ | |
| { | |
| "name": "orders", | |
| "description": "" | |
| }, | |
| { | |
| "name": "webhooks", | |
| "description": "" | |
| } | |
| ], | |
| "servers": [ { | |
| "url": "/api/orders" | |
| }], | |
| "components": { | |
| "securitySchemes": { | |
| "bearer": { | |
| "scheme": "bearer", | |
| "bearerFormat": "JWT", | |
| "in": "header", | |
| "name": "access-token", | |
| "type": "apiKey" | |
| } | |
| }, | |
| "schemas": { | |
| "MerchantDto": { | |
| "type": "object", | |
| "properties": { | |
| "merchantId": { | |
| "type": "string" | |
| }, | |
| "dealerId": { | |
| "type": "string" | |
| }, | |
| "tradingCompanyName": { | |
| "type": "string" | |
| }, | |
| "gstNumber": { | |
| "type": "string" | |
| }, | |
| "retailerNumber": { | |
| "type": "string" | |
| }, | |
| "phoneNumber": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "merchantId", | |
| "dealerId", | |
| "tradingCompanyName", | |
| "gstNumber", | |
| "retailerNumber", | |
| "phoneNumber" | |
| ] | |
| }, | |
| "InvoiceInternalFuelOrderDto": { | |
| "type": "object", | |
| "properties": { | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "isFullTank": { | |
| "type": "boolean" | |
| }, | |
| "completedAmount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "completedVolume": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "pricePerUnit": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| } | |
| }, | |
| "required": [ | |
| "pumpId", | |
| "isFullTank", | |
| "completedAmount", | |
| "completedVolume", | |
| "pricePerUnit" | |
| ] | |
| }, | |
| "InvoiceFuelDto": { | |
| "type": "object", | |
| "properties": { | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "fuelGrade": { | |
| "type": "string" | |
| }, | |
| "mesraCode": { | |
| "type": "string" | |
| }, | |
| "order": { | |
| "$ref": "#/components/schemas/InvoiceInternalFuelOrderDto" | |
| } | |
| }, | |
| "required": [ | |
| "pumpId", | |
| "order" | |
| ] | |
| }, | |
| "InvoiceDto": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "transactionCreatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "transactionCompletedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "merchant": { | |
| "$ref": "#/components/schemas/MerchantDto" | |
| }, | |
| "fuel": { | |
| "$ref": "#/components/schemas/InvoiceFuelDto" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "paymentAuthorizationId": { | |
| "type": "string" | |
| }, | |
| "subTotalWithoutGST": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "totalGSTAmount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "grandTotal": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| } | |
| }, | |
| "required": [ | |
| "merchant", | |
| "subTotalWithoutGST", | |
| "totalGSTAmount", | |
| "grandTotal" | |
| ] | |
| }, | |
| "NextActionDto": { | |
| "type": "object", | |
| "properties": { | |
| "deepLinkUrl": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "PaymentMetaData": { | |
| "type": "object", | |
| "properties": { | |
| "nextAction": { | |
| "$ref": "#/components/schemas/NextActionDto" | |
| } | |
| } | |
| }, | |
| "MembershipTierDTO": { | |
| "type": "object", | |
| "properties": { | |
| "level": { | |
| "type": "number" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "level", | |
| "name" | |
| ] | |
| }, | |
| "MembershipDTO": { | |
| "type": "object", | |
| "properties": { | |
| "currentTier": { | |
| "$ref": "#/components/schemas/MembershipTierDTO" | |
| }, | |
| "nextTier": { | |
| "$ref": "#/components/schemas/MembershipTierDTO" | |
| }, | |
| "fuelVolume": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "vendorPointAmount": { | |
| "type": "number" | |
| }, | |
| "vendorPointMultiplier": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "membershipPointAmount": { | |
| "type": "number" | |
| }, | |
| "membershipPointMultiplier": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "membershipIconPrimary": { | |
| "type": "string", | |
| "description": "Linnk to membership primary icon" | |
| }, | |
| "membershipIconDetails": { | |
| "type": "string", | |
| "description": "Linnk to membership details icon" | |
| }, | |
| "pointsTotal": { | |
| "type": "number", | |
| "description": "Total points accumulated" | |
| }, | |
| "pointsForLevelUp": { | |
| "type": "number", | |
| "description": "Total points needed to level up" | |
| } | |
| }, | |
| "required": [ | |
| "currentTier", | |
| "fuelVolume", | |
| "vendorPointAmount", | |
| "vendorPointMultiplier", | |
| "pointsTotal", | |
| "pointsForLevelUp" | |
| ] | |
| }, | |
| "PetronasLoyaltyTransactionDto": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "membership": { | |
| "description": "Membership information", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/MembershipDTO" | |
| } | |
| ] | |
| }, | |
| "isSuccess": { | |
| "type": "boolean" | |
| }, | |
| "cardNumber": { | |
| "type": "string" | |
| }, | |
| "earnedPoints": { | |
| "type": "number" | |
| }, | |
| "balance": { | |
| "type": "number" | |
| }, | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "error": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| } | |
| }, | |
| "required": [ | |
| "isSuccess", | |
| "createdAt" | |
| ] | |
| }, | |
| "LoyaltyTransactionDto": { | |
| "type": "object", | |
| "properties": { | |
| "petronas": { | |
| "description": "Petronas loyalty transaction information", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PetronasLoyaltyTransactionDto" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "petronas" | |
| ] | |
| }, | |
| "ChargeStatusDto": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string", | |
| "description": "Charge status name for data purposes", | |
| "enum": [ | |
| "processing", | |
| "succeeded", | |
| "failed" | |
| ], | |
| "example": "processing" | |
| }, | |
| "label": { | |
| "type": "string", | |
| "description": "Charge status label to be used for UI purposes", | |
| "example": "PROCESSING" | |
| }, | |
| "colorHex": { | |
| "type": "string", | |
| "description": "Charge status label color to be used for UI purposes", | |
| "example": "#ffb53b" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ] | |
| }, | |
| "FuelSubsidyDto": { | |
| "type": "object", | |
| "properties": { | |
| "subsidyTotalAmount": { | |
| "type": "number", | |
| "description": "The total amount + subsidy received in payload based on user input from frontend" | |
| }, | |
| "isTransactionCreated": { | |
| "type": "boolean", | |
| "description": "Flag for whether subsidy transaction is created or not at the end of succesfull order" | |
| }, | |
| "subsidyPrice": { | |
| "type": "number", | |
| "description": "Current subsidy price" | |
| }, | |
| "marketPrice": { | |
| "type": "number", | |
| "description": "Current market price" | |
| }, | |
| "isPartialSubsidyApplied": { | |
| "type": "number", | |
| "description": "`true` if partial subsidy applied" | |
| }, | |
| "userPurchaseAmount": { | |
| "type": "number", | |
| "description": "Total amount user has to pay(in RM)" | |
| }, | |
| "userPurchaseAmountInTotal": { | |
| "type": "number", | |
| "description": "Total amount of fuel user has received(in RM)" | |
| }, | |
| "userPurchaseQuantityInTotal": { | |
| "type": "number", | |
| "description": "Total quantity of fuel user has received(in Liters)" | |
| }, | |
| "amountFromSubsidyPrice": { | |
| "type": "number", | |
| "description": "Total amount based on subsidy price(in RM)" | |
| }, | |
| "quantityFromSubsidyPrice": { | |
| "type": "number", | |
| "description": "Total quantity based on subsidy price(in Liters)" | |
| }, | |
| "amountFromMarketPrice": { | |
| "type": "number", | |
| "description": "Total amount based on market price(in RM)" | |
| }, | |
| "quantityFromMarketPrice": { | |
| "type": "number", | |
| "description": "Total no of liters based on market price(in Liters)" | |
| }, | |
| "rebateAmount": { | |
| "type": "number", | |
| "description": "The subsidy amount that merchant has to rebate(in RM)" | |
| }, | |
| "balance": { | |
| "type": "number", | |
| "description": "The balance of subsidy remaining(in Liters)" | |
| }, | |
| "totalEligibility": { | |
| "type": "number", | |
| "description": "The total eligibility of subsidy for the users(in Liters)" | |
| }, | |
| "deductedQuota": { | |
| "type": "number", | |
| "description": "The amount of quota deducted(in Liters)" | |
| }, | |
| "quotaBeforeCharge": { | |
| "type": "number", | |
| "description": "The amount of quota before this fuel order(in Liters)" | |
| }, | |
| "merchantId": { | |
| "type": "string", | |
| "description": "Merchant ID" | |
| } | |
| }, | |
| "required": [ | |
| "subsidyTotalAmount" | |
| ] | |
| }, | |
| "CircleDto": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "ownerId": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "ReadOrderSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "paymentCaptureId": { | |
| "type": "string", | |
| "description": "Unique payment charge reference id" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "", | |
| "fuelReservePumpStarted", | |
| "fuelReservePumpSuccess", | |
| "fuelHoldAmountStarted", | |
| "fuelHoldAmountSuccess", | |
| "created", | |
| "fuelFulfillmentReady", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fuelFulfillmentReadyError", | |
| "confirmed", | |
| "fulfilled", | |
| "fuelReservePumpError", | |
| "fuelHoldAmountError", | |
| "error", | |
| "canceled", | |
| "inventoryUpdated", | |
| "refunded" | |
| ], | |
| "default": "created" | |
| }, | |
| "invoice": { | |
| "$ref": "#/components/schemas/InvoiceDto" | |
| }, | |
| "paymentMetaData": { | |
| "$ref": "#/components/schemas/PaymentMetaData" | |
| }, | |
| "loyaltyTransaction": { | |
| "$ref": "#/components/schemas/LoyaltyTransactionDto" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "userId": { | |
| "type": "string" | |
| }, | |
| "purchaseType": { | |
| "type": "string", | |
| "enum": [ | |
| "amount", | |
| "volume" | |
| ] | |
| }, | |
| "volumeQuantity": { | |
| "type": "number" | |
| }, | |
| "error": { | |
| "type": "string" | |
| }, | |
| "errorMessage": { | |
| "type": "string" | |
| }, | |
| "nextAction": { | |
| "$ref": "#/components/schemas/NextActionDto" | |
| }, | |
| "chargeStatus": { | |
| "description": "Order payment charge status", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/ChargeStatusDto" | |
| } | |
| ] | |
| }, | |
| "isSubsidisedOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a subsidy order" | |
| }, | |
| "isOneTapOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a one tap order" | |
| }, | |
| "isPosFuelOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a pos fuel order" | |
| }, | |
| "fuelSubsidy": { | |
| "description": "Fuel subsidy info", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/FuelSubsidyDto" | |
| } | |
| ] | |
| }, | |
| "cancelEarlyStatus": { | |
| "type": "string", | |
| "description": "Outcome of early cancellation by user", | |
| "enum": [ | |
| "success", | |
| "processing", | |
| "error_warning", | |
| "error_exit" | |
| ] | |
| }, | |
| "mappedMesraCode": { | |
| "type": "string" | |
| }, | |
| "errorMeta": { | |
| "type": "object", | |
| "description": "Error metadata that usually consist of errorTitle errorMessage and CTA(s)" | |
| }, | |
| "fuelType": { | |
| "type": "string", | |
| "enum": [ | |
| "fuel_primax_95", | |
| "fuel_primax_97", | |
| "fuel_dynamic_diesel", | |
| "fuel_euro_5_diesel", | |
| "fuel_ngv" | |
| ] | |
| }, | |
| "circle": { | |
| "$ref": "#/components/schemas/CircleDto" | |
| }, | |
| "isCancellableEarly": { | |
| "type": "boolean" | |
| }, | |
| "amount": { | |
| "type": "number" | |
| } | |
| } | |
| }, | |
| "Error": { | |
| "type": "object", | |
| "properties": {} | |
| }, | |
| "PosOrderInvoiceDto": { | |
| "type": "object", | |
| "properties": { | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "fuel": { | |
| "$ref": "#/components/schemas/InvoiceFuelDto" | |
| }, | |
| "grandTotal": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "merchant": { | |
| "$ref": "#/components/schemas/MerchantDto" | |
| }, | |
| "paymentAuthorizationId": { | |
| "type": "string" | |
| }, | |
| "subTotalWithoutGST": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "totalGSTAmount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "transactionCompletedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "transactionCreatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| } | |
| }, | |
| "required": [ | |
| "createdAt", | |
| "fuel", | |
| "grandTotal", | |
| "id", | |
| "merchant", | |
| "paymentAuthorizationId", | |
| "subTotalWithoutGST", | |
| "totalGSTAmount", | |
| "transactionCompletedAt", | |
| "transactionCreatedAt", | |
| "updatedAt" | |
| ] | |
| }, | |
| "ReadPosOrderResponseDto": { | |
| "type": "object", | |
| "properties": { | |
| "invoice": { | |
| "description": "Order invoice", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PosOrderInvoiceDto" | |
| } | |
| ] | |
| }, | |
| "orderId": { | |
| "type": "string", | |
| "description": "Order ID" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "description": "Order status", | |
| "enum": [ | |
| "created", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fulfilled", | |
| "confirmed", | |
| "inventoryUpdated", | |
| "refunded", | |
| "canceled" | |
| ] | |
| }, | |
| "paymentAuthorizationId": { | |
| "type": "string", | |
| "description": "Payment authorization ID" | |
| }, | |
| "transactionId": { | |
| "type": "string", | |
| "description": "Order transaction ID" | |
| } | |
| }, | |
| "required": [ | |
| "orderId", | |
| "orderStatus", | |
| "transactionId" | |
| ] | |
| }, | |
| "CancelOrderSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "example": "canceled" | |
| } | |
| }, | |
| "required": [ | |
| "orderId", | |
| "orderStatus" | |
| ] | |
| }, | |
| "PaymentMetaDataInput": { | |
| "type": "object", | |
| "properties": { | |
| "cardTokenId": { | |
| "type": "string" | |
| }, | |
| "redirectUrl": { | |
| "type": "string" | |
| }, | |
| "cardBrand": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "CreateOrderFuelInput": { | |
| "type": "object", | |
| "properties": { | |
| "pin": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "paymentProvider": { | |
| "type": "string", | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ], | |
| "format": "enum" | |
| }, | |
| "paymentMetaData": { | |
| "$ref": "#/components/schemas/PaymentMetaDataInput" | |
| }, | |
| "odometer": { | |
| "type": "number" | |
| }, | |
| "amount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "monetaryAmount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "isFullTank": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "purchaseType": { | |
| "type": "string", | |
| "enum": [ | |
| "amount", | |
| "volume" | |
| ], | |
| "default": "amount" | |
| }, | |
| "volumeQuantity": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "fuelType": { | |
| "type": "string", | |
| "enum": [ | |
| "fuel_primax_95", | |
| "fuel_primax_97", | |
| "fuel_dynamic_diesel", | |
| "fuel_euro_5_diesel", | |
| "fuel_ngv" | |
| ] | |
| }, | |
| "voucherCode": { | |
| "type": "string" | |
| }, | |
| "tags": { | |
| "example": [ | |
| "flow_polling" | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "number" | |
| } | |
| }, | |
| "paymentMethodId": { | |
| "type": "string" | |
| }, | |
| "isCircle": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "isSubsidy": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a subsidy order" | |
| }, | |
| "isOneTapOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a one tap order" | |
| }, | |
| "subsidyTotalAmount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 54.41, | |
| "description": "Total amount including subsidy value" | |
| }, | |
| "totalAmountWithoutSubsidy": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 50, | |
| "description": "Total amount excluding subsidy value, useful in Purchase by liters" | |
| } | |
| }, | |
| "required": [ | |
| "pumpId", | |
| "stationId" | |
| ] | |
| }, | |
| "CreateOrderFuelSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "orderId", | |
| "orderStatus" | |
| ] | |
| }, | |
| "IndexOrdersFuelSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "", | |
| "fuelReservePumpStarted", | |
| "fuelReservePumpSuccess", | |
| "fuelHoldAmountStarted", | |
| "fuelHoldAmountSuccess", | |
| "created", | |
| "fuelFulfillmentReady", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fuelFulfillmentReadyError", | |
| "confirmed", | |
| "fulfilled", | |
| "fuelReservePumpError", | |
| "fuelHoldAmountError", | |
| "error", | |
| "canceled", | |
| "inventoryUpdated", | |
| "refunded" | |
| ], | |
| "default": "" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| } | |
| }, | |
| "required": [ | |
| "orderId", | |
| "orderStatus" | |
| ] | |
| }, | |
| "UserFuelOptionsSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "minFullTankAmount": { | |
| "type": "number", | |
| "description": "minimum possible value for fueling full tank by amount", | |
| "example": 5 | |
| }, | |
| "fullTankAmount": { | |
| "type": "number", | |
| "description": "user custom full tank limit by amount", | |
| "example": 100 | |
| }, | |
| "maxFullTankAmount": { | |
| "type": "number", | |
| "description": "maximum possible value for fueling full tank by amount", | |
| "example": 500 | |
| }, | |
| "minFullTankVolume": { | |
| "type": "number", | |
| "description": "minimum possible value for fueling full tank by volume", | |
| "example": 4 | |
| }, | |
| "fullTankVolume": { | |
| "type": "number", | |
| "description": "user custom full tank limit by volume", | |
| "example": 80 | |
| }, | |
| "maxFullTankVolume": { | |
| "type": "number", | |
| "description": "maximum possible value for fueling full tank by volume", | |
| "example": 160 | |
| }, | |
| "minAmount": { | |
| "type": "number", | |
| "description": "minimum possible custom value for fueling by amount", | |
| "example": 3 | |
| }, | |
| "maxAmount": { | |
| "type": "number", | |
| "description": "maximum possible custom value for fueling by amount", | |
| "example": 500 | |
| }, | |
| "minVolume": { | |
| "type": "number", | |
| "description": "minimum possible custom value for fueling by volume", | |
| "example": 1 | |
| }, | |
| "presetAmounts": { | |
| "description": "preset custom values for fueling by amount", | |
| "example": [ | |
| 20, | |
| 30, | |
| 40 | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "number" | |
| } | |
| }, | |
| "presetVolumes": { | |
| "description": "preset custom values for fueling by volume", | |
| "example": [ | |
| 10, | |
| 20, | |
| 30 | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "number" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "minFullTankAmount", | |
| "fullTankAmount", | |
| "maxFullTankAmount", | |
| "minFullTankVolume", | |
| "fullTankVolume", | |
| "maxFullTankVolume", | |
| "minAmount", | |
| "maxAmount", | |
| "minVolume", | |
| "presetAmounts", | |
| "presetVolumes" | |
| ] | |
| }, | |
| "ResendReceiptStatusSuccessDto": { | |
| "type": "object", | |
| "properties": { | |
| "email": { | |
| "type": "string" | |
| }, | |
| "status": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "email", | |
| "status" | |
| ] | |
| }, | |
| "ResendReceiptStatusFailedDto": { | |
| "type": "object", | |
| "properties": { | |
| "email": { | |
| "type": "string" | |
| }, | |
| "status": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "email", | |
| "status", | |
| "message" | |
| ] | |
| }, | |
| "ReprocessOrderInput": { | |
| "type": "object", | |
| "properties": { | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "reprocessFuelFulfillment", | |
| "reprocessFuelFulfillmentSuccess", | |
| "reprocessFuelСharge", | |
| "reprocessFuelConfirmation", | |
| "reprocessFuelRewardsCreateAction", | |
| "reprocessFuelIssueLoyaltyPointsPetronas" | |
| ], | |
| "example": "reprocessFuelСharge", | |
| "description": "Recovery type" | |
| }, | |
| "metadata": { | |
| "type": "object", | |
| "description": "Metadata" | |
| } | |
| }, | |
| "required": [ | |
| "transactionId", | |
| "orderStatus" | |
| ] | |
| }, | |
| "SubmitFeedbackDto": { | |
| "type": "object", | |
| "properties": { | |
| "rating": { | |
| "type": "number", | |
| "description": "Rating" | |
| }, | |
| "comment": { | |
| "type": "string", | |
| "description": "Comment" | |
| } | |
| }, | |
| "required": [ | |
| "rating", | |
| "comment" | |
| ] | |
| }, | |
| "PartnerCreateOrderFuelInput": { | |
| "type": "object", | |
| "properties": { | |
| "pin": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "paymentMethodId": { | |
| "type": "string" | |
| }, | |
| "amount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "isFullTank": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "purchaseType": { | |
| "type": "string", | |
| "enum": [ | |
| "amount", | |
| "volume" | |
| ] | |
| }, | |
| "fuelType": { | |
| "type": "string", | |
| "enum": [ | |
| "ron95", | |
| "ron97", | |
| "diesel", | |
| "euro5Diesel", | |
| "ngv" | |
| ] | |
| }, | |
| "latitude": { | |
| "type": "number" | |
| }, | |
| "longitude": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "pin", | |
| "pumpId", | |
| "stationId", | |
| "paymentMethodId", | |
| "amount", | |
| "purchaseType", | |
| "latitude", | |
| "longitude" | |
| ] | |
| }, | |
| "PartnerUserFuelOptionsSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "presetAmounts": { | |
| "description": "preset custom values for fueling by amount", | |
| "type": "array", | |
| "items": { | |
| "type": "object" | |
| } | |
| }, | |
| "presetVolumes": { | |
| "description": "preset custom values for fueling by volume", | |
| "type": "array", | |
| "items": { | |
| "type": "object" | |
| } | |
| }, | |
| "fullTankAmount": { | |
| "type": "object", | |
| "description": "user custom full tank limit by amount" | |
| }, | |
| "fullTankVolume": { | |
| "type": "object", | |
| "description": "user custom full tank limit by volume" | |
| }, | |
| "minAmount": { | |
| "type": "object", | |
| "description": "minimum possible custom value for fueling by amount" | |
| }, | |
| "maxAmount": { | |
| "type": "object", | |
| "description": "maximum possible custom value for fueling by amount" | |
| }, | |
| "minVolume": { | |
| "type": "object", | |
| "description": "minimum possible custom value for fueling by volume" | |
| } | |
| }, | |
| "required": [ | |
| "presetAmounts", | |
| "presetVolumes", | |
| "fullTankAmount", | |
| "fullTankVolume", | |
| "minAmount", | |
| "maxAmount", | |
| "minVolume" | |
| ] | |
| }, | |
| "PartnerReadOrderSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "paymentCaptureId": { | |
| "type": "string", | |
| "description": "Unique payment charge reference id" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "", | |
| "fuelReservePumpStarted", | |
| "fuelReservePumpSuccess", | |
| "fuelHoldAmountStarted", | |
| "fuelHoldAmountSuccess", | |
| "created", | |
| "fuelFulfillmentReady", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fuelFulfillmentReadyError", | |
| "confirmed", | |
| "fulfilled", | |
| "fuelReservePumpError", | |
| "fuelHoldAmountError", | |
| "error", | |
| "canceled", | |
| "inventoryUpdated", | |
| "refunded" | |
| ], | |
| "default": "created" | |
| }, | |
| "invoice": { | |
| "$ref": "#/components/schemas/InvoiceDto" | |
| }, | |
| "paymentMetaData": { | |
| "$ref": "#/components/schemas/PaymentMetaData" | |
| }, | |
| "loyaltyTransaction": { | |
| "$ref": "#/components/schemas/LoyaltyTransactionDto" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "userId": { | |
| "type": "string" | |
| }, | |
| "purchaseType": { | |
| "type": "string", | |
| "enum": [ | |
| "amount", | |
| "volume" | |
| ] | |
| }, | |
| "volumeQuantity": { | |
| "type": "number" | |
| }, | |
| "error": { | |
| "type": "string" | |
| }, | |
| "errorMessage": { | |
| "type": "string" | |
| }, | |
| "nextAction": { | |
| "$ref": "#/components/schemas/NextActionDto" | |
| }, | |
| "chargeStatus": { | |
| "description": "Order payment charge status", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/ChargeStatusDto" | |
| } | |
| ] | |
| }, | |
| "isSubsidisedOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a subsidy order" | |
| }, | |
| "isOneTapOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a one tap order" | |
| }, | |
| "isPosFuelOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a pos fuel order" | |
| }, | |
| "fuelSubsidy": { | |
| "description": "Fuel subsidy info", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/FuelSubsidyDto" | |
| } | |
| ] | |
| }, | |
| "cancelEarlyStatus": { | |
| "type": "string", | |
| "description": "Outcome of early cancellation by user", | |
| "enum": [ | |
| "success", | |
| "processing", | |
| "error_warning", | |
| "error_exit" | |
| ] | |
| }, | |
| "mappedMesraCode": { | |
| "type": "string" | |
| }, | |
| "errorMeta": { | |
| "type": "object", | |
| "description": "Error metadata that usually consist of errorTitle errorMessage and CTA(s)" | |
| }, | |
| "fuelType": { | |
| "type": "string", | |
| "enum": [ | |
| "ron95", | |
| "ron97", | |
| "diesel", | |
| "euro5Diesel", | |
| "ngv" | |
| ] | |
| } | |
| } | |
| }, | |
| "WebhooksMetaDataInput": { | |
| "type": "object", | |
| "properties": { | |
| "orderConfirmWebhook": { | |
| "type": "string", | |
| "description": "Webhook URL to confirm order" | |
| } | |
| }, | |
| "required": [ | |
| "orderConfirmWebhook" | |
| ] | |
| }, | |
| "FuelMetaDataInput": { | |
| "type": "object", | |
| "properties": { | |
| "monetaryAmount": { | |
| "type": "number", | |
| "description": "Monetary amount of fuel purchase", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "pumpId": { | |
| "type": "string", | |
| "description": "Pump number" | |
| }, | |
| "purchaseType": { | |
| "type": "string", | |
| "description": "Fuel purchase type", | |
| "enum": [ | |
| "amount", | |
| "volume" | |
| ], | |
| "default": "amount" | |
| }, | |
| "webhooks": { | |
| "description": "Webhooks", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/WebhooksMetaDataInput" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "monetaryAmount", | |
| "pumpId", | |
| "webhooks" | |
| ] | |
| }, | |
| "PosCreateOrderFuelInput": { | |
| "type": "object", | |
| "properties": { | |
| "otac": { | |
| "type": "string", | |
| "description": "One Time Authorize Code" | |
| }, | |
| "retailerId": { | |
| "type": "string", | |
| "description": "Retailer Id/Station Id" | |
| }, | |
| "txDate": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "posTransactionId": { | |
| "type": "string", | |
| "description": "POS transaction Id" | |
| }, | |
| "totalAmount": { | |
| "type": "number", | |
| "description": "Total amount", | |
| "format": "double" | |
| }, | |
| "totalTaxAmount": { | |
| "type": "number", | |
| "description": "Total tax amount", | |
| "format": "double" | |
| }, | |
| "fuel": { | |
| "description": "Fuel meta data input", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/FuelMetaDataInput" | |
| } | |
| ] | |
| }, | |
| "isSubsidy": { | |
| "type": "boolean", | |
| "description": "Flag to indicate if its a subsidy order", | |
| "default": false | |
| } | |
| }, | |
| "required": [ | |
| "otac", | |
| "retailerId", | |
| "txDate", | |
| "posTransactionId", | |
| "totalAmount", | |
| "totalTaxAmount", | |
| "fuel" | |
| ] | |
| }, | |
| "WebhooksMetaDataOutput": { | |
| "type": "object", | |
| "properties": { | |
| "orderFuelFulfillmentSuccessWebhook": { | |
| "type": "string", | |
| "description": "Webhook URL for fuel dispense completion" | |
| }, | |
| "orderCancelWebhook": { | |
| "type": "string", | |
| "description": "Webhook URL to cancel order" | |
| } | |
| }, | |
| "required": [ | |
| "orderFuelFulfillmentSuccessWebhook", | |
| "orderCancelWebhook" | |
| ] | |
| }, | |
| "FuelMetaData": { | |
| "type": "object", | |
| "properties": { | |
| "paymentAuthorizedAmount": { | |
| "type": "number", | |
| "description": "Monetary amount authorized by payment authorization transaction", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "orderType": { | |
| "type": "string", | |
| "description": "Order type", | |
| "default": "fuel" | |
| }, | |
| "pumpId": { | |
| "type": "string", | |
| "description": "Pump number" | |
| }, | |
| "status": { | |
| "type": "string", | |
| "description": "Client side order status", | |
| "enum": [ | |
| "", | |
| "fuelReservePumpStarted", | |
| "fuelReservePumpSuccess", | |
| "fuelHoldAmountStarted", | |
| "fuelHoldAmountSuccess", | |
| "created", | |
| "fuelFulfillmentReady", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fuelFulfillmentReadyError", | |
| "confirmed", | |
| "fulfilled", | |
| "fuelReservePumpError", | |
| "fuelHoldAmountError", | |
| "error", | |
| "canceled", | |
| "inventoryUpdated", | |
| "refunded" | |
| ] | |
| }, | |
| "webhooks": { | |
| "description": "Webhooks", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/WebhooksMetaDataOutput" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "paymentAuthorizedAmount", | |
| "orderType", | |
| "pumpId", | |
| "status", | |
| "webhooks" | |
| ] | |
| }, | |
| "PosCreateOrderFuelSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "success": { | |
| "type": "boolean" | |
| }, | |
| "orderId": { | |
| "type": "string", | |
| "description": "Order id" | |
| }, | |
| "userId": { | |
| "type": "string", | |
| "description": "User id" | |
| }, | |
| "fullName": { | |
| "type": "string", | |
| "description": "User full name" | |
| }, | |
| "retailerId": { | |
| "type": "string", | |
| "description": "Retailer id" | |
| }, | |
| "stationName": { | |
| "type": "string", | |
| "description": "Station name" | |
| }, | |
| "txDate": { | |
| "type": "string", | |
| "format": "date-time", | |
| "description": "POS transaction date and time" | |
| }, | |
| "posTransactionId": { | |
| "type": "string", | |
| "description": "POS transaction id" | |
| }, | |
| "paymentProvider": { | |
| "type": "string", | |
| "description": "Payment provider", | |
| "default": "wallet", | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ] | |
| }, | |
| "authorizationId": { | |
| "type": "string", | |
| "description": "Authorized transaction id" | |
| }, | |
| "totalAmount": { | |
| "type": "number", | |
| "description": "Order total amount" | |
| }, | |
| "grandTotalAmount": { | |
| "type": "number", | |
| "description": "Order grand total amount" | |
| }, | |
| "totalTaxAmount": { | |
| "type": "number", | |
| "description": "Tax amount" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "description": "Order Created At Date" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "description": "Order Updated At Date" | |
| }, | |
| "fuel": { | |
| "description": "Fuel metat data", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/FuelMetaData" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "success", | |
| "orderId", | |
| "userId", | |
| "fullName", | |
| "retailerId", | |
| "stationName", | |
| "txDate", | |
| "posTransactionId", | |
| "paymentProvider", | |
| "authorizationId", | |
| "totalTaxAmount" | |
| ] | |
| }, | |
| "FuelOrderStateDto": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "completed": { | |
| "type": "boolean" | |
| }, | |
| "success": { | |
| "type": "boolean" | |
| }, | |
| "error": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "completed", | |
| "success", | |
| "error" | |
| ] | |
| }, | |
| "OrderStatesBaseStatusObjectDto": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "type": "boolean" | |
| }, | |
| "datetime": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ] | |
| }, | |
| "OrderStatesDto": { | |
| "type": "object", | |
| "properties": { | |
| "completed": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "started": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "skipped": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| } | |
| }, | |
| "required": [ | |
| "completed", | |
| "started", | |
| "skipped" | |
| ] | |
| }, | |
| "OrderStatesFulfillConfirmationDto": { | |
| "type": "object", | |
| "properties": { | |
| "completed": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "started": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "skipped": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "error": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| } | |
| }, | |
| "required": [ | |
| "completed", | |
| "started", | |
| "skipped" | |
| ] | |
| }, | |
| "OrderStatesCancelBaseDto": { | |
| "type": "object", | |
| "properties": { | |
| "completed": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "started": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "skipped": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "error": { | |
| "type": "object" | |
| } | |
| }, | |
| "required": [ | |
| "completed", | |
| "started", | |
| "skipped" | |
| ] | |
| }, | |
| "OrderStatesCancelDto": { | |
| "type": "object", | |
| "properties": { | |
| "completed": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "started": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "skipped": { | |
| "$ref": "#/components/schemas/OrderStatesBaseStatusObjectDto" | |
| }, | |
| "holdAmountCancel": { | |
| "$ref": "#/components/schemas/OrderStatesCancelBaseDto" | |
| }, | |
| "posOrderCancel": { | |
| "$ref": "#/components/schemas/OrderStatesCancelBaseDto" | |
| }, | |
| "reason": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "completed", | |
| "started", | |
| "skipped" | |
| ] | |
| }, | |
| "FuelOrderStatesDto": { | |
| "type": "object", | |
| "properties": { | |
| "init": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "externalInit": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "externalPayment": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "transactionInit": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "preAuth": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "fulfill": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "filfillConfirmation": { | |
| "$ref": "#/components/schemas/OrderStatesFulfillConfirmationDto" | |
| }, | |
| "charge": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "chargeRecovery": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "manualCharge": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "manualChargeWithGeneratedInvoice": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "issueLoyaltyPointsPetronas": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "confirm": { | |
| "$ref": "#/components/schemas/OrderStatesDto" | |
| }, | |
| "cancel": { | |
| "$ref": "#/components/schemas/OrderStatesCancelDto" | |
| } | |
| } | |
| }, | |
| "VoucherUsedDto": { | |
| "type": "object", | |
| "properties": { | |
| "voucherCode": { | |
| "type": "string" | |
| }, | |
| "isVoucherUsed": { | |
| "type": "boolean" | |
| }, | |
| "voucherAmount": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "voucherCode" | |
| ] | |
| }, | |
| "AdminReadOrderSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "loyaltyTransaction": { | |
| "$ref": "#/components/schemas/LoyaltyTransactionDto" | |
| }, | |
| "invoice": { | |
| "$ref": "#/components/schemas/InvoiceDto" | |
| }, | |
| "fuelOrderState": { | |
| "$ref": "#/components/schemas/FuelOrderStateDto" | |
| }, | |
| "fuelOrderStates": { | |
| "$ref": "#/components/schemas/FuelOrderStatesDto" | |
| }, | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderType": { | |
| "type": "string", | |
| "default": "fuel" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "example": "FUEL_ORDER_LOYALTY_POINTS_PETRONAS_SUCCESS" | |
| }, | |
| "status": { | |
| "type": "string", | |
| "example": "Fuel Fulfillment Ready Error" | |
| }, | |
| "statusLabel": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "Cancelled", | |
| "Created", | |
| "Error", | |
| "Fulfilled", | |
| "Confirmed", | |
| "Fuel Fulfillment Ready Error", | |
| "Fuel Fulfillment Ready", | |
| "Fuel Reserve Pump Success", | |
| "Fuel Reserve Pump Started", | |
| "Fuel Reserve Pump Error", | |
| "Fuel Fulfillment Error", | |
| "Fuel Fulfillment Success", | |
| "Fuel Fulfillment Started", | |
| "Fuel Hold Amount Success", | |
| "Fuel Hold Amount Started", | |
| "Fuel Hold Amount Error", | |
| "" | |
| ] | |
| }, | |
| "amount": { | |
| "type": "number" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "stationName": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "userId": { | |
| "type": "string" | |
| }, | |
| "userFullName": { | |
| "type": "string" | |
| }, | |
| "adminTags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "voucherUsed": { | |
| "$ref": "#/components/schemas/VoucherUsedDto" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "paymentProvider": { | |
| "type": "string", | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ] | |
| }, | |
| "cardBrand": { | |
| "type": "string", | |
| "enum": [ | |
| "VISA", | |
| "MASTERCARD", | |
| "AMEX" | |
| ] | |
| }, | |
| "paymentAuthorizedAmount": { | |
| "type": "number" | |
| }, | |
| "isSubsidisedOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a subsidy order" | |
| }, | |
| "isOneTapOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a one tap order" | |
| }, | |
| "isPosFuelOrder": { | |
| "type": "boolean", | |
| "default": false, | |
| "description": "Flag to indicate if its a pos fuel order" | |
| }, | |
| "fuelSubsidy": { | |
| "description": "Fuel subsidy info", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/FuelSubsidyDto" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "loyaltyTransaction", | |
| "invoice", | |
| "fuelOrderState", | |
| "fuelOrderStates", | |
| "orderId", | |
| "orderType", | |
| "orderStatus", | |
| "status", | |
| "statusLabel", | |
| "amount", | |
| "stationId", | |
| "stationName", | |
| "pumpId", | |
| "userId", | |
| "userFullName", | |
| "adminTags", | |
| "voucherUsed", | |
| "createdAt", | |
| "paymentProvider", | |
| "cardBrand", | |
| "paymentAuthorizedAmount" | |
| ] | |
| }, | |
| "AdminIndexOrdersSuccessDto": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderType": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "FUEL_ORDER_INIT", | |
| "FUEL_ORDER_INIT_SUCCESS", | |
| "FUEL_ORDER_INIT_ERROR", | |
| "FUEL_ORDER_EXTERNAL_INIT", | |
| "FUEL_ORDER_EXTERNAL_INIT_SUCCESS", | |
| "FUEL_ORDER_EXTERNAL_INIT_ERROR", | |
| "FUEL_ORDER_EXTERNAL_PAYMENT", | |
| "FUEL_ORDER_EXTERNAL_PAYMENT_SUCCESS", | |
| "FUEL_ORDER_EXTERNAL_PAYMENT_ERROR", | |
| "FUEL_ORDER_TRANSACTION_STARTED", | |
| "FUEL_ORDER_TRANSACTION_STARTED_SUCCESS", | |
| "FUEL_ORDER_TRANSACTION_STARTED_ERROR", | |
| "FUEL_ORDER_TRANSACTION_STARTED_NO_RESP", | |
| "FUEL_ORDER_TRANSACTION_STARTED_SKIPPED", | |
| "FUEL_ORDER_PRE_AUTH_STARTED", | |
| "FUEL_ORDER_PRE_AUTH_STARTED_SUCCESS", | |
| "FUEL_ORDER_PRE_AUTH_STARTED_ERROR", | |
| "FUEL_ORDER_PRE_AUTH_STARTED_NO_RESP", | |
| "FUEL_ORDER_FULFILL_STARTED", | |
| "FUEL_ORDER_FULFILL_STARTED_SUCCESS", | |
| "FUEL_ORDER_FULFILL_STARTED_ERROR", | |
| "FUEL_ORDER_FULFILL_STARTED_NO_RESP", | |
| "FUEL_ORDER_FULFILL_CONFIRMATION_STARTED", | |
| "FUEL_ORDER_FULFILL_CONFIRMATION_SUCCESS", | |
| "FUEL_ORDER_FULFILL_CONFIRMATION_ERROR", | |
| "FUEL_ORDER_FULFILL_CONFIRMATION_NO_RESP", | |
| "FUEL_ORDER_CHARGE", | |
| "FUEL_ORDER_CHARGE_SUCCESS", | |
| "FUEL_ORDER_CHARGE_ERROR", | |
| "FUEL_ORDER_CHARGE_NO_RESP", | |
| "FUEL_ORDER_RECOVERY_CHARGE", | |
| "FUEL_ORDER_RECOVERY_CHARGE_SUCCESS", | |
| "FUEL_ORDER_RECOVERY_CHARGE_ERROR", | |
| "FUEL_ORDER_RECOVERY_CHARGE_NO_RESP", | |
| "FUEL_ORDER_DUNNING_CHARGE_SUCCESS", | |
| "FUEL_ORDER_CONFIRM", | |
| "FUEL_ORDER_CONFIRM_SUCCESS", | |
| "FUEL_ORDER_CONFIRM_ERROR", | |
| "FUEL_ORDER_REWARDS_CREATE_ACTION", | |
| "FUEL_ORDER_REWARDS_CREATE_ACTION_SUCCESS", | |
| "FUEL_ORDER_REWARDS_CREATE_ACTION_NO_RESP", | |
| "FUEL_ORDER_REWARDS_CREATE_ACTION_ERROR", | |
| "FUEL_ORDER_LOYALTY_POINTS_PETRONAS", | |
| "FUEL_ORDER_LOYALTY_POINTS_PETRONAS_SKIPPED", | |
| "FUEL_ORDER_LOYALTY_POINTS_PETRONAS_SUCCESS", | |
| "FUEL_ORDER_LOYALTY_POINTS_PETRONAS_NO_RESP", | |
| "FUEL_ORDER_LOYALTY_POINTS_PETRONAS_ERROR", | |
| "FUEL_ORDER_LOYALTY_POINTS_FINISHED", | |
| "FUEL_ORDER_FULFILL_CONFIRMATION_LOST", | |
| "STORE_ORDER_INIT", | |
| "STORE_ORDER_INIT_SUCCESS", | |
| "STORE_ORDER_INIT_ERROR", | |
| "STORE_ORDER_PRE_AUTH", | |
| "STORE_ORDER_PRE_AUTH_SUCCESS", | |
| "STORE_ORDER_PRE_AUTH_ERROR", | |
| "STORE_ORDER_CONFIRM", | |
| "STORE_ORDER_CONFIRM_SUCCESS", | |
| "STORE_ORDER_CONFIRM_ERROR", | |
| "STORE_ORDER_FULFILL", | |
| "STORE_ORDER_FULFILL_SUCCESS", | |
| "STORE_ORDER_FULFILL_ERROR", | |
| "ORDER_CANCELED" | |
| ] | |
| }, | |
| "status": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "", | |
| "fuelReservePumpStarted", | |
| "fuelReservePumpSuccess", | |
| "fuelHoldAmountStarted", | |
| "fuelHoldAmountSuccess", | |
| "created", | |
| "fuelFulfillmentReady", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fuelFulfillmentReadyError", | |
| "confirmed", | |
| "fulfilled", | |
| "fuelReservePumpError", | |
| "fuelHoldAmountError", | |
| "error", | |
| "canceled", | |
| "inventoryUpdated", | |
| "refunded" | |
| ] | |
| }, | |
| "statusLabel": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "Cancelled", | |
| "Created", | |
| "Error", | |
| "Fulfilled", | |
| "Confirmed", | |
| "Fuel Fulfillment Ready Error", | |
| "Fuel Fulfillment Ready", | |
| "Fuel Reserve Pump Success", | |
| "Fuel Reserve Pump Started", | |
| "Fuel Reserve Pump Error", | |
| "Fuel Fulfillment Error", | |
| "Fuel Fulfillment Success", | |
| "Fuel Fulfillment Started", | |
| "Fuel Hold Amount Success", | |
| "Fuel Hold Amount Started", | |
| "Fuel Hold Amount Error", | |
| "" | |
| ] | |
| }, | |
| "amount": { | |
| "type": "number" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "stationName": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "userId": { | |
| "type": "string" | |
| }, | |
| "userFullName": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string" | |
| }, | |
| "paymentProvider": { | |
| "type": "string", | |
| "enum": [ | |
| "wallet", | |
| "smartpay", | |
| "vouchers", | |
| "cash", | |
| "boost", | |
| "card", | |
| "gift_card", | |
| "sub_wallet" | |
| ] | |
| }, | |
| "cardBrand": { | |
| "type": "string", | |
| "enum": [ | |
| "VISA", | |
| "MASTERCARD", | |
| "AMEX" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "orderId", | |
| "orderType", | |
| "orderStatus", | |
| "status", | |
| "statusLabel", | |
| "amount", | |
| "stationId", | |
| "stationName", | |
| "pumpId", | |
| "userId", | |
| "userFullName", | |
| "createdAt", | |
| "paymentProvider", | |
| "cardBrand" | |
| ] | |
| }, | |
| "IndexOrdersSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "", | |
| "fuelReservePumpStarted", | |
| "fuelReservePumpSuccess", | |
| "fuelHoldAmountStarted", | |
| "fuelHoldAmountSuccess", | |
| "created", | |
| "fuelFulfillmentReady", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fuelFulfillmentReadyError", | |
| "confirmed", | |
| "fulfilled", | |
| "fuelReservePumpError", | |
| "fuelHoldAmountError", | |
| "error", | |
| "canceled", | |
| "inventoryUpdated", | |
| "refunded" | |
| ], | |
| "default": "created" | |
| }, | |
| "stationId": { | |
| "type": "string" | |
| }, | |
| "pumpId": { | |
| "type": "string" | |
| }, | |
| "userId": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string" | |
| }, | |
| "updatedAt": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "amount": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "RecoveryByFuelDataDto": { | |
| "type": "object", | |
| "properties": { | |
| "fuelGrade": { | |
| "type": "string", | |
| "enum": [ | |
| "PRIMAX 95", | |
| "PRIMAX 97", | |
| "DIESEL", | |
| "EURO5" | |
| ] | |
| }, | |
| "pricePerUnit": { | |
| "type": "number" | |
| }, | |
| "completedVolume": { | |
| "type": "number" | |
| }, | |
| "completedAmount": { | |
| "type": "number" | |
| }, | |
| "transactionCompletedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| } | |
| }, | |
| "required": [ | |
| "fuelGrade", | |
| "pricePerUnit", | |
| "transactionCompletedAt" | |
| ] | |
| }, | |
| "PaymentTransactionAmount": { | |
| "type": "object", | |
| "properties": { | |
| "total": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "total" | |
| ] | |
| }, | |
| "PaymentTransaction": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string" | |
| }, | |
| "userId": { | |
| "type": "string" | |
| }, | |
| "reference_id": { | |
| "type": "string" | |
| }, | |
| "amount": { | |
| "$ref": "#/components/schemas/PaymentTransactionAmount" | |
| }, | |
| "status": { | |
| "type": "string" | |
| }, | |
| "paymentMethod": { | |
| "type": "string" | |
| }, | |
| "paymentSubmethod": { | |
| "type": "string" | |
| }, | |
| "paymentMethodData": { | |
| "type": "object" | |
| }, | |
| "nextAction": { | |
| "type": "object" | |
| }, | |
| "expiryDate": { | |
| "type": "string" | |
| }, | |
| "meta": { | |
| "type": "object" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "userId", | |
| "reference_id", | |
| "amount" | |
| ] | |
| }, | |
| "PaymentStorecard": { | |
| "type": "object", | |
| "properties": { | |
| "balance": { | |
| "type": "number" | |
| }, | |
| "expiry_date": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "balance", | |
| "expiry_date" | |
| ] | |
| }, | |
| "PaymentAuthorizeSuccessDto": { | |
| "type": "object", | |
| "properties": { | |
| "transaction": { | |
| "$ref": "#/components/schemas/PaymentTransaction" | |
| }, | |
| "storecard": { | |
| "$ref": "#/components/schemas/PaymentStorecard" | |
| } | |
| }, | |
| "required": [ | |
| "transaction", | |
| "storecard" | |
| ] | |
| }, | |
| "RetryPurchaseBodyDto": { | |
| "type": "object", | |
| "properties": { | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "message" | |
| ] | |
| }, | |
| "RetryPurchaseWithGeneratedInvoiceBodyDto": { | |
| "type": "object", | |
| "properties": { | |
| "amount": { | |
| "type": "number" | |
| }, | |
| "fuelType": { | |
| "type": "string", | |
| "enum": [ | |
| "PRIMAX_95", | |
| "PRIMAX_97", | |
| "DIESEL", | |
| "EURO5" | |
| ] | |
| }, | |
| "pricePerUnit": { | |
| "type": "number" | |
| }, | |
| "completedVolume": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "amount", | |
| "fuelType", | |
| "pricePerUnit", | |
| "completedVolume" | |
| ] | |
| }, | |
| "OrderFuelAuthorizeWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "result": { | |
| "type": "boolean" | |
| }, | |
| "reason": { | |
| "type": "string" | |
| }, | |
| "orderId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "created", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fulfilled", | |
| "confirmed", | |
| "inventoryUpdated", | |
| "refunded", | |
| "canceled" | |
| ] | |
| }, | |
| "paymentAuthorizationId": { | |
| "type": "string" | |
| }, | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "invoice": { | |
| "type": "object" | |
| } | |
| }, | |
| "required": [ | |
| "result", | |
| "orderId", | |
| "orderStatus", | |
| "paymentAuthorizationId", | |
| "transactionId", | |
| "invoice" | |
| ] | |
| }, | |
| "OrderFuelLoyaltyPointsPetronasSuccessWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "loyaltyResponse": { | |
| "type": "object" | |
| } | |
| }, | |
| "required": [ | |
| "loyaltyResponse" | |
| ] | |
| }, | |
| "OrderFuelLoyaltyPointsPetronasCleanupWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "loyaltyResponse": { | |
| "type": "object" | |
| } | |
| }, | |
| "required": [ | |
| "loyaltyResponse" | |
| ] | |
| }, | |
| "OrderFuelFulfillmentStartWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "fuelFulfillmentStarted" | |
| ], | |
| "default": "fuelFulfillmentStarted" | |
| } | |
| }, | |
| "required": [ | |
| "transactionId", | |
| "orderStatus" | |
| ] | |
| }, | |
| "InvoiceInPosOrderInvoiceDto": { | |
| "type": "object", | |
| "properties": { | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "fuel": { | |
| "$ref": "#/components/schemas/InvoiceFuelDto" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "merchant": { | |
| "$ref": "#/components/schemas/MerchantDto" | |
| }, | |
| "paymentAuthorizationId": { | |
| "type": "string" | |
| }, | |
| "subTotalWithoutGST": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "transactionCompletedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "transactionCreatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time" | |
| } | |
| }, | |
| "required": [ | |
| "createdAt", | |
| "fuel", | |
| "id", | |
| "merchant", | |
| "paymentAuthorizationId", | |
| "subTotalWithoutGST", | |
| "transactionCompletedAt", | |
| "transactionCreatedAt", | |
| "updatedAt" | |
| ] | |
| }, | |
| "OrderFuelFulfillmentSuccessWebhookInvoiceDto": { | |
| "type": "object", | |
| "properties": { | |
| "grandTotal": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "invoice": { | |
| "$ref": "#/components/schemas/InvoiceInPosOrderInvoiceDto" | |
| }, | |
| "orderid": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "enum": [ | |
| "created", | |
| "fuelFulfillmentStarted", | |
| "fuelFulfillmentSuccess", | |
| "fuelFulfillmentError", | |
| "fulfilled", | |
| "confirmed", | |
| "inventoryUpdated", | |
| "refunded", | |
| "canceled" | |
| ], | |
| "format": "enum" | |
| }, | |
| "paymentAuthorizationId": { | |
| "type": "string" | |
| }, | |
| "totalGSTAmount": { | |
| "type": "number", | |
| "format": "float", | |
| "example": 1.75 | |
| }, | |
| "transactionId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "grandTotal", | |
| "invoice", | |
| "orderid", | |
| "orderStatus", | |
| "paymentAuthorizationId", | |
| "totalGSTAmount", | |
| "transactionId" | |
| ] | |
| }, | |
| "OrderFuelFulfillmentSuccessWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "invoice": { | |
| "$ref": "#/components/schemas/OrderFuelFulfillmentSuccessWebhookInvoiceDto" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "fuelFulfillmentSuccess" | |
| ], | |
| "default": "fuelFulfillmentSuccess" | |
| }, | |
| "transactionId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "invoice", | |
| "orderStatus", | |
| "transactionId" | |
| ] | |
| }, | |
| "OrderFuelFulfillmentErrorWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string", | |
| "format": "enum", | |
| "enum": [ | |
| "fuelFulfillmentError" | |
| ], | |
| "default": "fuelFulfillmentError" | |
| }, | |
| "error": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| }, | |
| "required": [ | |
| "transactionId", | |
| "orderStatus", | |
| "error" | |
| ] | |
| }, | |
| "OrderCancelWebhookInput": { | |
| "type": "object", | |
| "properties": { | |
| "transactionId": { | |
| "type": "string" | |
| }, | |
| "orderStatus": { | |
| "type": "string" | |
| }, | |
| "cancelationReason": { | |
| "type": "string" | |
| }, | |
| "forceCancel": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "transactionId", | |
| "orderStatus", | |
| "cancelationReason", | |
| "forceCancel" | |
| ] | |
| }, | |
| "SubsidyMarkTransactionSuccessInput": { | |
| "type": "object", | |
| "properties": { | |
| "updatedBalance": { | |
| "type": "number", | |
| "description": "Updated balance after subsidy transaction creation", | |
| "example": 12.9 | |
| }, | |
| "isSuccess": { | |
| "type": "boolean", | |
| "example": true | |
| }, | |
| "userId": { | |
| "type": "string", | |
| "example": "some-user-id" | |
| } | |
| }, | |
| "required": [ | |
| "updatedBalance", | |
| "isSuccess", | |
| "userId" | |
| ] | |
| }, | |
| "ExternalFuelOrderMeta": { | |
| "type": "object", | |
| "properties": { | |
| "grantLoyaltyPoints": { | |
| "type": "boolean", | |
| "example": true | |
| } | |
| }, | |
| "required": [ | |
| "grantLoyaltyPoints" | |
| ] | |
| }, | |
| "CreateExternalFuelOrderInput": { | |
| "type": "object", | |
| "properties": { | |
| "userId": { | |
| "type": "string", | |
| "example": "1234-1234-1234" | |
| }, | |
| "stationId": { | |
| "type": "string", | |
| "example": "RYB9999" | |
| }, | |
| "pumpId": { | |
| "type": "string", | |
| "example": "1" | |
| }, | |
| "monetaryAmount": { | |
| "type": "number", | |
| "example": 10 | |
| }, | |
| "unitPrice": { | |
| "type": "number", | |
| "example": 2.2 | |
| }, | |
| "fuelType": { | |
| "type": "string", | |
| "enum": [ | |
| "fuel_primax_95", | |
| "fuel_primax_97", | |
| "fuel_dynamic_diesel", | |
| "fuel_euro_5_diesel", | |
| "fuel_ngv" | |
| ] | |
| }, | |
| "source": { | |
| "type": "string", | |
| "enum": [ | |
| "leads" | |
| ] | |
| }, | |
| "meta": { | |
| "$ref": "#/components/schemas/ExternalFuelOrderMeta" | |
| } | |
| }, | |
| "required": [ | |
| "userId", | |
| "stationId", | |
| "pumpId", | |
| "monetaryAmount", | |
| "unitPrice", | |
| "fuelType", | |
| "source", | |
| "meta" | |
| ] | |
| }, | |
| "IndexOrdersTransactionsSuccess": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "subtitle": { | |
| "type": "string" | |
| }, | |
| "amount": { | |
| "type": "number" | |
| }, | |
| "displayAmount": { | |
| "type": "string" | |
| }, | |
| "chargeStatus": { | |
| "$ref": "#/components/schemas/ChargeStatusDto" | |
| }, | |
| "paymentMethod": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "title", | |
| "subtitle", | |
| "amount", | |
| "displayAmount", | |
| "chargeStatus", | |
| "paymentMethod" | |
| ] | |
| }, | |
| "OrderSubsidyInfoDto": { | |
| "type": "object", | |
| "properties": { | |
| "subsidyAmount": { | |
| "type": "number", | |
| "description": "Subsidy amount", | |
| "example": 6.5 | |
| }, | |
| "subsidyVolume": { | |
| "type": "number", | |
| "description": "Subsidy volume", | |
| "example": 2.5 | |
| }, | |
| "subsidyPrice": { | |
| "type": "number", | |
| "description": "Subsidy price", | |
| "example": 1 | |
| }, | |
| "marketPrice": { | |
| "type": "number", | |
| "description": "Market price", | |
| "example": 1.98 | |
| }, | |
| "userPurchaseAmount": { | |
| "type": "number", | |
| "description": "Actual amount user has to pay", | |
| "example": 10 | |
| }, | |
| "isPartialSubsidyApplied": { | |
| "type": "boolean", | |
| "description": "To indicate if its partial subsidy", | |
| "example": true | |
| }, | |
| "amountFromSubsidyPrice": { | |
| "type": "number", | |
| "description": "Amount from subsidy price", | |
| "example": 10 | |
| }, | |
| "quantityFromSubsidyPrice": { | |
| "type": "number", | |
| "description": "Quantity from subsidy price", | |
| "example": 10 | |
| }, | |
| "amountFromMarketPrice": { | |
| "type": "number", | |
| "description": "Amount from market price", | |
| "example": 0 | |
| }, | |
| "quantityFromMarketPrice": { | |
| "type": "number", | |
| "description": "Quantity from market price", | |
| "example": 0 | |
| }, | |
| "userPurchaseAmountInTotal": { | |
| "type": "number", | |
| "description": "Actual amount paid by user", | |
| "example": 10 | |
| }, | |
| "userPurchaseQuantityInTotal": { | |
| "type": "number", | |
| "description": "Actual quantity received by user", | |
| "example": 20.22 | |
| } | |
| }, | |
| "required": [ | |
| "subsidyAmount", | |
| "subsidyVolume", | |
| "subsidyPrice", | |
| "marketPrice", | |
| "userPurchaseAmount", | |
| "isPartialSubsidyApplied", | |
| "amountFromSubsidyPrice", | |
| "quantityFromSubsidyPrice", | |
| "amountFromMarketPrice", | |
| "quantityFromMarketPrice", | |
| "userPurchaseAmountInTotal", | |
| "userPurchaseQuantityInTotal" | |
| ] | |
| }, | |
| "OrderReceiptDto": { | |
| "type": "object", | |
| "properties": { | |
| "userId": { | |
| "type": "string", | |
| "description": "ID of the User who created the Order", | |
| "example": "345sdsg4s-3d7a-4cca-b862-234lkdo" | |
| }, | |
| "transactionCreatedAt": { | |
| "type": "string", | |
| "description": "Transaction Created At", | |
| "format": "date-time" | |
| }, | |
| "fuelGrade": { | |
| "type": "string", | |
| "description": "Fuel Grade", | |
| "example": "Ron 97" | |
| }, | |
| "filledPetrolVolume": { | |
| "type": "number", | |
| "description": "Fuel Petrol Volume", | |
| "format": "double", | |
| "example": 30.2 | |
| }, | |
| "unitPrice": { | |
| "type": "number", | |
| "description": "Unit Price", | |
| "format": "double", | |
| "example": 2.2 | |
| }, | |
| "totalAmount": { | |
| "type": "number", | |
| "description": "Total Amount", | |
| "format": "double", | |
| "example": 67.89 | |
| }, | |
| "userPaidAmount": { | |
| "type": "number", | |
| "description": "Actual amount paid by user(Could be different due to fuel subsidy)", | |
| "format": "double", | |
| "example": 60 | |
| }, | |
| "pumpNumber": { | |
| "type": "number", | |
| "description": "Pump Number", | |
| "example": 1 | |
| }, | |
| "petrolStationName": { | |
| "type": "string", | |
| "description": "Petrol Station Name", | |
| "example": "Petronas @ NPE" | |
| }, | |
| "petrolStationAddress": { | |
| "type": "string", | |
| "description": "Petrol Station Address", | |
| "example": "123, Jalan xxx, 12345, Kuala Lumpur" | |
| }, | |
| "receiptNumber": { | |
| "type": "string", | |
| "description": "Receipt Number", | |
| "example": "AB1234567" | |
| }, | |
| "mesraCardNumber": { | |
| "type": "string", | |
| "description": "Mesra Card Number", | |
| "example": "4321 1234 0000 1001" | |
| }, | |
| "mesraPointsEarned": { | |
| "type": "number", | |
| "description": "Mesra Points Earned", | |
| "example": 10 | |
| }, | |
| "mesraBalanceAfterPurchase": { | |
| "type": "number", | |
| "description": "Mesra Balance After Purchase", | |
| "example": 1200 | |
| }, | |
| "circleId": { | |
| "type": "string", | |
| "description": "ID of the Circle if Order is paid using Circles", | |
| "example": "345sdsg4s3d7a4cca" | |
| }, | |
| "circleOwnerId": { | |
| "type": "string", | |
| "description": "OwnerId of the Circle if Order is paid using Circles", | |
| "example": "345sdsg4s-3d7a-4cca-b862-234lkdo" | |
| }, | |
| "isSubsidisedOrder": { | |
| "type": "boolean", | |
| "description": "Flag to indicate whether its subsidized order or not", | |
| "example": true | |
| }, | |
| "subsidyInfo": { | |
| "description": "Subsidy info", | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/OrderSubsidyInfoDto" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "userId", | |
| "transactionCreatedAt", | |
| "fuelGrade", | |
| "filledPetrolVolume", | |
| "unitPrice", | |
| "totalAmount", | |
| "userPaidAmount", | |
| "pumpNumber", | |
| "petrolStationName", | |
| "petrolStationAddress", | |
| "receiptNumber" | |
| ] | |
| }, | |
| "RewardsActionDto": { | |
| "type": "object", | |
| "properties": { | |
| "userId": { | |
| "type": "string", | |
| "description": "User ID" | |
| }, | |
| "type": { | |
| "type": "string", | |
| "description": "Type" | |
| }, | |
| "ackUrl": { | |
| "type": "string", | |
| "description": "Acknowledge URL" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "description": "Created At" | |
| }, | |
| "sentAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "description": "Sent At" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "description": "Metadata" | |
| }, | |
| "relatedDocumentId": { | |
| "type": "string", | |
| "description": "Related document ID" | |
| }, | |
| "amount": { | |
| "type": "number", | |
| "description": "Amount" | |
| }, | |
| "stationId": { | |
| "type": "string", | |
| "description": "Station ID" | |
| } | |
| }, | |
| "required": [ | |
| "userId", | |
| "type", | |
| "ackUrl", | |
| "createdAt", | |
| "sentAt", | |
| "meta", | |
| "relatedDocumentId", | |
| "amount", | |
| "stationId" | |
| ] | |
| }, | |
| "RewardsFailureStatsDto": { | |
| "type": "object", | |
| "properties": { | |
| "total": { | |
| "type": "number", | |
| "description": "Total" | |
| }, | |
| "failed": { | |
| "type": "number", | |
| "description": "Failed" | |
| }, | |
| "success": { | |
| "type": "number", | |
| "description": "Success" | |
| }, | |
| "successRate": { | |
| "type": "number", | |
| "description": "Success rate" | |
| } | |
| }, | |
| "required": [ | |
| "total", | |
| "failed", | |
| "success", | |
| "successRate" | |
| ] | |
| }, | |
| "ListTagsResponseDto": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ] | |
| }, | |
| "CreateTagsInputDto": { | |
| "type": "object", | |
| "properties": { | |
| "adminTags": { | |
| "example": [ | |
| "fraud-order" | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "adminTags" | |
| ] | |
| }, | |
| "CreateTagsResponseDto": { | |
| "type": "object", | |
| "properties": { | |
| "adminTags": { | |
| "example": [ | |
| "fraud-order" | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "adminTags" | |
| ] | |
| }, | |
| "GetManualReleaseStatusDto": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "type": "boolean", | |
| "description": "Status of manual release for order" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ] | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment