Created
June 26, 2024 11:30
-
-
Save hungaikev/82a0ce370524f76846949f614c115788 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.0 | |
| info: | |
| title: Swoove API | |
| version: 1.0.0 | |
| description: API documentation for Swoove delivery service | |
| servers: | |
| - url: https://test.swooveapi.com | |
| paths: | |
| /bulk-estimate/create-bulk-estimate: | |
| post: | |
| summary: Create estimates for a delivery with multiple pick up and drop offs | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BulkEstimateRequest' | |
| responses: | |
| 200: | |
| description: Estimate completed | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BulkEstimateResponse' | |
| /bulk-delivery/create-bulk-delivery: | |
| post: | |
| summary: Create a new delivery | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| responses: | |
| 200: | |
| description: Delivery created successfully | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/DeliveryResponse' | |
| /delivery/get-delivery/{delivery-code}: | |
| get: | |
| summary: Get delivery by delivery code | |
| parameters: | |
| - name: delivery-code | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| 200: | |
| description: Delivery found | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/DeliveryResponse' | |
| /delivery/bulk/get-by-reference/{reference}: | |
| get: | |
| summary: Get bulk delivery by reference | |
| parameters: | |
| - name: reference | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| 200: | |
| description: Delivery found | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/BulkDeliveryResponse' | |
| /delivery/cancel-delivery: | |
| put: | |
| summary: Cancel a delivery | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| responses: | |
| 200: | |
| description: Delivery cancelled successfully | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/CancelDeliveryResponse' | |
| /wallet/fund-wallet: | |
| post: | |
| summary: Fund your wallet to create orders | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/FundWalletRequest' | |
| responses: | |
| 200: | |
| description: Wallet funded successfully | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/FundWalletResponse' | |
| /service-zone: | |
| get: | |
| summary: Get available service zones | |
| responses: | |
| 200: | |
| description: Service zones retrieved successfully | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ServiceZoneResponse' | |
| /service-zone/check-zone: | |
| post: | |
| summary: Check if a latitude and longitude is in the service zone | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/CheckZoneRequest' | |
| responses: | |
| 200: | |
| description: Service zone check completed | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/CheckZoneResponse' | |
| components: | |
| schemas: | |
| BulkEstimateRequest: | |
| type: object | |
| properties: | |
| delivery_list: | |
| type: array | |
| items: | |
| type: object | |
| properties: | |
| pickup: | |
| $ref: '#/components/schemas/Location' | |
| dropoff: | |
| $ref: '#/components/schemas/Location' | |
| items: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Item' | |
| BulkEstimateResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| message: | |
| type: string | |
| responses: | |
| type: object | |
| properties: | |
| optimal_estimate: | |
| $ref: '#/components/schemas/Estimate' | |
| estimates: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Estimate' | |
| DeliveryResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| message: | |
| type: string | |
| responses: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Delivery' | |
| BulkDeliveryResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| message: | |
| type: string | |
| responses: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Delivery' | |
| CancelDeliveryResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| message: | |
| type: string | |
| responses: | |
| $ref: '#/components/schemas/Delivery' | |
| FundWalletRequest: | |
| type: object | |
| properties: | |
| amount: | |
| type: number | |
| payment_number: | |
| type: string | |
| FundWalletResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| code: | |
| type: integer | |
| message: | |
| type: string | |
| responses: | |
| type: object | |
| properties: | |
| redirect_url: | |
| type: string | |
| ServiceZoneResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| code: | |
| type: integer | |
| message: | |
| type: string | |
| responses: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/ServiceZone' | |
| CheckZoneRequest: | |
| type: object | |
| properties: | |
| latitude: | |
| type: number | |
| longitude: | |
| type: number | |
| CheckZoneResponse: | |
| type: object | |
| properties: | |
| success: | |
| type: boolean | |
| code: | |
| type: integer | |
| message: | |
| type: string | |
| responses: | |
| $ref: '#/components/schemas/ServiceZone' | |
| Location: | |
| type: object | |
| properties: | |
| type: | |
| type: string | |
| contact: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| mobile: | |
| type: string | |
| email: | |
| type: string | |
| country_code: | |
| type: string | |
| lat: | |
| type: number | |
| lng: | |
| type: number | |
| location: | |
| type: string | |
| Item: | |
| type: object | |
| properties: | |
| itemName: | |
| type: string | |
| itemQuantity: | |
| type: integer | |
| itemCost: | |
| type: number | |
| description: | |
| type: string | |
| itemWeight: | |
| type: number | |
| is_fragile: | |
| type: boolean | |
| dimensions: | |
| type: object | |
| properties: | |
| x: | |
| type: number | |
| y: | |
| type: number | |
| z: | |
| type: number | |
| Estimate: | |
| type: object | |
| properties: | |
| estimate_type_details: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| icon: | |
| type: string | |
| total_pricing: | |
| type: object | |
| properties: | |
| discount: | |
| type: number | |
| value: | |
| type: number | |
| currency_code: | |
| type: string | |
| currency_symbol: | |
| type: string | |
| currency_name: | |
| type: string | |
| time_string: | |
| type: string | |
| estimate_id: | |
| type: string | |
| selected_estimate_link: | |
| type: string | |
| individual_pricing: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Pricing' | |
| Pricing: | |
| type: object | |
| properties: | |
| pickup: | |
| $ref: '#/components/schemas/Location' | |
| dropoff: | |
| $ref: '#/components/schemas/Location' | |
| items: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Item' | |
| price_details: | |
| type: object | |
| properties: | |
| discount: | |
| type: number | |
| value: | |
| type: number | |
| currency_code: | |
| type: string | |
| currency_symbol: | |
| type: string | |
| currency_name: | |
| type: string | |
| Delivery: | |
| type: object | |
| properties: | |
| pickup: | |
| $ref: '#/components/schemas/Location' | |
| dropoff: | |
| $ref: '#/components/schemas/Location' | |
| items: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/Item' | |
| contacts: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| mobile: | |
| type: string | |
| email: | |
| type: string | |
| status: | |
| type: string | |
| delivery_code: | |
| type: string | |
| secret_code: | |
| type: string | |
| instructions: | |
| type: string | |
| reference: | |
| type: string | |
| full_price: | |
| type: object | |
| properties: | |
| discount: | |
| type: number | |
| value: | |
| type: number | |
| currency_code: | |
| type: string | |
| currency_symbol: | |
| type: string | |
| currency_name: | |
| type: string | |
| waybill_link: | |
| type: string | |
| tracking_link: | |
| type: string | |
| ServiceZone: | |
| type: object | |
| properties: | |
| _id: | |
| type: string | |
| properties: | |
| type: object | |
| properties: | |
| country_code: | |
| type: string | |
| country: | |
| type: string | |
| city_code: | |
| type: string | |
| city_name: | |
| type: string | |
| layer: | |
| type: integer | |
| stroke: | |
| type: string | |
| stroke-width: | |
| type: number | |
| stroke-opacity: | |
| type: number | |
| fill: | |
| type: string | |
| fill-opacity: | |
| type: number | |
| geometry: | |
| type: object | |
| properties: | |
| coordinates: | |
| type: array | |
| items: | |
| type: array | |
| items: | |
| type: number | |
| type: | |
| type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment