Skip to main content
POST
/
invoices
/
{clientId}
/
{invoiceId}
/
refresh-line-item-mappings
Refresh line item mappings
curl --request POST \
  --url https://api.sandbox.flowpayroll.ai/v1/billing/invoices/{clientId}/{invoiceId}/refresh-line-item-mappings \
  --header 'Content-Type: application/json' \
  --header 'X-Auth-Token: <api-key>' \
  --data '
{
  "accountCode": "<string>",
  "taxType": "<string>"
}
'
{
  "content": {
    "data": {
      "refreshedLineCount": 123,
      "invoice": {
        "id": "<string>",
        "organisationId": "<string>",
        "clientId": "<string>",
        "amount": 123,
        "lineAmountTypes": "<string>",
        "subTotal": 123,
        "totalTax": 123,
        "totalCreditAmount": 123,
        "balanceDue": 123,
        "currencyCode": "<string>",
        "appliedCredits": [
          {
            "creditNoteId": "<string>",
            "amountApplied": 123,
            "appliedDate": "<string>"
          }
        ],
        "groupingKey": "<string>",
        "invoiceFormatTagGroup": "<string>",
        "invoiceFormatTagName": "<string>",
        "date": "<string>",
        "dueDate": "<string>",
        "invoiceNumber": "<string>",
        "reference": "<string>",
        "attachments": [
          {
            "id": "<string>",
            "fileName": "<string>",
            "url": "<string>",
            "description": "<string>",
            "s3Key": "<string>",
            "contentType": "<string>",
            "fileSize": 123,
            "uploadedDate": "<string>",
            "uploadedBy": "<string>",
            "downloadUrl": "<string>",
            "downloadUrlExpiresAt": "<string>"
          }
        ],
        "lineItemAttachmentCount": 123,
        "linesWithoutAttachmentsCount": 123,
        "linesWithoutPoNumberCount": 123,
        "lineItems": [
          {
            "id": "<string>",
            "invoiceId": "<string>",
            "organisationId": "<string>",
            "clientId": "<string>",
            "employeeId": "<string>",
            "employeeName": "<string>",
            "description": "<string>",
            "amount": 123,
            "payElementId": "<string>",
            "units": 123,
            "chargeRate": 123,
            "chargeUnits": 123,
            "chargeValue": 123,
            "date": "<string>",
            "tags": [
              {
                "name": "<string>",
                "group": "<string>",
                "value": "<string>"
              }
            ],
            "createdDate": "<string>",
            "createdBy": "<string>",
            "attachments": [
              {
                "id": "<string>",
                "lineItemId": "<string>",
                "filename": "<string>",
                "contentType": "<string>",
                "fileSize": 123,
                "uploadedDate": "<string>",
                "uploadedBy": "<string>",
                "s3Key": "<string>",
                "source": "<string>",
                "downloadUrl": "<string>",
                "downloadUrlExpiresAt": "<string>"
              }
            ],
            "payElementDescription": "<string>",
            "accountCode": "<string>",
            "taxType": "<string>",
            "quantity": 123,
            "unitAmount": 123,
            "lineAmount": 123,
            "taxAmount": 123,
            "poNumber": "<string>"
          }
        ],
        "subtotalGroups": [
          {
            "label": "<string>",
            "amount": 123,
            "taxAmount": 123,
            "totalAmount": 123,
            "sortOrder": 123
          }
        ],
        "tags": [
          {
            "name": "<string>",
            "group": "<string>",
            "value": "<string>"
          }
        ],
        "externalId": "<string>",
        "externalProvider": "<string>",
        "lastSyncedAt": "<string>",
        "syncStatus": "<string>",
        "syncErrorMessage": "<string>",
        "syncErrorCode": "<string>",
        "externalProviderStatus": "<string>",
        "emailSent": true,
        "emailSentAt": "<string>",
        "emailSentBy": "<string>",
        "createdDate": "<string>",
        "createdBy": "<string>",
        "updatedDate": "<string>",
        "updatedBy": "<string>"
      }
    },
    "metadata": {
      "dateFormat": "<string>",
      "dateTimeFormat": "<string>"
    }
  },
  "metadata": {
    "dateFormat": "<string>",
    "dateTimeFormat": "<string>"
  },
  "errors": [
    {
      "field": "<string>",
      "reasonText": "<string>",
      "reasonId": "<string>",
      "reasonParameters": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ]
    }
  ],
  "message": {
    "text": "<string>",
    "textId": "<string>",
    "textParameters": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Auth-Token
string
header
required

Authentication token for API access

Path Parameters

clientId
string
required
invoiceId
string
required

Body

application/json
accountCode
string | null
taxType
string | null

Response

OK

content
object
metadata
object
errors
object[] | null
message
object