---
title: Query invoice
slug: amberflo-api/query-invoice
docTags: 
createdAt: 2024-11-07T15:10:16.980Z
---

{
  "id": "WafqZIN0AOe8UVAwoZIHC",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/integration/datastore/payment/query",
    "servers": [
      {
        "url": "https://app.amberflo.io/integration/datastore/payment/query"
      }
    ],
    "name": "Query invoice",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "com.amberflo.integration.datastore.QueryablePaymentQueryRequest.in",
          "schema": [
            {
              "name": "customerIdList",
              "kind": "optional",
              "type": "array",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "invoiceStartTimeInSeconds",
              "kind": "optional",
              "type": "integer<int64>",
              "example": 0
            },
            {
              "name": "invoiceEndTimeInSeconds",
              "kind": "optional",
              "type": "integer<int64>",
              "example": 0
            },
            {
              "name": "invoiceType",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "sortingFieldList",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/com.amberflo.integration.datastore.SortingField.in",
              "customType": "com.amberflo.integration.datastore.SortingField.in[]",
              "schema": [
                {
                  "name": "fieldName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "order",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/com.amberflo.integration.datastore.SortingField.Order.in",
                  "customType": "com.amberflo.integration.datastore.SortingField.Order.in",
                  "schema": []
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/com.amberflo.integration.datastore.QueryablePaymentQueryRequest.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "com.amberflo.integration.datastore.QueryablePaymentQueryResponse.out",
            "schema": [
              {
                "name": "queryablePaymentList",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/com.amberflo.integration.datastore.QueryablePayment.out",
                "customType": "com.amberflo.integration.datastore.QueryablePayment.out[]",
                "schema": [
                  {
                    "name": "paymentKey",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.ReadyPaymentKey.out",
                    "customType": "payment.billing.ReadyPaymentKey.out",
                    "schema": [
                      {
                        "name": "accountId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "customerId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "entityType",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "paymentSystem",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.integration.datastore.QueryablePaymentQueryResponse.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "8iOcBNwfAbdaUNwJbUF8o",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/integration/datastore/payment/query \\\n     --header 'accept: application/json'"
        },
        {
          "id": "4Pwpvc96WWLlEcarfKPrW",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/integration/datastore/payment/query\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "niCNNcmMARa56gAgeH_EL",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/integration/datastore/payment/query\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Io02DNHdn5k9GCf6m2ZpD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/integration/datastore/payment/query\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "8iOcBNwfAbdaUNwJbUF8o"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"queryablePaymentList\": [\n    {\n      \"paymentKey\": {\n        \"accountId\": \"\",\n        \"customerId\": \"\",\n        \"invoiceUri\": \"\",\n        \"entityType\": \"\",\n        \"paymentSystem\": \"\"\n      }\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}