Vic.ai API (v7.27.8)

Download OpenAPI specification:Download

Introduction

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

For integrations based in Norway, use the following base API URL:

https://api.no.vic.ai

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"

Getting Started

To begin interacting with the Vic.ai API, you will need the following credentials:

  • A Vic.ai client ID
  • A Vic.ai client secret.

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.

Authentication

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"}

Obtain an access token

Use this endpoint to obtain an access token that can be used to authenticate subsequent requests to the API.

Request Body schema: application/json
required
client_id
required
string
client_secret
required
string

Responses

Request samples

Content type
application/json
{
  • "client_id": "string",
  • "client_secret": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "Bearer",
  • "expires_in": 0
}

Pagination

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" \

Accounts

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.

List all accounts

Use this request to query the GL account data that are stored in Vic.ai.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Synchronize Accounts

Tells the ERP to synchronize the Account resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Info for a specific account

Use this request to get data for a single GL account that is stored in Vic.ai.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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": { }
}

Upserts an account

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

header Parameters
X-Request-Id
string <uuid>

token to be able to correctly log associated requests

Request Body schema: application/json
required
ExternalId (string) or null
externalUpdatedAt
required
string <date-time>

Does not have UTC normalization.

number
required
string <number>
name
required
string <= 255 characters
ExternalData (object) or null

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "externalUpdatedAt": "2021-06-29T17:20:53.154",
  • "number": "string",
  • "name": "string",
  • "externalData": { }
}

Response samples

Content type
application/json
{
  • "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": { }
}

Deletes an account

Use this request to delete data for a single account that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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": { }
}

Attachments

Attachments are original invoice documents that can be processed by Vic.ai.

Supported content types

  • 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 EDI formats:

PEPPOL BIS Billing v3

Supported embedded attachment MIME codes:

  • application/pdf
  • image/jpeg
  • image/png
  • image/tiff

The API will ignore other attachment types.

Upload an attachment

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.

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "47"
}

Companies

The companies in the Vic system.

Search and list companies accessible

Search and list companies accessible.

Authorizations:
BearerAuth
query Parameters
name_contains
string

List companies with names containing the value provided. This is a case insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Get a company

Get a company.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

List or search for users attached to the company

List or search for users attached to the company

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

query Parameters
name
string

The name of the user. This is a case-insensitive match.

name_contains
string

The name of the user contains the value specified. This is a case-insensitive match.

email
string

The user has the email address. This is a case-insensitive match.

email_contains
string

The email of the user contains the value specified. This is a case-insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create and attach user to company

Create and attach a user to a company. If the user already exists, use the attachUserToCompanyV2 (POST /v2/companies/{company_id}/users/attach) operation instead.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

Request Body schema: application/json

Create a user and attach it to a company.

first_name
string

The first name of the user.

last_name
string

The last name of the user.

name
required
string

The full preferred name of the user.

phone_number
string

The phone number the user is connected with. This is not required to be set. If provided, the phone number is validated.

email
required
string

The User's email. Must be unique.

timezone
string (TimeZoneV2)
language
string (LanguageV2)

The two letter code for the language used.

object (UserAddressV2)
Array of objects (UserMetadataEntryV2)
date_of_birth
string <date>

When the user was born.

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "name": "string",
  • "phone_number": "string",
  • "email": "string",
  • "timezone": "Etc/UTC",
  • "language": "en",
  • "address": {
    },
  • "metadata": [
    ],
  • "date_of_birth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "company_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Attach an existing user to a company

Attaches an existing user to a company. You may provide the user_id or email. If the user does not exist, you will need to use the createCompanyUserV2 operation.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

Request Body schema: application/json

Attach an existing user to a company.

user_id
string <uuid>

The User's id. Both can be provided. user_id takes higer precedence than email.

email
string

The existing User's email. Both can be provided. user_id takes higer precedence than email.

Responses

Request samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "company_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Remove user from company

Removes the user from the company. This does not remove them from the organization, even when the user is not attached to any companies within the organization.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

user_id
required
string <uuid>

The ID of the user.

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Dimensions

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.

List all dimensions

Use this request to query the dimensions data that are stored in Vic.ai.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a dimension

Create a new dimension in Vic.ai.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Create a dimension.

ExternalId (string) or null
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.

ExternalId (string) or null

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

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "externalUpdatedAt": "2021-06-29T17:20:53.154",
  • "name": "string",
  • "type": "string",
  • "typeName": "string",
  • "typeExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "shortName": "string",
  • "externalData": { }
}

Response samples

Content type
application/json
{
  • "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"
}

Synchronize Dimensions

Tells the ERP to synchronize the Dimension resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Info for a specific dimension

Use this request to get data for a single dimension that is stored in Vic.ai.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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"
}

Upserts a dimension

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

header Parameters
X-Request-Id
string <uuid>

token to be able to correctly log associated requests

Request Body schema: application/json
required
ExternalId (string) or null
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.

ExternalId (string) or null

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

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "externalUpdatedAt": "2021-06-29T17:20:53.154",
  • "name": "string",
  • "type": "string",
  • "typeName": "string",
  • "typeExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "shortName": "string",
  • "externalData": { }
}

Response samples

Content type
application/json
{
  • "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"
}

Deletes a dimension

Use this request to delete data for a single dimension that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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"
}

Invoices

These routes give you read-only access to two types of invoices:

  • Invoices which have not yet been posted to the ERP system (restricted access).
  • Invoices which have been posted to the ERP system.

List all invoices

Use this request to query the invoice data that are stored in Vic.ai.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

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 POSTED)

InvoiceMarkedAs (string) or any

selects the marked as of invoices which are to be searched (defaults to ALL)

InvoiceBillStatus (string) or any

selects the bill status of invoices as which are to be searched (defaults to ALL)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an invoice.

When creating an invoice, there are three steps to follow:

  1. Create the invoice with a POST to /invoices
  2. Upload the document with a POST to /invoice/{id}/document
  3. Process the document with a POST to /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.

Authorizations:
BearerAuth
Request Body schema: application/json
required
ExternalId (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 null here.

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)

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "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": {
    },
  • "paymentTerm": {
    },
  • "creditAccount": {
    },
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "bolNumbers": [
    ],
  • "fields": [
    ]
}

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

Info for a specific invoice

Use this request to get data for a single invoice that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

Asynchronous reply to invoice post or invoice transfer

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: 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).
  • InvoiceReject: 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. Currently unsupported:
  • InvoiceClearError: the error set in an 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.
Authorizations:
BearerAuth
path Parameters
id
required
string

The internalId of the invoice which should be confirmed.

Request Body schema: application/json
required
One of
required
ExternalId (string) or null
externalUpdatedAt
required
string <date-time>
postingError
string

Responses

Request samples

Content type
application/json
Example
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "postingError": "string"
}

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

Deletes an invoice

Use this request to delete data for a single invoice that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Start the invoice processing.

Tells Vic that the invoice is ready to start being processed. Once this is called, it may not be called again.

Authorizations:
BearerAuth
path Parameters
id
required
string

The Invoice internal id or external id.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

Document for a specific invoice

Use this request to get the document associated with a single invoice that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The Invoice internal id or external id.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Upload document invoice

This attaches a document to the invoice for processing. An external id must be specified for an invoice prior to calling this.

  • Once an invoice has been processed, you may not attach a new document.
  • Once a document has been attached to an invoice, it may not be changed. NOTE: The maximum file size allowed is 64MB.
Authorizations:
BearerAuth
path Parameters
id
required
string

The Invoice internal id or external id.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Request Body schema: multipart/form-data
required
document
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

Asynchronous reply to invoice post or invoice transfer

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The internalId of the invoice which should be confirmed.

Request Body schema: application/json
required
required
ExternalId (string) or null
externalUpdatedAt
required
string <date-time>
postingError
string

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "postingError": "string"
}

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

Asynchronous reply to invoice post

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The internalId of the invoice which should be confirmed.

Request Body schema: application/json
required
required
integer or null
required
string or null
reason
required
string

Responses

Request samples

Content type
application/json
{
  • "item": 0,
  • "field": "string",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "totalAmount": "1.00",
  • "amountWithoutTax": "1.00",
  • "amountTax": "1.00",
  • "transactionType": "INVOICE",
  • "refNumber": "string",
  • "poNumber": "string",
  • "description": "string",
  • "currency": "USD",
  • "customFields": [
    ],
  • "fields": [
    ],
  • "language": "en",
  • "issueDate": "2019-08-24",
  • "glDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "paymentInfo": {
    },
  • "invoiceInfo": {
    },
  • "source": "Millum",
  • "internalId": "string",
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "paymentTerm": {
    },
  • "paymentRef": "string",
  • "vendorInternalId": "47",
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "postingError": "string",
  • "documentUrl": "string",
  • "status": "NOT_READY",
  • "bolNumbers": [
    ],
  • "selfAssessedUseTaxAmount": "1.00",
  • "selfAssessedUseTaxAccount": "string",
  • "markedAs": "PAID",
  • "billStatus": "PAID"
}

line items for a specific invoice

List all of the line items for the invoice. NOTE: They are ungrouped so that you may inspect and modify them as necessary.

Authorizations:
BearerAuth
path Parameters
id
required
string

The Invoice internal id or external id.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Invoices For Training

Invoices used for training AI models.

List all training invoices

Use this request to query the training invoice data that are stored in Vic.ai.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

sortOrder
string
Default: "ASCENDING"
Enum: "ASCENDING" "DESCENDING"

what sort order should be used for queries

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Info for a specific training invoice

Use this request to get data for a single training invoice that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "invoiceInfo": {
    },
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "lineItems": [
    ],
  • "externalData": { },
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "bolNumbers": [
    ],
  • "fields": [
    ]
}

Upserts a training invoice

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.

  • The line items passed will be set as the desired state of the invoice.
  • Empty list of line items will cause all line items to be deleted.
  • Existing line items passed will be matched as best as possible. If they can not be matched they will be deleted and replaced with the desired items.
Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

Request Body schema: multipart/form-data
required
required
object (TrainingInvoiceUpsert)
invoiceDocument
string <binary>

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "invoiceInfo": {
    },
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "lineItems": [
    ],
  • "externalData": { },
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "bolNumbers": [
    ],
  • "fields": [
    ]
}

Deletes a training invoice

Use this request to delete data for a single training invoice that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "invoiceInfo": {
    },
  • "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "lineItems": [
    ],
  • "externalData": { },
  • "externalUpdatedAt": "2019-08-24T14:15:22Z",
  • "bolNumbers": [
    ],
  • "fields": [
    ]
}

Document for a specific training invoice

Use this request to get the document associated with a training invoice that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Organizations

Organizations within the Vic system. The old name for this resource is Account Firm. We are transitioning to the name of Organization.

Search and list organizations accessible

Search and list organizations accessible.

Authorizations:
BearerAuth
query Parameters
name_contains
string

List organizations with names containing the value provided. This is a case insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Get an organization

Get an organization.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the Organization.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

List users attached to an organization

List users attached to an organization.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the Organization.

query Parameters
name
string

The name of the user. This is a case-insensitive match.

name_contains
string

The name of the user contains the value specified. This is a case-insensitive match.

email
string

The user has the email address. This is a case-insensitive match.

email_contains
string

The email of the user contains the value specified. This is a case-insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create and attach user to an organization

Create and attach a user to an organization. If the user already exists, use the attachUserToOrganizationV2 (POST /v2/organizations/{organization_id}/users/attach) operation instead.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the organization.

Request Body schema: application/json

Create a user and attach it to an organization.

first_name
string

The first name of the user.

last_name
string

The last name of the user.

name
required
string

The full preferred name of the user.

phone_number
string

The phone number the user is connected with. This is not required to be set. If provided, the phone number is validated.

email
required
string

The User's email. Must be unique.

timezone
string (TimeZoneV2)
language
string (LanguageV2)

The two letter code for the language used.

object (UserAddressV2)
Array of objects (UserMetadataEntryV2)
date_of_birth
string <date>

When the user was born.

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "name": "string",
  • "phone_number": "string",
  • "email": "string",
  • "timezone": "Etc/UTC",
  • "language": "en",
  • "address": {
    },
  • "metadata": [
    ],
  • "date_of_birth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "organization_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Attach an existing user to an organization

Attaches an existing user to an organization. You may provide the user_id or email. If the user does not exist, you will need to use the createOrganizationUserV2 operation.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the organization.

Request Body schema: application/json

Attach an existing user to an organization.

user_id
string <uuid>

The User's id. Both can be provided. user_id takes higer precedence than email.

email
string

The existing User's email. Both can be provided. user_id takes higer precedence than email.

Responses

Request samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "organization_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Remove user from organization

Removes the user from the organization. NOTE: This will remove the user from ALL of the companies within the organization.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the organization.

user_id
required
string <uuid>

The ID of the user.

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Payment Batches

Payment batches are a collection of payments that are made to vendors.

List all payment batches

List all payment batches.

Authorizations:
BearerAuth
query Parameters
completedAtOrAfter
string <date-time>

Filter batches that were completed at or after the date time provided. This can be used in combination with completedAtOrBefore.

completedAtOrBefore
string <date-time>

Filter batches that were completed at or before the date time provided. This can be used in combination with completedAtOrAfter.

PaymentBatchStatus (string) or any

Selects the payment batches that match the status provided. When left unspecified, it is the same as if all was specified.

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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a payment batch

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The ID of the payment batch.

Responses

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "credits": [
    ]
}

Payment Terms

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.

Get a list of payment terms

Get a list of payment terms.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "daysToPay": 0,
  • "daysToPayCondition": "issue_date",
  • "description": "string",
  • "discountDays": 0,
  • "discountDaysCondition": "issue_date",
  • "discountPercentage": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238"
}

Create a new payment term

Create a new payment term.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Create a payment term.

required
string or null
daysToPay
required
integer >= 0

The number of days the invoice should be paid in.

PaymentTermCondition (string) or null
Default: "issue_date"

These options are used in conjunction with daysToPay to calculate the due date.

string or null
integer or null
PaymentTermCondition (string) or null
Default: "issue_date"

These options are used in conjunction with discountDays to calculate the discount date.

string or null
ExternalId (string) or null

The ID of the payment term in the ERP if it has one.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "daysToPay": 0,
  • "daysToPayCondition": "issue_date",
  • "description": "string",
  • "discountDays": 0,
  • "discountDaysCondition": "issue_date",
  • "discountPercentage": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "daysToPay": 0,
  • "daysToPayCondition": "issue_date",
  • "description": "string",
  • "discountDays": 0,
  • "discountDaysCondition": "issue_date",
  • "discountPercentage": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238"
}

Synchronize Payment Terms

Tells the ERP to synchronize the Payment Terms resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Get a payment term

Get a payment term. The id in the path can be either the Payment Term's internal ID or its external ID when useSystem=external is included in the query string.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "daysToPay": 0,
  • "daysToPayCondition": "issue_date",
  • "description": "string",
  • "discountDays": 0,
  • "discountDaysCondition": "issue_date",
  • "discountPercentage": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238"
}

Update a payment term

Update a payment term. The id in the path can be either the Payment Term's internal ID or its external ID when useSystem=external is included in the request. The Payment Term's external ID can be updated by including externalId={value} in the request body. If the externalId key is present without a value, the Payment Term's externalId WILL be cleared.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Request Body schema: application/json
required

Update a payment term.

required
string or null
daysToPay
required
integer >= 0

The number of days the invoice should be paid in.

PaymentTermCondition (string) or null
Default: "issue_date"

These options are used in conjunction with daysToPay to calculate the due date.

string or null
integer or null
PaymentTermCondition (string) or null
Default: "issue_date"

These options are used in conjunction with discountDays to calculate the discount date.

string or null
ExternalId (string) or null

The ID of the payment term in the ERP if it has one.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "daysToPay": 0,
  • "daysToPayCondition": "issue_date",
  • "description": "string",
  • "discountDays": 0,
  • "discountDaysCondition": "issue_date",
  • "discountPercentage": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "daysToPay": 0,
  • "daysToPayCondition": "issue_date",
  • "description": "string",
  • "discountDays": 0,
  • "discountDaysCondition": "issue_date",
  • "discountPercentage": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238"
}

Delete a payment term

Delete a payment term. The id in the path can be either the Payment Term's internal ID or its external ID when useSystem=external is included in the query string.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Purchase Orders

The purchase orders.

List purchase orders

List purchase orders.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a purchase order

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.

Authorizations:
BearerAuth
Request Body schema: application/json

Create a purchase order.

ExternalId (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)
PurchaseOrderType (string)
Default: "normal"

The type of the purchase order.

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "issuedOn": "2019-08-24",
  • "poNumber": "12003400",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "description": "string",
  • "requestor": {
    },
  • "siteOwner": {
    },
  • "createdOn": "2019-08-24",
  • "vendor": {
    },
  • "lineItems": [
    ],
  • "type": "normal"
}

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "issuedOn": "2019-08-24",
  • "poNumber": "string",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "status": "open",
  • "type": "blanket",
  • "description": "string",
  • "lineItems": [
    ]
}

Synchronize Purchase Orders

Tells the ERP to synchronize the Purchase Orders resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Get a purchase order

Get a purchase order.

Authorizations:
BearerAuth
path Parameters
purchaseOrderId
required
string

The internal id or external id of the purchase order. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "issuedOn": "2019-08-24",
  • "poNumber": "string",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "status": "open",
  • "type": "blanket",
  • "description": "string",
  • "lineItems": [
    ]
}

Update a purchase order

Update a purchase order. Once finished updating the purchase order you should also also call processPurchaseOrder to kick off reprocessing purchase order matching.

Authorizations:
BearerAuth
path Parameters
purchaseOrderId
required
string

The internal id or external id of the purchase order. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Request Body schema: application/json

Create a purchase order.

ExternalId (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.

PurchaseOrderType (string)

The type of the purchase order.

Responses

Request samples

Content type
application/json
{
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "issuedOn": "2019-08-24",
  • "poNumber": "12003400",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "description": "string",
  • "requestor": {
    },
  • "siteOwner": {
    },
  • "createdOn": "2019-08-24",
  • "vendor": {
    },
  • "type": "blanket"
}

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "issuedOn": "2019-08-24",
  • "poNumber": "string",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "status": "open",
  • "type": "blanket",
  • "description": "string",
  • "lineItems": [
    ]
}

Delete a purchase order

Delete a purchase order. Once finished updating the purchase order you should also also call processPurchaseOrder to kick off reprocessing purchase order matching.

Authorizations:
BearerAuth
path Parameters
purchaseOrderId
required
string

The internal id or external id of the purchase order. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Process the purchase order

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.

Authorizations:
BearerAuth
path Parameters
purchaseOrderId
required
string

The internal id or external id of the purchase order. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "issuedOn": "2019-08-24",
  • "poNumber": "string",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "status": "open",
  • "type": "blanket",
  • "description": "string",
  • "lineItems": [
    ]
}

Close a purchase order

Closes a purchase order.

Authorizations:
BearerAuth
path Parameters
purchaseOrderId
required
string

The internal id or external id of the purchase order. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "issuedOn": "2019-08-24",
  • "poNumber": "string",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "status": "open",
  • "type": "blanket",
  • "description": "string",
  • "lineItems": [
    ]
}

Opens a purchase order

Opens a purchase order.

Authorizations:
BearerAuth
path Parameters
purchaseOrderId
required
string

The internal id or external id of the purchase order. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "vendor": {
    },
  • "internalUpdatedAt": "2019-08-24T14:15:22Z",
  • "issuedOn": "2019-08-24",
  • "poNumber": "string",
  • "deliverOn": "2019-08-24",
  • "amount": "1.00",
  • "currencyId": "USD",
  • "status": "open",
  • "type": "blanket",
  • "description": "string",
  • "lineItems": [
    ]
}

Add a line item to a purchase order.

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.

Authorizations:
BearerAuth
Request Body schema: application/json

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 matchingType set to four_way.

quantityReceived
string <decimal>

The quantity received. Required when matchingType set to three_way (default) or four_way.

quantityRequested
required
string <decimal>

The quantity requested. Required for all matchingType values.

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. two_way - Only the quantityRequested field is required. three_way (default) - The quantityRequested and quantityReceived fields are required. four_way - The quantityRequested, quantityReceived, and quantityAccepted 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)
ExternalId (string) or null
status
string (PurchaseOrderLineItemStatus)
Enum: "open" "closed"

The status of the purchase order line item.

  • When status field is set to open, then its value is derived from the line item's remaining amount. If the line item's remaining amount is above 0, then it is considered open, otherwise it is considered closed.
  • When status is set to closed then the line item is considered closed, no matter the remaining amount.

Responses

Request samples

Content type
application/json
{
  • "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": [
    ],
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "status": "open"
}

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "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": [
    ],
  • "invoiceItemsMatched": [
    ],
  • "status": "open"
}

Update a purchase order's line item

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.

Authorizations:
BearerAuth
path Parameters
purchaseOrderLineItemId
required
string

The internal id or external id of the purchase order line item. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Request Body schema: application/json

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 matchingType set to four_way.

quantityReceived
string <decimal>

The quantity received. Required when matchingType set to three_way (default) or four_way.

quantityRequested
required
string <decimal>

The quantity requested. Required for all matchingType values.

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. two_way - Only the quantityRequested field is required. three_way (default) - The quantityRequested and quantityReceived fields are required. four_way - The quantityRequested, quantityReceived, and quantityAccepted 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
ExternalId (string) or null

The ID of the purchase order item within the ERP. If left unspecified when updating, it will be cleared.

Array of objects (DimensionRef)
status
string (PurchaseOrderLineItemStatus)
Enum: "open" "closed"

The status of the purchase order line item.

  • When status field is set to open, then its value is derived from the line item's remaining amount. If the line item's remaining amount is above 0, then it is considered open, otherwise it is considered closed.
  • When status is set to closed then the line item is considered closed, no matter the remaining amount.

Responses

Request samples

Content type
application/json
{
  • "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,
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "dimensions": [
    ],
  • "status": "open"
}

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "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": [
    ],
  • "invoiceItemsMatched": [
    ],
  • "status": "open"
}

Delete a purchase order's line item

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.

Authorizations:
BearerAuth
path Parameters
purchaseOrderLineItemId
required
string

The internal id or external id of the purchase order line item. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Close a purchase order's line item

Closes a purchase order's line item.

Authorizations:
BearerAuth
path Parameters
purchaseOrderLineItemId
required
string

The internal id or external id of the purchase order line item. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "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": [
    ],
  • "invoiceItemsMatched": [
    ],
  • "status": "open"
}

Opens a purchase order's line item

Opens a purchase order's line item.

Authorizations:
BearerAuth
path Parameters
purchaseOrderLineItemId
required
string

The internal id or external id of the purchase order line item. If using the external id, you must pass useSystem=external.

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "internalId": "string",
  • "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238",
  • "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": [
    ],
  • "invoiceItemsMatched": [
    ],
  • "status": "open"
}

Status

Status requests on the state of the Vic.ai system.

Health check

Use this request to obtain a health check statement.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "status": "PASS",
  • "version": "string",
  • "company": "string"
}

Tags

Tags are part of your ERP Masterdata, and represent business categories that are associated with certain entities, like Vendor.

Get a list of tags

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.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new tag

Create a new tag.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Create a tag.

value
required
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "value": "string"
}

Update a tag

Update a tag.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the tag

Request Body schema: application/json
required

Update a tag.

value
required
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "value": "string"
}

Delete a tag

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the tag

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Tax Codes

The tax codes.

Creates a company's tax code

Creates a company's tax code

Authorizations:
BearerAuth
Request Body schema: application/json

Create a tax code.

code
required
string <= 255 characters
description
required
string <= 255 characters
rate
required
string <decimal>

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "description": "Tax code description",
  • "rate": "0.25"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "code": "string",
  • "description": "Tax code description",
  • "rate": "0.25"
}

Get the list of tax codes for a company

Get the list of tax codes for a company

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "code": "string",
  • "description": "Tax code description",
  • "rate": "0.25"
}

Users

Managing users in the Vic system. You are allowed to add and remove users from companies and organizations along with managing some of their attributes. However, you are not allowed edit a user's email. This is currently a limitation of the system.

If a user is already created and you wish to add it to a company or organization, use the following operations to add them.

  • POST /v2/organizations/{organization_id}/users/attach
  • POST /v2/companies/{company_id}/users/attach

List users attached to an organization

List users attached to an organization.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the Organization.

query Parameters
name
string

The name of the user. This is a case-insensitive match.

name_contains
string

The name of the user contains the value specified. This is a case-insensitive match.

email
string

The user has the email address. This is a case-insensitive match.

email_contains
string

The email of the user contains the value specified. This is a case-insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create and attach user to an organization

Create and attach a user to an organization. If the user already exists, use the attachUserToOrganizationV2 (POST /v2/organizations/{organization_id}/users/attach) operation instead.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the organization.

Request Body schema: application/json

Create a user and attach it to an organization.

first_name
string

The first name of the user.

last_name
string

The last name of the user.

name
required
string

The full preferred name of the user.

phone_number
string

The phone number the user is connected with. This is not required to be set. If provided, the phone number is validated.

email
required
string

The User's email. Must be unique.

timezone
string (TimeZoneV2)
language
string (LanguageV2)

The two letter code for the language used.

object (UserAddressV2)
Array of objects (UserMetadataEntryV2)
date_of_birth
string <date>

When the user was born.

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "name": "string",
  • "phone_number": "string",
  • "email": "string",
  • "timezone": "Etc/UTC",
  • "language": "en",
  • "address": {
    },
  • "metadata": [
    ],
  • "date_of_birth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "organization_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Attach an existing user to an organization

Attaches an existing user to an organization. You may provide the user_id or email. If the user does not exist, you will need to use the createOrganizationUserV2 operation.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the organization.

Request Body schema: application/json

Attach an existing user to an organization.

user_id
string <uuid>

The User's id. Both can be provided. user_id takes higer precedence than email.

email
string

The existing User's email. Both can be provided. user_id takes higer precedence than email.

Responses

Request samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "organization_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Remove user from organization

Removes the user from the organization. NOTE: This will remove the user from ALL of the companies within the organization.

Authorizations:
BearerAuth
path Parameters
organization_id
required
string <uuid>

The ID of the organization.

user_id
required
string <uuid>

The ID of the user.

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

List or search for users attached to the company

List or search for users attached to the company

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

query Parameters
name
string

The name of the user. This is a case-insensitive match.

name_contains
string

The name of the user contains the value specified. This is a case-insensitive match.

email
string

The user has the email address. This is a case-insensitive match.

email_contains
string

The email of the user contains the value specified. This is a case-insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create and attach user to company

Create and attach a user to a company. If the user already exists, use the attachUserToCompanyV2 (POST /v2/companies/{company_id}/users/attach) operation instead.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

Request Body schema: application/json

Create a user and attach it to a company.

first_name
string

The first name of the user.

last_name
string

The last name of the user.

name
required
string

The full preferred name of the user.

phone_number
string

The phone number the user is connected with. This is not required to be set. If provided, the phone number is validated.

email
required
string

The User's email. Must be unique.

timezone
string (TimeZoneV2)
language
string (LanguageV2)

The two letter code for the language used.

object (UserAddressV2)
Array of objects (UserMetadataEntryV2)
date_of_birth
string <date>

When the user was born.

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "name": "string",
  • "phone_number": "string",
  • "email": "string",
  • "timezone": "Etc/UTC",
  • "language": "en",
  • "address": {
    },
  • "metadata": [
    ],
  • "date_of_birth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "company_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Attach an existing user to a company

Attaches an existing user to a company. You may provide the user_id or email. If the user does not exist, you will need to use the createCompanyUserV2 operation.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

Request Body schema: application/json

Attach an existing user to a company.

user_id
string <uuid>

The User's id. Both can be provided. user_id takes higer precedence than email.

email
string

The existing User's email. Both can be provided. user_id takes higer precedence than email.

Responses

Request samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "company_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Remove user from company

Removes the user from the company. This does not remove them from the organization, even when the user is not attached to any companies within the organization.

Authorizations:
BearerAuth
path Parameters
company_id
required
string <uuid>

The ID of the company.

user_id
required
string <uuid>

The ID of the user.

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

List users

List users accessible in the system. The users accessible will be those that are attached to organizations that have granted access to your client.

Authorizations:
BearerAuth
query Parameters
name
string

The name of the user. This is a case-insensitive match.

name_contains
string

The name of the user contains the value specified. This is a case-insensitive match.

email
string

The user has the email address. This is a case-insensitive match.

email_contains
string

The email of the user contains the value specified. This is a case-insensitive match.

object (PaginationV2)

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Get a user

Get a user

Authorizations:
BearerAuth
path Parameters
user_id
required
string <uuid>

The ID of the user.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a user

Update a user with the data provided. If fields are omitted, they will be considered null and will be cleared. If you do not wish to clear these values, please provide everything.

Note: A user's email is not allowed to be updated over the API. If a user's email must be changed, please use the Web UI or contact support about this.

Authorizations:
BearerAuth
path Parameters
user_id
required
string <uuid>

The ID of the user.

Request Body schema: application/json

Updates a user.

This is a full replacement operation. All fields unspecified will be treated as if they were null and will be cleared on the user. When updating a user, please provide all fields and their values.

first_name
string

The first name of the user.

last_name
string

The last name of the user.

name
required
string

The full preferred name of the user.

phone_number
string

The phone number the user is connected with. This is not required to be set. If provided, the phone number is validated.

timezone
string (TimeZoneV2)
language
string (LanguageV2)

The two letter code for the language used.

object (UserAddressV2)
Array of objects (UserMetadataEntryV2)
date_of_birth
string <date>

When the user was born.

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "name": "string",
  • "phone_number": "string",
  • "timezone": "Etc/UTC",
  • "language": "en",
  • "address": {
    },
  • "metadata": [
    ],
  • "date_of_birth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

VAT Codes

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.

List all VAT codes

Use this request to query all the VAT code data that are stored in Vic.ai.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Synchronize Vat Codes

Tells the ERP to synchronize the Vat Code resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Info for a specific VAT code

Use this request to get data for a single VAT code that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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"
}

Upserts a VAT code

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Request Body schema: application/json
required
code
string <= 255 characters
description
string <= 255 characters
ExternalId (string) or null
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

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "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"
}

Deletes a VAT code

Use this request to delete data for a single VAT code that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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

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.

List all vendors

Use this request to query the vendor data that are stored in Vic.ai.

Authorizations:
BearerAuth
query Parameters
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 SinceIsExternal) the format is UTC.

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.

  • PENDING - The vendor is not confirmed, has no errors, and was not predicted. It is pending to be confirmed.
  • ACTIVE - The vendor is confirmed and has no errors.
  • PREDICTED - The vendor was predicted by Vic.
  • ERRORED - The vendor has errors set.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Synchronize Vendors

Tells the ERP to synchronize the Vendor resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Info for a specific vendor

Use this request to get data for a single vendor that is stored in Vic.ai.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "defaultPaymentInfo": {
    },
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
  • "externalData": { },
  • "errors": [
    ]
}

Upserts a vendor

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.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

header Parameters
X-Request-Id
string <uuid>

token to be able to correctly log associated requests

Request Body schema: application/json
required
ExternalId (string) or null
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 PaymentTerm a vendor uses.

string or null

The VendorGroup id the vendor is attached to.

ExternalData (object) or null
Array of objects (VendorManager)
Array of objects (VendorRemoteError)

The errors that occurred in the external ERP system.

Responses

Request samples

Content type
application/json
{
  • "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": {
    },
  • "defaultPaymentInfo": {
    },
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
  • "externalData": { },
  • "managers": [
    ],
  • "errors": [
    ]
}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "defaultPaymentInfo": {
    },
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
  • "externalData": { },
  • "errors": [
    ]
}

Deletes a vendor

Use this request to delete data for a single vendor that is stored in Vic.ai

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "defaultPaymentInfo": {
    },
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
  • "externalData": { },
  • "errors": [
    ]
}

Completes the response callback cycle resulting from a 202

Use this post to report vendor update failure errors back to Vic.ai. Strictly a response to the callbacks.

  • The X-Request-Id header is required.
  • The id MUST be a Vendor internalId.
Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

header Parameters
X-Request-Id
string <uuid>

token to be able to correctly log associated requests

Request Body schema: application/json
required
required
Array of objects (VendorRemoteError)

Responses

Request samples

Content type
application/json
{
  • "errors": [
    ]
}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "defaultPaymentInfo": {
    },
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
  • "externalData": { },
  • "errors": [
    ]
}

Clears errors on the Vendor.

Used to clear errors that have been fixed in the ERP system.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the database entry

query Parameters
useSystem
string
Default: "EXTERNAL"
Enum: "INTERNAL" "EXTERNAL" "internal" "external"

Which system to use for id or updatedAt filters.

header Parameters
X-Request-Id
string <uuid>

token to be able to correctly log associated requests

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "defaultPaymentInfo": {
    },
  • "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b",
  • "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d",
  • "externalData": { },
  • "errors": [
    ]
}

List all vendor groups

List all vendor groups.

Authorizations:
BearerAuth
query Parameters
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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a vendor group

Create a vendor group.

Authorizations:
BearerAuth
Request Body schema: application/json

Create a vendor group.

name
required
string

The name of the vendor group

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Update the vendor group

Update the vendor group.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

The id of the vendor group

Request Body schema: application/json

Update a vendor group.

name
required
string

The name of the vendor group

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Delete vendor group

Delete vendor group.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

The id of the vendor group

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Vendor Groups

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.

List all vendor groups

List all vendor groups.

Authorizations:
BearerAuth
query Parameters
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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a vendor group

Create a vendor group.

Authorizations:
BearerAuth
Request Body schema: application/json

Create a vendor group.

name
required
string

The name of the vendor group

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Update the vendor group

Update the vendor group.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

The id of the vendor group

Request Body schema: application/json

Update a vendor group.

name
required
string

The name of the vendor group

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Delete vendor group

Delete vendor group.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

The id of the vendor group

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Vendor Tags

Vendor tags are used to categorize vendors using tags.

Get a list of vendor tags

Get a list of vendor tags.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new vendor tag

Create a new vendor tag. A vendor is not allowed to have the same tag attached multiple times.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Create a vendor tag.

vendorId
required
string
tagId
required
string

Responses

Request samples

Content type
application/json
{
  • "vendorId": "string",
  • "tagId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "vendorId": "string",
  • "tagId": "string"
}

Delete a vendor tag

Delete a vendor tag.

Authorizations:
BearerAuth
path Parameters
id
required
string

The id of the vendor tag

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Synchronizing

Synchronization is explicit and it is up to the integration to call each resource in the order deemed appropriate.

When calling any synchronization functions. Care must be taken by the integration to not get itself into ping-pong call loop. For instance, if an api call synchronizes a resource, then the webhook handler should not call a different resource synchronize function.

Synchronize Accounts

Tells the ERP to synchronize the Account resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Synchronize Dimensions

Tells the ERP to synchronize the Dimension resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Synchronize Vendors

Tells the ERP to synchronize the Vendor resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Synchronize Vat Codes

Tells the ERP to synchronize the Vat Code resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Synchronize Purchase Orders

Tells the ERP to synchronize the Purchase Orders resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Synchronize Payment Terms

Tells the ERP to synchronize the Payment Terms resource. If the ERP is using the API, the call will be sent via the normal webhook methods. If the ERP is not using this API then this will call the native integration's synchronize functionality.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 100,
  • "message": "string"
}

Webhooks

Subscriptions

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.

Create and Update Subscription

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"]
}'

Unsubscribe

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'

Events

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

Event Details

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.

  • All 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.
  • All other 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.
  • All 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.
  • All events retried will be reattempted at least 5 times.

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.

Payment Batch Processed

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"
        },
      }
    ]
  }
}

Get current webhook subscription

Get the current webhook subscription if one exists.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{}

Create new webhook subscription

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.

Authorizations:
BearerAuth
Request Body schema: application/json
required
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 ["all"]. If you are updating the subscription and wish to leave the events subscribed to alone, this field should be left unspecified or null.

Responses

Callbacks

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Callback payload samples

Callback
Content type
application/json
{
  • "event": "all",
  • "data": {
    }
}

Delete webhook subscription

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.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
"OK"

Changelog

Changes made to the Vic api system are logged here.

2024-11-07

  • Add amountMatched to #/components/schemas/MatchItem

2024-10-07

  • Add externalId to #/components/schemas/PurchaseOrderLineItem
  • Reuse #/components/schemas/ExternalId on objects that have an externalId defined.

2024-10-03

  • Add PurchaseOrderLineItem status component and fields to related components.
    • Add #/components/schemas/PurchaseOrderLineItemStatus.
    • Add status to #/components/schemas/CreatePurchaseOrderLineItem.
    • Add status to #/components/schemas/UpdatePurchaseOrderLineItem.
    • Add status to #/components/schemas/PurchaseOrderLineItem.

2024-09-30

  • Add ability to manage a user's metadata.
  • Added metadata to #/components/schemas/UserV2.
  • Added metadata to #/components/schemas/CreateUserV2.
  • Added metadata to #/components/schemas/UpdateUserV2.

2024-09-27

  • Add GET /v2/organizations/{organization_id}/users lists all users within an organization.
  • Add POST /v2/organizations/{organization_id}/users creates and attaches a new user to the organization.
  • Add POST /v2/organizations/{organization_id}/users/attach to attach an existing user to an organization.
  • Add GET /v2/companies/{organization_id}/users to list all users attached to a company.
  • Add POST /v2/companies/{organization_id}/users to create a new user and attach it to the company.
  • Add POST /v2/companies/{organization_id}/users/attach to attach an existing user to an organization.
  • Add GET /v2/users to list all accessible users.
  • Add GET /v2/users/{user_id} to fetch a user.
  • Add PUT /v2/users/{user_id} to update an existing user.

2024-09-23

  • Mark amount on #/components/schemas/InvoiceLineItem as deprecated. Please use lineItemTotal.
  • Add Purchase Order type component and fields to related components.
    • Add #/components/schemas/PurchaseOrderType.
    • Add type to #/components/schemas/CreatePurchaseOrder.
    • Add type to #/components/schemas/UpdatePurchaseOrder.
    • Add type to #/components/schemas/PurchaseOrder.
  • Introduce the "Organization" concept. We are beginning a migration from the old "Account Firm" concept to a more generic "Organization" concept.
  • Add GET /v2/organizations/{organization_id} to fetch a single organization.
  • Add GET /v2/organizations to search and list available organizations.

2024-08-27

  • Add acceptedAt to #/components/schemas/Payment.
  • Add acceptedAt to #/components/schemas/Credit.
  • Fix incorrect documentation for PO Match types.
    • FOUR_WAY renamed to four_way
    • THREE_WAY renamed to three_way
    • TWO_WAY renamed to two_way
  • Add POST - /v0/accounts/synchronize to synchronize GL Accounts.
  • Add POST - /v0/dimensions/synchronize to synchronize Dimensions.
  • Add POST - /v0/paymentTerms/synchronize to synchronize Payment Terms.
  • Add POST - /v0/purchaseOrders/synchronize to synchronize Purchase Orders.
  • Add POST - /v0/vatCodes/synchronize to synchronize Vat Codes.
  • Add POST - /v0/vendors/synchronize to synchronize Vendors.
  • Add GET - /v0/paymentTerms/{id} to fetch a payment term using the internal id or external id if useSystem=external is passed.
  • Add support for useSystem=external for updatePaymentTerm and deletePaymentTerm.
  • Add support for useSystem=external for getPurchaseOrder, updatePurchaseOrder, deletePurchaseOrder, getPurchaseOrderItem, and deletePurchaseOrderItem

2024-07-09

  • Add number to #/components/schemas/CreateInvoiceLineItem
  • Add number to #/components/schemas/InvoiceLineItem
  • Add number to #/components/schemas/TrainingInvoiceLineItemUpsert
  • Add amountTax to #/components/schemas/TrainingInvoiceLineItemUpsert
  • Add unitPrice to #/components/schemas/CreateInvoiceLineItem
  • Add unitPrice to #/components/schemas/TrainingInvoiceLineItemUpsert
  • Add siteOwner to #/components/schemas/CreatePurchaseOrder
  • Add siteOwner to #/components/schemas/UpdatePurchaseOrder
  • Add taxCode to #/components/schemas/InvoiceLineItem
  • Add taxCodeId to #/components/schemas/TrainingInvoiceLineItemUpsert

2024-05-24

  • Add vatRate to #/components/schemas/InvoiceLineItemInfo.
  • Add totalAmount to #/components/schemas/CreateInvoice.
  • Add totalAmount to #/components/schemas/TrainingInvoiceUpsert.
  • Add settlementAmount to #/components/schemas/Payment.
  • Add settlementAmount to #/components/schemas/Credit.
  • Add settlementCurrencyId to #/components/schemas/Payment.
  • Add settlementCurrencyId to #/components/schemas/Credit.
  • Add exchangeRate to #/components/schemas/Credit.
  • Add exchangeRate to #/components/schemas/Payment.
  • Fix incorrect documentation for #/components/schemas/LineItemVat.
  • Fix incorrect documentation for #/components/schemas/CreateInvoiceLineItem.
  • Fix incorrect documentation for #/components/schemas/TrainingInvoiceLineItemUpsert.
  • Add #/components/schemas/VendorLookupByInternalId.
  • Add #/components/schemas/VendorLookupByExternalId.
  • Add #/components/schemas/VendorLookupByName.
  • Add #/components/schemas/VendorLookupByOrgNumberAndBankAccount.
  • Add #/components/schemas/VendorLookupByOrgNumber.
  • Replace #/components/schemas/VendorLookup to be one of the new vendor look ups.
  • Upgrade OpenAPI Spec to 3.1.0.

2024-01-05

  • Added rate to #/components/schemas/LineItemVat
  • Added paymentTermId to #/components/schemas/Invoice
  • Fixed missing internalUpdateAt and externalUpdatedAt to #/components/schemas/Invoice.
  • Fixed missing externalUpdatedAt to #/components/schemas/TrainingInvoice.
  • Clarified descriptions for internalUpdatedAt and externalUpdatedAt fields.

2023-11-27

  • Added listPurchaseOrders operation.
  • Added refNumber to TrainingInvoiceUpsert required fields.
  • Changed issuedOn to be non nullable for #/components/schemas/CreateInvoiceLineItem.
  • Removed costAccountExternalId from TrainingInvoiceUpsert required fields.
  • Renamed #/components/schemas/VendorRef to #/components/schemas/VendorLookup.
  • Added new #/components/schemas/InvoiceRef.
  • Added new #/components/schemas/CostAccountRef.
  • Added new #/components/schemas/VendorRef.
  • Added new #/components/schemas/PaymentStatus.
  • Added new #/components/schemas/CreditStatus.
  • Added new #/components/schemas/PaymentBatchStatus.
  • Added new #/components/schemas/Payment.
  • Added new #/components/schemas/Credit.
  • Added new #/components/schemas/PaymentBatch.
  • Added listPaymentBatches operation.
  • Added getPaymentBatch operation.

2023-08-08

  • Added paymentTermId to #/components/schemas/Vendor.
  • Added paymentTermId to #/components/schemas/VendorUpsert.
  • Added paymentTermId to #/components/schemas/VendorCallback.

2023-08-07

  • Allow nullable productNumber for #/components/schemas/CreatePurchaseOrderItem.
  • Allow nullable productNumber for #/components/schemas/CreatePurchaseOrderLineItem.
  • Allow nullable productNumber for #/components/schemas/UpdatePurchaseOrderLineItem.
  • Allow nullable productNumber for #/components/schemas/PurchaseOrderLineItem.
  • Fix definition of requestor for #/compnents/schemas/CreatePurchaseOrder to be a PurchaseOrderRequestor object.
  • Added selfAssessedUseTaxAmount to #/components/schemas/Invoice.
  • Added selfAssessedUseTaxAccount to #/components/schemas/Invoice.
  • Added createTaxCode operation.
  • Added getTaxCodes operation.

2023-06-07

  • Replaced bolNumber with bolNumbers for #/components/schemas/Invoice.
  • Replaced bolNumber with bolNumbers for #/components/schemas/TrainingInvoice.
  • Replaced bolNumber with bolNumbers for #/components/schemas/CreateInvoice.
  • Replaced bolNumber with bolNumbers for #/components/schemas/TrainingInvoiceUpsert.
  • Added typeName to #/components/schemas/Dimension.
  • Added typeName to #/components/schemas/DimensionUpsert.
  • Added support for managing payment terms.

2023-05-24

  • Removed pattern constraint from #/components/schemas/Account.
  • Removed pattern constraint from #/components/schemas/AccountUpsert.
  • Removed pattern constraint from #/components/schemas/CostAccountInfo.
  • Added #/components/schemas/VendorManager.
  • Allow passing managers (#/components/schemas/VendorManager) to #/components/schemas/VendorUpsert.

2023-05-23

  • Added new schema #/components/schemas/MatchItem.
  • Added poItemsMatched to #/components/schemas/ which is an array of MatchItems.
  • Added invoiceItemsMatched to #/components/schemas/PurchaseOrderLineItem which is an array of MatchItems.

2023-05-22

For managing tags:

  • Added GET /v0/tags to get all tags.
  • Added POST /v0/tag to create new tags.
  • Added PUT /v0/tag/{id} to update tags.
  • Added DELETE /v0/tag/{id} to delete tags.

For managing vendor tags:

  • Added GET /v0/vendorTags to get all vendor tags.
  • Added POST /v0/vendorTag to create new vendor tags.
  • Added DELETE /v0/vendorTag/{id} to delete vendor tags.

2023-05-12

  • Allow passing bolNumber (bill of lading number) to #/components/schemas/CreateInvoice, #/components/schemas/TrainingInvoice and #/components/schemas/TrainingInvoiceUpsert
  • Allow passing requestor (#/components/schemas/PurchaseOrderRequestor) to #/components/schemas/CreatePurchaseOrder and #/components/schemas/UpdatePurchaseOrder

2023-05-10

  • Allow negative values for quantityRequested, quantityReceived, quantityInvoiced, unitAmount, and lineItemTotal.

2023-05-05

  • Added lineNumber to #/components/schemas/CreatePurchaseOrderItem
  • Added lineNumber to #/components/schemas/PurchaseOrderItem
  • Renamed quantity to quantityRequested in #/components/schemas/CreatePurchaseOrderItem
  • Renamed quantity to quantityRequested in #/components/schemas/PurchaseOrderItem
  • Added quantityReceived to #/components/schemas/CreatePurchaseOrderItem
  • Added quantityReceived to #/components/schemas/PurchaseOrderItem
  • Added quantityInvoiced to #/components/schemas/InvoiceLineItem
  • Added quantityInvoiced to #/components/schemas/CreateInvoiceLineItem
  • Added quantityInvoiced to #/components/schemas/TrainingInvoiceLineItemUpsert
  • Added lineItemTotal to #/components/schemas/InvoiceLineItem
  • Added poLineNumber to #/components/schemas/InvoiceLineItem
  • Added poNumber to #/components/schemas/InvoiceLineItem
  • Renamed #/components/schemas/PurchaseOrderItem to #/components/schemas/PurchaseOrderLineItem
  • Changed vendor is now required for #/components/schemas/CreatePurchaseOrder
  • Changed vendor is now required for #/components/schemas/UpdatePurchaseOrder
  • Fixed missing externalId by adding it to #/components/schemas/Invoice

2023-03-28

  • Added accountNumber to #/components/schemas/CreateInvoice
  • Added servicePeriodStart to #/components/schemas/CreateInvoice
  • Added servicePeriodEnd to #/components/schemas/CreateInvoice
  • Added accountNumber to #/components/schemas/TrainingInvoiceUpsert
  • Added servicePeriodStart to #/components/schemas/TrainingInvoiceUpsert
  • Added servicePeriodEnd to #/components/schemas/TrainingInvoiceUpsert

2023-03-23

  • Added createDimension operation.
  • invoiceTransfer callback will now receive the same payload as the invoicePost callback.
  • Added typeExternalId to #/components/schemas/DimensionRef.
  • Expanded documentation for #/components/schemas/DimensionRef.
  • Deprecated dimensionsExternalIds in #/components/schemas/TrainingInvoiceLineItemUpsert. Instead please use the dimensions field which has the same functionality as the createInvoice operation.

2023-03-13

  • Deprecate singular resource path names in favor of pluralized paths. Old paths will be supported for at least 6 months. We recommend changing to the newer paths as soon as possible.
  • Changed /v0/account/{id} to /v0/accounts/{id}
  • Changed /v0/dimension/{id} to /v0/dimensions/{id}
  • Changed /v0/invoice/{id}/confirm to /v0/invoices/{id}/confirm
  • Changed /v0/invoice/{id}/document to /v0/invoices/{id}/document
  • Changed /v0/invoice/{id}/lineItems to /v0/invoices/{id}/lineItems
  • Changed /v0/invoice/{id}/process to /v0/invoices/{id}/process
  • Changed /v0/invoice/{id}/reject to /v0/invoices/{id}/reject
  • Changed /v0/invoice/{id} to /v0/invoices/{id}
  • Changed /v0/trainingInvoice/{id}/document to /v0/trainingInvoices/{id}/document
  • Changed /v0/trainingInvoice/{id} to /v0/trainingInvoices/{id}
  • Changed /v0/vatCode/{id} to /v0/vatCodes/{id}
  • Changed /v0/vendor/{id}/errors to /v0/vendors/{id}/errors
  • Changed /v0/vendor/{id} to /v0/vendors/{id}
  • Add typeExternalId to #/components/schemas/Dimension.
  • Add typeExternalId to #/components/schemas/DimensionUpsert.
  • Changed set max length for type on #/components/schemas/Dimension.
  • Changed set max length for type on #/components/schemas/DimensionUpsert.
  • Changed set max length for name on #/components/schemas/Dimension.
  • Changed set max length for name on #/components/schemas/DimensionUpsert.
  • Changed name to be required for #/components/schemas/DimensionUpsert.

2023-02-01

  • Remove unused #/components/schemas/QueryCommon.
  • Remove unused #/components/schemas/UpsertCommon.
  • Rename #/components/schemas/CreateInvoiceVendor to #/components/schemas/VendorRef.
  • Add #/components/schemas/Currency to represent ISO-4217 codes.
  • Add POST /v0/purchaseOrders to create purchase orders.
  • Add GET /v0/purchaseOrders/{purchaseOrderId} to get a purchase order.
  • Add POST /v0/purchaseOrders/{purchaseOrderId}/process to start the matching process.
  • Add DELETE /v0/purchaseOrders/{purchaseOrderId} to delete purchase orders.

2023-01-25

  • Add #/components/schemas/PaymentInfoMethod enum.
  • Add #/components/schemas/InternationalBankAccount object.
  • Allow bic and iban to be nullable on #/components/schemas/InternationalBankAccount.
  • Fold #/components/schemas/PaymentInfoUS, #/components/schemas/PaymentInfoNO, and #/components/schemas/PaymentInfoSE into a single #/components/schemas/PaymentInfo definition.
  • Allow most #/components/schemas/PaymentInfo fields to be nullable.
  • Fold #/components/schemas/InvoiceLineItemInfoUS, #/components/schemas/InvoiceLineItemInfoSE, and #/components/schemas/InvoiceLineItemInfoNO into #/components/schemas/InvoiceLineItemInfo.
  • Allow #/components/schemas/InvoiceLineItemInfo fields to be nullable.
  • Allow invoiceLineItemInfo on #/components/schemas/TrainingInvoiceLineItemUpsert to be nullable.
  • Allow invoiceLineItemInfo on #/components/schemas/InvoiceLineItem to be nullable.
  • Remove required fields from #/components/schemas/Dimension.

2023-01-19

  • Lift all error responses to the #/components/responses section.
  • Replace obtainToken response with #/components/responses/TokenCreatedResponse
  • Replace healthCheck response with #/components/responses/HealthyResponse
  • Replace listAccounts response with #/components/responses/AccountsResponse
  • Replace getAccount response with #/components/responses/AccountResponse
  • Replace upsertAccount response with #/components/responses/AccountUpsertedResponse
  • Replace deleteAccount response with #/components/responses/AccountDeletedResponse
  • Replace listDimensions response with #/components/responses/DimensionsResponse
  • Replace getDimension response with #/components/responses/DimensionResponse
  • Replace upsertDimension response with #/components/responses/DimensionCreatedResponse and #/components/responses/DimensionUpdatedResponse
  • Replace deleteDimension response with #/components/responses/DimensionDeletedResponse
  • Replace listVendors response with #/components/responses/VendorsResponse
  • Replace getVendor response with #/components/responses/VendorResponse
  • Replace upsertVendor response with #/components/responses/VendorCreatedResponse and #/components/responses/VendorUpdatedResponse
  • Replace deleteVendor response with #/components/responses/VendorDeletedResponse
  • Replace setVendorRemoteErrors response with #/components/responses/VendorRemoteErrorsUpdatedResponse
  • Replace clearVendorRemoteErrors response with #/components/responses/VendorRemoteErrorsClearedResponse
  • Replace listInvoices response with #/components/responses/InvoicesResponse
  • Replace createInvoice response with #/components/responses/InvoiceCreatedResponse
  • Replace getInvoice response with #/components/responses/InvoiceResponse
  • Replace ackInvoice response with #/components/responses/InvoiceResponse
  • Replace deleteInvoice response with #/components/responses/InvoiceDeletedResponse
  • Replace startProcessingInvoice response with #/components/responses/InvoiceResponse
  • Replace getInvoiceDocument response with #/components/responses/InvoiceDocumentResponse
  • Replace confirmInvoice response with #/components/responses/InvoiceConfirmedResponse
  • Replace rejectInvoice response with #/components/responses/InvoiceRejectedResponse
  • Replace getInvoicelineItems response with #/components/responses/InvoiceLineItemsResponse
  • Replace listTrainingInvoices response with #/components/responses/TrainingInvoicesResponse
  • Replace upsertTrainingInvoice response with #/components/responses/TrainingInvoiceUpsertedResponse
  • Replace deleteTrainingInvoice response with #/components/responses/TrainingInvoiceDeletedResponse
  • Replace getTrainingInvoiceDocument response with #/components/responses/TrainingInvoiceDocumentResponse
  • Replace listVatCodes response with #/components/responses/VatCodesResponse
  • Replace getVatCode response with #/components/responses/VatCodeResponse
  • Replace upsertVatCode response with #/components/responses/VatCodeUpsertedResponse
  • Replace deleteVatCode response with #/components/responses/VatCodeDeletedResponse
  • Replace getSubscription response with #/components/responses/SubscriptionResponse
  • Replace subscribe response with #/components/responses/SubscriptionUpsertedResponse
  • Replace unsubscribe response with #/components/responses/SubscriptionDeletedResponse
  • Replace getCostAccounts response with #/components/responses/CostAccountsResponse

2023-01-18

  • Replace dimensions ref to #/components/schemas/Dimension.

2022-12-16

  • Removed requiredDimensionsExternal from #/components/schemas/Account.
  • Removed parentAccountExternalId from #/components/schemas/Account.
  • Removed requiredDimensionsInternal from #/components/schemas/Account.
  • Removed parentAccountInternalId from #/components/schemas/Account.
  • Removed requiredDimensionsExternal from #/components/schemas/AccountUpsert.
  • Removed parentAccountExternalId from #/components/schemas/AccountUpsert.
  • Removed parentDimensionExternalId from #/components/schemas/Dimension.
  • Removed parentDimensionInternalId from #/components/schemas/Dimension.
  • Removed parentDimensionExternalId from #/components/schemas/DimensionUpsert.

2022-12-15

  • Changed Account number to only permit the pattern ^\d+$.

2022-12-08

  • Added name to #/components/schemas/DimensionRef

2022-09-20

  • Added POST /v0/invoice/{id}/reject.
  • Added GET /v0/subscription to fetch the currently configued V0 subscription.
  • Added customFields to #/components/schemas/Invoice.

2022-09-02

  • Added description to #/components/schemas/Vendor.
  • Added VendorTaxInfo to #/components/schemas/VendorTaxInfo.
  • Removed #/components/schemas/TaxInfoUS. Has been combined to #/components/schemas/VendorTaxInfo.
  • Removed #/components/schemas/TaxInfoSE. Has been combined to #/components/schemas/VendorTaxInfo.
  • Removed #/components/schemas/TaxInfoNO. Has been combined to #/components/schemas/VendorTaxInfo.

2022-07-08

  • Added POST /v0/invoice/{id}/confirm to confirm invoices.

2022-07-05

  • Expand #/components/schemas/Account definition to use less inheritance.
  • Expand #/components/schemas/AccountUpsert definition to use less inheritance.
  • Expand #/components/schemas/Dimension definition to use less inheritance.
  • Expand #/components/schemas/DimensionUpsert definition to use less inheritance.
  • Expand #/components/schemas/Invoice definition to use less inheritance.
  • Expand #/components/schemas/InvoiceLineItem definition to use less inheritance.
  • Expand #/components/schemas/TrainingInvoice definition to use less inheritance.
  • Expand #/components/schemas/VatCode definition to use less inheritance.
  • Expand #/components/schemas/VatCodeUpsert definition to use less inheritance.
  • Expand #/components/schemas/Vendor definition to use less inheritance.
  • Expand #/components/schemas/VendorUpsert definition to use less inheritance.
  • Expand #/components/schemas/VendorConfirm definition to use less inheritance.
  • Expand #/components/schemas/VendorCallback definition to use less inheritance.
  • Removed #/components/schemas/AccountCommon.
  • Removed #/components/schemas/DimensionCommon.
  • Removed #/components/schemas/InvoiceCommon.
  • Removed #/components/schemas/InvoiceFetched.
  • Removed #/components/schemas/InvoiceRequirable.
  • Removed #/components/schemas/InvoiceLineItemCommon.
  • Removed #/components/schemas/VatCodeCommon.
  • Removed #/components/schemas/VatCodeRequirable.
  • Removed #/components/schemas/VendorRequirable.
  • Removed #/components/schemas/VendorCommon.

2022-06-22

  • Added DELETE /v0/invoice/{id} to delete an invoice.

2022-06-15

  • Added bban to #/components/schemas/PaymentInfoSE
  • Added bban to #/components/schemas/PaymentInfoNO
  • Added BBAN to the allowed enum for defaultMethod on #/components/schemas/PaymentInfoSE
  • Added BBAN to the allowed enum for defaultMethod on #/components/schemas/PaymentInfoNO

2022-06-10

  • Added source to #/components/schemas/Invoice.
  • Added vendor to #/components/schemas/Invoice.
  • Added paymentRef to #/components/schemas/Invoice.
  • Added paymentTerm to #/components/schemas/Invoice.
  • Added dimensions to #/components/schemas/InvoiceLineItem.
  • Added costAccount to #/components/schemas/InvoiceLineItem.
  • Added vat to #/components/schemas/InvoiceLineItem.
  • Added GET /v0/invoice/{id}/lineItems to fetch ungrouped line items.
  • Marked kid as deprecated in #/components/schemas/InvoiceInfoNO. The paymentRef field on #/components/schemas/Invoice should be used instead.
  • Marked dimensionsInternalIds as deprecated in #/components/schemas/InvoiceLineItem. Use dimensions instead.
  • Marked dimensionsExternalIds as deprecated in #/components/schemas/InvoiceLineItem. Use dimensions instead.
  • Marked costAccountInternalId as deprecated in #/components/schemas/InvoiceLineItem. Use costAccount instead.
  • Marked costAccountExternalId as deprecated in #/components/schemas/InvoiceLineItem. Use costAccount instead.

2022-06-09

  • Make vendorExternalId not required for #/components/schemas/Invoice.
  • Allow createInvoice to have lineItems specified.

2022-05-24

  • useSystem directive to startProcessingInvoice
  • useSystem directive to uploadDocumentInvoice
  • externalId is no longer required for createInvoice.
  • Added ability to filter vendors by state for GET /v0/vendors.
  • Added POST /v0/invoices to begin the creation of an invoice.
  • Added POST /v0/invoice/{id}/document to attach a document to an invoice.
  • Added POST /v0/invoice/{id}/process to notify Vic that the invoice may now start being processed.
  • Removed application/json request body from PUT /v0/trainingInvoice/{id}. All requests should just be multipart/form-data.

2022-05-18

  • Simplified Vendor.confirmedAt field.
  • Removed NullableInternalId. Replaced with allOf: ["#/components/schemas/InternalId"]; followed by a nullable: true.
  • Removed NullableExternalId. Replaced with allOf: ["#/components/schemas/ExternalId"]; followed by a nullable: true.
  • Removed NullableObject. Replaced with allOf: ["#/components/schemas/ExternalData"]; followed by a nullable: true.
  • Removed NullableString. Replaced with type: string; followed by a nullable: true.
  • Removed InvoiceInfoUS. No replacement added.
  • Removed InvoiceInfoSE. No replacement added.

2022-05-16

  • Simplified InvoiceCommon.invoiceInfo to reference InvoiceInfoNO
  • Removed extra VendorState definition.

2022-05-10

  • GET /v0/costAccounts - Ability to get all the CostAccount for a company.
  • Added 200 response to PUT /v0/vendor/{id} definition when the vendor has been updated, and 201 when the vendor has been created.

2022-05-04

  • Added errors to #/components/schemas/Vendor to convey errors that occurred in the ERP system.
  • POST /v0/vendor/{id}/errors - Ability to set errors on a vendor.
  • DELETE /v0/vendor/{id}/errors - Ability to clear errors on a vendor.
  • confirmedAt on #/components/schemas/Vendor are allowed to be null.