Skip to content

Move one vendor's bills to a supplier of their own (ADMIN+, dashboard user)

POST
/suppliers/{supplierId}/split
curl --request POST \
--url https://api.invogi.com/v1/suppliers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/split \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "sourceRef": "example" }'

The vendor’s bills move to an existing supplier with that vendor’s name, or a new one. Payments on them and recovery cases opened from them move too. Findings that compared those bills with this supplier’s are returned for review; none is changed. Refused for the vendor matching this supplier’s own name (400), and when the supplier no longer has differently named vendors (409).

supplierId
required
string format: uuid
Media typeapplication/json
object
sourceRef
required

A group’s sourceRef from source-vendors

string

Example generated

{
"sourceRef": "example"
}

What moved

Media typeapplication/json
object
supplier
object
id
string format: uuid
name
string
created
boolean
invoicesMoved
integer
casesMoved
integer
findingsToReview
Array<object>
object
id
string format: uuid
type
string
summary
string
disposition
string

Example generated

{
"supplier": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"created": true
},
"invoicesMoved": 1,
"casesMoved": 1,
"findingsToReview": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"type": "example",
"summary": "example",
"disposition": "example"
}
]
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

API key lacks required scope/role

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Resource not found

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Conflicting idempotency key or resource processing state

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}