Update a payment instruction
1 min
PATCH
https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}
Path Parameters
- accountReferencestringrequiredDescription
- paymentInstructionReferencestringrequiredDescription
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Body Parameters
- patchRequestMicrosoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v1.Patch.PaymentInstructions.PaymentInstructionPatchModel]required
- valueSystem.Object
- pathstring
- opstring
- fromstring
Responses
204
- FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionDescription
- paymentInstructionReferencestringDescription
- statusstring<Pending | Active | Completed | Cancelled>Description
- currencystringDescription
- descriptionstringDescription
- cartReferencestringDescription
- fulfilmentPaymentMappingsFictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.FulfilmentPaymentMapping[]Description
- fulfilmentsFictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.Fulfilment[]Description
- cartReferencestringDescription
- fulfilmentReferencestringDescription
- fulfilmentStatusstring<Pending | Processing | Completed | Dispatched | Cancelled>Description
- fulfilmentTypestring<Physical | Digital>Description
- expectedDeliveryDatestring<date-time>ExampleDescription
- supplierNotificationDatestring<date-time>ExampleDescription
- addressReferencestringDescription
- dateCreatedstring<date-time>ExampleDescription
- dateLastUpdatedstring<date-time>ExampleDescription
- customFulfilmentParametersobjectExampleDescription
- paymentsFictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.Payment[]Description
- cartReferencestringDescription
- paymentReferencestringDescription
- paymentDatestring<date-time>ExampleDescription
- paymentStatusstring<None | Pending | Processed | Created | New | Confirmed | Dispatched | Cancelled | Notified | Reminder | Completed | Refunded | Waiting | Downloaded | SuspectedDuplicate | MaxRefunded | PartialRefunded | NeedToOrder | ProductsOrdered | Authorised | Unpaid>Description
- dateCreatedstring<date-time>ExampleDescription
- dateLastUpdatedstring<date-time>ExampleDescription
- vatAmountnumber<double>Description
- grossAmountnumber<double>Description
- netAmountnumber<double>Description
- customPaymentParametersobjectExampleDescription
- customPaymentInstructionParametersobjectExampleDescription
400
401
403
404
412
curl
curl --request PATCH \
--url https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-version: string' \
--data '[
{}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var raw = JSON.stringify([
{}
]);
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
request.body = JSON.dump([
{}
])
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}"
payload = json.dumps([
{}
])
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
204
// No Content
{
"paymentInstructionReference": "",
"status": "",
"currency": "",
"description": "",
"cartReference": "",
"fulfilmentPaymentMappings": [
{
"fulfilments": [
{
"cartReference": "",
"fulfilmentReference": "",
"fulfilmentStatus": "",
"fulfilmentType": "",
"expectedDeliveryDate": "2021-09-21T05:33:22.3073453",
"supplierNotificationDate": "2021-09-21T05:33:22.3073453",
"addressReference": "",
"dateCreated": "2021-09-21T05:33:22.3073453",
"dateLastUpdated": "2021-09-21T05:33:22.3073453",
"customFulfilmentParameters": {}
}
],
"payments": [
{
"cartReference": "",
"paymentReference": "",
"paymentDate": "2021-09-21T05:33:22.432364",
"paymentStatus": "",
"dateCreated": "2021-09-21T05:33:22.432364",
"dateLastUpdated": "2021-09-21T05:33:22.432364",
"vatAmount": "",
"grossAmount": "",
"netAmount": "",
"customPaymentParameters": {}
}
]
}
],
"customPaymentInstructionParameters": {}
}400
// Bad Request
• The cancellation code is too long
• Unable to amend payment instruction
• The status can only be set to 'Cancelled'
401
// Unauthorized
• API Authentication Failure: Invalid Authentication Type/Credentials Provided
403
// Forbidden
• Cart is already in use and/or bound to another account
404
// Not Found
• Account cannot be found
• Payment instruction cannot be found
412
// Precondition Failed
• Can not amend payment instruction status that has already been cancelled
• PATCH data validation failed.
• Carts must contain a minimum of 1 line item.
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.