POST /purchase-invoice-payments.json

POST /purchase-invoice-payments.json
application/json

Body Required

  • amount number Required

    Amount

    Default value is 0.

  • exchangeRate number(float) Required

    Exchange rate

    Default value is 1.

  • externalId string | null

    External

  • paidAt string(date-time) Required

    Paid at

    Default value is {} (empty).

  • paymentMethodId integer(int32) | null

    Payment method

  • purchaseInvoiceId integer(int32) Required

    Purchase invoice

  • purchaseItemId integer(int32) | null

    Purchase item

  • reference string | null

    Reference

  • status string | null Required

    Status

    Values are active or cancelled. Default value is active.

  • transferId string | null

    Transfer

  • type string | null Required

    Type

    Values are payment, overpayment, correction, refund, or refundCommission. Default value is payment.

  • xeroId string | null

    Xero

Responses

  • 200

    Successful response

    Hide response attributes Show response attributes object
POST /purchase-invoice-payments.json
curl \
 -X POST http://api.example.com/v1/purchase-invoice-payments.json \
 -H "Content-Type: application/json" \
 -d '{"amount":0,"exchangeRate":1,"externalId":"string","paidAt":{},"paymentMethodId":42,"purchaseInvoiceId":42,"purchaseItemId":42,"reference":"string","status":"active","transferId":"string","type":"payment","xeroId":"string"}'
Request example
{
  "amount": 0,
  "exchangeRate": 1,
  "externalId": "string",
  "paidAt": {},
  "paymentMethodId": 42,
  "purchaseInvoiceId": 42,
  "purchaseItemId": 42,
  "reference": "string",
  "status": "active",
  "transferId": "string",
  "type": "payment",
  "xeroId": "string"
}
Response examples (200)
{
  "amount": 0,
  "createdAt": "2023-05-04T09:42:00+00:00",
  "exchangeRate": 1,
  "externalId": "string",
  "id": 42,
  "paidAt": {},
  "paymentMethodId": 42,
  "purchaseInvoiceId": 42,
  "purchaseItemId": 42,
  "reference": "string",
  "status": "active",
  "transferId": "string",
  "type": "payment",
  "updatedAt": "2023-05-04T09:42:00+00:00",
  "xeroId": "string"
}