---
title: POST Statements
slug: post-statements
icon: 🟩
createdAt: 2022-03-23T01:57:46.000Z
---

### Important Notes:

- `patientId` - iCorePay internal ULID use to directly link to an internal patient
- `externalPmsPatientId` - This is the PMS's patient identifier
- `externalPatientId` - This is your identifier for the patient (can be the same as the PMS's patient identifer)

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://gfp-api.acdev.io/api/v1/pending-invoices/",
  "name": "Upload Statements",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "fileName",
        "type": "string",
        "children": [],
        "description": "Filename of the statement being processed.  Only 1 filename can be uploaded per store within a 24-hour period to prevent accidental simultaneous uploads"
      },
      {
        "kind": "required",
        "name": "pendingInvoiceUploads",
        "type": "Object",
        "children": [
          {
            "kind": "required",
            "name": "statementDate",
            "type": "String",
            "children": [],
            "description": "Date object represented as 2023-06-22"
          },
          {
            "kind": "required",
            "name": "rowNum",
            "type": "Integer",
            "description": "Index of the upload object being uploaded"
          },
          {
            "kind": "optional",
            "name": "patientId",
            "type": "string",
            "description": "iCorePay internal ULID use to directly link to an internal patient"
          },
          {
            "kind": "optional",
            "name": "providerId",
            "type": "string",
            "description": "PMS ID of Patient's provider"
          },
          {
            "kind": "optional",
            "name": "amountDue",
            "type": "Number",
            "description": "Amount of the statement.  Represented in cents.  e.g. 600 for $6"
          },
          {
            "kind": "optional",
            "name": "firstName",
            "type": "string",
            "description": "Patient's first name"
          },
          {
            "kind": "optional",
            "name": "lastName",
            "type": "string",
            "description": "Patient's last name"
          },
          {
            "kind": "optional",
            "name": "email",
            "type": "string",
            "description": "Patient's email.  Must be provided if patient is to get statement via email"
          },
          {
            "kind": "optional",
            "name": "smsPhoneNumber",
            "type": "string",
            "description": "Patient's phone number.  Must be provided if patient is to get statement texted.  Format is +15555555555"
          },
          {
            "kind": "optional",
            "name": "addressLine1",
            "type": "string",
            "description": "Address - Line 1"
          },
          {
            "kind": "optional",
            "name": "addressLine2",
            "type": "string",
            "description": "Address - Line2"
          },
          {
            "kind": "optional",
            "name": "addressCity",
            "type": "string",
            "description": "Address - City"
          },
          {
            "kind": "optional",
            "name": "addressState",
            "type": "string",
            "description": "Address - State"
          },
          {
            "kind": "optional",
            "name": "addressZip",
            "type": "string",
            "description": "Address - Zip"
          },
          {
            "kind": "optional",
            "name": "patientNote",
            "type": "string",
            "description": "Custom note to be provided to patient on their invoice"
          },
          {
            "kind": "optional",
            "name": "externalLocationId",
            "type": "string",
            "description": "If uploading a file for multiple locations at once, must specify your identifier for this location.  This is configured via the Store Admin Configurations panel"
          },
          {
            "kind": "optional",
            "name": "lineItems",
            "type": "Object",
            "children": [
              {
                "kind": "optional",
                "name": "date",
                "type": "string",
                "description": "Date of upload.  Formatted as yyyy-MM-dd"
              },
              {
                "kind": "optional",
                "name": "dateOfService",
                "type": "string",
                "description": "Date of procedure service.  Formatted as yyyy-MM-dd"
              },
              {
                "kind": "optional",
                "name": "sku",
                "type": "string",
                "description": "Procedure SKU"
              },
              {
                "kind": "optional",
                "name": "charges",
                "type": "Integer",
                "description": "Charges for this line item, represented in cents"
              },
              {
                "kind": "optional",
                "name": "credit",
                "type": "Integer",
                "description": "Credit for this line item, represented in cents.  This represents any negative amount applied to procedure (e.g. insurance payment, pre-payment, discount, etc)\n"
              },
              {
                "kind": "optional",
                "name": "balance",
                "type": "Integer",
                "description": "Overall amount for this line item"
              },
              {
                "kind": "optional",
                "name": "patientFirstName",
                "type": "string",
                "description": "If Billing to a guarantor for a dependent's procedure, include that dependent's name here"
              },
              {
                "kind": "optional",
                "name": "patientLastName",
                "type": "string",
                "description": "If Billing to a guarantor for a dependent's procedure, include that dependent's name here"
              }
            ],
            "description": "Array of Billable Line Items.  These can be credits as well (e.g. -$50 already paid)"
          },
          {
            "name": "posOrderId",
            "kind": "optional",
            "type": "string",
            "description": "Point of Sale reference id values of length greater than 200 characters will be truncated when saved."
          },
          {
            "name": "externalPatientId",
            "kind": "required",
            "type": "string",
            "description": "An identifier from the external source. Can match externalPmsPatientId."
          },
          {
            "name": "externalPmsPatientId",
            "kind": "required",
            "type": "string",
            "description": "Identifier provided for patient from the patient management system. Deprecated patientId field will be mapped here."
          }
        ],
        "description": "Array of Pending Invoice Upload objcts"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "c0f7bjPcqHaJiKYiBqEF0",
        "code": "{\n  \"savedPaymentId\":\"01GQSVMZH59XSSXFXKNBZNW6PY\"\n}\n",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "c0f7bjPcqHaJiKYiBqEF0"
  },
  "examples": {
    "languages": [
      {
        "id": "TsJH4BARuElrAzdNuPV8E",
        "code": "curl -X POST \\\n  --url 'https://gfp-api.acdev.io/api/v1/pending-invoices' \\\n  --header 'content-type: application/json;charset=UTF-8' \\\n  --header 'accept: application/json' \\\n  --header 'X-Api-Key: {Secret API Key}' \\\n  --header 'X-Store-Id: {Store ULID}' \\\n  --data-raw '\n{\n  \"fileName\": \"test_upload.xlsx\",\n  \"pendingInvoiceUploads\": [\n    {\n      \"statementDate\": \"2022-11-08\",\n      \"patientId\": \"2006-1000009\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Snow\",\n      \"email\": \"the.white.wolf@winterfell.com\",\n      \"smsPhoneNumber\": \"+15556873509\",\n      \"addressLine1\": \"1 Castle\",\n      \"addressCity\": \"Winterfell\",\n      \"addressState\": \"GA\",\n      \"addressZip\": \"30030\",\n      \"amountDue\": 15780,\n      \"patientNote\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \",\n      \"posOrderId\": \"deadbeef-dead-beef-dead-beefdeadbeef\",\n      \"lineItems\": [\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2022-04-11\",\n          \"sku\": \"D1110\",\n          \"description\": \"Prophylaxis - Adult\",\n          \"charges\": 13900,\n          \"credit\": -13700,\n          \"balance\": 200,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        },\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2022-04-11\",\n          \"sku\": \"D0274\",\n          \"description\": \"Bitewings - Four Radiographic Images\",\n          \"charges\": 9800,\n          \"credit\": -9400,\n          \"balance\": 400,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        },\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2021-10-07\",\n          \"description\": \"Insurance Adjustment\",\n          \"charges\": 2100,\n          \"balance\": 2100,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        },\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2021-10-09\",\n          \"sku\": \"D2392\",\n          \"description\": \"Resin-Based Composite - Two Surfaces, Posterior\",\n          \"charges\": 35100,\n          \"credit\": -32060,\n          \"balance\": 3040,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        },\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2022-04-11\",\n          \"sku\": \"D2392\",\n          \"description\": \"Resin-Based Composite - Two Surfaces, Posterior\",\n          \"charges\": 35100,\n          \"credit\": -32060,\n          \"balance\": 3040,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        },\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2021-10-07\",\n          \"sku\": \"D1208\",\n          \"description\": \"Topical Application Of Fluoride – Excluding Varnish\",\n          \"charges\": 5900,\n          \"credit\": -2400,\n          \"balance\": 3500,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        },\n        {\n          \"date\": \"2022-11-08\",\n          \"dateOfService\": \"2022-04-11\",\n          \"sku\": \"D1208\",\n          \"description\": \"Topical Application Of Fluoride – Excluding Varnish\",\n          \"charges\": 5900,\n          \"credit\": -2400,\n          \"balance\": 3500,\n          \"patientFirstName\": \"Daenerys\",\n          \"patientLastName\": \"Targaryen\"\n        }\n      ]\n    }\n  ]\n}'",
        "language": "json",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "TsJH4BARuElrAzdNuPV8E"
  },
  "description": "From your backend code, upload statements with your store id and private key.",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

