Skip to content
Navigation

Run an action on a remittance file

POST
https://api.nicer.travel/commerce/remittance-batches/{batchId}/actions

Runs one action on a remittance file under review: APPLY_MAPPING (reads the file again), SAVE_PRESET, EDIT_LINE, EXCLUDE_LINE, INCLUDE_LINE, SET_MATCH (the items a line pays and how much), RESET_MATCHES, RERUN_MATCHING, RECONCILE (posts the money and allocates every chosen match as a resumable job), UNDO_RECONCILE (reverses every allocation and voids the remittances) and DISCARD (before reconciling). Jobs answer at once with jobId; poll the file (status COMMITTING while the reconcile runs, then COMMITTED; a reconcile that failed resumes when asked again). A file reconciled once cannot be reconciled again. Agency admins and finance staff; UNDO_RECONCILE Nicer staff only.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • batchId
    string
    required

Header parameters

  • Idempotency-Key
    string
    required

    Unique key (8–255 chars) per request; replays return the original result.

  • x-nicer-company
    string
    required

    Company context. Authentication and tenant membership are validated by the API.

Request body JSON required

One of the following:

  • object
    • mapping
      object
      required
      • columns
        map of
        string
        required
      • defaults
        map of
        string
        required
      • dateFormat
        ISO
        or
        US
        or
        EU
        required
      • decimalSeparator
        .
        or
        ,
        required
      • headerRow
        integer
        required
        maximum: 50 · minimum: 1
      • sheet
        required

        Any of the following:

        • string
        • null
    • type
      string
      required
  • object
    • name
      string
      required
      maxLength: 100 · minLength: 1
    • type
      string
      required
  • object
    • changes
      object
      required
      • amountMinor
        optional
        integer
        maximum: 9007199254740991 · minimum: -9007199254740991
      • checkIn
        optional

        Any of the following:

        • string
        • null
      • checkOut
        optional

        Any of the following:

        • string
        • null
      • clientName
        optional

        Any of the following:

        • string
        • null
      • confirmationNumber
        optional

        Any of the following:

        • string
        • null
      • identifierNumber
        optional

        Any of the following:

        • string
        • null
      • supplierName
        optional

        Any of the following:

        • string
        • null
    • remittanceLineId
      string
      required
      maxLength: 255 · minLength: 1
    • type
      string
      required
  • object
    • reason
      DUPLICATE
      or
      NOT_COMMISSION
      or
      OTHER_COMPANY
      or
      OTHER
      required
    • remittanceLineId
      string
      required
      maxLength: 255 · minLength: 1
    • type
      string
      required
  • object
    • remittanceLineId
      string
      required
      maxLength: 255 · minLength: 1
    • type
      string
      required
  • object
    • allocations
      array of
      object
      required
      • amountMinor
        integer
        required
        maximum: 9007199254740991
      • commissionItemId
        string
        required
        maxLength: 255 · minLength: 1
    • remittanceLineId
      string
      required
      maxLength: 255 · minLength: 1
    • type
      string
      required
  • object
    • type
      string
      required
    • remittanceLineId
      optional
      string
      maxLength: 255 · minLength: 1
  • object
    • type
      string
      required
  • object
    • type
      string
      required
  • object
    • reason
      string
      required
      maxLength: 500 · minLength: 1
    • type
      string
      required
  • object
    • type
      string
      required
    • reason
      optional
      string
      maxLength: 500 · minLength: 1

Returns

200

OK

JSON
  • batch
    object
    required
    • committedAt
      required

      Any of the following:

      • string
      • null
    • companyName
      string
      required
      minLength: 1
    • createdAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
    • createdByUserId
      string
      required
      minLength: 1
    • errorCode
      required

      Any of the following:

      • string
      • null
    • fileName
      string
      required
      minLength: 1
    • format
      CSV
      or
      TSV
      or
      TXT
      or
      XLSX
      required
    • headers
      array of
      string
      required
    • jobId
      required

      Any of the following:

      • string
      • null
    • presetId
      required

      Any of the following:

      • string
      • null
    • sizeBytes
      integer
      required
      maximum: 9007199254740991
    • source
      FILE_IMPORT
      required
    • status
      string
      ·
      one of 9 values
      required
      Allowed values: AWAITING_UPLOAD, UPLOADED, PARSING, READY, COMMITTING, COMMITTED, UNDONE, DISCARDED, FAILED
    • updatedAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
    • allowedActions
      array of
      string
      ·
      one of 11 values
      required
      Allowed values: APPLY_MAPPING, SAVE_PRESET, EDIT_LINE, EXCLUDE_LINE, INCLUDE_LINE, SET_MATCH, RESET_MATCHES, RERUN_MATCHING, RECONCILE, UNDO_RECONCILE, DISCARD
    • batchId
      string
      required
      minLength: 1
    • channel
      string
      ·
      one of 10 values
      required
      Allowed values: ARC, BSP, CHECK, ACH, WIRE, CARD, STRIPE, CASH, HOST_STATEMENT, OTHER
    • committedByUserId
      required

      Any of the following:

      • string
      • null
    • mapping
      required

      Any of the following:

      • RemittanceImportMapping
        • columns
          map of
          string
          required
        • defaults
          map of
          string
          required
        • dateFormat
          ISO
          or
          US
          or
          EU
          required
        • decimalSeparator
          .
          or
          ,
          required
        • headerRow
          integer
          required
          maximum: 50 · minimum: 1
        • sheet
          required

          Any of the following:

          • string
          • null
      • null
    • number
      string
      required
      minLength: 1
    • parsedAt
      required

      Any of the following:

      • string
      • null
    • stats
      object
      required
      • excluded
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • invalid
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • invalidRows
        array of
        object
        required
        • errors
          array of
          object
          required
          • code
            REQUIRED
            or
            INVALID_AMOUNT
            or
            INVALID_DATE
            or
            INVALID_RATE
            or
            INVALID_VALUE
            required
          • field
            string
            ·
            one of 18 values
            required
            Allowed values: amount, bookingGross, checkIn, checkOut, clientName, confirmationNumber, currency, fee, fxRate, identifierNumber, originalAmount, originalCurrency, payableOn, payerName, paymentReference, rate, receivedOn, supplierName
        • rowNumber
          integer
          required
          maximum: 9007199254740991
      • lines
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • matched
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • pendingReview
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • proposed
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • totals
        array of
        object
        required
        • amountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
        • currency
          string
          required
          pattern: ^[A-Z]{3}$
        • matchedMinor
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
      • unmatched
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • zero
        integer
        required
        maximum: 9007199254740991 · minimum: 0
    • undoneAt
      required

      Any of the following:

      • string
      • null
  • line
    required

    Any of the following:

    • RemittanceLine
      • allocatedMinor
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • allocations
        array of
        object
        required
        • allocatedByUserId
          required

          Any of the following:

          • string
          • null
        • allocationId
          string
          required
          minLength: 1
        • amountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
        • commissionItemId
          string
          required
          minLength: 1
        • createdAt
          string
          required
          format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        • currency
          string
          required
          pattern: ^[A-Z]{3}$
        • entryType
          ALLOCATION
          or
          REVERSAL
          required
        • fxRate
          string
          required
          pattern: ^\d{1,10}\.\d{8}$
        • itemCompanyName
          string
          required
          minLength: 1
        • itemNumber
          string
          required
          minLength: 1
        • lineAmountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
        • matchScore
          required

          Any of the following:

          • number
          • null
        • method
          AUTO
          or
          SUGGESTED
          or
          MANUAL
          or
          CLAIM
          required
        • reason
          required

          Any of the following:

          • string
          • null
        • receivedOn
          string
          required
          format: date · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        • remittanceLineId
          string
          required
          minLength: 1
        • reversedMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
        • reversesAllocationId
          required

          Any of the following:

          • string
          • null
        • split
          object
          required
          • advisorMinor
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
          • agencyMinor
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
          • feesMinor
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
          • hostMinor
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
          • houseMinor
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
          • referrerMinor
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
      • amountMinor
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • archivedAt
        required

        Any of the following:

        • string
        • null
      • batchId
        required

        Any of the following:

        • string
        • null
      • cells
        map of
        string
        required
      • currency
        string
        required
        pattern: ^[A-Z]{3}$
      • duplicateOfLineId
        required

        Any of the following:

        • string
        • null
      • exclusionReason
        required

        Any of the following:

        • LineExclusionReason
        • null
      • feeMinor
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • fxRate
        required

        Any of the following:

        • FxRate
        • null
      • lineNumber
        integer
        required
        maximum: 9007199254740991
      • matchState
        UNMATCHED
        or
        PROPOSED
        or
        PENDING_REVIEW
        or
        MATCHED
        or
        EXCLUDED
        or
        ZERO
        required
      • originalAmountMinor
        required

        Any of the following:

        • integer
        • null
      • originalCurrency
        required

        Any of the following:

        • CurrencyCode
        • null
      • proposals
        array of
        object
        required
        • autoEligible
          boolean
          required
        • balanceMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
        • clientName
          string
          required
          minLength: 1
        • commissionItemId
          string
          required
          minLength: 1
        • companyName
          string
          required
          minLength: 1
        • confirmationNumber
          required

          Any of the following:

          • string
          • null
        • currency
          string
          required
          pattern: ^[A-Z]{3}$
        • features
          map of
          number
          required
        • itemNumber
          string
          required
          minLength: 1
        • method
          required

          Any of the following:

          • string
            AUTO
            or
            SUGGESTED
            or
            MANUAL
            or
            CLAIM
          • null
        • proposedAmountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
        • rank
          integer
          required
          maximum: 9007199254740991
        • score
          number
          required
          maximum: 100 · minimum: 0
        • selected
          boolean
          required
        • supplierName
          required

          Any of the following:

          • string
          • null
        • travelEnd
          string
          required
          format: date · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        • travelStart
          string
          required
          format: date · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
      • received
        object
        required
        • checkIn
          required

          Any of the following:

          • string
          • null
        • checkOut
          required

          Any of the following:

          • string
          • null
        • clientName
          required

          Any of the following:

          • string
          • null
        • confirmationNumber
          required

          Any of the following:

          • string
          • null
        • grossMinor
          required

          Any of the following:

          • integer
          • null
        • identifierNumber
          required

          Any of the following:

          • string
          • null
        • rateBps
          required

          Any of the following:

          • integer
          • null
        • supplierName
          required

          Any of the following:

          • string
          • null
      • remittanceId
        string
        required
        minLength: 1
      • remittanceLineId
        string
        required
        minLength: 1
      • unallocatedMinor
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
    • null

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close