invoice

Update

post/invoice/{invoiceId}

Request

  • Base URL: https://api.mercoa.com
  • URL: https://api.mercoa.com/invoice/{invoiceId}
  • Auth: HTTP bearer

Path parameters

invoiceIdstring required

Invoice ID or Invoice ForeignID

Request body

status'UNASSIGNED' | 'DRAFT' | 'NEW' | 'APPROVED' | 'SCHEDULED' | 'PENDING' | 'PAID' | 'ARCHIVED' | 'REFUSED' | 'CANCELED' | 'FAILED'
amountnumber double

Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated.

currency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'CNY' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'
invoiceDatestring date-time

Date the invoice was issued.

deductionDatestring date-time

Initial date when funds are scheduled to be deducted from payer's account.

settlementDatestring date-time

Date of funds settlement.

dueDatestring date-time

Due date of invoice.

invoiceNumberstring
noteToSelfstring

Note to self or memo on invoice.

serviceStartDatestring date-time
serviceEndDatestring date-time
netTermsinteger

Net terms in days. Must be a positive number.

payerIdstring
paymentSourceIdstring
vendorIdstring
paymentDestinationIdstring
metadataobject

Metadata associated with this invoice.

foreignIdstring

The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID.

documentstring

Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB. If the invoice already has a document, this will add a new document to the invoice.

uploadedImagestring

DEPRECATED. Use document field instead.

creatorUserIdstring
failureType'SOURCE_PAYMENT_ERROR' | 'DESTINATION_PAYMENT_ERROR' | 'REJECTED_HIGH_RISK' | 'INSUFFICIENT_FUNDS' | 'PROCESSING_ERROR'
batchPaymentboolean

If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date.

vendorCreditIdsVendorCreditTypesVendorCreditId[]

The IDs of the vendor credits to be applied to this invoice. Passing this field will un-apply any previously applied vendor credits.

taxAmountnumber double

Tax amount for this invoice.

shippingAmountnumber double

Shipping amount for this invoice.

ocrJobIdstring
paymentDestinationConfirmedboolean

Set to true if the payment destination has been confirmed by the vendor or if the payment destination should default to the selected payment destination on the vendor portal.

creatorEntityIdstring

Response

Response with status 200

status'UNASSIGNED' | 'DRAFT' | 'NEW' | 'APPROVED' | 'SCHEDULED' | 'PENDING' | 'PAID' | 'ARCHIVED' | 'REFUSED' | 'CANCELED' | 'FAILED' required
amountnumber double

Total amount of invoice in major units

currency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'CNY' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'
invoiceDatestring date-time

Date the invoice was issued.

deductionDatestring date-time

Initial date when funds are scheduled to be deducted from payer's account. The actual deduction date may differ from this date, and will be reflected in the processedAt field.

nextDeductionDatestring date-time

For invoice templates, this is the date when the next recurring payment will be scheduled.

dueDatestring date-time

Due date of invoice.

invoiceNumberstring
noteToSelfstring
serviceStartDatestring date-time
serviceEndDatestring date-time
netTermsinteger

Net terms in days. Must be a positive number.

payerIdstring
paymentSourceIdstring
vendorIdstring
paymentDestinationIdstring
paymentDestinationConfirmedboolean required

True if the payment destination has been confirmed by the vendor. False if the payment destination has been set (for example, a check to an address) but has not been confirmed by the vendor.

batchPaymentboolean

If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date.

hasDocumentsboolean required

True if the invoice has documents attached.

hasSourceEmailboolean required

True if the invoice was created by an incoming email.

taxAmountnumber double

Tax amount for this invoice.

shippingAmountnumber double

Shipping amount for this invoice.

metadataobject required

Metadata associated with this invoice.

creatorEntityIdstring
entityGroupIdstring
entityGroupForeignIdstring

The foreign ID of the entity group that created this invoice.

createdAtstring date-time required
updatedAtstring date-time required
ocrJobIdstring
recurringTemplateIdstring
idstring required
processedAtstring date-time

Date when the invoice payment was processed.

settlementDatestring date-time

Date of funds settlement.

foreignIdstring

The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID.

failureType'SOURCE_PAYMENT_ERROR' | 'DESTINATION_PAYMENT_ERROR' | 'REJECTED_HIGH_RISK' | 'INSUFFICIENT_FUNDS' | 'PROCESSING_ERROR'
vendorCreditIdsVendorCreditTypesVendorCreditId[]

The IDs of the vendor credits that are currently applied to this invoice.

Changes

No recorded changes to this operation across all 1 revision of this API.