---
updatedAt: 2024-12-30T13:25:24.000Z
agentTools:
  projectIndex: https://ecom-payments-developer-api.readme.io/llms.txt
---

# Find all Invoices with pagination

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/v1/api/invoices": {
      "get": {
        "operationId": "InvoiceExternalController_findAll",
        "summary": "Find all Invoices with pagination",
        "parameters": [
          {
            "name": "X-Ecom-Mid",
            "in": "header",
            "description": "Your mid",
            "required": true,
            "schema": {
              "type": "string",
              "default": "123456"
            }
          },
          {
            "name": "order",
            "required": false,
            "in": "query",
            "schema": {
              "default": "DESC",
              "enum": [
                "ASC",
                "DESC"
              ],
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "take",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 50,
              "default": 10,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully received model list",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PageDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InvoiceResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "You are not authorized to access this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "example": 401
                    },
                    "error": {
                      "type": "string",
                      "example": "UNAUTHORIZED"
                    },
                    "message": {
                      "type": "string",
                      "items": {
                        "type": "string"
                      },
                      "example": "You are not authorized to access this resource."
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "API-Invoices"
        ],
        "security": [
          {
            "X-Ecom-Api-Token": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "E-Links Gateway",
    "description": "",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api-sandbox.ecom.io/elinks"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Ecom-Api-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Ecom-Api-Token"
      }
    },
    "schemas": {
      "CustomerResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "example": "123456789"
          },
          "fullName": {
            "type": "string",
            "readOnly": true,
            "example": "Mahmoud"
          },
          "email": {
            "type": "string",
            "readOnly": true,
            "example": "mahmoud@outlook.com"
          },
          "phoneCode": {
            "type": "string",
            "readOnly": true,
            "example": "+965"
          },
          "phoneNumber": {
            "type": "string",
            "readOnly": true,
            "example": "123456789"
          },
          "receivedAmount": {
            "type": "string",
            "readOnly": true,
            "example": "0"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "readOnly": true,
            "example": "2022-01-01T00:00:00.000Z"
          }
        },
        "required": [
          "id",
          "fullName",
          "email",
          "phoneCode",
          "phoneNumber",
          "receivedAmount",
          "createdAt"
        ]
      },
      "PageMetaDto": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number"
          },
          "take": {
            "type": "number"
          },
          "itemCount": {
            "type": "number"
          },
          "pageCount": {
            "type": "number"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          }
        },
        "required": [
          "page",
          "take",
          "itemCount",
          "pageCount",
          "hasPreviousPage",
          "hasNextPage"
        ]
      },
      "PageDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "array"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageMetaDto"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "AmountDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "example": 100.505,
            "description": "Transaction amount"
          },
          "currency": {
            "type": "string",
            "default": "KWD",
            "enum": [
              "KWD"
            ],
            "example": "KWD",
            "description": "Currency of the country for the transaction"
          },
          "discountType": {
            "type": "string",
            "description": "discount type",
            "enum": [
              "AMOUNT",
              "PERCENTAGE"
            ],
            "example": "PERCENTAGE"
          },
          "discountAmount": {
            "type": "number",
            "description": "discount amount",
            "example": 10.5
          }
        },
        "required": [
          "value",
          "currency"
        ]
      },
      "NotificationDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "boolean",
            "description": "send email to customer",
            "example": true
          },
          "sms": {
            "type": "boolean",
            "description": "send sms to customer",
            "example": true
          }
        }
      },
      "InvoiceMerchantResponseDto": {
        "type": "object",
        "properties": {
          "mid": {
            "type": "string",
            "example": "13232"
          },
          "fullNameAr": {
            "type": "string",
            "example": "John Doe"
          },
          "fullNameEn": {
            "type": "string",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "example": "test@example.com"
          },
          "phoneNumber": {
            "type": "string",
            "example": "123456789"
          },
          "logoUrl": {
            "type": "string",
            "example": "https://example.com/logo.png"
          },
          "websiteLink": {
            "type": "string",
            "example": "https://example.com"
          },
          "description": {
            "type": "string",
            "example": "John Doe"
          }
        },
        "required": [
          "mid",
          "fullNameAr",
          "fullNameEn",
          "email",
          "phoneNumber",
          "logoUrl",
          "websiteLink",
          "description"
        ]
      },
      "InvoiceResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "example": "INV_2024090969898"
          },
          "amount": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AmountDto"
              }
            ]
          },
          "issuer": {
            "type": "object",
            "readOnly": true,
            "example": {
              "id": "123313231321321321",
              "fullName": "ahmed hany",
              "email": "ahmed@ecom.io",
              "role": "MERCHANT_SUPER_ADMIN"
            }
          },
          "status": {
            "type": "object",
            "readOnly": true,
            "example": "UNPAID"
          },
          "paymentMethod": {
            "type": "object",
            "readOnly": true,
            "example": "KNET"
          },
          "customer": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerResponseDto"
              }
            ]
          },
          "merchantReference": {
            "type": "string",
            "readOnly": true,
            "example": "cust_1212_inv"
          },
          "ecomReference": {
            "type": "string",
            "readOnly": true,
            "example": "2be39ee9-93e6-49bf-9bf8-f3769f87fcb2"
          },
          "description": {
            "type": "string",
            "readOnly": true,
            "example": "desc of transaction"
          },
          "notes": {
            "type": "string",
            "readOnly": true,
            "example": "some notes"
          },
          "paymentToken": {
            "type": "string",
            "readOnly": true,
            "example": "xxxx-yyyy-zzzz-qqqq"
          },
          "paymentUrl": {
            "type": "string",
            "readOnly": true,
            "example": "https://ecom.io/v1/payments/invoices/xxxxx"
          },
          "purposeEn": {
            "type": "string",
            "readOnly": true,
            "example": "SERVICE"
          },
          "purposeAr": {
            "type": "string",
            "readOnly": true,
            "example": "خدمة"
          },
          "viewCount": {
            "type": "number",
            "readOnly": true,
            "example": 1
          },
          "notification": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationDto"
              }
            ]
          },
          "mid": {
            "type": "string",
            "readOnly": true,
            "example": "1b56772a-5fcb-4560-b8a0-d4c7abd8aed7"
          },
          "products": {
            "readOnly": true,
            "example": [
              {
                "nameAr": "Product Name",
                "nameEn": "Product Name",
                "qty": 7,
                "price": 5,
                "image": "https://example.com/image.png"
              }
            ],
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "paymentNetwork": {
            "type": "object",
            "readOnly": true,
            "example": {
              "status": "CAPTURED",
              "networkType": "KnetPaymentNetwork",
              "paymentMethod": "KNET",
              "ecomId": "86927dbc-203c-486f-a38e-bfc45db9a1a7",
              "transactionId": "9571d347-c911-4922-9a86-e6950cf724a5",
              "transactionDate": "2025-02-04T09:50:23.475Z",
              "paymentId": "bdae38aa-2fd5-4695-917b-228d530e2b50",
              "trackingId": "0ea875e8-8980-463e-b0da-40802b132772",
              "referenceId": "e891ee87-5acb-4a21-b2cc-fbcc9ae3cebf",
              "authorizationId": "7b032cfc-9adc-4b98-baf8-4363c7130198",
              "orderId": "ae5a9d15-5eb2-48e6-9057-138752b53977"
            }
          },
          "merchant": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceMerchantResponseDto"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "readOnly": true,
            "example": "2022-01-01T00:00:00.000Z"
          },
          "expiresAt": {
            "type": "object",
            "readOnly": true,
            "example": "2022-01-01T00:00:00.000Z"
          },
          "neverExpire": {
            "type": "boolean",
            "readOnly": true,
            "example": false
          },
          "paidAt": {
            "format": "date-time",
            "type": "string",
            "readOnly": true,
            "example": "2022-01-01T00:00:00.000Z"
          },
          "reminderSent": {
            "type": "object",
            "readOnly": true,
            "example": "2022-01-01T00:00:00.000Z"
          }
        },
        "required": [
          "id",
          "amount",
          "issuer",
          "status",
          "paymentMethod",
          "customer",
          "merchantReference",
          "ecomReference",
          "description",
          "notes",
          "paymentToken",
          "paymentUrl",
          "purposeEn",
          "purposeAr",
          "viewCount",
          "notification",
          "mid",
          "paymentNetwork",
          "merchant",
          "createdAt",
          "expiresAt",
          "neverExpire",
          "paidAt",
          "reminderSent"
        ]
      }
    }
  }
}
```