Modify Source Invoice
patch
https://api.flxpoint.com/source-invoices/{id}Use this when you want to update source invoice data through the API.
๐ X-API-TOKENโฑ 2 req/sToken: Account ยท Source ยท Channel
This page explains the endpoint. To send a live test request, use the interactive tester in Stoplight or your own Postman / HTTP client.
This endpoint will allow you to change specific fields on a Source Invoice. Only non-null fields will be updated.
A source token or account token may be used.
It is supported for both Fulfillment Request invoices and RMA invoices.
Request
Body
application/jsontotalCreditCostnumberUsed for RMA invoices only.
accountingSyncedboolean | nullSet this value to true after syncing this invoice to your external accounting system.
externalAccountingIdstring | nullidentfier in the extrenal system that identifes this `Source Invoice`
accountingSyncErrorstring | nullitemsarray[UpdateSourceInvoiceItem]invoiceItemIdinteger | nullIf no value is passed, a new invoice item will be created.
externalAccountingItemIdstring | nullidentfier in the external system that identfies this `Source Invoice Item`
statusstringallowed
unpaidpaidcreditedrefundedvendorPayoutIdintegerExample request
patch
/source-invoices/{id}curl -X PATCH "https://api.flxpoint.com/source-invoices/{id}" \
-H "Accept: application/json" \
-H "X-API-TOKEN: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"totalCreditCost": 0,
"accountingSynced": true,
"externalAccountingId": "string",
"accountingSyncError": "string",
"items": [
{
"invoiceItemId": 0,
"externalAccountingItemId": "string"
}
],
"status": "unpaid",
"vendorPayoutId": 0
}'Example body ยท application/json
{
"totalCreditCost": 0,
"accountingSynced": true,
"externalAccountingId": "string",
"accountingSyncError": "string",
"items": [
{
"invoiceItemId": 0,
"externalAccountingItemId": "string"
}
],
"status": "unpaid",
"vendorPayoutId": 0
}Responses
200OK
No schema documented for this status.
400Bad Request
No schema documented for this status.
401Unauthorized
No schema documented for this status.
404Not Found
No schema documented for this status.
OpenAPI fragment
{
"patch": {
"summary": "Modify Source Invoice",
"description": "This endpoint will allow you to change specific fields on a Source Invoice. Only non-null fields will be updated.\n\nA source token or account token may be used.\n\nIt is supported for both Fulfillment Request invoices and RMA invoices.",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateSourceInvoice"
},
"examples": {
"Full": {
"value": {
"totalCreditCost": 0,
"accountingSynced": true,
"externalAccountingId": "string",
"items": [
{
"invoiceItemId": 0,
"externalAccountingItemId": "string"
}
],
"status": "unpaid",
"vendorPayoutId": 0
}
},
"Accounting Sync": {
"value": {
"accountingSynced": true,
"externalAccountingId": "string",
"items": [
{
"invoiceItemId": 0,
"externalAccountingItemId": "string"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
}
}
}
}Ready to run it? Send the curl from your terminal or Postman, or use the interactive tester in Stoplight.Open in Stoplight