The Vic.ai API provides a seamless connection between your Enterprise Resource Planning (ERP) system and the Vic.ai product suite.
The API is designed to offer three main areas of functionality:
Syncing master data: This refers to the data in your ERP that Vic.ai interacts with. You are required to supply and update this data in Vic.ai, and you also have the option to verify the copy of the masterdata in Vic.ai.
Syncing training data: We need historical data to train your AI model. To that end, the API provides endpoints to sync historical invoices into Vic.ai and to confirm their presence.
Subscribing to and receiving webhooks: Webhooks enable users or automated tasks to interact with your ERP through various actions in the Vic.ai product suite, such as posting an invoice, payment or purchase order or requesting synchronization. You will receive a notification via a webhook when these actions occur.
For US-based integrations, please use the following base API URL:
https://api.us.vic.ai/v0
For integrations based in Norway, use the following base API URL:
https://api.no.vic.ai/v0
All paths mentioned in this documentation should use one of these URLs as the base.
Example:
curl https://api.us.vic.ai/v0/healthCheck \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
To begin interacting with the Vic.ai API, you will need the following credentials:
These can be provided to you securely by a Vic.ai representative upon request.
Please note: These credentials are essentially the keys to your ERP integration. If they fall into the wrong hands, unauthorized parties could impersonate you, gain access to sensitive data, and potentially perform malicious actions. Therefore, it's crucial to keep these credentials safe at all times to protect your application's integrity and your clients' data.
To initiate the authentication process, send a POST request to /v0/token
with the payload as shown in the example below:
{
"client_id": "VIC_CLIENT_ID",
"client_secret": "VIC_CLIENT_SECRET"
}
Here is an example of how to do this:
curl -X POST https://api.us.vic.ai/v0/token \
-H "Content-Type: application/json" \
-d '{"client_id": "VIC_CLIENT_ID", "client_secret": "VIC_CLIENT_SECRET"}'
Upon providing a valid client ID and client secret, you should receive a response similar to the following:
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}
For subsequent calls, use the value in access_token
in the Authorization
field.
Here is an example:
curl https://api.us.vic.ai/v0/healthCheck \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
The response should resemble the following:
{"company":"Your Company Name","status":"PASS","version":"0.19.0"}
Use this endpoint to obtain an access token that can be used to authenticate subsequent requests to the API.
client_id required | string |
client_secret required | string |
{- "client_id": "string",
- "client_secret": "string"
}
{- "access_token": "string",
- "token_type": "Bearer",
- "expires_in": 0
}
The Vic.ai API leverages cursor-based pagination for traversing through data.
To fetch the next page of information, include the cursor
parameter to the request. This value can be obtained from the X-next
field in a previous response.
Example:
curl https://api.us.vic.ai/v0/accounts?cursor=foobar \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
GL (General Ledger) accounts are part of your ERP Masterdata. In order to be associated with an invoice line item, key data about the account must be stored in Vic.ai. These operations allow querying and manipulation of these GL account data.
Use this request to query the GL account data that are stored in Vic.ai.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
sortOrder | string Default: "ASCENDING" Enum: "ASCENDING" "DESCENDING" what sort order should be used for queries |
[- {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "number": "string",
- "name": "string",
- "externalData": { }
}
]
Use this request to get data for a single GL account that is stored in Vic.ai.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "number": "string",
- "name": "string",
- "externalData": { }
}
Use this request to upsert GL account data for one GL account into
Vic.ai.
If the account is known by Vic.ai, the externalId supplied will be used
to resolve the account and perform an update of the data, otherwise, a
new account will be inserted.
If the upsert action is part of a syncRequest, you should include the
syncRequest ID in the X-Request-Id
header.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
X-Request-Id | string <uuid> token to be able to correctly log associated requests |
externalId | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> Does not have UTC normalization. |
number required | string <number> |
name required | string <= 255 characters |
ExternalData (object) or null |
{- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "number": "string",
- "name": "string",
- "externalData": { }
}
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "number": "string",
- "name": "string",
- "externalData": { }
}
Use this request to delete data for a single account that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "number": "string",
- "name": "string",
- "externalData": { }
}
application/msword
application/pdf
application/vnd.ms-word.document.macroEnabled.12
application/vnd.ms-word.template.macroEnabled.12
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.openxmlformats-officedocument.wordprocessingml.template
image/tiff
text/xml
(See note below about supported EDI formats)image/jpg
image/jpeg
image/png
image/gif
application/vnd.ms-excel
application/vnd.ms-excel.addin.macroenabled.12
application/vnd.ms-excel.sheet.binary.macroenabled.12
application/vnd.ms-excel.sheet.macroenabled.12
application/vnd.ms-excel.template.macroenabled.12
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.openxmlformats-officedocument.spreadsheetml.template
Supported embedded attachment MIME codes:
application/pdf
image/jpeg
image/png
image/tiff
The API will ignore other attachment types.
Use this to upload an attachment to Vic.ai. The attachment will be created and processing enqueued automatically.
The response is a 201 with the attachment ID.
file required | string <binary> |
{- "id": "47"
}
Dimensions are part of your ERP Masterdata, and represent business categories that are associated with invoice line items, that Vic.ai can automatically assign to invoice line items. These operations allow querying and manipulation of the dimension data.
Use this request to query the dimensions data that are stored in Vic.ai.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
sortOrder | string Default: "ASCENDING" Enum: "ASCENDING" "DESCENDING" what sort order should be used for queries |
[- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
]
Create a new dimension in Vic.ai.
Create a dimension.
externalId | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> Does not have UTC normalization. |
name required | string <= 255 characters The name of the dimension. |
type | string <= 255 characters The dimension type. |
typeName | string <= 255 characters The dimension type name. |
typeExternalId | string <= 255 characters The type's external ID in the ERP system. If left unspecified, it will clear the existing value. |
shortName | string <= 255 characters |
ExternalData (object) or null |
{- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { }
}
{- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
Use this request to get data for a single dimension that is stored in Vic.ai.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
Use this request to update or insert dimensions data for one dimension
into Vic.ai.
Note: The insert portion of this will be changed to no longer
function and the createDimension
operation should be used instead.
If the dimension is known by Vic.ai, the externalId
supplied will be
used to resolve the dimension and perform an update of the data,
otherwise, a new dimension will be inserted.
If the upsert action is part of a syncRequest
, you should include the
syncRequest
ID in the X-Request-Id
header.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
X-Request-Id | string <uuid> token to be able to correctly log associated requests |
externalId | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> Does not have UTC normalization. |
name required | string <= 255 characters The name of the dimension. |
type | string <= 255 characters The dimension type. |
typeName | string <= 255 characters The dimension type name. |
typeExternalId | string <= 255 characters The type's external ID in the ERP system. If left unspecified, it will clear the existing value. |
shortName | string <= 255 characters |
ExternalData (object) or null |
{- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { }
}
{- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
Use this request to delete data for a single dimension that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
These routes give you read-only access to two types of invoices:
Use this request to query the invoice data that are stored in Vic.ai.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
sortOrder | string Default: "ASCENDING" Enum: "ASCENDING" "DESCENDING" what sort order should be used for queries |
InvoiceState (string) or any selects the state of invoices which are to be searched
(defaults to |
[- {
- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
]
When creating an invoice, there are three steps to follow:
/invoices
/invoice/{id}/document
/invoice/{id}/process
You can make the id the internal id (from vic.ai) or the external id (from your system).
Note
The maximum file size allowed to upload is 64MB.
InvoiceExternalId (string) or null The external id if it is known within the external system. This field can be null. | |
string or null Where the invoice originated from. | |
transactionType required | string (TransactionType) Enum: "INVOICE" "CREDITNOTE" The type of invoice transaction. |
refNumber | string <= 255 characters Number that appears on the invoice. |
string or null | |
string or null | |
MonetaryValue (string) The total amount of the invoice, including tax/VAT. | |
currency | string <ISO-4217> <= 3 characters The currency code the invoice is in. |
Language (string) or null | |
issueDate | string <date> The date the invoice was issued on. |
glDate | string <date> |
dueDate | string <date> The date the invoice is due on. |
string or null | |
string or null | |
string or null | |
paymentRef | string <= 255 characters The payment reference number. The KID is a customer identification number that is mandatory for invoices in Norway. |
InvoicePaymentInfo (object) or null | |
InvoicePaymentTerm (object) or null The payment term the invoice should be paid in. If the term is not
known, pass | |
CreditAccountRef (object) or null | |
(VendorLookup (VendorLookupByInternalId (object) or VendorLookupByExternalId (object) or VendorLookupByName (object) or VendorLookupByOrgNumberAndBankAccount (object) or VendorLookupByOrgNumber (object))) or null | |
Array of objects (CreateInvoiceLineItem) | |
Array of objects (BillOfLadingNumber) | |
Array of objects (InvoiceFieldInput) |
{- "externalId": "string",
- "source": "Millum",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "totalAmount": "1.00",
- "currency": "str",
- "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "accountNumber": "string",
- "servicePeriodStart": "2019-08-24",
- "servicePeriodEnd": "2019-08-24",
- "paymentRef": "string",
- "paymentInfo": {
- "kind": "ACH",
- "accountHolderName": "string",
- "accountNumber": "string",
- "routingNumber": "string",
- "bic": "string"
}, - "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "creditAccount": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": "1.00",
- "quantityInvoiced": "string",
- "comment": "string",
- "description": "string",
- "billable": true,
- "taxCodeId": "4f8ee29f-1f5a-45f9-b07e-0fe70e9e4fdc",
- "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "unitPrice": "1.00",
- "number": "string",
- "lineType": "item"
}
], - "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "fields": [
- {
- "label": "string",
- "value": "string"
}
]
}
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
Use this request to get data for a single invoice that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
Use this request to indicate that an invoice has been posted or transferred to the ERP system, in the case where you have not activated a subscription, or you have responded to the subscription with a 202-asynchronous response. Note that this operation can either be a confirmation, or a rejection, depending on the shape of the payload. Possible payloads:
InvoiceConfirm
operation
should be cleared because the postingError has been resolved in the
ERP. This cannot be used to clear an error due to InvoiceReject
.
Note that :id
must be internalId for this route.id required | string The |
externalId required | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> |
postingError | string |
{- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "postingError": "string"
}
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
Use this request to delete data for a single invoice that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
string or null selects the comment which is to be displayed |
{- "code": 100,
- "message": "string"
}
Tells Vic that the invoice is ready to start being processed. Once this is called, it may not be called again.
id required | string The Invoice internal id or external id. |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
Use this request to get the document associated with a single invoice that is stored in Vic.ai
id required | string The Invoice internal id or external id. |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "code": 100,
- "message": "string"
}
This attaches a document to the invoice for processing. An external id must be specified for an invoice prior to calling this.
id required | string The Invoice internal id or external id. |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
document required | string <binary> |
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
Used to confirm that the invoice data have been successfully posted to
the ERP, possibly including a postingError
.
Use of this postingError
means that the invoice data are posted, but
some secondary content needs amendation in the ERP that cannot be
performed from the vic user interface (for example: a problem
uploading the posted document).
Note: id
must be the internalId
of the invoice.
id required | string The |
externalId required | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> |
postingError | string |
{- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "postingError": "string"
}
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
Used to communicate that the invoice data have NOT been
successfully posted to the ERP, due to invalid data. This should NOT
be used to communicate an error in posting due to a general failure
such as a network issue or an availability issue with the ERP, in
those or similar cases, a retry should be performed without notifying the vic system.
Note: id
must be the internalId
of the invoice.
id required | string The |
required | integer or null |
required | string or null |
reason required | string |
{- "item": 0,
- "field": "string",
- "reason": "string"
}
{- "totalAmount": "1.00",
- "amountWithoutTax": "1.00",
- "amountTax": "1.00",
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "USD",
- "customFields": [
- {
- "id": "string",
- "value": "string",
- "label": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
], - "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "source": "Millum",
- "internalId": "string",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "string",
- "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentTerm": {
- "count": 0,
- "unit": "DAYS"
}, - "paymentRef": "string",
- "vendorInternalId": "47",
- "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "vendor": {
- "internalId": "47",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "orgNumber": "string",
- "countryCode": "US",
- "name": "string"
}, - "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "postingError": "string",
- "documentUrl": "string",
- "status": "NOT_READY",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "selfAssessedUseTaxAmount": "1.00",
- "selfAssessedUseTaxAccount": "string"
}
List all of the line items for the invoice. NOTE: They are ungrouped so that you may inspect and modify them as necessary.
id required | string The Invoice internal id or external id. |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
[- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
]
Use this request to query the training invoice data that are stored in Vic.ai.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
sortOrder | string Default: "ASCENDING" Enum: "ASCENDING" "DESCENDING" what sort order should be used for queries |
[- {
- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "string",
- "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "externalData": { },
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
]
}
]
Use this request to get data for a single training invoice that is stored in Vic.ai
id required | string The id of the database entry |
{- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "string",
- "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "externalData": { },
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
]
}
Use this request to upsert training invoice data for one invoice into Vic.ai.
When putting a new invoice into the system, an invoiceDocument
will be
required. If the training invoice already exists, an invoiceDocument
will not be required.
All requests that need to have the invoiceDocument
updated should have
a multipart/form-data
content type.
If the training invoice just needs to be updated without a document
specified a content type of application/json
is permitted.
If the invoice is known by Vic.ai, the externalId
supplied will be
used to resolve the invoice and perform an update of the data,
otherwise, a new invoice will be created.
When updating a training invoice, the invoiceDocument
is no longer required,
and the Content-Type
can be application/json
If the training invoice needs the underlying document updated, use a
multipart/form-data
to accomplish this. It will have the same format as the
insert described above.
Some things to note about updating existing invoices.
id required | string The id of the database entry |
required | object (TrainingInvoiceUpsert) |
invoiceDocument | string <binary> |
{- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "string",
- "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "externalData": { },
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
]
}
Use this request to delete data for a single training invoice that is stored in Vic.ai
id required | string The id of the database entry |
{- "transactionType": "INVOICE",
- "refNumber": "string",
- "poNumber": "string",
- "description": "string",
- "currency": "string",
- "language": "en",
- "issueDate": "2019-08-24",
- "glDate": "2019-08-24",
- "dueDate": "2019-08-24",
- "paymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "invoiceInfo": {
- "kid": "string",
- "creditAccountExternalId": "string",
- "creditAccountInternalId": "string"
}, - "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "lineItems": [
- {
- "index": 0,
- "amount": 0,
- "amountTax": "1.00",
- "description": "string",
- "comment": "string",
- "billable": false,
- "accrual": {
- "start": "2019-08-24",
- "count": 0,
- "unit": "MONTHS"
}, - "invoiceLineItemInfo": {
- "vatCode": "string",
- "vatAmount": 0,
- "vatRate": "1.00"
}, - "vat": {
- "internalId": "string",
- "externalId": "string",
- "code": "string",
- "amount": "1.00",
- "rate": "1.00"
}, - "costAccountInternalId": "47",
- "costAccountExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "costAccount": {
- "internalId": "string",
- "externalId": "string",
- "number": "string"
}, - "dimensions": [
- {
- "name": "string",
- "type": "string",
- "typeName": "string",
- "typeExternalId": "string",
- "shortName": "string",
- "externalData": { },
- "displayName": "string",
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154"
}
], - "dimensionsInternalIds": [
- "47"
], - "dimensionsExternalIds": [
- "21b31bc7-1267-4335-893c-d7fe4706a238"
], - "quantityInvoiced": "string",
- "lineItemTotal": "1.00",
- "lineType": "item",
- "poLineNumber": 0,
- "poNumber": "string",
- "poItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
], - "unitPrice": "1.00",
- "number": "string"
}
], - "externalData": { },
- "externalUpdatedAt": "2019-08-24T14:15:22Z",
- "bolNumbers": [
- {
- "bolNumber": "string"
}
], - "fields": [
- {
- "label": "string",
- "title": "string",
- "type": "string",
- "value": "string"
}
]
}
Use this request to get the document associated with a training invoice that is stored in Vic.ai
id required | string The id of the database entry |
{- "code": 100,
- "message": "string"
}
List all payment batches.
completedAtOrAfter | string <date-time> Filter batches that were completed at or after the date time
provided. This can be used in combination with |
completedAtOrBefore | string <date-time> Filter batches that were completed at or before the date time
provided. This can be used in combination with |
PaymentBatchStatus (string) or any Selects the payment batches that match the status provided. When left
unspecified, it is the same as if | |
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "companyId": "string",
- "processedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "approvedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "status": "pending_approval",
- "payments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "1.00",
- "settlementAmount": "1.00",
- "discountAmount": "1.00",
- "currencyId": "USD",
- "settlementCurrencyId": "USD",
- "exchangeRate": "1.00",
- "status": "pending_approval",
- "approvedAt": "2019-08-24T14:15:22Z",
- "fundedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "invoice": {
- "internalId": "string",
- "externalId": "string"
}, - "costAccount": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string",
- "externalId": "string"
}
}
], - "credits": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "1.00",
- "settlementAmount": "1.00",
- "currencyId": "USD",
- "settlementCurrencyId": "USD",
- "exchangeRate": "1.00",
- "status": "pending_approval",
- "approvedAt": "2019-08-24T14:15:22Z",
- "fundedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "invoice": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string",
- "externalId": "string"
}
}
]
}
]
The batches returned may include payments and credits that could be
rejected
or voided
. This is by design. If you are synchronizing with
an ERP, it is most likely safe to discard the rejected
payments or
credits. When payments or credits are voided
, this can happen for a
variety of reasons.
The payment provider can not process that payment due to an error.
The vendor attached to that payment is missing required information or
is no longer valid.
A stop payment was issued outside of Vic and support has had to go
remediate.
By no means is this list exhaustive and if you have questions, please
reach out to support.
id required | string The ID of the payment batch. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "companyId": "string",
- "processedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "approvedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "status": "pending_approval",
- "payments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "1.00",
- "settlementAmount": "1.00",
- "discountAmount": "1.00",
- "currencyId": "USD",
- "settlementCurrencyId": "USD",
- "exchangeRate": "1.00",
- "status": "pending_approval",
- "approvedAt": "2019-08-24T14:15:22Z",
- "fundedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "invoice": {
- "internalId": "string",
- "externalId": "string"
}, - "costAccount": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string",
- "externalId": "string"
}
}
], - "credits": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "1.00",
- "settlementAmount": "1.00",
- "currencyId": "USD",
- "settlementCurrencyId": "USD",
- "exchangeRate": "1.00",
- "status": "pending_approval",
- "approvedAt": "2019-08-24T14:15:22Z",
- "fundedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "invoice": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string",
- "externalId": "string"
}
}
]
}
Payment terms are part of your ERP Masterdata, and represent payment terms that Vic.ai can automatically assign to invoices. Some vendors may have a default payment term, and some invoices may have a specific payment term. In either case, Vic.ai can automatically assign payment terms to invoices.
Create a new payment term.
Create a payment term.
required | string or null |
daysToPay required | integer >= 1 The number of days the invoice should be paid in. |
string or null | |
integer or null | |
string or null |
{- "name": "string",
- "daysToPay": 1,
- "description": "string",
- "discountDays": 0,
- "discountPercentage": "string"
}
{- "id": "string",
- "name": "string",
- "daysToPay": 1,
- "description": "string",
- "discountDays": 0,
- "discountPercentage": "string"
}
Update a payment term.
id required | string The id of the payment term |
Update a payment term.
required | string or null |
daysToPay required | integer >= 1 The number of days the invoice should be paid in. |
string or null | |
integer or null | |
string or null |
{- "name": "string",
- "daysToPay": 1,
- "description": "string",
- "discountDays": 0,
- "discountPercentage": "string"
}
{- "id": "string",
- "name": "string",
- "daysToPay": 1,
- "description": "string",
- "discountDays": 0,
- "discountPercentage": "string"
}
List purchase orders.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
upto | string <date-time> Datetime value for decremental updates. |
status | string (PurchaseOrderStatus) Default: "open" Enum: "open" "closed" selects the status of purchase orders which are to be searched |
[- {
- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
]
Creates a purchase order in the Vic.ai system.
You are responsible for setting the amount
on the purchase order which is the
summation of all the purchase order line items.
Once the purchase order has been created and all manipulations are finished, you
must call the processPurchaseOrder
operation.
Optionally, to set a requestor, you can pass a requestor
object with email
or name
.
Optionally, to set a site owner, you can pass a siteOwner
object with email
or name
.
Create a purchase order.
PurchaseOrderExternalId (string) or null | |
required | string or null |
poNumber required | string <= 255 characters The purchase order number. This is used to match against invoices. |
string or null | |
amount required | string <decimal> (MonetaryValue) The monetary value as a string. A float should not be used. The api will accept a float and it will be transformed into a monetary value, but for best results please use a string with the proper decimal precision. |
Currency (string) The currency that the purchase order uses. | |
string or null The description of the purchase order. | |
PurchaseOrderRequestor (object) or null | |
PurchaseOrderSiteOwner (object) or null | |
string or null When the purchase order was created. | |
required | (VendorLookup (VendorLookupByInternalId (object) or VendorLookupByExternalId (object) or VendorLookupByName (object) or VendorLookupByOrgNumberAndBankAccount (object) or VendorLookupByOrgNumber (object))) The vendor of the purchase order. |
required | Array of objects (CreatePurchaseOrderItem) |
{- "externalId": "string",
- "issuedOn": "2019-08-24",
- "poNumber": "12003400",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "description": "string",
- "requestor": {
- "email": "user@example.com",
- "name": "string"
}, - "siteOwner": {
- "email": "user@example.com",
- "name": "string"
}, - "createdOn": "2019-08-24",
- "vendor": {
- "internalId": "string"
}, - "lineItems": [
- {
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityReceived": "12.3",
- "quantityRequested": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
]
}
]
}
{- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
Get a purchase order.
purchaseOrderId required | string The internal id of the purchase order. |
{- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
Update a purchase order.
Once finished updating the purchase order you should also also call
processPurchaseOrder
to kick off reprocessing purchase order matching.
purchaseOrderId required | string The id of the purchase order. |
Create a purchase order.
PurchaseOrderExternalId (string) or null | |
string or null When the purchase order was issued. | |
poNumber required | string <= 255 characters The purchase order number. This is used to match against invoices. |
string or null | |
amount required | string <decimal> (MonetaryValue) The monetary value as a string. A float should not be used. The api will accept a float and it will be transformed into a monetary value, but for best results please use a string with the proper decimal precision. |
Currency (string) The currency that the purchase order uses. | |
string or null The description of the purchase order. | |
PurchaseOrderRequestor (object) or null | |
PurchaseOrderSiteOwner (object) or null | |
string or null When the purchase order was created. | |
required | (VendorLookup (VendorLookupByInternalId (object) or VendorLookupByExternalId (object) or VendorLookupByName (object) or VendorLookupByOrgNumberAndBankAccount (object) or VendorLookupByOrgNumber (object))) The vendor of the purchase order. |
{- "externalId": "string",
- "issuedOn": "2019-08-24",
- "poNumber": "12003400",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "description": "string",
- "requestor": {
- "email": "user@example.com",
- "name": "string"
}, - "siteOwner": {
- "email": "user@example.com",
- "name": "string"
}, - "createdOn": "2019-08-24",
- "vendor": {
- "internalId": "string"
}
}
{- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
Delete a purchase order.
Once finished updating the purchase order you should also also call
processPurchaseOrder
to kick off reprocessing purchase order matching.
purchaseOrderId required | string The internal id of the purchase order. |
{- "code": 100,
- "message": "string"
}
When the purchase order modifications are completed use this operation to let Vic know that it is ready to be processed. Once a purchase order is being processed, it can not be modified until completed.
purchaseOrderId required | string The internal id of the purchase order. |
{- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
Closes a purchase order.
purchaseOrderId required | string The internal id of the purchase order. |
{- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
Opens a purchase order.
purchaseOrderId required | string The internal id of the purchase order. |
{- "internalId": "string",
- "externalId": "string",
- "vendor": {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}, - "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "issuedOn": "2019-08-24",
- "poNumber": "string",
- "deliverOn": "2019-08-24",
- "amount": "1.00",
- "currencyId": "USD",
- "status": "open",
- "description": "string",
- "lineItems": [
- {
- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
]
}
Create a purchase order's line item.
Caution should be taken when creating a new line item in a purchase order. Each purchase order line item must have a line number and it must be unique among the other line items. It should be a non negative value.
Note: This action will change purchase order status
from closed
to open
,
if the purchase order is closed
.
After creating the new purchase order line item, you must update the the
purchase order's amount
field. This should be done once you are finished
manipulating all of the line items.
Once you are finished manipulating the purchase order you will need to call
the processPurchaseOrder
operation to kick off the matching process based on
the updated information.
Create a purchase order line item.
purchaseOrderId required | string The ID of the purchase order to attach this line item to. |
required | string or null |
string or null | |
UnitOfMeasure (string) or null | |
quantityAccepted | string <decimal> The quantity accepted. Required when |
quantityReceived | string <decimal> The quantity received. Required when |
quantityRequested required | string <decimal> The quantity requested. Required for all |
matchingType | string (PurchaseOrderLineItemMatchingType) Enum: "TWO_WAY" "THREE_WAY" "FOUR_WAY" The type of matching that should be done on the line item. Determines which quantity fields are required.
|
unitAmount required | string <decimal> (MonetaryValue) The monetary value as a string. A float should not be used. The api will accept a float and it will be transformed into a monetary value, but for best results please use a string with the proper decimal precision. |
lineItemTotal required | string <decimal> (MonetaryValue) The monetary value as a string. A float should not be used. The api will accept a float and it will be transformed into a monetary value, but for best results please use a string with the proper decimal precision. |
lineNumber required | integer >= 1 |
Array of objects (DimensionRef) |
{- "purchaseOrderId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityReceived": "12.3",
- "quantityRequested": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
]
}
{- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
Updates a purchase order's line item.
If there are existing matches made to an invoice that has been posted, you will not be able to update the purchase order line item.
If you update lineItemTotal
you must update the purchase order's amount
field which is the summation of all the line items. This should be done once you
are finished manipulating all of the line items.
Once you are finished manipulating the purchase order you will need to call
the processPurchaseOrder
operation to kick off the matching process based on
the updated information.
purchaseOrderLineItemId required | string The id of the purchase order line item. |
Update a purchase order line item.
required | string or null |
string or null | |
UnitOfMeasure (string) or null | |
quantityAccepted | string <decimal> The quantity accepted. Required when |
quantityReceived | string <decimal> The quantity received. Required when |
quantityRequested required | string <decimal> The quantity requested. Required for all |
matchingType | string (PurchaseOrderLineItemMatchingType) Enum: "TWO_WAY" "THREE_WAY" "FOUR_WAY" The type of matching that should be done on the line item. Determines which quantity fields are required.
|
unitAmount required | string <decimal> (MonetaryValue) The monetary value as a string. A float should not be used. The api will accept a float and it will be transformed into a monetary value, but for best results please use a string with the proper decimal precision. |
lineItemTotal required | string <decimal> (MonetaryValue) The monetary value as a string. A float should not be used. The api will accept a float and it will be transformed into a monetary value, but for best results please use a string with the proper decimal precision. |
lineNumber required | integer >= 1 |
Array of objects (DimensionRef) |
{- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityReceived": "12.3",
- "quantityRequested": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
]
}
{- "internalId": "string",
- "productNumber": "string",
- "productDescription": "string",
- "unitOfMeasure": "kg",
- "quantityAccepted": "1.0",
- "quantityRequested": "1.0",
- "quantityReceived": "1.0",
- "matchingType": "TWO_WAY",
- "unitAmount": "1.00",
- "lineItemTotal": "1.00",
- "lineNumber": 1,
- "dimensions": [
- {
- "internalId": "string",
- "externalId": "string",
- "name": "string",
- "typeExternalId": "string"
}
], - "invoiceItemsMatched": [
- {
- "invoiceItemId": "string",
- "purchaseOrderItemId": "string",
- "quantityMatched": "string"
}
]
}
Delete a purchase order's line item.
If there are existing matches made to an invoice that has been posted, you will not be able to delete the purchase order line item.
After deleting the purchase order line item, you must update the the
purchase order's amount
field. This should be done once you are finished
manipulating all of the line items.
Once you are finished manipulating the purchase order you will need to call
the processPurchaseOrder
operation to kick off the matching process based on
the updated information.
purchaseOrderLineItemId required | string The id of the purchase order line item. |
{- "code": 100,
- "message": "string"
}
Tags are part of your ERP Masterdata, and represent business categories that are associated with certain entities, like Vendor.
Get a list of tags.
Tags are used to categorize entities. Currently the only entity that is
taggable are Vendors using the /vendorTags
endpoint. These are not the
tags that are used to describe a group of companies.
[- {
- "id": "string",
- "value": "string"
}
]
Create a new tag.
Create a tag.
value required | string <= 255 characters |
{- "value": "string"
}
{- "id": "string",
- "value": "string"
}
Update a tag.
id required | string The id of the tag |
Update a tag.
value required | string <= 255 characters |
{- "value": "string"
}
{- "id": "string",
- "value": "string"
}
Delete a tag. If you delete a tag, any entities that the tags is attached to will be deleted as well. This action can not be undone.
id required | string The id of the tag |
{- "code": 100,
- "message": "string"
}
Creates a company's tax code
Create a tax code.
code required | string <= 255 characters |
description required | string <= 255 characters |
rate required | string <decimal> |
{- "code": "string",
- "description": "Tax code description",
- "rate": "0.25"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "Tax code description",
- "rate": "0.25"
}
In some regions, VAT codes are part of your ERP Masterdata, that represent timeboxed VAT codes and VAT values that Vic.ai can automatically assign to invoice line items.
Use this request to query all the VAT code data that are stored in Vic.ai.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
sortOrder | string Default: "ASCENDING" Enum: "ASCENDING" "DESCENDING" what sort order should be used for queries |
vatCode | string selects the VAT code which is to be displayed |
[- {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "code": "string",
- "description": "string",
- "activeStartingAt": "2019-08-24T14:15:22Z",
- "activeEndingAt": "2019-08-24T14:15:22Z",
- "rate": 0,
- "remoteData": { },
- "defaultInvoiceCreditAccount": "string",
- "vatCreditAccount": "string",
- "vatDebitAccount": "string"
}
]
Use this request to get data for a single VAT code that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "code": "string",
- "description": "string",
- "activeStartingAt": "2019-08-24T14:15:22Z",
- "activeEndingAt": "2019-08-24T14:15:22Z",
- "rate": 0,
- "remoteData": { },
- "defaultInvoiceCreditAccount": "string",
- "vatCreditAccount": "string",
- "vatDebitAccount": "string"
}
Use this request to upsert VAT code into Vic.ai. The request body should contain the VAT code object as JSON. If the VAT code is known by Vic.ai, the id supplied will be used to resolve the VAT code and perform an update of the data, otherwise, a new VAT code will be inserted.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
code | string <= 255 characters |
description | string <= 255 characters |
externalId | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> The date time when the invoice was updated in the ERP system. This does not have UTC normalization. |
activeStartingAt | string <date-time> |
activeEndingAt | string <date-time> |
rate | number |
remoteData | object |
defaultInvoiceCreditAccount | string <= 255 characters |
vatCreditAccount | string <= 255 characters |
vatDebitAccount | string <= 255 characters |
{- "code": "string",
- "description": "string",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "activeStartingAt": "2019-08-24T14:15:22Z",
- "activeEndingAt": "2019-08-24T14:15:22Z",
- "rate": 0,
- "remoteData": { },
- "defaultInvoiceCreditAccount": "string",
- "vatCreditAccount": "string",
- "vatDebitAccount": "string"
}
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "code": "string",
- "description": "string",
- "activeStartingAt": "2019-08-24T14:15:22Z",
- "activeEndingAt": "2019-08-24T14:15:22Z",
- "rate": 0,
- "remoteData": { },
- "defaultInvoiceCreditAccount": "string",
- "vatCreditAccount": "string",
- "vatDebitAccount": "string"
}
Use this request to delete data for a single VAT code that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "code": "string",
- "description": "string",
- "activeStartingAt": "2019-08-24T14:15:22Z",
- "activeEndingAt": "2019-08-24T14:15:22Z",
- "rate": 0,
- "remoteData": { },
- "defaultInvoiceCreditAccount": "string",
- "vatCreditAccount": "string",
- "vatDebitAccount": "string"
}
Vendors are part of your ERP Masterdata, and represent companies that produce invoices. In order to be associated with an invoice, key data about the vendor must be stored in Vic.ai. These operations allow querying and manipulation of the vendor data.
Use this request to get data for a single vendor that is stored in Vic.ai.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
Updates or inserts a vendor into the Vic.ai system.
All fields passed are set on the vendor. All fields that are omitted
from the request body are considered to be null and will be set to null.
If the vendor is known by Vic.ai, the externalId
supplied will be used
to resolve the vendor and perform an update of the data, otherwise, a
new vendor will be inserted.
If the upsert action is part of a syncRequest
, you should include the
syncRequest
ID in the X-Request-Id
header.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
X-Request-Id | string <uuid> token to be able to correctly log associated requests |
externalId | string (ExternalId) <= 255 characters The external id set by the ERP system. It does not have to be a UUID and can be any non empty string desired. |
externalUpdatedAt required | string <date-time> The date time when the invoice was updated in the ERP system. This does not have UTC normalization. |
name | string <= 255 characters |
Email (string) or null | |
string or null | |
string or null | |
string or null | |
string or null | |
string or null | |
CountryCode (string) or null | |
currency | string <ISO-4217> (Currency) <= 3 characters The ISO-4217 currency code. |
string or null | |
state | string (VendorState) Enum: "CONFIRMED" "UNCONFIRMED" |
object (VendorTaxInfo) | |
object (PaymentInfo) | |
string or null The id of the | |
string or null The | |
ExternalData (object) or null | |
Array of objects (VendorManager) | |
Array of objects (VendorRemoteError) The errors that occurred in the external ERP system. |
{- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "managers": [
- {
- "email": "user@example.com",
- "name": "string"
}
], - "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
Use this request to delete data for a single vendor that is stored in Vic.ai
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
Use this post to report vendor update failure errors back to Vic.ai. Strictly a response to the callbacks.
X-Request-Id
header is required.id
MUST be a Vendor internalId
.id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
X-Request-Id | string <uuid> token to be able to correctly log associated requests |
required | Array of objects (VendorRemoteError) |
{- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
Used to clear errors that have been fixed in the ERP system.
id required | string The id of the database entry |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
X-Request-Id | string <uuid> token to be able to correctly log associated requests |
{- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
Vendors can be grouped together in Vic.ai. This is especially useful for purchase order matching where you want to match a purchase order to a group of vendors.
Use this request to query the vendor data that are stored in Vic.ai.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
since | string <date-time> Datetime value for incremental updates.
NOTE: For external datetimes, the expected format is not in UTC. for
vic-internal datetimes (see |
confirmed | boolean Default: true selects if confirmed vendors are to be displayed. |
unconfirmed | boolean Default: true selects if unconfirmed vendors are to be displayed. |
useSystem | string Default: "EXTERNAL" Enum: "INTERNAL" "EXTERNAL" "internal" "external" Which system to use for id or updatedAt filters. |
sortOrder | string Default: "ASCENDING" Enum: "ASCENDING" "DESCENDING" what sort order should be used for queries |
state | string (VendorStateFilter) Enum: "ACTIVE" "PENDING" "PREDICTED" "ERRORED" Filter vendors by state.
|
[- {
- "internalId": "47",
- "internalUpdatedAt": "2019-08-24T14:15:22Z",
- "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
- "externalUpdatedAt": "2021-06-29T17:20:53.154",
- "name": "string",
- "email": "user@example.com",
- "description": "string",
- "phone": "string",
- "addressStreet": "string",
- "addressCity": "string",
- "addressState": "string",
- "addressPostalCode": "string",
- "countryCode": "US",
- "currency": "USD",
- "confirmedAt": "2019-08-24T14:15:22Z",
- "state": "CONFIRMED",
- "taxInfo": {
- "taxId": "string",
- "is1099vendor": true,
- "orgNumber": "string"
}, - "defaultPaymentInfo": {
- "bankAccountNum": "string",
- "bankCode": "string",
- "paymentTerm": {
- "count": 1,
- "unit": "DAYS"
}, - "bankGiro": "string",
- "plusGiro": "string",
- "bban": "string",
- "internationalBankAccount": {
- "iban": "string",
- "bic": "string"
}, - "defaultMethod": "BANKACCOUNT"
}, - "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
- "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
- "externalData": { },
- "errors": [
- {
- "message": "string",
- "field": "string"
}
]
}
]
List all vendor groups.
limit | integer [ 1 .. 100 ] How many items to return at one time (max 100) (default 100) |
cursor | string Which item to start from. See Pagination for more information. |
[- {
- "id": "string",
- "name": "string"
}
]
Create a vendor group.
Create a vendor group.
name required | string The name of the vendor group |
{- "name": "string"
}
{- "id": "string",
- "name": "string"
}
Update the vendor group.
id required | string <uuid> The id of the vendor group |
Update a vendor group.
name required | string The name of the vendor group |
{- "name": "string"
}
{- "id": "string",
- "name": "string"
}
You can subscribe to all events in the Vic API system or a subset of the events. At the moment, each company may only have one subscription specified.
To create or update a subscription with the Vic API, you can pass the following.
curl --request PUT \
--url http://api.us.vic.ai/v0/subscription \
--header 'Authorization: Bearer MYBEARERTOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"callbackUrl": "https://yourCallbackUrl",
"accessToken": "unique-token-per-client",
"expiresAt": "2024-01-01T00:00:00Z"
}'
If you wish to only subscribe to specific events you may pass an array of event names.
curl --request PUT \
--url http://api.us.vic.ai/v0/subscription \
--header 'Authorization: Bearer MYBEARERTOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"callbackUrl": "https://yourCallbackUrl",
"accessToken": "unique-token-per-client",
"expiresAt": "2024-01-01T00:00:00Z",
"events": ["payment_batch_processed"]
}'
If you need to update your subscription to receive all events after trimming it
down, you may pass "events":["all"]
. When passing all
, it must be set by
itself.
curl --request PUT \
--url http://api.us.vic.ai/v0/subscription \
--header 'Authorization: Bearer MYBEARERTOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"callbackUrl": "https://yourCallbackUrl",
"accessToken": "unique-token-per-client",
"expiresAt": "2024-01-01T00:00:00Z",
"events": ["all"]
}'
You can delete a subscription by doing the following. Once the subscription is deleted, events will stop going to the callback url.
curl --request DELETE \
--url http://api.us.vic.ai/v0/subscription \
--header 'Authorization: Bearer MYBEARERTOKEN'
These are the V1
events you can subscribe to. These will be sent as a POST
to https://yourCallbackUrl/events
.
all
- This is a special form, that specifies that you want all events sent
to your webhook.payment_batch_processed
The following V0
events may be specified. They will be sent to the original
callback paths where the event name was in the path.
vendorNew
- POST
https://yourCallbackUrl/vendorNew
invoicePost
- POST
https://yourCallbackUrl/invoicePost
invoiceTransfer
- POST
https://yourCallbackUrl/invoiceTransfer
syncRequest
- POST
https://yourCallbackUrl/syncRequest
The newer webhook endpoints will be sent to https://yourCallbackUrl/events
.
The receiver is expected to handle everything asynchronously via this method. We
do not parse parse the response body and will ignore it.
2XX
responses will be treated as successful.401
and 403
responses will be treated as failures and be retried with an
exponential backoff. Once the retries have been exhausted, the event is
discarded.4XX
responses will be treated as successful. If something is to be
rejected, you will need to make the appropriate calls to the Vic API to
complete the asynchronous handshake. Example: confirming or rejecting an
invoice post.5XX
responses will be treated as a failure and will be retried with an
exponential backoff. Once the retries have been exhausted, the event is
discarded.NOTE: The integrating system has 15 seconds to respond. After the time has passed it will be considered a failure, and a retry will be sent for events going to
https://yourCallbackUrl/events
.
The general structure of the webhook event will be as follows.
{
"event": "the_event_name",
"data": {
"id": "123",
"something": "value"
}
}
There will be a top level field event
that describes what the type of event
is. There will also be a data
envelope that will contain the data for the
event.
This event is emitted from the Vic system when a batch of payments has been sent
to the payment processor and a successful response has been obtained. The
payload for this event matches almost exactly what you will receive in the
getPaymentBatch
operation.
Only approved credits and payments will be emitted with the event. Voided and
rejected payments will not be sent. If you need these values, you should call
getPaymentBatch
in order to fetch them.
Here is an example of an $200 invoice being paid in full with a $20 credit note being applied. This will bring the total batch payment to $180. The credit note applied is not subtracted from the payment in this breakdown because ERPs typically need entries of the payment being applied and the credit note being used in conjunction with that credit note.
{
"event": "payment_batch_processed",
"data": {
"id": "f1c2384f-57d8-41fe-afa6-17caf62b2a3f",
"name": "Batch 2023-10-01 001",
"processedAt": "2023-10-01T19:12:00Z",
"approvedAt": "2023-10-01T19:12:00Z",
"rejectedAt": null,
"voidedAt": null,
"status": "approved",
"companyId": "123",
"payments": [
{
"id": "edb3a624-9f12-4cd8-adb8-4d9a5ec0b48b",
"amount": "200.00",
"settlementAmount": "200.00",
"settlementCurrencyId": "USD",
"exchangeRate": "1.0",
"discountAmount": "0.00",
"currencyId": "USD",
"status": "approved",
"voidedAt": null,
"rejectedAt": null,
"approvedAt": "2023-10-01T19:12:00Z",
"fundedAt": null,
"costAccount": {
"internalId": "1",
"externalId": "cost-account-id-in-erp",
},
"invoice": {
"internalId": "876",
"externalId": "invoice-id-in-erp"
},
"vendor": {
"internalId": "409",
"externalId": "vendor-id-in-erp"
},
}
],
"credits": [
{
"id": "091f257a-9b6e-4797-bcb6-ccd36dda260f",
"amount": "20.00",
"settlementAmount": "20.00",
"settlementCurrencyId": "USD",
"exchangeRate": "1.0",
"discountAmount": "0.00",
"currencyId": "USD",
"status": "approved",
"voidedAt": null,
"rejectedAt": null,
"approvedAt": "2023-10-01T19:12:00Z",
"fundedAt": null,
"invoice": {
"internalId": "900",
"externalId": "credit-note-id-in-erp"
},
"vendor": {
"internalId": "409",
"externalId": "vendor-id-in-erp"
},
}
]
}
}
This request is used to configure or modify a new subscription to user and automated actions. You must supply a callback url and set an access token that Vic.ai can use to authenticate itself in your system. Notifications of user actions will proceed via the documented schema. The callback url must be https.
callbackUrl required | string <uri> |
accessToken required | string <= 1024 characters |
expiresAt required | string <date-time> |
Array of WebhookEventName (strings) or null The list of events to subscribe to. If you wish to subscribe to all
events simply pass |
{- "accessToken": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "events": [
- "all"
]
}
{- "accessToken": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "events": [
- "all"
]
}
{- "event": "all",
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "companyId": "string",
- "processedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "approvedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "status": "pending_approval",
- "payments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "1.00",
- "settlementAmount": "1.00",
- "discountAmount": "1.00",
- "currencyId": "USD",
- "settlementCurrencyId": "USD",
- "exchangeRate": "1.00",
- "status": "pending_approval",
- "approvedAt": "2019-08-24T14:15:22Z",
- "fundedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "invoice": {
- "internalId": "string",
- "externalId": "string"
}, - "costAccount": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string",
- "externalId": "string"
}
}
], - "credits": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "1.00",
- "settlementAmount": "1.00",
- "currencyId": "USD",
- "settlementCurrencyId": "USD",
- "exchangeRate": "1.00",
- "status": "pending_approval",
- "approvedAt": "2019-08-24T14:15:22Z",
- "fundedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "voidedAt": "2019-08-24T14:15:22Z",
- "invoice": {
- "internalId": "string",
- "externalId": "string"
}, - "vendor": {
- "internalId": "string",
- "externalId": "string"
}
}
]
}
}
This request is used to cancel a subscription to user actions. In conjunction with a post reqeust, you may use this as a first step to update subscription URLs or authorization tokens.
"OK"