Update an invoice payment
The PUT /pic/link/invoice-payments/update
endpoint allows you to update a payment. ππΌπ€
Authorizationβ
This endpoint requires authentication through Basic Auth
with the username and password of the backend that will consume it. To create and configure a backend, follow the backends tutorial
Request parametersβ
- π£ Path
- π Query
- πͺ Body
This request does not contain parameters of type Path
This request does not contain parameters of type Query
JSON Bodyβ
{
"inputs": [
InvoicePayment
]
}
Name | Type | Default | Description |
---|---|---|---|
inputs | Array[ InvoicePayment ] | Required | List of invoice payments to update |
InvoicePayment
β
{
"paymentId": string,
"purchaseInvoiceId": string,
"paymentDate": string,
"amount": float,
"currencyId": string
}
Name | Type | Default | Description |
---|---|---|---|
paymentId | string | Required | Identifier of payment in the external system |
purchaseInvoiceId | string | Fecha de envΓo de la peticiΓ³n | Identifier of the invoice |
paymentDate | strinf | Required | Payment date |
amount | float | Required | Payment amount |
currencyId | bool | false | Identifier of the currency |
The payment date must be in DD-MM-YYYY
format in order to be processed correctly.
The purchaseInvoiceId
field must correspond to a valid invoice of a purchase order created from the same backend. You can only register payments on invoices obtained through the GET /pic/link/purchase-invoices/find
endpoint.
Examplesβ
- π₯οΈ cURL
curl --location 'https://<identifier>.api.appliqloud.com/pic/link/invoice-payments/update' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <token>' \
--data '{
"inputs": [
{
"paymentId": "6000098",
"purchaseInvoiceId": "1",
"paymentDate": "2024-08-09",
"amount": 1250.0,
"currencyId": "MXN"
}
]
}'
Make sure to modify the <identifier>
and <token>
fields with your company identifier and authentication token respectively.
Responsesβ
- β 200
- β οΈ 200 (with errors)
- π 401
- π§ 500
Payments were updated successfully
{
"success": [
{
"paymentId": "6000098",
"invoicePaymentStatus": "TRANSFERRED",
"purchaseInvoiceId": "20001",
"vendorBusinessPartnerId": "1",
"paymentDate": "2024-08-09",
"amount": 1250.0,
"currency": "USD"
}
],
"errors": []
}
There is an error in the request
{
"success": [],
"errors": [
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"cause": "InvoicePaymentNotFoundException",
"message": "Invoice payment 6000098 not found in backend SAP_APQ",
"context": {
"id": "6000098",
"backend_id": "SAP_APQ"
}
}
]
}
Authorization required or credentials are not correct
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"request": "POST /pic/invoices/payments",
"cause": "UnauthorizedException",
"message": "Authorization required"
}
Internal application error (contact support@appliqloud.com or open a support ticket)
{
"success": [],
"errors": [
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"cause": "InternalServerError",
"message": "Internal Server Error"
}
]
}