{ "swagger": "2.0", "info": { "title": "AtaraPay Api", "version": "1.20.0" }, "basePath": "/api", "paths": { "/{role}/banks": { "get": { "tags": [ "Banks Module" ], "summary": "Get all banks with bank code and nip codes", "responses": { "200": { "description": "{status:success, message: available_banks data: [BanksObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "external/getBanks": { "post": { "tags": [ "Plugin Module" ], "summary": "Get Service Provider (From external source - plugin)", "parameters": [ { "name": "service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "authtoken": { "description": "Token calculated based on seller API Keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service Provider Fetched successfully data:[ServiceProviderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/login": { "post": { "tags": [ "Buyer Module" ], "summary": "Customer Login", "parameters": [ { "name": "customer", "in": "body", "description": "Customer Details [CustomerObject]", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" }, "password": { "description": "Password or PIN", "type": "string" }, "platform": { "description": "Platform (mobile or web)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: customer_authenicated, data: [CustomerObject]}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/login": { "post": { "tags": [ "Seller Module" ], "summary": "Seller Login", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" }, "password": { "description": "Password or PIN", "type": "string" }, "platform": { "description": "Platform (mobile or web)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: seller_authenicated, data: [SellerObject]}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliverymen/login": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Delivery Man Login", "parameters": [ { "name": "deliverymen", "in": "body", "description": "Delivery Man Details [SellerObject]", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" }, "password": { "description": "Password or PIN", "type": "string" }, "platform": { "description": "Platform (use only when platform is mobile and as platform=mobile)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: deliveryman_authenicated, data: [SellerObject]}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/changePassword": { "post": { "tags": [ "Seller Module" ], "summary": "Change Seller Password", "parameters": [ { "name": "seller", "in": "body", "description": "Change Seller password", "required": true, "schema": { "properties": { "current_password": { "description": "Seller Current Password", "type": "string" }, "new_password": { "description": "Seller New Password", "type": "string" }, "new_password_confirmation": { "description": "Seller New Password Confirmation", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: password_updated]}" }, "201": { "description": "{status: error, message: parameters missing or required/record_not_found/password_does_not_match}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]/role_not_defined}" } } } }, "/customer/changePassword": { "post": { "tags": [ "Buyer Module" ], "summary": "Change Customer Password", "parameters": [ { "name": "customer", "in": "body", "description": "Change customer password", "required": true, "schema": { "properties": { "current_password": { "description": "Customer Current Password", "type": "string" }, "new_password": { "description": "Customer New Password", "type": "string" }, "new_password_confirmation": { "description": "Customer New Password Confirmation", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: password_updated]}" }, "201": { "description": "{status: error, message: parameters missing or required/record_not_found/password_does_not_match}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]/role_not_defined}" } } } }, "/deliveryman/changePassword": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Change Delivery Man Password", "parameters": [ { "name": "customer", "in": "body", "description": "Change deliveryman password", "required": true, "schema": { "properties": { "current_password": { "description": "deliveryman Current Password", "type": "string" }, "new_password": { "description": "deliveryman New Password", "type": "string" }, "new_password_confirmation": { "description": "deliveryman New Password Confirmation", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: password_updated]}" }, "201": { "description": "{status: error, message: parameters missing or required/record_not_found/password_does_not_match}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]/role_not_defined/unauthorized_access}" } } } }, "/customer/forgot": { "post": { "tags": [ "Buyer Module" ], "summary": "Customer Forgot Password", "parameters": [ { "name": "customer", "in": "body", "description": "Customer email to get email with reset token", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: token_generated, data: [token: reset_token_key ]}" }, "201": { "description": "{status: error, message: user_not_found}" } } } }, "/seller/forgot": { "post": { "tags": [ "Seller Module" ], "summary": "Seller Forgot Password", "parameters": [ { "name": "seller", "in": "body", "description": "Seller email to get email with reset token", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: token_generated, data: [token: reset_token_key ]}" }, "201": { "description": "{status: error, message: user_not_found}" } } } }, "/deliverymen/forgot": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Delivery Man Login", "parameters": [ { "name": "deliverymen", "in": "body", "description": "Deliveryman email to get email with reset token", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: token_generated, data: [token: reset_token_key ]}" }, "201": { "description": "{status: error, message: user_not_found}" } } } }, "/customer/forgot/reset": { "post": { "tags": [ "Buyer Module" ], "summary": "Customer Reset Forgot Password", "parameters": [ { "name": "customer", "in": "body", "description": "Customer email, new password and reset token to reset password", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" }, "password": { "description": "New Password", "type": "string" }, "password_confirmation": { "description": "Confirm New Password", "type": "string" }, "token": { "description": "Reset Token from email/forgot response", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: reset_successful}" }, "201": { "description": "{status: error, message: reset_failed}" } } } }, "/seller/forgot/reset": { "post": { "tags": [ "Seller Module" ], "summary": "Seller Reset Forgot Password", "parameters": [ { "name": "seller", "in": "body", "description": "Seller email, new password and reset token to reset password", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" }, "password": { "description": "New Password", "type": "string" }, "password_confirmation": { "description": "Confirm New Password", "type": "string" }, "token": { "description": "Reset Token from email/forgot response", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: reset_successful}" }, "201": { "description": "{status: error, message: reset_failed" } } } }, "/deliverymen/forgot/reset": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Delivery Man Reset Forgot Password", "parameters": [ { "name": "deliverymen", "in": "body", "description": "Deliveryman email, new password and reset token to reset password", "required": true, "schema": { "properties": { "email": { "description": "Email Address", "type": "string" }, "password": { "description": "New Password", "type": "string" }, "password_confirmation": { "description": "Confirm New Password", "type": "string" }, "token": { "description": "Reset Token from email/forgot response", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: reset_successful}" }, "201": { "description": "{status: error, message: reset_failed}" } } } }, "/customer/checkBuyer": { "post": { "tags": [ "Buyer Module" ], "summary": "Check if the buyer has an existing record in the database", "parameters": [ { "name": "buyer", "in": "body", "description": "Buyer Details [BuyerObject]", "required": true, "schema": { "properties": { "email": { "description": "Buyer Email Address or Phone number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=customer_exist, data: [customerObject]}" }, "201": { "description": "{status=error, message=customer_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/completeEasyRegistration": { "post": { "tags": [ "Buyer Module" ], "summary": "Completing user registration from P2P", "parameters": [ { "name": "buyer", "in": "body", "description": "Customer Details [BuyerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Customer Firstname", "type": "string" }, "lastname": { "description": "Customer Lastname", "type": "string" }, "password": { "description": "Customer Password", "type": "string" }, "email": { "description": "Customer Email", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=customer_updated, data: [customerObject]}" }, "201": { "description": "{status=error, message=Record not found, kindly register}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/completeMobileBuyerRegistration": { "post": { "tags": [ "Buyer Module" ], "summary": "Completing user registration from P2P", "parameters": [ { "name": "buyer", "in": "body", "description": "Customer Details [BuyerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Customer Firstname", "type": "string" }, "phone_number": { "description": "Customer Phone Number", "type": "string" }, "password": { "description": "Customer Password", "type": "string" }, "password_confirmation": { "description": "Customer Password confirmaation", "type": "string" }, "email": { "description": "Customer Email", "type": "string" }, "referral_code": { "description": "Referral code", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=customer_updated, data: [customerObject]}" }, "201": { "description": "{status=error, message=Invalid_buyer}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/mobileBuyerRegistration": { "post": { "tags": [ "Buyer Module" ], "summary": "Mobile App User Registration", "parameters": [ { "name": "buyer", "in": "body", "description": "Customer Details [BuyerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Customer Firstname", "type": "string" }, "phone_number": { "description": "Customer Phone Number", "type": "string" }, "device_type": { "description": "Customer Device Type", "type": "string" }, "device_version": { "description": "Customer Device Version", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=customer_updated, data: [customerObject]}" }, "201": { "description": "{status=error, message=Invalid_buyer}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/register": { "post": { "tags": [ "Buyer Module" ], "summary": "Create New Customer", "parameters": [ { "name": "customer", "in": "body", "description": "Customer Details [CustomerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Customer Firstname", "type": "string" }, "lastname": { "description": "Customer Lastname", "type": "string" }, "phone_number": { "description": "Customer Phone Number", "type": "string" }, "email": { "description": "Customer Email Address", "type": "string" }, "password": { "description": "Customer Password", "type": "string" }, "password_confirmation": { "description": "Confirm Password", "type": "string" }, "PIN": { "description": "Customer PIN", "type": "integer" }, "PIN_confirmation": { "description": "Confirm Customer PIN", "type": "integer" }, "device_type": { "description": "Customer Device Type", "type": "string" }, "device_version": { "description": "Customer Device Version", "type": "string" }, "returning": { "description": "if user is completing registration, send returning = 1", "type": "integer" }, "referral_code": { "description": "If user is being referred by another user, enter their referral code.", "type": "string" }, "reg_type": { "description": "if user is using easy_p2p send, returning = 1", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=customer_registered/customer_updated/customer_updated_otp, data: [customerObject]}" }, "201": { "description": "{status=error, message=messageText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/resendEmail": { "post": { "tags": [ "Buyer Module" ], "summary": "Resend verificaiton email to new buyer", "parameters": [ { "name": "buyer", "in": "body", "description": "Buyer Details [BuyerObject]", "required": true, "schema": { "properties": { "email": { "description": "Buyer Email Address", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=Resent_email}" }, "201": { "description": "{status=error, message=Invalid_buyer}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/resendMobileOTP/": { "post": { "tags": [ "Buyer Module" ], "summary": "Resend verificaiton OTP to buyer", "parameters": [ { "name": "resendMobileOTP", "in": "body", "description": "Sends a token to registered phone", "required": true, "schema": { "properties": { "phone_number": { "description": "Customer Existing Phone Number", "type": "string" }, "new_phone_number": { "description": "Customer New Phone Number", "type": "string" } }, "type": "object" }, "type": "string" } ], "responses": { "200": { "description": "{status=success, message=token_generated}" }, "201": { "description": "{status=error, message=Invalid_buyer}" }, "401": { "description": "{status: error, message: token_not_generated/invalid_token}" } } } }, "/customer/sendToken/{token}": { "get": { "tags": [ "Customer Module" ], "summary": "Customer Phone Number OTP Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Sends a token to registered phone", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: token_generated}" }, "201": { "description": "{status: error, message: token_not_generated/invalid_token}" } } } }, "/customer/confirmation/{token}/{otp}/{type}": { "get": { "tags": [ "Buyer Module" ], "summary": "Customer Email Confirmation when user update phone number (type=update_records)", "parameters": [ { "name": "token", "in": "query", "description": "Token from mail sent to user", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: customer_verified}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/customer/confirmation/{token}/{otp}": { "get": { "tags": [ "Buyer Module" ], "summary": "Customer Email Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Token from mail sent to user", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: customer_verified}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/customer/verified": { "get": { "tags": [ "Buyer Module" ], "summary": "Check if verified by AT/eCommerce", "responses": { "200": { "description": "{status: success, message: customer_verified}" }, "201": { "description": "{status: error, message: not_verified/customer_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer": { "get": { "tags": [ "Buyer Module" ], "summary": "Get Authenticated Customer Details", "responses": { "200": { "description": "{status: success, message: customer_details, data: [CustomerObject]}" }, "201": { "description": "{status: error, message: failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/dashboard": { "get": { "tags": [ "Buyer Module" ], "summary": "Get buyers's dashboard details", "responses": { "200": { "description": "{status: success, message: buyer_dashboard, data: [\r\n * total_transactions: 0,\r\n * total_disputes: 0,\r\n * total_orders: 0,\r\n * disputed_transactions: 0,\r\n * pending_transactions: 0,\r\n * accepted_transactions: 0,\r\n * completed_transactions: 0,\r\n * rejected_transactions: 0,\r\n * created_transactions: 0,\r\n * recent_orders: [OrderObjects]]}" }, "201": { "description": "{status: error, message: failed_to_load" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/notifications": { "get": { "tags": [ "customer Module" ], "summary": "Get Notification for Authenticated customer", "responses": { "200": { "description": "{status: success, message: notifications, data: [NotificationObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/manageNotification/{id}": { "put": { "tags": [ "Customer Module" ], "summary": "Manage Notification Status for Authenticated Customer", "parameters": [ { "name": "id", "in": "body", "description": "Customer Notification", "required": true, "schema": { "properties": { "status": { "description": "Status (1 for Read and 0 for Unread)", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "status: success, message:Notifications, data: [NotificationObject" }, "201": { "description": "status: error, message:Missing parameter Required / Failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/account/update": { "put": { "tags": [ "Buyer Module" ], "summary": "Update/Edit Customer Details", "parameters": [ { "name": "customer", "in": "body", "description": "Customer Details [CustomerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Customer Firstname", "type": "string" }, "lastname": { "description": "Customer Lastname", "type": "string" }, "phone_number": { "description": "Customer Phone Number", "type": "string" }, "email_address": { "description": "Customer Email Address", "type": "string" }, "platform": { "description": "Mobile if the platform sending api is mobile, dont pass if you are sending from web", "type": "string" }, "verified": { "description": "verification status = 1, when user otp has been verified", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: customer_updated, data: [CustomerObject]}" }, "201": { "description": "{status: error, message: some parameters missing or required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/orders": { "get": { "tags": [ "Order Module" ], "summary": "Get Orders for Authenticated Customer", "responses": { "200": { "description": "{status: success, message: customer_orders, data: [TransactionObject + customerObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/order": { "post": { "tags": [ "Order Module" ], "summary": "Get Single Order Details", "parameters": [ { "name": "id", "in": "body", "description": "Customer id", "required": true, "schema": { "properties": { "id": { "description": "Order Unique Id greater than 1", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "status: success, message:order_details, data: [TransactionObject" }, "201": { "description": "status: error, message:Missing parameter Required / Failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payments": { "get": { "tags": [ "Buyer Module" ], "summary": "Get Payments for Authenticated Buyer", "responses": { "200": { "description": "{status: success, message: buyer_payments, data: [PaymentObjects]}" }, "201": { "description": "{status: error, message: no_payment_record/failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payouts": { "get": { "tags": [ "Escrow Module" ], "summary": "Get Payouts for Authenticated Customer", "responses": { "200": { "description": "{status: success, message: customer_payouts, data: [PayoutObject]}" }, "201": { "description": "{status: error, message: no_payout_record" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/order/disputes": { "get": { "tags": [ "Order Module" ], "summary": "Get All Disputes for Authenticated Customer", "responses": { "200": { "description": "{status: success, message:customer_disputes, data: [RefundRequestObject]}" }, "201": { "description": "{status: error, message: Could not Get Disputes}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/order/dispute": { "post": { "tags": [ "Order Module" ], "summary": "Get Single Dispute Details", "parameters": [ { "name": "dispute_id", "in": "body", "description": "Dispute Unique Id", "required": true, "schema": { "properties": { "dispute_id": { "description": "Dispute Unique Id greater than 1", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message:dispute_details, data: [RefundRequestObject + TransactionObject]}" }, "201": { "description": "{status: error, message:Some Missing Parameters are Required / Failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/order/dispute/raise": { "post": { "tags": [ "Order Module" ], "summary": "Raise a Dispute ", "parameters": [ { "name": "dispute", "in": "body", "description": "Dispute Details", "required": true, "schema": { "properties": { "transaction_id": { "description": "Target Transaction Unique Id greater than 1", "type": "integer", "format": "int64" }, "status": { "description": "Status of the Dispute 0 - Canceled 1 - Pending/Processing 2 - Solved(Default = 1)", "type": "string" }, "reason": { "description": "Reason for Dispute or refund request", "type": "string" }, "email": { "description": "Contact email for Dispute or refund request", "type": "string" }, "attachment": { "description": "attachment file for Dispute or refund request", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: new_dispute, data: [DisputeObject]}" }, "201": { "description": "{status: error, message: Missing Parameters are Required / failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/order/dispute/cancel": { "post": { "tags": [ "Order Module" ], "summary": "Cancel a Dispute ", "parameters": [ { "name": "dispute_id", "in": "body", "description": "Dispute Details", "required": true, "schema": { "properties": { "dispute_id": { "description": "Dispute Unique Id greater than 1", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: cancel_dispute, data: [DisputeObject]}" }, "201": { "description": "{status success, message: You_cannot_cancel_selected_dispute})" } } } }, "/customer/payout/create": { "post": { "tags": [ "Escrow Module" ], "summary": "Add a PayOut Account ", "parameters": [ { "name": "PayOut Details", "in": "body", "description": "Payout Account Details", "required": true, "schema": { "properties": { "bank_name": { "description": "Bank Name of Payout Detail", "type": "string" }, "bank_code": { "description": "Refer to paystack docs for bank_code", "type": "string" }, "type": { "description": "1 for own, 2 for service provider", "type": "integer" }, "bank_account_name": { "description": "Payout Bank Account Name", "type": "string" }, "bank_account_number": { "description": "PayOut Bank Account Number", "type": "string" }, "default": { "description": "1 for yes, 2 for no", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: account_added, data: [AccountObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required/invalid_bank_account }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payout/setDefault/{id}": { "put": { "tags": [ "Escrow Module" ], "summary": "Set PayOut Details as Default of Authenticated Customer", "responses": { "200": { "description": "{status: success, message: set_as_default, data: [AccountObject]}" }, "201": { "description": "{status: error, message: payout_details_not_found/could_not_set_as_default}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payout/edit/{id}": { "put": { "tags": [ "Escrow Module" ], "summary": "Edit PayOut Details of Authenticated Customer", "parameters": [ { "name": "id", "in": "query", "description": "id", "required": true, "type": "integer", "items": { "type": "integer" } }, { "name": "PayOut Details", "in": "body", "description": "Payout Account Details", "required": true, "schema": { "properties": { "type": { "description": "1 for own, 2 for service provider", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: details_updated, data: [AccountObject]}" }, "201": { "description": "{status: error, message: payout_details_not_found/could_not_update_details}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payout/view": { "get": { "tags": [ "Escrow Module" ], "summary": "View PayOut Details of Authenticated Customer", "responses": { "200": { "description": "{status: success, message: account_details, data: [AccountObject]}" }, "201": { "description": "{status: error, message: payout_details_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payout/history": { "get": { "tags": [ "Escrow Module" ], "summary": "Get Payout for Authenticated Buyer", "responses": { "200": { "description": "{status: success, message: buyer_payouts, data: [PayoutObjects]}" }, "201": { "description": "{status: error, message: no_payout_record/failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/payout/delete/{id}": { "delete": { "tags": [ "Escrow Module" ], "summary": "Delete PayOut Details of Authenticated Customer", "parameters": [ { "name": "id", "in": "query", "description": "id", "required": true, "type": "integer", "items": { "type": "integer" } } ], "responses": { "200": { "description": "{status: success, message: deleted_details}" }, "201": { "description": "{status: error, message: payout_details_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/purchase": { "post": { "tags": [ "Order Module" ], "summary": "Create a Purchase Transaction", "parameters": [ { "name": "purchase", "in": "body", "description": "Purchase Details", "required": true, "schema": { "type": "object", "$ref": "#/definitions/Transaction" } } ], "responses": { "200": { "description": "{status: success, message: new_transaction, data: [TransactionObject]}" }, "201": { "description": "{status: error, message: Some Parameters Missing are Required / Failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/add_courier": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Create New Courier", "parameters": [ { "name": "deliveryMan", "in": "body", "description": "DeliveryMan Details [DeliveryManObject]", "required": true, "schema": { "properties": { "business_name": { "description": "Delivery Man Name", "type": "string" }, "business_email": { "description": "Delivery Man Email", "type": "string", "format": "date" }, "business_address": { "description": "Delivery Man Address", "type": "string" }, "business_state": { "description": "Delivery Man State", "type": "string" }, "business_city": { "description": "Delivery Man City", "type": "string" }, "business_country": { "description": "Delivery Man Country", "type": "string" }, "business_phone": { "description": "Delivery Man Phone", "type": "string" }, "siteURL": { "description": "siteURL", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=courier_business_added, data: [CourierbusinessObject]}" }, "201": { "description": "{status=error, message=failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/create": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Create New Cour", "parameters": [ { "name": "deliveryMan", "in": "body", "description": "DeliveryMan Details [DeliveryManObject]", "required": true, "schema": { "properties": { "type": { "description": "DeliveryMan Type", "type": "integer" }, "courier_business": { "description": "DeliveryMan Courier business ID. Default null", "type": "integer" }, "firstname": { "description": "Delivery Man Firstname", "type": "string" }, "lastname": { "description": "Delivery Lastname", "type": "string", "format": "date" }, "city": { "description": "Delivery Man City", "type": "string" }, "state": { "description": "Delivery Man State", "type": "string" }, "country": { "description": "Delivery Man Country", "type": "string" }, "phone": { "description": "Delivery Man Phone", "type": "string" }, "siteURL": { "description": "siteURL", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=delivery_man_registered, data: [DeliveryManObject]}" }, "201": { "description": "{status=error, message=failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/update/{id}": { "put": { "tags": [ "DeliveryMan Module" ], "summary": "Update Delivery Man", "parameters": [ { "name": "deliveryMan", "in": "body", "description": "eliveryMan Details [DeliveryMan]", "required": true, "schema": { "properties": { "type": { "description": "DeliveryMan Type", "type": "integer" }, "courier_business": { "description": "DeliveryMan Courier business ID. Default null", "type": "integer" }, "firstname": { "description": "Delivery Man Firstname", "type": "string" }, "lastname": { "description": "Delivery Lastname", "type": "string", "format": "date" }, "city": { "description": "Delivery Man City", "type": "string" }, "state": { "description": "Delivery Man State", "type": "string" }, "country": { "description": "Delivery Man Country", "type": "string" }, "phone": { "description": "Delivery Man Phone", "type": "string" }, "siteURL": { "description": "siteURL", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=updated_successfully, data: [DeliveryManObject]}" }, "201": { "description": "{status=error, message=Some Missing Parameters are Required failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/courier/update/{id}": { "put": { "tags": [ "DeliveryMan Module" ], "summary": "Update Delivery Man", "parameters": [ { "name": "deliveryMan", "in": "body", "description": "eliveryMan Details [DeliveryMan]", "required": true, "schema": { "properties": { "type": { "description": "DeliveryMan Type", "type": "integer" }, "business_name": { "description": "Delivery Man Name", "type": "string" }, "business_email": { "description": "Delivery Man Email", "type": "string", "format": "date" }, "business_address": { "description": "Delivery Man Address", "type": "string" }, "business_city": { "description": "Delivery Man City", "type": "string" }, "business_country": { "description": "Delivery Man Country", "type": "string" }, "business_phone": { "description": "Delivery Man Phone", "type": "string" }, "siteURL": { "description": "siteURL", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=updated_successfully, data: [DeliveryManObject]}" }, "201": { "description": "{status=error, message=Some Missing Parameters are Required failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/view": { "get": { "tags": [ "DeliveryMan Module" ], "summary": "Get Delivery Men Registered to Authenticated Seller", "responses": { "200": { "description": "{status: success, message: delivery_men, data: [DeliveryManObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/viewcourier": { "get": { "tags": [ "DeliveryMan Module" ], "summary": "Get Courier Businesses Registered to Authenticated Seller", "responses": { "200": { "description": "{status: success, message: couriers, data: [CourierObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/viewDetails": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Single Delivery Man Details", "parameters": [ { "name": "deliveryMan", "in": "body", "description": "eliveryMan Details [DeliveryMan]", "required": true, "schema": { "properties": { "delivery_man_id": { "description": "DeliveryMan Unique ID", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: delivery_men, data: [DeliveryManObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/delete/{id}": { "delete": { "tags": [ "DeliveryMan Module" ], "summary": "Delete Delivery Men Registered to Authenticated Seller", "responses": { "200": { "description": "{status: success, message: delivery_men_deleted, data: [DeliveryManObject]}" }, "201": { "description": "{status: error, message: Record Not Found/ failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliveryman/courier/delete/{id}": { "delete": { "tags": [ "DeliveryMan Module" ], "summary": "Delete Courier Registered to Authenticated Seller", "responses": { "200": { "description": "{status: success, message: courier_deleted, data: [CourierObject]}" }, "201": { "description": "{status: error, message: Record Not Found/ delete_failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliverymantype/create": { "post": { "tags": [ "DeliveryMan Module" ], "summary": "Create New DeliveryManType", "parameters": [ { "name": "deliveryMan", "in": "body", "description": "DeliveryMan Details [DeliveryManObject]", "required": true, "schema": { "properties": { "title": { "description": "DeliveryMan Type Title", "type": "integer" }, "description": { "description": "Delivery Man Type Description", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=delivery_man_type_registered, data: [DeliveryManTypeObject]}" }, "201": { "description": "{status=error, message=failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliverymantype/view": { "get": { "tags": [ "DeliveryMan Module" ], "summary": "Get Delivery Men Types", "responses": { "200": { "description": "{status: success, message: delivery_men_types, data: [DeliveryManTypeObject]}" }, "201": { "description": "{status: error, message: failed" } } } }, "/deliverymantype/update/{id}": { "put": { "tags": [ "DeliveryMan Module" ], "summary": "Update DeliveryManType", "parameters": [ { "name": "deliveryManType", "in": "body", "description": "DeliveryManType Details [DeliveryManObject]", "required": true, "schema": { "properties": { "title": { "description": "DeliveryMan Type Title", "type": "integer" }, "description": { "description": "Delivery Man Type Description", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: updated_successfully, data: [DeliveryManTypeObject]}" }, "201": { "description": "{status: error, message: Missing Parameters/ failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/deliverymantype/delete/{id}": { "delete": { "tags": [ "DeliveryMan Module" ], "summary": "Delete Delivery Men Types", "responses": { "200": { "description": "{status: success, message: deliverymanType_deleted, data: [DeliveryManTypeObject]}" }, "201": { "description": "{status: error, message: Could Not find Record / failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/external/order/confirm": { "post": { "tags": [ "Plugin Module" ], "summary": "", "parameters": [ { "name": "plugin, order", "in": "body", "description": "", "required": true, "schema": { "properties": { "order_id": { "description": "", "type": "integer" }, "status": { "description": "0 or 1", "type": "integer" }, "deduct_logistics": { "description": "Optional Boolean True or False", "type": "boolean" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: transaction_complete," }, "201": { "description": "{status: error, message: transaction_complete" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/dashboard": { "get": { "tags": [ "Marketplace Operator Module" ], "summary": "Get marketplace operator's dashboard details", "responses": { "200": { "description": "{status: success, message: marketplace_dashboard, data: [\r\n * total_completed_transactions: 0,\r\n * total_pending_transactions: 0,\r\n * total_orders: 0,\r\n * disputed_transactions: 0,\r\n * pending_transactions: 0,\r\n * accepted_transactions: 0,\r\n * completed_transactions: 0,\r\n * marketplace_child: 0,\r\n * rejected_transactions: 0,\r\n * created_transactions: 0,\r\n * cancelled_transactions: 0,\r\n * recent_orders: [OrderObjects]]}" }, "201": { "description": "{status: error, message: failed_to_load" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/orders/{platform}": { "get": { "tags": [ "Marketplace Operator Module" ], "summary": "Get Orders for Authenticated Marketplace Operator", "responses": { "200": { "description": "{status: success, message: orders, data: [TransactionObject + CustomerObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/orders": { "get": { "tags": [ "Marketplace Operator Module" ], "summary": "Get Orders for Authenticated Marketplace Operator", "responses": { "200": { "description": "{status: success, message: orders, data: [TransactionObject + CustomerObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "marketplace/pluginkey": { "get": { "tags": [ "Marketplace Operator Module" ], "summary": "View Plugin Keys (public and private)", "responses": { "200": { "description": "{status: success, message: api_keys, data: [KeyInfoObject]" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/order": { "post": { "tags": [ "Marketplace Operator Module" ], "summary": "Get Details of a single Order.", "parameters": [ { "name": "order id", "in": "body", "description": "Order Unique Identifier", "required": true, "schema": { "properties": { "id": { "description": "Order Unique Identifier", "type": "integer", "format": "int11" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: order_details, data: [TransactionObject + [CustomerObject]]}" }, "201": { "description": "{status: error, message: Some Missing Parameter Required /Failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/payments": { "get": { "tags": [ "Marketplace Operator Module" ], "summary": "Get Payments for Authenticated Marketplace Operator", "responses": { "200": { "description": "{status: success, message: seller_payments, data: [PaymentObjects]}" }, "201": { "description": "{status: error, message: no_payment_record/failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/payouts": { "get": { "tags": [ "Escrow Module" ], "summary": "Get Payouts for Authenticated Marketplace Operator", "responses": { "200": { "description": "{status: success, message: orders, data: [PayoutObject]}" }, "201": { "description": "{status: error, message: no_payout_record" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/payout/history": { "get": { "tags": [ "Escrow Module" ], "summary": "Get Payout History for Authenticated Marketplace Operator", "responses": { "200": { "description": "{status: success, message: seller_payouts, data: [PaymoutObjects]}" }, "201": { "description": "{status: error, message: no_payout_record/failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/order/disputes": { "get": { "tags": [ "Marketplace Module" ], "summary": "Get Disputes for Orders for Authenticated Marketplace Operator", "responses": { "200": { "description": "{status: success, message: disputes, data: [RefundRequestObject + {TransactionObject}]}" }, "201": { "description": "{status: error, message: no_dispute" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "marketplace/getMarketplaceSellers": { "get": { "tags": [ "Marketplace Operator Module" ], "summary": "Get Sellers Associated to Marketplace", "responses": { "200": { "description": "{status: success, message: marketplace_sellers, data: [marketplaceSellerObject]" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/marketplace/addSeller": { "post": { "tags": [ "Marketplace Operator Module" ], "summary": "Add a seller to a marketplace.", "parameters": [ { "name": "Marketplace", "in": "body", "description": "Marketplace Details [MarketplaceObject]", "required": true, "schema": { "properties": { "seller_id": { "description": "Seller Id", "type": "integer", "format": "int11" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: marketplace_sellers_details, data: [MarketplaceObject + [SellerObject]]}" }, "201": { "description": "{status: error, message: Some Missing Parameter Required /Failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/external/create/{reference}": { "get": { "tags": [ "Plugin Module" ], "summary": "Create New Transaction/Order", "responses": { "200": { "description": "{status:success, message: order_created_payment_successful data: [OrderObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/external/status/{orderId}": { "get": { "tags": [ "Plugin Module" ], "summary": "Check transaction status by orderId", "responses": { "200": { "description": "{status:success, message: transaction_status data: [TransactionObject]}" }, "201": { "description": "{status:error, message: transaction_does_not_exist/failed}" } } } }, "/promo/verifyPromoCode": { "post": { "tags": [ "Order Module" ], "summary": "Verify a promo code ", "parameters": [ { "name": "Verify Promo Code", "in": "body", "description": "Verify Promo Code", "required": true, "schema": { "properties": { "promo_code": { "description": "Promo Code", "type": "string" }, "transaction_id": { "description": "Transaction id for which the promo is to be used", "type": "integer", "format": "int64" }, "customer_phone": { "description": "Customer's Phone number", "type": "string" }, "seller_phone": { "description": "Seller's Phone", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: promo_valid, data: [promo Object]}" }, "201": { "description": "{status: error, message: promo_verification_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/promo/unAppendPromo": { "post": { "tags": [ "Order Module" ], "summary": "unAppend promo from a transaction", "parameters": [ { "name": "unAppend promo from a transaction", "in": "body", "description": "UnAppend promo from a transaction", "required": true, "schema": { "properties": { "transaction_id": { "description": "Transaction id for which the promo is to be used", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: promo_valid, data: [promo Object]}" }, "201": { "description": "{status: error, message: promo_verification_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/promo/appendPromo": { "post": { "tags": [ "Order Module" ], "summary": "Append promo to a transaction", "parameters": [ { "name": "Append promo to a transaction", "in": "body", "description": "promo to a transaction", "required": true, "schema": { "properties": { "promo_code": { "description": "Promo Code", "type": "string" }, "transaction_id": { "description": "Transaction id for which the promo is to be used", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: promo_valid, data: [promo Object]}" }, "201": { "description": "{status: error, message: promo_verification_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/promo/getPromoCode": { "get": { "tags": [ "Order Module" ], "summary": "Check transaction status by orderId", "responses": { "200": { "description": "{status:success, message: promo_codes data: [PromoObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/promo/addPromoCode": { "post": { "tags": [ "Order Module" ], "summary": "Add a promo code ", "parameters": [ { "name": "Add Promo Code", "in": "body", "description": "Add Promo Code", "required": true, "schema": { "properties": { "promo_code": { "description": "Promo Code", "type": "string" }, "promo_user": { "description": "Promo User id", "type": "integer", "format": "int64" }, "promo_type": { "description": "Promo type, between 0,2", "type": "string" }, "promo_descripton": { "description": "Promo desecription", "type": "string" }, "promo_platform": { "description": "Promo platform, ecommerce or p2p", "type": "string" }, "promo_percent": { "description": "Promo percent, between 0,1", "type": "float" }, "usage_freq": { "description": "Promo usage frequency, the number of times that a promo can be used, between 0, 10", "type": "integer", "format": "int64" }, "start_date": { "description": "Promo start date", "type": "string" }, "stop_date": { "description": "Promo end date", "type": "string" }, "status": { "description": "Promo status", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: promo_created, data: [promoObject]}" }, "201": { "description": "{status: error, message: promo_created_not_created }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/promo/updatePromoCode/{promo_id}": { "put": { "tags": [ "Order Module" ], "summary": "update promo code ", "parameters": [ { "name": "update Promo Code", "in": "body", "description": "update Promo Code", "required": true, "schema": { "properties": { "promo_code": { "description": "Promo Code", "type": "string" }, "promo_user": { "description": "Promo User id", "type": "integer", "format": "int64" }, "promo_type": { "description": "Promo type, between 0,2", "type": "string" }, "promo_descripton": { "description": "Promo desecription", "type": "string" }, "promo_platform": { "description": "Promo platform, ecommerce or p2p", "type": "string" }, "promo_percent": { "description": "Promo percent, between 0,1", "type": "float" }, "usage_freq": { "description": "Promo usage frequency, the number of times that a promo can be used, between 0, 10", "type": "integer", "format": "int64" }, "start_date": { "description": "Promo start date", "type": "string" }, "stop_date": { "description": "Promo end date", "type": "string" }, "status": { "description": "Promo status", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: promo_changes_saved, data: [promoObject]}" }, "201": { "description": "{status: error, message: promo_fail_to_update }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/promo/activatePromoCode/{promo_id}": { "put": { "tags": [ "Order Module" ], "summary": "Activate promo code ", "parameters": [ { "name": "update Promo Code", "in": "body", "description": "update Promo Code", "required": true, "schema": { "properties": { "status": { "description": "Promo status", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: promo_deactivated/promo_activated, data: [promoObject]}" }, "201": { "description": "{status: error, message: promo_code_does_not_exist/promo_fail_to_update }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/payment/verify": { "post": { "tags": [ "Order Module" ], "summary": "Verify Transaction/Order", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "payment_id": { "description": "Payment Number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:verification data:[PayStack Verification Response]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed/invalid_details}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/view": { "post": { "tags": [ "Order Module" ], "summary": "View Transaction/Order.", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction Order Id/Number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:order_details data:[TransactionObject]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed/invalid_order_code}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/{role}/order/cancel/{order_id}": { "get": { "tags": [ "Order Module" ], "summary": "Get One Transaction/Order Statuses. Use /order/allStatus to get all Transaction Statuses (ID)", "responses": { "200": { "description": "{status:success, message:all_status data: [TransactionStatusObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/order/setStatus": { "post": { "tags": [ "Order Module" ], "summary": "Set Transaction/Order Status. Use /order/allStatus to get all Transaction Statuses (ID)", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction Order Id/Number", "type": "string" }, "status": { "description": "Transaction Status ID. Use /order/allStatus to get all Transaction Statuses", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:status_changed data:-}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed/invalid_order_code/invalid_status}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/setDelivery": { "post": { "tags": [ "Order Module" ], "summary": "Set Transaction/Order Delivery Status. ", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction Order Id/Number", "type": "string" }, "delivery_status": { "description": "Transaction Status ID. 0 - Not Delivered or 1 - Delivered", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:delivery_status_changed data:-}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed/invalid_order_code/invalid_status}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/allStatus": { "get": { "tags": [ "Order Module" ], "summary": "Get All Transaction/Order Statuses. Use /order/allStatus to get all Transaction Statuses (ID)", "responses": { "200": { "description": "{status:success, message:all_status data: [TransactionStatusObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/order/update": { "put": { "tags": [ "Order Module" ], "summary": "Update Transaction", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "type": { "description": "Order Type", "type": "integer" }, "order_id": { "description": "Order Id/Number.", "type": "string" }, "delivery_date": { "description": "Transaction Delivery Date", "type": "date" }, "delivery_location": { "description": "Transaction Delivery Location.", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:updated data:[TransactionObject]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed/invalid_order_code}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/startTransaction": { "post": { "tags": [ "Order Module" ], "summary": "Start POD Transaction", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "phone_number": { "description": "Delivery Man Phone Number", "type": "string" }, "order_code": { "description": "Order Code", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message: verification_sent}" }, "201": { "description": "{status:error, message: Missing Parameters Required/invalid_order_code/delivery_man_unknown/transaction_completed_before/failed_to_process}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/verifyTransaction": { "post": { "tags": [ "Order Module" ], "summary": "Verify OTP of POD Transaction", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "otp": { "description": "OTP", "type": "string" }, "order_code": { "description": "Order Code", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message: pod_created}" }, "201": { "description": "{status:error, message: Missing Parameters Required/invalid_order_code/invalid_otp/failed_to_process}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/response": { "post": { "tags": [ "Order Module" ], "summary": "Customer/DM Response to POD Transaction", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "order_code": { "description": "Order Code", "type": "string" }, "party": { "description": "1 for Customer, 2 for DeliveryMan", "type": "string" }, "answer": { "description": "Answer - Y for Yes, N for No", "type": "int" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message: pod_updated}" }, "201": { "description": "{status:error, message: Missing Parameters Required/invalid_order_code/invalid_otp/failed_to_process}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/authorizeCashPayment": { "post": { "tags": [ "Order Module" ], "summary": "Authorize customer cash payment, (for switch only)", "parameters": [ { "name": "order", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "reference": { "description": "Reference Code", "type": "string" }, "amount": { "description": "Cash amount paid", "type": "string" }, "narative": { "description": "Descriptive (optional)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message: payment_authorized}" }, "201": { "description": "{status:error, message: Missing Parameters Required/invalid_reference_code/already_authorized/failed_to_process}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/complete": { "post": { "tags": [ "Order Module" ], "summary": "Complete Delivery Order ", "parameters": [ { "name": "Complete Delivery Order", "in": "body", "description": "Complete Delivery", "required": true, "schema": { "properties": { "order": { "description": "Transaction(order) id", "type": "string" }, "email": { "description": "Seller Email", "type": "string" }, "phone_number": { "description": "seller's Phone number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: pod_created, data: [orderObject]}" }, "201": { "description": "{status: error, message: verification_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/uploadProof": { "post": { "tags": [ "Order Module" ], "summary": "Upload proof of delivery Order ", "parameters": [ { "name": "Upload proof of delivery", "in": "body", "description": "Upload proof of delivery", "required": true, "schema": { "properties": { "order": { "description": "Transaction(order) id", "type": "string" }, "proof_of_delivery": { "description": "Proof Of Delivery", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: uploaded_proof_of_delivery, data: [orderObject]}" }, "201": { "description": "{status: error, message: invalid_transaction }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/unAssignSp": { "post": { "tags": [ "Order Module" ], "summary": "UnAssign Service provider from Order", "parameters": [ { "name": "UnAssign Service provider from Order", "in": "body", "description": "UnAssign Service provider from Order", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction(order) id", "type": "string" }, "seller": { "description": "Seller ID", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: order_already_updated, data: [orderObject]}" }, "201": { "description": "{status: error, message: invalid_transaction }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/ResendOrderCompleteSmsEmail": { "post": { "tags": [ "Order Module" ], "summary": "Resend Order Complete Delivery SMS and Email", "parameters": [ { "name": "Resend Order Complete Delivery SMS and Email", "in": "body", "description": "Resend Order Complete Delivery SMS and Email", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction(order) id", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: complete_delivery_notification_sent, data: [orderObject]}" }, "201": { "description": "{status: error, message: invalid_transaction }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/order/pod/BuyerResendOrderImpedimentSmsEmail": { "post": { "tags": [ "Order Module" ], "summary": "Resend Order Complete Delivery SMS and Email", "parameters": [ { "name": "Resend Order Complete Delivery SMS and Email", "in": "body", "description": "Resend Order Complete Delivery SMS and Email", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction(order) id", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: impediment_notification_sent, data: [orderObject]}" }, "201": { "description": "{status: error, message: invalid_transaction }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "external/order/transactionPaymentInformation": { "post": { "tags": [ "Plugin Module" ], "summary": "Get transaction payment information", "parameters": [ { "name": "Get transaction payment information", "in": "body", "description": "Get transaction payment information", "required": true, "schema": { "properties": { "transaction_id": { "description": "Transaction(order) id(optional but if ommitted every other field is required except promo_code)", "type": "string" }, "type": { "description": "Transaction type: '1 = Ecommerce' or '2 = P2P", "type": "integer" }, "seller_phone": { "description": "Seller Phone Number (Required)", "type": "string" }, "buyer_phone": { "description": "Buyer Phone Number (Required)", "type": "string" }, "currency": { "description": "Currency", "type": "string" }, "promo_code": { "description": "Promo Code", "type": "string" }, "product_cost": { "description": "transaction amount in kobo", "type": "string" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "string" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "payment_method": { "description": "Payment Method, (Paystack or Monnify)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: Get transaction payment information , data: [paymentInformationObject]}" }, "201": { "description": "{status: error, message: Missing Parameters Required/failed/invalid_details }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "{role}/order/transactionPaymentInformation": { "post": { "tags": [ "Order Module" ], "summary": "Get transaction payment information", "parameters": [ { "name": "Get transaction payment information", "in": "body", "description": "Get transaction payment information", "required": true, "schema": { "properties": { "transaction_id": { "description": "Transaction(order) id(optional but if ommitted every other field is required except promo_code)", "type": "string" }, "type": { "description": "Transaction type: '1 = Ecommerce' or '2 = P2P", "type": "integer" }, "seller_phone": { "description": "Seller Phone Number (Required)", "type": "string" }, "buyer_phone": { "description": "Buyer Phone Number (Required)", "type": "string" }, "currency": { "description": "Currency", "type": "string" }, "promo_code": { "description": "Promo Code", "type": "string" }, "product_cost": { "description": "transaction amount in kobo", "type": "string" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "string" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "payment_method": { "description": "Payment Method, (Paystack or Monnify)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: Get transaction payment information , data: [paymentInformationObject]}" }, "201": { "description": "{status: error, message: Missing Parameters Required/failed/invalid_details }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/transaction/create": { "post": { "tags": [ "p2p Module" ], "summary": "Create New Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Details", "required": true, "schema": { "properties": { "type": { "description": "Transaction type: 'general' or 'milestone", "type": "string" }, "product_name": { "description": "Transaction title", "type": "string" }, "product_desc": { "description": "Transaction Description", "type": "string" }, "category": { "description": "Transaction category", "type": "string" }, "seller_email": { "description": "Required", "type": "string" }, "seller_phone": { "description": "Optional", "type": "string" }, "quantity": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "string" }, "amount_payed": { "description": "transaction amount in kobo", "type": "string" }, "shipping_method": { "description": "Shipping Method 0 - No shipping, 1- Shipping Required", "type": "integer" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "integer" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "is_additional_services": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "integer" }, "additional_service_amount": { "description": "Total Cost of Addtional Services", "type": "integer" }, "max_delivery_days": { "description": "Maximum Number of Delivery Days", "type": "integer" }, "easyp2p": { "description": "To classify if the transaction is an easyp2p/mobile transaction, pass value 1 if is easyP2p/mobile, and dont pass field if it's not easyp2p/Mobile", "type": "integer" }, "contract_files": { "description": "Order/transacton contract file", "type": "string" }, "extra": { "description": "Stringified JSON of object inform of key: value, where key is the property and value is the value. Example { year: 2018, model: 'Benz'}", "type": "string" }, "delivery_location": { "description": "Delivery Location", "type": "string" }, "payment_method": { "description": "Payment Method, (Paystack or Monnify)", "type": "string" }, "recipient": { "description": "Stringified JSON of objects in the form [ { recipient_name: 'Recipient name', recipient_address: 'Recipient Address', recipient_account_type: 'Saving', recipient_bank_swift: '78432'}, . . .]", "type": "string" }, "additional_services": { "description": "An array of objects in the form [ { service: 'additional_service', cost: 'set_cost', payment_recipient: 'id of registered payment recipient', selected: 'always set to true'}, . . .]", "type": "array", "items": { "properties": { "service": { "type": "string" }, "cost": { "type": "integer" }, "payment_recipient": { "type": "integer" }, "selected": { "type": "boolean" } }, "type": "object" } } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=transaction_created, data=[TransactionObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/transaction/create": { "post": { "tags": [ "p2p Module" ], "summary": "Create New Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Details", "required": true, "schema": { "properties": { "type": { "description": "Transaction type: 'general' or 'milestone", "type": "string" }, "product_name": { "description": "Transaction title", "type": "string" }, "product_desc": { "description": "Transaction Description", "type": "string" }, "category": { "description": "Transaction category", "type": "string" }, "seller_email": { "description": "Required", "type": "string" }, "seller_phone": { "description": "Optional", "type": "string" }, "quantity": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "string" }, "amount_payed": { "description": "transaction amount in kobo", "type": "string" }, "shipping_method": { "description": "Shipping Method 0 - No shipping, 1- Shipping Required", "type": "integer" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "integer" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "is_additional_services": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "integer" }, "additional_service_amount": { "description": "Total Cost of Addtional Services", "type": "integer" }, "max_delivery_days": { "description": "Maximum Number of Delivery Days", "type": "integer" }, "extra": { "description": "Stringified JSON of object inform of key: value, where key is the property and value is the value. Example { year: 2018, model: 'Benz'}", "type": "string" }, "delivery_location": { "description": "Delivery Location", "type": "string" }, "payment_method": { "description": "Payment Method, (Paystack or Monnify)", "type": "string" }, "recipient": { "description": "Stringified JSON of objects in the form [ { recipient_name: 'Recipient name', recipient_address: 'Recipient Address', recipient_account_type: 'Saving', recipient_bank_swift: '78432'}, . . .]", "type": "string" }, "additional_services": { "description": "An array of objects in the form [ { service: 'additional_service', cost: 'set_cost', payment_recipient: 'id of registered payment recipient', selected: 'always set to true'}, . . .]", "type": "array", "items": { "properties": { "service": { "type": "string" }, "cost": { "type": "integer" }, "payment_recipient": { "type": "integer" }, "selected": { "type": "boolean" } }, "type": "object" } } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=transaction_created, data=[TransactionObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "seller/transaction/respond": { "post": { "tags": [ "p2p Module" ], "summary": "Response from Buyer on transaction terms", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Response", "required": true, "schema": { "properties": { "order_id": { "description": "Order ID", "type": "string" }, "response": { "description": "Customer Response", "type": "string" }, "conment": { "description": "Comment if response is Disagree", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=response_sent, data=[PayStackAuthObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "buyer/transaction/respond": { "post": { "tags": [ "p2p Module" ], "summary": "Response from Buyer on transaction terms", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Response", "required": true, "schema": { "properties": { "order_id": { "description": "Order ID", "type": "string" }, "response": { "description": "Customer Response", "type": "string" }, "conment": { "description": "Comment if response is Disagree", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=response_sent, data=[PayStackAuthObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/{role}/transaction/makep2pUssdPayment": { "post": { "tags": [ "p2p Module" ], "summary": "Payment for using USSD(monnify) p2p Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Response", "required": true, "schema": { "properties": { "order_id": { "description": "Order ID", "type": "string" }, "cust_id": { "description": "Customer ID this used when the transaction is an easyP2P transaction", "type": "integer" }, "alt": { "description": "Alternative Customer Phone Number", "type": "string" }, "promo_code": { "description": "Promo code", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=AuthorizationData/redirect to Monnify, data=[monnifyAuthObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/{role}/transaction/payment": { "post": { "tags": [ "p2p Module" ], "summary": "Payment for PayStack p2p Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Response", "required": true, "schema": { "properties": { "order_id": { "description": "Order ID", "type": "string" }, "cust_id": { "description": "Customer ID this used when the transaction is an easyP2P transaction", "type": "integer" }, "alt": { "description": "Alternative Customer Phone Number", "type": "string" }, "promo_code": { "description": "Promo code", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=AuthorizationData/redirect to paystack, data=[PayStackAuthObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/project/createProject": { "post": { "tags": [ "p2p Module" ], "summary": "Create Project for milestone Payments(external source)", "parameters": [ { "name": "seller", "in": "body", "description": "Project Response", "required": true, "schema": { "properties": { "project_name": { "description": "Project Name", "type": "string" }, "description": { "description": "Short descrptive statement of the project", "type": "string" }, "customer_email": { "description": "Associated Customer Email", "type": "string" }, "customer_phone": { "description": "Associated Customer Phone Number", "type": "string" }, "started_by": { "description": "Project Started By (buyer or seller)", "type": "string" }, "authtoken": { "description": "base64 encode of Seller API keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_created, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "customer/project/assignSeller": { "post": { "tags": [ "p2p Module" ], "summary": "Assign seller to Project for milestone Payments", "parameters": [ { "name": "seller", "in": "body", "description": "Project Response", "required": true, "schema": { "properties": { "project_id": { "description": "Project ID", "type": "integer" }, "seller_email": { "description": "Associating Seller Email", "type": "string" }, "seller_phone": { "description": "Associating Seller Phone Number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_seller_assigned, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: project_not_found, debug: [DebugInfoObject]}" } } } }, "/project/deleteAssignSeller/{project_id}": { "post": { "tags": [ "p2p Module" ], "summary": "Delete Assign Seller to Project(external source)", "parameters": [ { "name": "seller", "in": "body", "description": "Project Response", "required": true, "schema": { "properties": { "project_id": { "description": "Project ID", "type": "integer" }, "authtoken": { "description": "base64 encode of Seller API keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_seller_deleted, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/project/delAssignSeller/{project_id}/{seller_id}": { "delete": { "tags": [ "p2p Module" ], "summary": "Delete Assign Seller to Project", "responses": { "200": { "description": "{status: success, message: project_seller_deleted, data: [ProjectSellerObject]}" }, "201": { "description": "{status: error, message: Record Not Found/ failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/project/assignSellerToProject": { "post": { "tags": [ "p2p Module" ], "summary": "Assign seller to Project for milestone Payments(external source)", "parameters": [ { "name": "seller", "in": "body", "description": "Project Response", "required": true, "schema": { "properties": { "project_id": { "description": "Project ID", "type": "integer" }, "customer_email": { "description": "Associated Customer Email", "type": "string" }, "customer_phone": { "description": "Associated Customer Phone Number", "type": "string" }, "authtoken": { "description": "base64 encode of Seller API keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_created, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/project/updateProject/{project_id}": { "put": { "tags": [ "p2p Module" ], "summary": "Update Project for milestone Payments(external source)", "parameters": [ { "name": "seller", "in": "body", "description": "Project Response", "required": true, "schema": { "properties": { "project_name": { "description": "Project Name", "type": "string" }, "description": { "description": "Short descrptive statement of the project", "type": "string" }, "authtoken": { "description": "base64 encode of Seller API keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_created, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/project/update/{project_id}": { "put": { "tags": [ "p2p Module" ], "summary": "Update Project for milestone Payments", "parameters": [ { "name": "seller", "in": "body", "description": "Project Response", "required": true, "schema": { "properties": { "project_name": { "description": "Project Name", "type": "string" }, "description": { "description": "Short descrptive statement of the project", "type": "string" }, "authtoken": { "description": "base64 encode of Seller API keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_created, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/project/getExternalProjects": { "post": { "tags": [ "p2p Module" ], "summary": "Get Projects associated to a seller for milestone Payments(for external source)", "parameters": [ { "name": "seller", "in": "body", "description": "Projects Response", "required": true, "schema": { "properties": { "authtoken": { "description": "base64 encode of Seller API keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=project_data, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "{role}/project/getProjects": { "get": { "tags": [ "p2p Module" ], "summary": "Get All Projects", "responses": { "200": { "description": "{status=success, message=project_data, data=[projectObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "{role}/project/addMilestone": { "post": { "tags": [ "p2p Module" ], "summary": "Create New Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Details", "required": true, "schema": { "properties": { "project_id": { "description": "Project id", "type": "integer" }, "type": { "description": "Transaction type: 'general' or 'milestone", "type": "string" }, "description": { "description": "Transaction Description", "type": "string" }, "customer_id": { "description": "Customer/buyer ID, Required", "type": "integer" }, "seller_email": { "description": "Seller email", "type": "string" }, "seller_phone": { "description": "Seller Phone", "type": "string" }, "quantity": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "string" }, "amount_payed": { "description": "transaction amount in kobo", "type": "string" }, "shipping_method": { "description": "Shipping Method 0 - No shipping, 1- Shipping Required", "type": "integer" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "integer" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "is_additional_services": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "integer" }, "additional_service_amount": { "description": "Total Cost of Addtional Services", "type": "integer" }, "max_delivery_days": { "description": "Maximum Number of Delivery Days", "type": "integer" }, "extra": { "description": "Stringified JSON of object inform of key: value, where key is the property and value is the value. Example { year: 2018, model: 'Benz'}", "type": "string" }, "delivery_location": { "description": "Delivery Location", "type": "string" }, "payment_method": { "description": "Payment Method, (Paystack or Monnify)", "type": "string" }, "recipient": { "description": "Stringified JSON of objects in the form [ { recipient_name: 'Recipient name', recipient_address: 'Recipient Address', recipient_account_type: 'Saving', recipient_bank_swift: '78432'}, . . .]", "type": "string" }, "additional_services": { "description": "An array of objects in the form [ { service: 'additional_service', cost: 'set_cost', payment_recipient: 'id of registered payment recipient', selected: 'always set to true'}, . . .]", "type": "array", "items": { "properties": { "service": { "type": "string" }, "cost": { "type": "integer" }, "payment_recipient": { "type": "integer" }, "selected": { "type": "boolean" } }, "type": "object" } } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=transaction_created, data=[TransactionObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/transaction/update/{order_id}": { "put": { "tags": [ "p2p Module" ], "summary": "Seller Update Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Details", "required": true, "schema": { "properties": { "type": { "description": "Transaction type: 'general' or 'milestone", "type": "string" }, "product_name": { "description": "Transaction title", "type": "string" }, "product_desc": { "description": "Transaction Description", "type": "string" }, "category": { "description": "Transaction category", "type": "string" }, "seller_email": { "description": "Required", "type": "string" }, "seller_phone": { "description": "Optional", "type": "string" }, "quantity": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "string" }, "amount_payed": { "description": "transaction amount in kobo", "type": "string" }, "shipping_method": { "description": "Shipping Method 0 - No shipping, 1- Shipping Required", "type": "integer" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "integer" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "is_additional_services": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "integer" }, "additional_service_amount": { "description": "Total Cost of Addtional Services", "type": "integer" }, "max_delivery_days": { "description": "Maximum Number of Delivery Days", "type": "integer" }, "extra": { "description": "Stringified JSON of object inform of key: value, where key is the property and value is the value. Example { year: 2018, model: 'Benz'}", "type": "string" }, "additional_services": { "description": "An array of objects in the form [ { service: 'additional_service', cost: 'set_cost', payment_recipient: 'id of registered payment recipient', selected: 'always set to true'}, . . .]", "type": "array", "items": { "properties": { "service": { "type": "string" }, "cost": { "type": "integer" }, "payment_recipient": { "type": "integer" }, "selected": { "type": "boolean" } }, "type": "object" } } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=transaction_created, data=[TransactionObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/transaction/update/{order_id}": { "put": { "tags": [ "p2p Module" ], "summary": "Customer Update Transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Details", "required": true, "schema": { "properties": { "type": { "description": "Transaction type: 'general' or 'milestone", "type": "string" }, "product_name": { "description": "Transaction title", "type": "string" }, "product_desc": { "description": "Transaction Description", "type": "string" }, "category": { "description": "Transaction category", "type": "string" }, "seller_email": { "description": "Required", "type": "string" }, "seller_phone": { "description": "Optional", "type": "string" }, "quantity": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "string" }, "amount_payed": { "description": "transaction amount in kobo", "type": "string" }, "shipping_method": { "description": "Shipping Method 0 - No shipping, 1- Shipping Required", "type": "integer" }, "shipping_cost": { "description": "Cost of Shipping", "type": "integer" }, "shipping_fee_bearer": { "description": "Who Bears Shipping Cost, customer, seller or both", "type": "integer" }, "escrow_fee_bearer": { "description": "Who Bears Escrow Cost, customer, seller or both", "type": "string" }, "is_additional_services": { "description": "Who Bears Escrow Cost, buyer, seller or both", "type": "integer" }, "additional_service_amount": { "description": "Total Cost of Addtional Services", "type": "integer" }, "max_delivery_days": { "description": "Maximum Number of Delivery Days", "type": "integer" }, "extra": { "description": "Stringified JSON of object inform of key: value, where key is the property and value is the value. Example { year: 2018, model: 'Benz'}", "type": "string" }, "additional_services": { "description": "An array of objects in the form [ { service: 'additional_service', cost: 'set_cost', payment_recipient: 'id of registered payment recipient', selected: 'always set to true'}, . . .]", "type": "array", "items": { "properties": { "service": { "type": "string" }, "cost": { "type": "integer" }, "payment_recipient": { "type": "integer" }, "selected": { "type": "boolean" } }, "type": "object" } } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=transaction_created, data=[TransactionObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/customer/transaction/updateEasyP2P/{order_id}": { "put": { "tags": [ "p2p Module" ], "summary": "Customer update EasyP2P transaction", "parameters": [ { "name": "seller", "in": "body", "description": "Transaction Details", "required": true, "schema": { "properties": { "seller_email": { "description": "optional", "type": "string" }, "seller_phone": { "description": "Optional", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=transaction_created, data=[TransactionObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/{role}/transaction/view": { "get": { "tags": [ "p2p Module" ], "summary": "Get All Transaction/Order Statuses. Use /order/allStatus to get all Transaction Statuses (ID)", "responses": { "200": { "description": "{status:success, message:all_status data: [TransactionStatusObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/{role}/transaction/view/{order_id}": { "get": { "tags": [ "p2p Module" ], "summary": "Get One Transaction/Order Statuses. Use /order/allStatus to get all Transaction Statuses (ID)", "responses": { "200": { "description": "{status:success, message:all_status data: [TransactionStatusObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/{role}/transaction/cancel/{order_id}": { "get": { "tags": [ "p2p Module" ], "summary": "Get One Transaction/Order Statuses. Use /order/allStatus to get all Transaction Statuses (ID)", "responses": { "200": { "description": "{status:success, message:all_status data: [TransactionStatusObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/{role}/check": { "post": { "tags": [ "p2p Module" ], "summary": "Check user role for p2p transaction", "parameters": [ { "name": "seller", "in": "body", "description": "User Records", "required": true, "schema": { "properties": { "phone_number": { "description": "Required", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:account_exists data: [userObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/{role}/checkUserRecords": { "post": { "tags": [ "p2p Module" ], "summary": "Check if user mismatch", "parameters": [ { "name": "seller", "in": "body", "description": "User Records", "required": true, "schema": { "properties": { "phone_number": { "description": "Required", "type": "string" }, "email": { "description": "Required", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:account_exists data: [userObject]}" }, "201": { "description": "{status:error, message: failed}" } } } }, "/preference/get": { "get": { "tags": [ "Seller Module" ], "summary": "Get Set Transaction Charge", "parameters": [ { "name": "token", "in": "query", "description": "Get Set Transaction Charge", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: PreferenceObject}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/Seller/mobileSellerRegistration": { "post": { "tags": [ "Seller Module" ], "summary": "Mobile App User Registration", "parameters": [ { "name": "buyer", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Seller Firstname", "type": "string" }, "phone_number": { "description": "Seller Phone Number", "type": "string" }, "device_type": { "description": "Seller Device Type", "type": "string" }, "device_version": { "description": "Seller Device Version", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=seller_registered, data: [SellerObject]}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/completeMobileRegister": { "post": { "tags": [ "Seller Module" ], "summary": "Complete Mobile Seller Registration", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Seller Firstname", "type": "string" }, "phone_number": { "description": "Seller Phone Number", "type": "string" }, "email": { "description": "Seller Email Address", "type": "string" }, "password": { "description": "Seller Password", "type": "string" }, "password_confirmation": { "description": "Seller Password Confirmation", "type": "string" }, "referral_code": { "description": "Referral code", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=seller_registered}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/register": { "post": { "tags": [ "Seller Module" ], "summary": "Create New Seller", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Seller Firstname", "type": "string" }, "lastname": { "description": "Seller Lastname", "type": "string" }, "phone_number": { "description": "Seller Phone Number", "type": "string" }, "email": { "description": "Seller Email Address", "type": "string" }, "password": { "description": "Seller Password", "type": "string" }, "password_confirmation": { "description": "Seller Password Confirmation", "type": "string" }, "PIN": { "description": "Seller's PIN", "type": "integer" }, "PIN_confirmation": { "description": "Seller's PIN Confirmation", "type": "integer" }, "device_type": { "description": "Customer Device Type", "type": "string" }, "device_version": { "description": "Customer Device Version", "type": "string" }, "referral_code": { "description": "If user is being referred by another user, enter their referral code.", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=seller_registered}" }, "201": { "description": "{status=error, message=errorText}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/resendEmail": { "post": { "tags": [ "Seller Module" ], "summary": "Resend verificaiton email to new seller", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "email": { "description": "Seller Email Address", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=Resent_email}" }, "201": { "description": "{status=error, message=Invalid_seller}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/resendEmailOTP": { "post": { "tags": [ "Seller Module" ], "summary": "Resend verificaiton email to seller", "parameters": [ { "name": "resendEmailOTP", "in": "body", "description": "Sends a token to registered phone", "required": true, "schema": { "properties": { "email": { "description": "Seller Existing Email", "type": "string" }, "new_email": { "description": "Seller New Email", "type": "string" } }, "type": "object" }, "type": "string" } ], "responses": { "200": { "description": "{status=success, message=token_generated}" }, "201": { "description": "{status=error, message=Invalid_seller}" }, "401": { "description": "{status: error, message: token_not_generated/invalid_token}" } } } }, "/seller/resendMobileOTP": { "post": { "tags": [ "Seller Module" ], "summary": "Resend verificaiton OTP to seller Phone", "parameters": [ { "name": "resendMobileOTP", "in": "body", "description": "Sends a token to registered phone", "required": true, "schema": { "properties": { "phone_number": { "description": "Seller Existing Phone Number", "type": "string" }, "new_phone_number": { "description": "Seller New Phone Number", "type": "string" } }, "type": "object" }, "type": "string" } ], "responses": { "200": { "description": "{status=success, message=token_generated}" }, "201": { "description": "{status=error, message=Invalid_seller}" }, "401": { "description": "{status: error, message: token_not_generated/invalid_token}" } } } }, "/seller/sendToken/{token}": { "get": { "tags": [ "Seller Module" ], "summary": "Seller Phone Number OTP Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Sends a token to registered phone", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: token_generated}" }, "201": { "description": "{status: error, message: token_not_generated/invalid_token}" } } } }, "/seller/sendEmailToken/{token}": { "get": { "tags": [ "Seller Module" ], "summary": "Seller Email OTP Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Sends a token to registered email", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: token_generated}" }, "201": { "description": "{status: error, message: token_not_generated/invalid_token}" } } } }, "/seller/confirmation/{token}/{otp}/{type}": { "get": { "tags": [ "Seller Module" ], "summary": "Seller Email Confirmation when email is updated (type = update_records)", "parameters": [ { "name": "token", "in": "query", "description": "Token from mail sent to seller", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: seller_verified}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/seller/confirmation/{token}/{otp}": { "get": { "tags": [ "Seller Module" ], "summary": "Seller Email Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Token from mail sent to seller", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: seller_verified}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/seller/confirmSellerMobilePhone/{token}/{otp}/{type}": { "get": { "tags": [ "Seller Module" ], "summary": "Seller mobile phone Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Token from sms sent to seller", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: seller_mobile_phone_verified}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/seller/confirmSellerMobilePhone/{token}/{otp}": { "get": { "tags": [ "Seller Module" ], "summary": "Seller mobile phone Confirmation", "parameters": [ { "name": "token", "in": "query", "description": "Token from sms sent to seller", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: seller_mobile_phone_verified}" }, "201": { "description": "{status: error, message: invalid_token}" } } } }, "/seller/support/{token}/{answer}": { "get": { "tags": [ "Admin Module" ], "summary": "Support Business Approval", "parameters": [ { "name": "token", "in": "query", "description": "token", "required": true, "type": "string", "items": { "type": "string" } }, { "name": "answer", "in": "query", "description": "yes/no", "required": true, "type": "string", "items": { "type": "string" } } ], "responses": { "200": { "description": "{status: success, message: seller_approved/seller_disapproved}" }, "201": { "description": "{status: error, message: invalid_token/failed_to_process}" } } } }, "/seller/account": { "get": { "tags": [ "Seller Module" ], "summary": "Get Authenticated Seller Account Details", "responses": { "200": { "description": "{status: success, message: seller_details, data: [sellerObject]}" }, "201": { "description": "{status: error, message: seller_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller": { "get": { "tags": [ "Seller Module" ], "summary": "Get Authenticated Seller Details", "responses": { "200": { "description": "{status: success, message: seller_details, data: [sellerObject]}" }, "201": { "description": "{status: error, message: seller_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/mobileBusiness": { "post": { "tags": [ "Seller Module" ], "summary": "Update Mobile Seller Business Information", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "individual": { "description": "Individual(this is only used when seller skipped business registration on mobile)", "type": "string", "format": "varchar255" }, "business_name": { "description": "Business Name", "type": "string", "format": "varchar255" }, "business_address": { "description": "Business Address", "type": "string", "format": "varchar255" }, "business_address_2": { "description": "Business Address 2", "type": "string", "format": "varchar255" }, "business_city": { "description": "Business City", "type": "string", "format": "varchar255" }, "business_state": { "description": "Business State", "type": "string", "format": "varchar255" }, "business_country": { "description": "Business State", "type": "string", "format": "varchar255" }, "business_email": { "description": "Business Email", "type": "string", "format": "varchar255" }, "siteURL": { "description": "Site URL", "type": "string", "format": "varchar255" }, "year_of_inc": { "description": "Year of Inc", "type": "string", "format": "varchar255" }, "memorandum_of_article": { "description": "Memorandum of Article", "type": "file", "format": "pdf, docs" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: updated_successfully, data: [sellerObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters are required / seller_details_not_found/update_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/business": { "post": { "tags": [ "Seller Module" ], "summary": "Add Seller Business Information", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "is_marketplace": { "description": "1 or 0 Is Seller A MarketPlace Admin ?", "type": "integer" }, "marketplace_child": { "description": "MarketPlace Child/ Parent to", "type": "string" }, "business_name": { "description": "Business Name", "type": "string", "format": "varchar255" }, "business_address": { "description": "Business Address", "type": "string", "format": "varchar255" }, "business_address_2": { "description": "Business Address 2", "type": "string", "format": "varchar255" }, "business_city": { "description": "Business City", "type": "string", "format": "varchar255" }, "business_state": { "description": "Business State", "type": "string", "format": "varchar255" }, "business_country": { "description": "Business State", "type": "string", "format": "varchar255" }, "business_email": { "description": "Business Email", "type": "string", "format": "varchar255" }, "siteURL": { "description": "Site URL", "type": "string", "format": "varchar255" }, "BVN": { "description": "Bank Verification Number", "type": "string", "format": "varchar255" }, "year_of_inc": { "description": "Year of Inc", "type": "string", "format": "varchar255" }, "memorandum_of_article": { "description": "Memorandum of Article", "type": "file", "format": "pdf, docs" }, "individual": { "description": "1 if individual or 0 If business", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: updated_successfully, data: [sellerObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters are required / seller_details_not_found/update_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/bvnpayment": { "get": { "tags": [ "Seller Module" ], "summary": "Pay Bvn Fee", "responses": { "200": { "description": "{status: success, message: orders, data: authorization_url" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/bvnVerification": { "post": { "tags": [ "Seller Module" ], "summary": "Seller BVN Verification ", "parameters": [ { "name": "Seller BVN Verification", "in": "body", "description": "Seller BVN Verification", "required": true, "schema": { "properties": { "bvn": { "description": "Bank Verification Number", "type": "string" }, "account_number": { "description": "BVN associated account number", "type": "string" }, "bank_code": { "description": "BVN associated bank code", "type": "string" }, "phone_number": { "description": "BVN associated phone number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: bvn_verified, data: [userObject]}" }, "201": { "description": "{status: error, message: bvn_not_verified }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/account/update": { "put": { "tags": [ "Seller Module" ], "summary": "Update/Edit Seller Account Details", "parameters": [ { "name": "seller", "in": "body", "description": "Seller Details [SellerObject]", "required": true, "schema": { "properties": { "firstname": { "description": "Seller Firstname", "type": "string" }, "lastname": { "description": "Seller Lastname", "type": "string" }, "phone": { "description": "Seller Phone Number", "type": "string" }, "email": { "description": "Seller Email Address", "type": "string" }, "platform": { "description": "Mobile if the platform sending api is mobile, dont pass if you are sending from web", "type": "string" }, "verified": { "description": "verification status = 1, when user otp has been verified", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: updated_successfully, data: [sellerObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters are required / seller_details_not_found/update_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/verify": { "post": { "tags": [ "Seller Module" ], "summary": "Verify Seller BVN", "parameters": [ { "name": "seller", "in": "body", "description": "BVN [SellerObject]", "required": true, "schema": { "properties": { "bvn": { "description": "Seller Bank Verification Number", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: verified, data: [sellerObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters are required / seller_details_not_found/update_failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "seller/pluginkey/generate": { "put": { "tags": [ "Seller Module" ], "summary": "Get a Plugin Key (public and private)", "parameters": [ { "name": "seller", "in": "body", "description": "Seller's Password", "required": true, "schema": { "properties": { "password": { "description": "Seller's password", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: key_generated, data: [KeyInfoObject]" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "seller/pluginkey": { "get": { "tags": [ "Seller Module" ], "summary": "View Plugin Keys (public and private)", "responses": { "200": { "description": "{status: success, message: api_keys, data: [KeyInfoObject]" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/dashboard": { "get": { "tags": [ "Seller Module" ], "summary": "Get seller's dashboard details", "responses": { "200": { "description": "{status: success, message: seller_dashboard, data: [\r\n * total_transactions: 0,\r\n * total_disputes: 0,\r\n * total_orders: 0,\r\n * disputed_transactions: 0,\r\n * pending_transactions: 0,\r\n * accepted_transactions: 0,\r\n * completed_transactions: 0,\r\n * rejected_transactions: 0,\r\n * created_transactions: 0,\r\n * recent_orders: [OrderObjects],\r\n * tours: [\r\n * delivery_tour_done:0,\r\n * payment_tour_done:0,\r\n * setting_tour_done:0,\r\n * ]]}" }, "201": { "description": "{status: error, message: failed_to_load" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/notifications": { "get": { "tags": [ "Seller Module" ], "summary": "Get Notification for Authenticated Seller", "responses": { "200": { "description": "{status: success, message: notifications, data: [NotificationObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/manageNotification/{id}": { "put": { "tags": [ "Seller Module" ], "summary": "Manage Notification Status for Authenticated Seller", "parameters": [ { "name": "id", "in": "body", "description": "Seller Notification", "required": true, "schema": { "properties": { "status": { "description": "Status (1 for Read and 0 for Unread)", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "status: success, message:Notifications, data: [NotificationObject" }, "201": { "description": "status: error, message:Missing parameter Required / Failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/orders/{platform}": { "get": { "tags": [ "Seller Module" ], "summary": "Get Orders for Authenticated Seller for Mobile", "responses": { "200": { "description": "{status: success, message: orders, data: [TransactionObject + CustomerObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/orders/": { "get": { "tags": [ "Seller Module" ], "summary": "Get Orders for Authenticated Seller", "responses": { "200": { "description": "{status: success, message: orders, data: [TransactionObject + CustomerObject]}" }, "201": { "description": "{status: error, message: failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/order": { "post": { "tags": [ "Seller Module" ], "summary": "Get Details of a single Order.", "parameters": [ { "name": "order id", "in": "body", "description": "Order Unique Identifier", "required": true, "schema": { "properties": { "id": { "description": "Order Unique Identifier", "type": "integer", "format": "int11" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: order_details, data: [TransactionObject + [CustomerObject]]}" }, "201": { "description": "{status: error, message: Some Missing Parameter Required /Failed }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payments": { "get": { "tags": [ "Seller Module" ], "summary": "Get Payments for Authenticated Seller", "responses": { "200": { "description": "{status: success, message: seller_payments, data: [PaymentObjects]}" }, "201": { "description": "{status: error, message: no_payment_record/failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payouts": { "get": { "tags": [ "Escrow Module" ], "summary": "Get Payouts for Authenticated Seller", "responses": { "200": { "description": "{status: success, message: orders, data: [PayoutObject]}" }, "201": { "description": "{status: error, message: no_payout_record" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/order/disputes": { "get": { "tags": [ "Seller Module" ], "summary": "Get Disputes for Orders for Authenticated Seller", "responses": { "200": { "description": "{status: success, message: disputes, data: [RefundRequestObject + {TransactionObject}]}" }, "201": { "description": "{status: error, message: no_dispute" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/order/dispute": { "post": { "tags": [ "Seller Module" ], "summary": "Get Single Dispute Details", "parameters": [ { "name": "dispute_id", "in": "body", "description": "Dispute Unique Id", "required": true, "schema": { "properties": { "dispute_id": { "description": "Dispute Unique Id greater than 1", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: disputes, data: [RefundRequestObject + {TransactionObject}]}" }, "201": { "description": "{status: error, message:Some Missing Parameters Required / Failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/order/dispute/raise": { "post": { "tags": [ "Seller Module" ], "summary": "Raise a Dispute ", "parameters": [ { "name": "dispute", "in": "body", "description": "Dispute Details", "required": true, "schema": { "properties": { "transaction_id": { "description": "Target Transaction Unique Id greater than 1", "type": "integer", "format": "int64" }, "status": { "description": "Status of the Dispute 0 - Canceled 1 - Pending/Processing 2 - Solved(Default = 1)", "type": "string" }, "reason": { "description": "Reason for Dispute or refund request", "type": "string" }, "email": { "description": "Contact email for Dispute or refund request", "type": "string" }, "attachment": { "description": "attachment file for Dispute or refund request", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: new_dispute, data: [RefundRequestObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters are Required /could_not_raise_dispute}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/order/dispute/cancel": { "post": { "tags": [ "Seller Module" ], "summary": "Cancel a Dispute ", "parameters": [ { "name": "dispute", "in": "body", "description": "Dispute Unique Id", "required": true, "schema": { "properties": { "dispute_id": { "description": "Dispute Unique Id greater than 1", "type": "integer", "format": "int64" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: cancel_dispute, data: [RefundRequestObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required/You_cannot_cancel_selected_dispute }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/create": { "post": { "tags": [ "Escrow Module" ], "summary": "Add a PayOut Account ", "parameters": [ { "name": "PayOut Details", "in": "body", "description": "Payout Account Details", "required": true, "schema": { "properties": { "bank_name": { "description": "Bank Name of Payout Detail", "type": "string" }, "bank_code": { "description": "Refer to paystack docs for bank_code", "type": "string" }, "bank_account_name": { "description": "Payout Bank Account Name", "type": "string" }, "bank_account_number": { "description": "PayOut Bank Account Number", "type": "string" }, "default": { "description": "1 for yes, 2 for no", "type": "integer" }, "type": { "description": "Account Type, 1 = Local NGN account, 2 = USD account (wise, paypal, cashapp", "type": "integer" }, "account_type": { "description": "Account type for foreign payout such as Paypal, Wise, CashApp etc.", "type": "string" }, "account_id": { "description": "Account ID of foreign payout acount type", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: account_added, data: [AccountObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required/invalid_bank_account }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/createSp": { "post": { "tags": [ "Seller Module" ], "summary": "Add Service Provider (Authenticated User)", "parameters": [ { "name": "service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "type": { "description": "Account Type, 1 = Local NGN account, 2 = USD account (wise, paypal, cashapp", "type": "integer" }, "firstname": { "description": "Service Provider Firstname", "type": "string" }, "lastname": { "description": "Service Provider Lastname", "type": "string" }, "phone": { "description": "Service Provider Phone number e.g,08111111111", "type": "string" }, "email": { "description": "Service Provider Email", "type": "string" }, "bank_code": { "description": "Service Provider Bank Code", "type": "string" }, "nip_bank_code": { "description": "Service Provider Bank Code (providus)", "type": "string" }, "bank_account_number": { "description": "Service Provider Bank Account Number", "type": "string" }, "bank_account_name": { "description": "Service Provider Bank Account Name", "type": "string" }, "bank_name": { "description": "Service Provider Bank Name", "type": "string" }, "account_type": { "description": "Account type for foreign payout such as Paypal, Wise, CashApp etc.", "type": "string" }, "account_id": { "description": "Account ID of foreign payout acount type", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service Provider Added successfully data:[ServiceProviderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/setDefault/{id}": { "put": { "tags": [ "Escrow Module" ], "summary": "Set PayOut Details as Default of Authenticated Seller", "responses": { "200": { "description": "{status: success, message: set_as_default, data: [AccountObject]}" }, "201": { "description": "{status: error, message: payout_details_not_found/could_not_set_as_default}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/edit/{id}": { "put": { "tags": [ "Escrow Module" ], "summary": "Edit PayOut Details of Authenticated Seller", "parameters": [ { "name": "id", "in": "query", "description": "id", "required": true, "type": "integer", "items": { "type": "integer" } }, { "name": "PayOut Details", "in": "body", "description": "Payout Account Details", "required": true, "schema": { "properties": { "type": { "description": "1 for own, 2 for service provider", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: details_updated, data: [AccountObject]}" }, "201": { "description": "{status: error, message: payout_details_not_found/could_not_update_details}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/view": { "get": { "tags": [ "Escrow Module" ], "summary": "View PayOut Details of Authenticated Seller", "responses": { "200": { "description": "{status: success, message: account_details, data: [AccountObject]}" }, "201": { "description": "{status: error, message: payout_details_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/history": { "get": { "tags": [ "Escrow Module" ], "summary": "Get Payout History for Authenticated Seller", "responses": { "200": { "description": "{status: success, message: seller_payouts, data: [PaymoutObjects]}" }, "201": { "description": "{status: error, message: no_payout_record/failed" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/delete/{id}": { "delete": { "tags": [ "Escrow Module" ], "summary": "Delete PayOut Details of Authenticated Seller", "parameters": [ { "name": "id", "in": "query", "description": "id", "required": true, "type": "integer", "items": { "type": "integer" } } ], "responses": { "200": { "description": "{status: success, message: deleted_details}" }, "201": { "description": "{status: error, message: payout_details_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/payout/deleteSp/{id}": { "delete": { "tags": [ "Escrow Module" ], "summary": "Delete Service provider Details of Authenticated Seller", "parameters": [ { "name": "id", "in": "query", "description": "id", "required": true, "type": "integer", "items": { "type": "integer" } } ], "responses": { "200": { "description": "{status: success, message: Service Provider Deleted successfully}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/identification/create": { "post": { "tags": [ "Seller Module" ], "summary": "Add a mode of identification", "parameters": [ { "name": "Identification Card", "in": "body", "description": "Identification Card Details", "required": true, "schema": { "properties": { "card_type": { "description": "Identification card type (International passport | National ID card | Voter's card | Driver's Licence)", "type": "string" }, "expiry_at": { "description": "Expiry Date of the Identification Card", "type": "datetime" }, "identification_card": { "description": "Image upload of the identificaiton card", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: identification_card_added, data: [IdentificationObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/identification/update": { "put": { "tags": [ "Seller Module" ], "summary": "Update mode of identification", "parameters": [ { "name": "Identification Card", "in": "body", "description": "Update Identification Card Details", "required": true, "schema": { "properties": { "id": { "description": "Photo Identification ID", "type": "integer" }, "card_type": { "description": "Identification card type (International passport | National ID card | Voter's card | Driver's Licence)", "type": "string" }, "expiry_at": { "description": "Expiry Date of the Identification Card", "type": "datetime" }, "identification_card": { "description": "Image upload of the identificaiton card", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: identification_card_update, data: [IdentificationObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/term/refundableFlag": { "post": { "tags": [ "Seller Module" ], "summary": "Set Refundable Flag, Action on Rejection ", "parameters": [ { "name": "Refundable", "in": "body", "description": "Refundable", "required": true, "schema": { "properties": { "refundable_flag": { "description": "Refundable Flag: '0' Pay Seller on Rejection. '1' - Refund Buyer on Rejection ", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: preference_set, data: [TermObject]}" }, "201": { "description": "{status: error, message: preference_not_set/validation }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/term/paymentFrequency": { "post": { "tags": [ "Seller Module" ], "summary": "Set Frequency of payment ", "parameters": [ { "name": "Payment Frequency", "in": "body", "description": "set frequency of payment", "required": true, "schema": { "properties": { "payment_frequency": { "description": "Payment Frequency: '1' 24 hours, '2' - Weekly, '3' - Bi Weekly, '4' - Monthly ", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: frequency_set, data: [TermObject]}" }, "201": { "description": "{status: error, message: frequency_not_set/validation }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/term/setPayoutCurrency": { "post": { "tags": [ "Seller Module" ], "summary": "Set Payout Currency", "parameters": [ { "name": "Refundable", "in": "body", "description": "Refundable", "required": true, "schema": { "properties": { "payout_currency": { "description": "Payout Currency (Three alphabet currency code)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: preference_set, data: [TermObject]}" }, "201": { "description": "{status: error, message: preference_not_set/validation }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/term/setCardFee": { "post": { "tags": [ "Seller Module" ], "summary": "Set who pays card payment fee ", "parameters": [ { "name": "Set Card Fee", "in": "body", "description": "Set who pays card payment fee", "required": true, "schema": { "properties": { "card_fee": { "description": "payee: '1' - Seller, '2' - Buyer", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: settings_saved, data: [TermObject]}" }, "201": { "description": "{status: error, message: could_not_save_settings/validation }" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/term/create": { "post": { "tags": [ "Seller Module" ], "summary": "Create a Term", "parameters": [ { "name": "term", "in": "body", "description": "Term Details", "required": true, "schema": { "properties": { "days": { "description": "Max delivery days", "type": "integer", "format": "varchar255" }, "SLA": { "description": "SLA", "type": "integer", "format": "varchar255" }, "logistics_fee": { "description": "Logistics Fee", "type": "integer", "format": "varchar255" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: term_added, data: [DeliveryTermObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required /Failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/term/edit": { "put": { "tags": [ "Seller Module" ], "summary": "Update/Edit a Term", "parameters": [ { "name": "term", "in": "body", "description": "Term Details", "required": true, "schema": { "properties": { "days": { "description": "Body of the Term", "type": "string", "format": "varchar255" }, "SLA": { "description": "SLA", "type": "string", "format": "varchar255" }, "logistics_fee": { "description": "Logistics Fee", "type": "string", "format": "varchar255" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: update_successfully, data: [DeliveryTermObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required /Update Failed, data: [DeliveryTermObject]}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/terms": { "get": { "tags": [ "Seller Module" ], "summary": "Get Terms by Authenticated Seller", "responses": { "200": { "description": "{status: success, message: seller_terms, data: [DeliveryTermObjects + {SellerObject}]}" }, "201": { "description": "{status: error, message: failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/order/assign": { "post": { "tags": [ "Seller Module", "Order Module" ], "summary": "Assign a Delivery Man to an Order. Get DeliveryMen using /seller/deliverymen", "parameters": [ { "name": "order", "in": "body", "description": "Order Details", "required": true, "schema": { "properties": { "order_id": { "description": "Transaction Order Number/ID", "type": "string", "format": "varchar6" }, "delivery_man_id": { "description": "One of Seller Registered DeliveryMen Unique Id", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status: success, message: deliveryman_assigned, data: [TransactionObject]}" }, "201": { "description": "{status: error, message: Some Missing Parameters Required /Failed/Invalid Credentials}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/deliverymen": { "get": { "tags": [ "Seller Module" ], "summary": "Get Delivery Men of Authenticated Seller", "responses": { "200": { "description": "{status: success, message: delivery_men, data: [DeliveryManObjects]}" }, "201": { "description": "{status: error, message: No Record Found/Failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/serviceprovider": { "post": { "tags": [ "Seller Module" ], "summary": "Get Service Provider (From external source - plugin)", "parameters": [ { "name": "service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "authtoken": { "description": "Token calculated based on seller API Keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service Provider Fetched successfully data:[ServiceProviderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/serviceprovider/create": { "post": { "tags": [ "Seller Module" ], "summary": "Add Service Provider (From external source - plugin)", "parameters": [ { "name": "service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "type": { "description": "Account Type, 1 = Local NGN account, 2 = USD account (wise, paypal, cashapp", "type": "integer" }, "firstname": { "description": "Service Provider Firstname", "type": "string" }, "lastname": { "description": "Service Provider Lastname", "type": "string" }, "phone": { "description": "Service Provider Phone number e.g,08111111111", "type": "string" }, "email": { "description": "Service Provider Email", "type": "string" }, "authtoken": { "description": "Token calculated based on seller API Keys", "type": "string" }, "bank_code": { "description": "Service Provider Bank Code", "type": "string" }, "nip_bank_code": { "description": "Service Provider Bank Code (providus)", "type": "string" }, "bank_account_number": { "description": "Service Provider Bank Account Number", "type": "string" }, "bank_account_name": { "description": "Service Provider Bank Account Name", "type": "string" }, "bank_name": { "description": "Service Provider Bank Name", "type": "string" }, "account_type": { "description": "Account type for foreign payout such as Paypal, Wise, CashApp etc.", "type": "string" }, "account_id": { "description": "Account ID of foreign payout acount type", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service Provider Added successfully data:[ServiceProviderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/serviceprovider/delete": { "delete": { "tags": [ "Seller Module" ], "summary": "Delete Service Provider ", "parameters": [ { "name": "service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "sp_id": { "description": "Service Provider id", "type": "integer" }, "authtoken": { "description": "Token calculated based on seller API Keys", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service Provider Deleted successfully data:[ServiceProviderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/serviceprovider/order/update": { "put": { "tags": [ "Seller Module" ], "summary": "Set Service Provider to an order", "parameters": [ { "name": "service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "sp_id": { "description": "Service Provider id", "type": "integer" }, "authtoken": { "description": "Token calculated based on seller API Keys", "type": "string" }, "commission": { "description": "Commission of payment for Service Provider", "type": "integer" }, "order_id": { "description": "Transaction ID", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service provider and commission successfully associated with the order data:[ServiceProviderOrderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/serviceprovider/marketplaceOrder/update": { "put": { "tags": [ "Seller Module" ], "summary": "Set Marketplace Operator Service Provider to an order", "parameters": [ { "name": "Marketplace Operator service Provider", "in": "body", "description": "Order Details ", "required": true, "schema": { "properties": { "authtoken": { "description": "Token calculated based on Marketplace Operator's API Keys", "type": "string" }, "commission": { "description": "Commission of payment for Service Provider", "type": "integer" }, "order_id": { "description": "Transaction ID", "type": "integer" } }, "type": "object" } } ], "responses": { "200": { "description": "{status:success, message:Service provider and commission successfully associated with the order data:[ServiceProviderOrderObjects]}" }, "201": { "description": "{status:error, message: Missing Parameters Required/failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/seller/support/mail": { "post": { "tags": [ "Admin Module" ], "summary": "Send support mail (No Freshdesk)", "parameters": [ { "name": "support", "in": "body", "description": "Support Mail Details [MailObject]", "required": true, "schema": { "properties": { "subject": { "description": "Mail Subject (Max 50)", "type": "string" }, "description": { "description": "Mail Description", "type": "string" }, "attachment": { "description": "Mail File Attachment (Max 5MB)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=support_mail_sent}" }, "201": { "description": "{status=error, message=sending_failed}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } }, "/buyer/support/mail": { "post": { "tags": [ "Admin Module" ], "summary": "Send support mail (No Freshdesk)", "parameters": [ { "name": "support", "in": "body", "description": "Support Mail Details [MailObject]", "required": true, "schema": { "properties": { "subject": { "description": "Mail Subject (Max 50)", "type": "string" }, "email": { "description": "Email Address", "type": "string" }, "description": { "description": "Mail Description", "type": "string" }, "attachment": { "description": "Mail File Attachment (Max 5MB)", "type": "string" } }, "type": "object" } } ], "responses": { "200": { "description": "{status=success, message=support_mail_sent}" }, "201": { "description": "{status=error, message=sending_failed_user_not_found}" }, "401": { "description": "{status: error, message: invalid token/token expired, debug: [DebugInfoObject]}" } } } } }, "definitions": { "Bank": { "required": [ "name" ], "properties": { "bank_name": { "description": "Bank Name", "type": "string" }, "bank_code": { "description": "Bank Code", "type": "string" }, "bank_nip_code": { "description": "Bank NIP Code", "type": "string" } } }, "Customer": { "required": [ "name" ], "properties": { "firstname": { "description": "Customer Firstname", "type": "string" }, "lastname": { "description": "Customer Lastname", "type": "string" }, "phone_number": { "description": "Customer Phone Number", "type": "string" }, "email_address": { "description": "Customer Email Address", "type": "string" } } }, "DeliveryTerm": { "required": [ "name" ], "properties": { "user_id": { "description": "Seller/Merchant Id", "type": "integer", "format": "int11" }, "days": { "description": "Max delivery days", "type": "integer" }, "SLA": { "description": "SLA Details", "type": "integer" }, "logistics_fee": { "description": "Logistic Fee", "type": "integer" } } }, "Identification": { "required": [ "name" ], "properties": { "card_type": { "description": "Identification card type (International passport | National ID card | Voter's card | Driver's Licence)", "type": "string" }, "expiry_at": { "description": "Expiry Date of the Identification Card", "type": "datetime" }, "identifcation_card": { "description": "Image upload of the identificaiton card", "type": "string" } } }, "MarketplaceOperatorSeller": { "required": [ "name" ], "properties": { "seller_id": { "description": "Seller Id", "type": "integer" }, "marketplace_operator_id": { "description": "Marketplace Operator Seller Id", "type": "integer" }, "status": { "description": "Status", "type": "integer" } } }, "Project": { "required": [ "name" ], "properties": { "seller_id": { "description": "Seller Id", "type": "integer" }, "customer_id": { "description": "Customer Id", "type": "integer" }, "project_name": { "description": "Project Name", "type": "string" }, "description": { "description": "Description", "type": "string" }, "started_by": { "description": "Project created by", "type": "string" }, "status": { "description": "Project Status", "type": "string" } } }, "ProjectSeller": { "required": [ "name" ], "properties": { "seller_id": { "description": "Seller Id", "type": "integer" }, "customer_id": { "description": "Customer Id", "type": "integer" }, "project_id": { "description": "Project ID", "type": "integer" } } }, "Seller": { "required": [ "name" ], "properties": { "is_marketplace": { "description": "If Seller is marketplace admin", "type": "integer" }, "marketplace_child": { "description": "Marketplace admin parent Id", "type": "integer" }, "business_name": { "description": "Seller Business Name", "type": "string" }, "business_address": { "description": "Seller Business Address", "type": "string" }, "business_address_2": { "description": "Seller Business Address Line 2", "type": "string" }, "business_city": { "description": "Seller Business City", "type": "string" }, "business_state": { "description": "Seller Business State", "type": "string" }, "business_country": { "description": "Seller Business Country", "type": "string" }, "siteURL": { "description": "Seller Website", "type": "string", "format": "http://" } } }, "SellerConfig": { "required": [ "name" ], "properties": { "seller_id": { "description": "Seller Id", "type": "integer" }, "active_config_type": { "description": "Active config type (PERCENTAGE_BASED = 1, TRANCHE_BASED = 2)", "type": "integer" }, "minimum_escrow_fee": { "description": "Minimum escrow fee", "type": "integer" }, "escrow_percent": { "description": "Escrow percent", "type": "integer" }, "maximum_escrow_fee_p2p": { "description": "Maximum Escrow fee p2p", "type": "integer" }, "maximum_escrow_fee_ecommerce": { "description": "Maximum escrow fee ecommerce", "type": "integer" }, "card_fee_ngn_percent": { "description": "Card fee naira percent", "type": "integer" }, "card_fee_ussd_percent": { "description": "Card fee ussd percent", "type": "integer" }, "card_fee_usd_percent": { "description": "Card fee usd percent", "type": "integer" }, "card_fee_ussd_max": { "description": "Card fee ussd maximum", "type": "integer" }, "card_fee_max": { "description": "Card fee maximum", "type": "integer" }, "product_max_cost_ref": { "description": "Product maximum cost reference", "type": "integer" }, "card_fee_additional_charge": { "description": "Card fee additional charge", "type": "integer" }, "card_fee_ussd_additional_charge": { "description": "Card fee ussd additional charge", "type": "integer" }, "transfer_fee_ussd": { "description": "Transfer fee ussd", "type": "integer" }, "transfer_fee": { "description": "Transfer fee", "type": "integer" }, "payout_time": { "description": "Payout time", "type": "integer" }, "status": { "description": "Seller Config Status", "type": "integer" } } }, "SellerConfigPriceRange": { "required": [ "name" ], "properties": { "seller_config_id": { "description": "Seller Config Id", "type": "integer" }, "minimum_product_cost": { "description": "Minimum Product Cost", "type": "integer" }, "maximum_product_cost": { "description": "Maximum Product Cost", "type": "integer" }, "escrow_amount": { "description": "Escrow Amount", "type": "integer" } } }, "USSDTransaction": { "required": [ "name" ], "properties": { "type": { "description": "Transaction Type", "type": "integer", "format": "int11" }, "customer_id": { "description": "Customer Unique Id", "type": "integer", "format": "int11" }, "beneficiary_merchant_id": { "description": "Beneficiary Merchant Unique Id", "type": "integer", "format": "int11" }, "buyer_alt_phone": { "description": "Buyer Alternative Phone number", "type": "string" }, "amount_payed": { "description": "Amount Payed", "type": "integer", "format": "int11" }, "product_id": { "description": "Product Unique Id", "type": "integer", "format": "int11" }, "product_name": { "description": "Product Name", "type": "string" }, "response_description": { "description": "Response Description", "type": "string" }, "product_cost": { "description": "Product Cost", "type": "integer", "format": "int11" }, "category": { "description": "Product category", "type": "integer", "format": "int11" }, "status": { "description": "Status Code", "type": "integer", "format": "int11" }, "product_delivery_status": { "description": "Delivery Status", "type": "integer", "format": "int64" }, "transaction_date": { "description": "Transaction Date", "type": "date", "format": "yyyy-mm-dd" }, "delivery_date": { "description": "Delivery Date", "type": "date", "format": "yyyy-mm-dd" } } }, "Transaction": { "required": [ "name" ], "properties": { "type": { "description": "Transaction Type", "type": "integer", "format": "int11" }, "customer_id": { "description": "Customer Unique Id", "type": "integer", "format": "int11" }, "beneficiary_merchant_id": { "description": "Beneficiary Merchant Unique Id", "type": "integer", "format": "int11" }, "payment_reference": { "description": "Payment Reference", "type": "string" }, "amount_payed": { "description": "Amount Payed", "type": "integer", "format": "int11" }, "response_code": { "description": "Respose Code", "type": "integer", "format": "int11" }, "response_description": { "description": "Response Description", "type": "string" }, "status": { "description": "Status Code", "type": "integer", "format": "int11" }, "product_delivery_status": { "description": "Delivery Status", "type": "integer", "format": "int64" }, "transaction_date": { "description": "Transaction Date", "type": "date", "format": "yyyy-mm-dd" }, "delivery_date": { "description": "Delivery Date", "type": "date", "format": "yyyy-mm-dd" } } }, "User": { "required": [ "name" ], "properties": { "role_id": { "description": "Role Id", "type": "integer" }, "firstname": { "description": "User Firstname", "type": "string" }, "lastname": { "description": "User Lastname", "type": "string" }, "phone_number": { "description": "User Phone Number", "type": "string", "format": "080" }, "email": { "description": "User Email", "type": "string" }, "password": { "description": "User Password", "type": "string" }, "PIN": { "description": "User PIN", "type": "string" }, "BVN": { "description": "User BVN", "type": "string" }, "ip_address": { "description": "User IP Address", "type": "string" }, "device_type": { "description": "User Device Type", "type": "string" }, "device_version": { "description": "User Device Version", "type": "string" }, "confirmation_token": { "description": "User Confirmation Token", "type": "string" } } } } }